/* Guard app. Follows Shopify admin conventions (system font, grey ground,
   white cards, compact tables) so merchants recognise it. Light only, like
   the Shopify admin. */
:root {
  --soft-shadow: 0 0 0 1px rgba(17, 24, 20, 0.06), 0 1px 2px rgba(17, 24, 20, 0.04), 0 6px 18px rgba(17, 24, 20, 0.04);
  --accent: #1f6b4f; --accent-soft: #e6f2ec;
  --ground: #f1f1f1;
  --card: #ffffff;
  --ink: #303030;
  --muted: #616161;
  --faint: #8a8a8a;
  --line: #ebebeb;
  --edge: #e3e3e3;
  --head: #f7f7f7;
  --link: #005bd3;
  --brand: #1f3a2e;
  --warn-bg: #ffef9d;  --warn-ink: #4f4700;
  --review-bg: #e0f0ff; --review-ink: #00428c;
  --good-bg: #cdfee1;  --good-ink: #0c5132; --good-dot: #29845a;
  --calm-bg: #e3e3e3;  --calm-ink: #4a4a4a;
  --bad-bg: #fee9e8;   --bad-ink: #8e1f0b;
  --banner-bg: #fff1e3; --banner-edge: #ffd7b1;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: light; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "San Francisco", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 13px; line-height: 20px;
}
a { color: var(--link); }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.topbar { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 0 20px; min-height: 52px; background: var(--card); border-bottom: 1px solid var(--edge); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 14px; color: var(--ink); text-decoration: none; }
.brand-mark { display: inline-flex; width: 24px; height: 24px; border-radius: 6px; background: var(--brand); align-items: center; justify-content: center; }
.topnav { display: flex; gap: 4px; align-self: stretch; flex-wrap: wrap; }
.topnav a { display: flex; align-items: center; padding: 0 10px; color: var(--muted); text-decoration: none; }
.topnav a[aria-current="page"] { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--ink); }
/* Settings: a menu in the top bar on wider screens. */
.nav-group { position: relative; display: flex; align-items: stretch; }
.nav-more { display: flex; align-items: center; gap: 4px; padding: 0 10px; border: 0; background: none; color: var(--muted); font: inherit; cursor: pointer; }
.nav-more:hover, .topnav a:hover { color: var(--ink); }
.nav-more svg { transition: transform 0.15s; }
.nav-group.open .nav-more svg { transform: rotate(180deg); }
.nav-group.current .nav-more { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--ink); }
.nav-sub { display: none; }
.nav-group.open .nav-sub { display: flex; flex-direction: column; position: absolute; top: calc(100% + 4px); left: 0; z-index: 1000; min-width: 270px; padding: 4px; background: var(--card); border-radius: 10px; box-shadow: 0 0 0 1px var(--edge), 0 12px 32px rgba(0, 0, 0, 0.14), 0 2px 6px rgba(0, 0, 0, 0.06); animation: dd-in 0.12s ease-out; }
.topnav .nav-sub a { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 8px 10px; border-radius: 6px; color: var(--ink); box-shadow: none; }
.topnav .nav-sub a[hidden] { display: none; }
.topnav .nav-sub a b { font-weight: 600; }
.topnav .nav-sub a span { color: var(--muted); font-size: 12px; }
.topnav .nav-sub a:hover, .topnav .nav-sub a:focus-visible { background: var(--ground); outline: none; }
.topnav .nav-sub a[aria-current="page"] { background: var(--ground); box-shadow: inset 3px 0 0 var(--ink); font-weight: inherit; }
.spacer { flex: 1 1 auto; }
/* Dropdowns: one look everywhere, the same in Safari and Chrome (no native
   gloss), with a chevron and a clear focus ring. */
select {
  -webkit-appearance: none; appearance: none;
  height: 34px; padding: 0 34px 0 12px; max-width: 100%;
  border: 1px solid #d4d4d4; border-radius: 8px;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%23616161' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  font: inherit; font-weight: 550; color: var(--ink); cursor: pointer;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
  text-overflow: ellipsis;
}
select:hover { border-color: #b5b5b5; }
select:focus-visible { outline: none; border-color: var(--link); box-shadow: 0 0 0 2px rgba(0, 91, 211, 0.25); }
select:disabled { cursor: not-allowed; color: var(--muted); background-color: var(--head); }
select.is-open { border-color: var(--link); box-shadow: 0 0 0 2px rgba(0, 91, 211, 0.25); }
.select { min-width: 150px; }
/* The menu a dropdown opens (built in app.js), in the app's own font. */
.dd-menu { position: fixed; z-index: 1000; box-sizing: border-box; padding: 4px; overflow-y: auto; background: var(--card); color: var(--ink); border-radius: 10px; box-shadow: 0 0 0 1px var(--edge), 0 12px 32px rgba(0, 0, 0, 0.14), 0 2px 6px rgba(0, 0, 0, 0.06); font: inherit; font-size: 14px; animation: dd-in 0.12s ease-out; }
@keyframes dd-in { from { opacity: 0; transform: translateY(-4px); } }
.dd-option { display: flex; align-items: center; gap: 8px; padding: 7px 12px 7px 8px; border-radius: 6px; cursor: pointer; white-space: nowrap; line-height: 20px; }
.dd-option .check { width: 16px; height: 16px; flex: none; visibility: hidden; color: var(--ink); }
.dd-option[aria-selected="true"] { font-weight: 600; }
.dd-option[aria-selected="true"] .check { visibility: visible; }
.dd-option.active { background: var(--ground); }
.dd-option.disabled { color: var(--faint); cursor: default; }
@media (prefers-reduced-motion: reduce) { .dd-menu { animation: none; } }
.form .select, .rules-row select { width: 100%; }
/* The account picker in the top bar sits on white, so it gets a soft fill. */
.account-select { background-color: var(--ground); border-color: transparent; box-shadow: none; }
.account-select:hover { border-color: #d4d4d4; }

.page { max-width: 1200px; margin: 0 auto; padding: 20px 24px 48px; display: flex; flex-direction: column; gap: 16px; outline: none; }
.page.narrow { max-width: 1000px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.page-head h1 { margin: 0; font-size: 20px; line-height: 28px; font-weight: 700; }
.page-head .sub { color: var(--muted); }
.title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; white-space: nowrap; flex: none; height: 32px; padding: 0 14px; border: 0; border-radius: 8px; background: var(--card); color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; box-shadow: 0 0 0 1px #d4d4d4, inset 0 -1px 0 #cccccc; }
.btn.small { height: 30px; padding: 0 12px; }
.btn.primary { background: var(--ink); color: #fff; box-shadow: inset 0 -1px 0 #000; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.icon-btn { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 8px; color: var(--ink); }
.icon-btn:hover { background: var(--edge); }

.card { background: var(--card); border-radius: 12px; box-shadow: 0 0 0 1px var(--edge), 0 1px 0 rgba(0,0,0,0.05); }
.card.pad { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.card h2 { margin: 0; font-size: 14px; font-weight: 650; }
.card-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; }
.card-foot { padding: 10px 16px; border-top: 1px solid var(--line); background: var(--head); color: var(--muted); border-radius: 0 0 12px 12px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); font-size: 12px; }

.banner { display: flex; gap: 12px; padding: 12px 16px; border-radius: 12px; background: var(--banner-bg); box-shadow: 0 0 0 1px var(--banner-edge); }
.banner.info { background: #eaf4ff; box-shadow: 0 0 0 1px #c8e1ff; }
.banner.bad { background: var(--bad-bg); box-shadow: 0 0 0 1px #fdc4bd; color: var(--bad-ink); }
.banner strong { font-weight: 650; display: block; }
.banner .banner-actions { display: flex; gap: 12px; align-items: center; margin-top: 6px; flex-wrap: wrap; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 8px; font-size: 12px; font-weight: 550; white-space: nowrap; }
.badge.warn { background: var(--warn-bg); color: var(--warn-ink); }
.badge.review { background: var(--review-bg); color: var(--review-ink); }
.badge.good { background: var(--good-bg); color: var(--good-ink); }
.badge.calm { background: var(--calm-bg); color: var(--calm-ink); }
.badge.bad { background: var(--bad-bg); color: var(--bad-ink); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.good .dot { background: var(--good-dot); }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs { display: flex; gap: 2px; flex-wrap: wrap; }
.tab { height: 28px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: inherit; font-weight: 550; cursor: pointer; }
.tab[aria-selected="true"] { background: var(--edge); color: var(--ink); font-weight: 600; }
.tab .n { color: var(--faint); margin-left: 4px; }
.search { height: 28px; min-width: 200px; border: 1px solid #d4d4d4; border-radius: 8px; padding: 0 10px; font: inherit; }

.table-wrap { overflow-x: auto; }
table.index { width: 100%; min-width: 1080px; border-collapse: collapse; }
table.index th { background: var(--head); color: var(--muted); font-weight: 550; text-align: left; padding: 8px 12px; white-space: nowrap; }
table.index td { padding: 8px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
table.index tr.row { cursor: pointer; }
table.index tr.row:hover td { background: #fafafa; }
table.index .num { text-align: right; font-variant-numeric: tabular-nums; }
.av-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.thumb { flex: none; width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--edge); background: var(--head); object-fit: cover; display: inline-flex; align-items: center; justify-content: center; }
.ad-name { color: var(--ink); font-weight: 600; text-decoration: none; }
.ad-name:hover { text-decoration: underline; }
.edits { color: var(--ink); max-width: 260px; }
.link-btn { all: unset; cursor: pointer; color: var(--ink); font-weight: 600; }
.link-btn:hover { text-decoration: underline; }
.link-btn:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
table.index tfoot td { border-top: 1px solid #c9c9c9; background: var(--head); font-variant-numeric: tabular-nums; }
.badge a { color: inherit; text-decoration: none; margin-left: 4px; }
.empty { padding: 40px 16px; text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 8px; align-items: center; }
.empty strong { color: var(--ink); font-size: 14px; }

.columns { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.col-main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.col-side { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.creative { display: flex; gap: 16px; flex-wrap: wrap; }
.creative img, .creative .ph { width: 168px; max-width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 8px; border: 1px solid var(--edge); background: var(--head); }
.creative .ph { display: flex; align-items: center; justify-content: center; color: var(--faint); }
dl.facts { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }
.list-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 12px 16px; border-top: 1px solid var(--line); }
.list-row .text { display: flex; flex-direction: column; min-width: 0; }
.list-row .name { font-weight: 600; }
.history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.history li { display: flex; flex-direction: column; gap: 2px; }
.history li + li { padding-top: 12px; border-top: 1px solid var(--line); }

.rules-row { display: grid; grid-template-columns: minmax(0, 1fr) 160px; gap: 16px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); }

.rules-row .changed { color: var(--link); font-size: 12px; }
@media (max-width: 560px) { .rules-row { grid-template-columns: 1fr; } }

.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.code { display: flex; gap: 8px; align-items: center; background: var(--head); border: 1px solid var(--edge); border-radius: 8px; padding: 8px 10px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; overflow-x: auto; }
.code code { flex: 1; white-space: nowrap; }
.form { display: flex; flex-direction: column; gap: 12px; max-width: 420px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-weight: 550; }
.field input { height: 32px; border: 1px solid #8a8a8a; border-radius: 8px; padding: 0 10px; font: inherit; }
.field .help { color: var(--muted); font-size: 12px; }
.error { color: var(--bad-ink); }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; font-weight: 550; box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.toast.error { background: var(--bad-ink); }

/* Ad page */
.crumbs { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; color: var(--faint); padding-left: 36px; }
.link-btn.quiet { color: var(--muted); font-weight: 500; }
.stats { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-left: 1px solid var(--line); min-width: 0; }
.stat:first-child { border-left: 0; }
.stat-label { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-value { font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; }
.stats-foot { grid-column: 1 / -1; }
@media (max-width: 1000px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } .stat { border-left: 0; border-top: 1px solid var(--line); } }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.editor { gap: 14px; }
.field-ro { display: flex; flex-direction: column; gap: 4px; }
.field-label { font-weight: 550; }
.option { font-size: 12px; color: var(--faint); margin-top: 4px; }
.field-box { border: 1px solid #d4d4d4; border-radius: 8px; padding: 7px 10px; background: #fafafa; overflow-wrap: anywhere; }
.field-box.multiline { white-space: pre-wrap; }
.field-box.empty-value { color: var(--faint); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.media-item { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.media-item img, .media-item video { width: 100%; max-height: 420px; object-fit: contain; background: #111; border-radius: 8px; border: 1px solid var(--edge); display: block; }
.media-item figcaption { color: var(--muted); font-size: 12px; }
.pv { border: 1px solid var(--edge); border-radius: 10px; overflow: hidden; background: #fff; }
.pv-head { display: flex; gap: 8px; align-items: center; padding: 10px 12px; }
.pv-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.pv-text { margin: 0; padding: 0 12px 10px; white-space: pre-wrap; }
.pv-media { display: block; width: 100%; max-height: 520px; object-fit: contain; background: #111; }
.pv-empty { height: 160px; display: flex; align-items: center; justify-content: center; color: var(--faint); background: var(--head); }
.pv-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; background: var(--head); }
.pv-domain { font-size: 11px; letter-spacing: 0.02em; }
.pv-headline { font-weight: 650; }
.pv-desc { font-size: 12px; }
.pv-cta { flex: none; background: var(--edge); border-radius: 6px; padding: 6px 12px; font-weight: 600; }


.btn.fb-btn { background: #1877f2; color: #fff; box-shadow: inset 0 -1px 0 #0d5bc6; }
details.card > summary { cursor: pointer; font-weight: 650; font-size: 14px; }
.check { display: flex; gap: 8px; align-items: center; padding: 3px 0; font-weight: 400; flex-wrap: wrap; }
.field .check input { height: auto; padding: 0; margin: 0; }

/* Event health */
.check-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; }
.kv { display: flex; justify-content: space-between; gap: 12px; }
.bar { display: block; height: 6px; border-radius: 3px; background: var(--edge); overflow: hidden; }
.bar span { display: block; height: 100%; background: #29845a; }

/* Audit report: a letter-size document that prints cleanly. */
.report { background: #fff; width: 100%; max-width: 816px; margin: 0 auto; padding: 56px 64px; box-shadow: 0 0 0 1px var(--edge); font-size: 14px; line-height: 1.5; color: #1a1a1a; display: flex; flex-direction: column; gap: 20px; }
.report h1 { margin: 0; font-size: 26px; line-height: 1.2; }
.report h2 { margin: 0; font-size: 16px; }
.report table { width: 100%; border-collapse: collapse; font-size: 13px; }
.report th { text-align: left; color: var(--muted); font-weight: 600; padding: 6px 8px 6px 0; border-bottom: 1px solid #1a1a1a; }
.report td { padding: 8px 8px 8px 0; border-bottom: 1px solid var(--edge); vertical-align: middle; }
.report .letterhead { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.report .letterhead b { color: #1a1a1a; }
.report .foot { color: var(--muted); font-size: 12px; border-top: 1px solid var(--edge); padding-top: 12px; }
@media print {
  .topbar, .no-print { display: none !important; }
  body { background: #fff; }
  .page { padding: 0; max-width: none; }
  .report { box-shadow: none; padding: 0; max-width: none; }
}
@media (max-width: 600px) { .page { padding: 16px; } .report { padding: 24px 20px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.connected-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.connected-row:last-of-type { border-bottom: 0; }

.legal { line-height: 1.6; font-size: 14px; }
.legal h1 { margin-bottom: 0; }
.legal h2 { font-size: 15px; margin: 24px 0 6px; }
.legal p, .legal ul, .legal ol { margin: 0 0 10px; }

.fix-row { align-items: flex-start; }
.fix-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* Insights */
.section-h { font-size: 15px; margin: 8px 0 0; }
.card-title-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card-title-row h2, .card.pad > h2 { margin: 0; font-size: 14px; }
.action { gap: 8px; }
.action-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.action-n { width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 650; flex: none; }
.action-name { min-width: 0; overflow-wrap: anywhere; }
.action-impact { margin-left: auto; }
.action-why { margin: 0; }
.action-do ol, .evidence { margin: 4px 0 0; padding-left: 20px; }
.action-do li, .evidence li { margin: 2px 0; }
.ai-note { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; background: #f4f6fb; }
.ai-note .badge { flex: none; }
.ai-headline { margin: 0; font-weight: 650; font-size: 14px; }
.action details summary, .card details summary { cursor: pointer; color: var(--muted); }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.funnel-row { display: grid; grid-template-columns: 170px 1fr 56px 70px; gap: 8px; align-items: center; }
.funnel-row .bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.funnel-row .bar i { display: block; height: 100%; background: var(--good-dot); }
.funnel-row.weak .bar i { background: #e51c00; }
.funnel-row.weak b { color: var(--bad-ink); }
.funnel-row b { text-align: right; font-variant-numeric: tabular-nums; }
.targets { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.targets label { display: flex; flex-direction: column; gap: 2px; color: var(--muted); font-size: 12px; }
.targets input { width: 120px; height: 30px; padding: 0 8px; border: 1px solid #d4d4d4; border-radius: 8px; font: inherit; }
.ask { display: flex; gap: 8px; align-items: flex-end; }
.ask textarea { flex: 1; padding: 8px; border: 1px solid #d4d4d4; border-radius: 8px; font: inherit; resize: vertical; }
#ask-a p { margin: 6px 0; }
@media (max-width: 640px) { .funnel-row { grid-template-columns: 1fr 48px; } .funnel-row .bar, .funnel-row .faint { display: none; } .ask { flex-direction: column; align-items: stretch; } }

/* Reporting table: a wide name column that stays put while the numbers scroll */
table.index.reporting { min-width: 1180px; }
.page.wide { max-width: 1440px; }
table.index.reporting th, table.index.reporting td { padding: 10px 10px; white-space: nowrap; }
table.index.reporting th.num { font-size: 12px; }
table.index.reporting .name-col { position: sticky; left: 0; z-index: 1; width: 300px; min-width: 260px; max-width: 320px; white-space: normal; background: var(--card); box-shadow: 1px 0 0 var(--line), inset 0 1px 0 var(--line); }
table.index.reporting thead .name-col, table.index.reporting tfoot .name-col { background: var(--head); }
table.index.reporting tbody tr:hover td { background: #fafafa; }
table.index.reporting tbody tr:hover .name-col { background: #fafafa; }
.name-stack { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.row-name, .name-stack .ad-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 18px; overflow-wrap: anywhere; }
.name-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.budget { color: var(--muted); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.index.reporting td.roas { font-weight: 650; }
@media (max-width: 640px) {
  table.index.reporting .name-col { width: 150px; min-width: 150px; max-width: 150px; }
  table.index.reporting .av-cell .thumb { display: none; }
  .row-name, .name-stack .ad-name { -webkit-line-clamp: 3; font-size: 12px; }
}

/* Busy buttons and the connected-accounts view */
.spinner { display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2s; } }
.btn[aria-busy="true"] { cursor: progress; opacity: 0.85; }
.connected-card { gap: 12px; }
.connected-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.connected-head > div { display: flex; align-items: center; gap: 8px; }
.connected-head h2 { margin: 0; font-size: 15px; }
.connected-list { display: grid; grid-template-columns: 210px 1fr; gap: 6px 12px; margin: 0; }
.connected-list dt { color: var(--muted); }
.connected-list dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 480px) { .connected-list { grid-template-columns: 1fr; } .connected-list dd { margin-bottom: 6px; } }

/* Top bar on phones: logo, account and a Menu button on one row; the links
   and Sign out open as a list underneath. */
.menu-toggle { display: none; }
@media (max-width: 720px) {
  .topbar { gap: 8px; padding: 8px 16px; min-height: 56px; }
  .topbar .spacer { display: none; }
  .brand { margin-right: auto; }
  .account-select { max-width: 46vw; min-width: 0; text-overflow: ellipsis; }
  .menu-toggle { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 1px solid var(--edge); border-radius: 8px; background: var(--card); color: var(--ink); font: inherit; font-weight: 550; cursor: pointer; }
  .menu-toggle[aria-expanded="true"] { background: var(--ground); }
  .topnav, #sign-out { display: none; }
  .topbar.menu-open .topnav { display: flex; flex-direction: column; gap: 0; flex: 0 0 calc(100% + 32px); order: 10; align-self: auto; border-top: 1px solid var(--line); margin: 4px -16px 0; padding: 4px 0; }
  .topbar.menu-open .topnav a { padding: 12px 16px; min-height: 44px; }
  .topbar.menu-open .topnav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--ink); background: var(--ground); }
  .topbar.menu-open #sign-out:not([hidden]) { display: inline-flex; order: 11; margin: 4px 0 8px; }
  /* Phones: Settings becomes a labelled section of the list. */
  .topbar.menu-open .nav-group { display: block; border-top: 1px solid var(--line); margin-top: 4px; }
  .topbar.menu-open .nav-more { width: 100%; padding: 12px 16px 4px; cursor: default; pointer-events: none; color: var(--faint); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; box-shadow: none; }
  .topbar.menu-open .nav-more svg { display: none; }
  .topbar.menu-open .nav-sub, .topbar.menu-open .nav-group.open .nav-sub { display: flex; flex-direction: column; position: static; min-width: 0; padding: 0; box-shadow: none; border-radius: 0; animation: none; background: none; }
  .topbar.menu-open .topnav .nav-sub a { padding: 12px 16px; min-height: 44px; border-radius: 0; justify-content: center; }
  .topbar.menu-open .topnav .nav-sub a span { display: none; }
  .topbar.menu-open .topnav .nav-sub a { color: var(--muted); }
  .topbar.menu-open .topnav .nav-sub a b { font-weight: inherit; }
  .topbar.menu-open .topnav .nav-sub a[aria-current="page"] { color: var(--ink); font-weight: 600; }
}
.small-link { font-size: 12px; font-weight: 500; color: var(--link); margin-left: 6px; }
.ig-edit { display: flex; gap: 6px; margin-top: 6px; }
.ig-edit input { height: 30px; padding: 0 8px; border: 1px solid #d4d4d4; border-radius: 8px; font: inherit; min-width: 0; flex: 1; max-width: 220px; }

/* Phase 5 editing */
.edit-dialog { border: 0; border-radius: 12px; padding: 0; width: min(480px, calc(100vw - 32px)); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25); }
.edit-dialog::backdrop { background: rgba(0, 0, 0, 0.35); }
.edit-form { display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.edit-form h2 { margin: 0; font-size: 16px; }
.edit-form section { display: flex; flex-direction: column; gap: 6px; }
.edit-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.edit-row input { height: 32px; padding: 0 8px; border: 1px solid #d4d4d4; border-radius: 8px; font: inherit; min-width: 0; flex: 1; }
.edit-form .actions { justify-content: flex-end; }
.edit-diff { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; align-items: start; }
.edit-diff .was { color: var(--muted); text-decoration: line-through; overflow-wrap: anywhere; }
.edit-diff .now { font-weight: 600; overflow-wrap: anywhere; }
#ad-copy-form textarea { padding: 8px; border: 1px solid #d4d4d4; border-radius: 8px; font: inherit; resize: vertical; }
@media (max-width: 560px) { .edit-diff { grid-template-columns: 1fr; } .edit-diff span[aria-hidden] { display: none; } }
/* Approvals and Fixes rows: the request text takes the space, the badge and
   buttons keep theirs; on phones the actions sit under the request. */
.fix-row .text { flex: 1 1 auto; min-width: 0; }
.fix-row .fix-actions { flex: none; flex-wrap: nowrap; }
@media (max-width: 640px) {
  .fix-row { flex-direction: column; }
  .fix-row .fix-actions { flex-wrap: wrap; justify-content: flex-start; }
}

/* Comments */
.comment { gap: 8px; }
.comment-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.comment-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.comment-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.comment-reply { display: flex; flex-direction: column; gap: 6px; }
.comment-reply textarea { padding: 8px; border: 1px solid #d4d4d4; border-radius: 8px; font: inherit; resize: vertical; }
.comment-quote { display: flex; flex-direction: column; gap: 2px; }
.comment-quote q { padding: 6px 10px; border-left: 3px solid var(--edge); background: var(--head); border-radius: 4px; overflow-wrap: anywhere; }

.nico-note { font-size: 13px; line-height: 1.45; padding: 8px 10px; border-radius: 8px; background: var(--calm-bg); color: var(--ink); margin: 6px 0; }
.nico-note .warn-text { color: var(--warn-ink); }

/* Approvals: one card per request, filters on top. */
.approval-filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; }
.approval-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.approval-tools .search { height: 32px; min-width: 180px; }
.request-list { display: flex; flex-direction: column; gap: 10px; }
.request { display: flex; flex-direction: column; overflow: hidden; }
.request.open { box-shadow: 0 0 0 1px var(--edge), inset 3px 0 0 var(--review-ink), 0 1px 0 rgba(0,0,0,0.05); }
.request-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px 0; }
.request-type { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.request-body { display: flex; flex-direction: column; gap: 6px; padding: 6px 16px 14px; min-width: 0; }
.request-title { margin: 0; font-size: 15px; font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
.request-target { font-size: 13px; overflow-wrap: anywhere; }
.request-change { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; padding: 10px 12px; border-radius: 8px; background: var(--head); }
.request-change .comment-quote q { background: var(--card); }
/* Before on one line, after under it, so long text keeps the full width. */
.request-change .edit-diff.field { grid-template-columns: 110px auto minmax(0, 1fr); column-gap: 6px; row-gap: 2px; }
.request-change .edit-diff.field > .faint { grid-row: 1 / span 2; }
.request-change .edit-diff.field .was { grid-column: 2 / -1; }
.request-change .edit-diff.field > [aria-hidden] { grid-column: 2; grid-row: 2; }
.request-change .edit-diff.field .now { grid-column: 3; grid-row: 2; }
.request.failed { box-shadow: 0 0 0 1px var(--edge), inset 3px 0 0 var(--bad-ink), 0 1px 0 rgba(0,0,0,0.05); }
.request-warning { font-size: 13px; color: var(--warn-ink); background: var(--warn-bg); padding: 6px 10px; border-radius: 8px; }
.request-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 16px; border-top: 1px solid var(--line); }
.request-actions { display: flex; gap: 8px; margin-left: auto; }
.approval-filters .tab { white-space: nowrap; flex: none; }
@media (max-width: 560px) { .request-change .edit-diff { grid-template-columns: 1fr; gap: 2px; } .request-change .edit-diff > * { grid-column: auto !important; grid-row: auto !important; } }
@media (max-width: 640px) {
  .approval-filters .tabs { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .approval-tools, .approval-tools .select, .approval-tools .search { width: 100%; }
  .request-actions { width: 100%; }
  .request-actions .btn { flex: 1; }
}

/* Comments: one card per comment, avatar, text, the ad it's on, then actions. */
.comment-list { display: flex; flex-direction: column; gap: 10px; }
.comment-card { display: flex; flex-direction: column; overflow: hidden; }
.comment-card.is-hidden .comment-text, .comment-card.is-hidden .avatar { opacity: 0.55; }
.comment-main { display: flex; gap: 12px; padding: 14px 16px 10px; min-width: 0; }
.avatar { position: relative; flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 650; font-size: 14px; color: var(--ink); background: var(--ground); }
.avatar.facebook { background: #e7efff; color: #1d4ed8; }
.avatar.instagram { background: #fde9f3; color: #be185d; }
.avatar-badge { position: absolute; right: -3px; bottom: -3px; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; background: var(--card); box-shadow: 0 0 0 1px var(--edge); }
.avatar-badge svg { width: 10px; height: 10px; }
.comment-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.comment-card .comment-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.comment-card .comment-head b { font-weight: 650; }
.icon-link { margin-left: auto; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; color: var(--muted); }
.icon-link:hover { background: var(--ground); color: var(--ink); }
.icon-link svg { width: 15px; height: 15px; }
.comment-card .comment-text { font-size: 15px; line-height: 1.45; }
.comment-ads { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; min-width: 0; }
.ad-chip { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 2px 8px; border-radius: 999px; background: var(--ground); color: var(--muted); text-decoration: none; font-weight: 550; }
.ad-chip:hover { color: var(--ink); background: var(--edge); }
.comment-toolbar { display: flex; align-items: center; gap: 2px; padding: 4px 8px; border-top: 1px solid var(--line); }
.comment-toolbar .spacer { flex: 1; }
.tool { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.tool svg, .comment-reply-actions .btn svg { width: 15px; height: 15px; flex: none; }
.tool:hover { background: var(--ground); color: var(--ink); }
.tool.nico { color: var(--link); }
.tool.danger:hover { color: var(--bad-ink); background: var(--bad-bg); }
.tool[disabled] { opacity: 0.5; cursor: default; }
.comment-card.replying .comment-toolbar { display: none; }
.comment-card .comment-reply { padding: 12px 16px 14px; border-top: 1px solid var(--line); background: var(--head); gap: 8px; }
.comment-card .comment-reply textarea { background: var(--card); min-height: 76px; font-size: 14px; line-height: 1.45; }
.comment-card .comment-reply textarea:focus { outline: none; border-color: var(--link); box-shadow: 0 0 0 2px rgba(0, 91, 211, 0.2); }
.comment-reply-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.comment-reply-actions .spacer { flex: 1; }
.comment-card .nico-note { background: var(--card); box-shadow: 0 0 0 1px var(--edge); }
.comment-requested { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--head); }
@media (max-width: 560px) {
  .comment-main { padding: 12px 12px 8px; gap: 10px; }
  .avatar { width: 32px; height: 32px; }
  .comment-toolbar { padding: 4px; }
  .comment-toolbar .spacer { display: none; }
  .comment-toolbar .tool { flex: 1; justify-content: center; padding: 0 4px; gap: 5px; font-size: 13px; }
  .tool .wide-only { display: none; }
  .ad-chip { max-width: 100%; }
  .comment-reply-actions .spacer { display: none; }
  .comment-reply-actions .btn { flex: 1; }
}

/* Guard's checks before a change (preflight). */
.preflight-dialog { width: min(560px, calc(100vw - 32px)); }
.preflight-head { display: flex; gap: 12px; align-items: flex-start; }
.preflight-icon { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; }
.preflight-icon.stop { background: var(--bad-bg); color: var(--bad-ink); }
.preflight-icon.warn { background: var(--warn-bg); color: var(--warn-ink); }
.pf-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 55vh; overflow-y: auto; }
.pf-check { padding: 10px 12px; border-radius: 8px; background: var(--head); box-shadow: inset 3px 0 0 var(--edge); display: flex; flex-direction: column; gap: 4px; }
.pf-check.stop { box-shadow: inset 3px 0 0 var(--bad-ink); }
.pf-check.warn { box-shadow: inset 3px 0 0 var(--warn-ink); }
.pf-check-head { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.pf-check-head b { font-weight: 650; line-height: 1.35; flex: 1 1 240px; }
.pf-check p { margin: 0; font-size: 13px; line-height: 1.45; color: var(--ink); overflow-wrap: anywhere; }
.pf-check .pf-fix span { font-weight: 650; }
.preflight-ack { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; cursor: pointer; }
.preflight-ack input { margin-top: 2px; }
.btn.danger { background: var(--bad-ink); color: #fff; box-shadow: none; }
.btn.danger[disabled] { opacity: 0.4; }
.request-checks { border-radius: 8px; }
.request-checks summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; padding: 2px 0; }
.request-checks summary::-webkit-details-marker { display: none; }
.request-checks summary::after { content: "Show"; font-size: 12px; color: var(--link); font-weight: 550; }
.request-checks[open] summary::after { content: "Hide"; }
.request-checks .pf-checks { margin-top: 8px; max-height: none; }

/* Insights: offers the account runs. */
.offers { display: flex; flex-direction: column; gap: 8px; }
#offer-rows { display: flex; flex-direction: column; gap: 6px; }
.offer-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.6fr) 150px auto; gap: 6px; align-items: center; }
.offer-row input { height: 32px; padding: 0 8px; border: 1px solid #d4d4d4; border-radius: 8px; font: inherit; min-width: 0; }
.offers .actions { justify-content: flex-end; }
.warn-text { color: var(--warn-ink); }
@media (max-width: 640px) { .offer-row { grid-template-columns: 1fr 1fr; } .offer-row .offer-name, .offer-row .offer-words { grid-column: 1 / -1; } }

/* Insights: the decision page. Numbers strip, a to-do list in three
   buckets, and a side column with the briefing, funnel and goals. */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); padding: 0; }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; min-width: 0; }
.kpi + .kpi { border-left: 1px solid var(--line); }
.kpi-label { font-size: 12px; color: var(--muted); font-weight: 550; }
.kpi-value { font-size: 22px; line-height: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi-delta { font-size: 12px; font-weight: 550; }
.kpi-delta.up { color: var(--good-ink); }
.kpi-delta.down { color: var(--bad-ink); }
.kpi-delta.flat, .kpi-target { color: var(--faint); font-size: 12px; }
.roas-good { color: var(--good-ink); }
.roas-warn { color: var(--warn-ink); }
.roas-bad { color: var(--bad-ink); }
.insights-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.insights-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.insights-side { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 12px; min-width: 0; }
.side-card h2 { font-size: 14px; margin: 0; }
.side-card .ai-headline { font-weight: 600; }
.side-note p { margin: 2px 0; font-size: 13px; }
.bucket-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.bucket-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--card); box-shadow: 0 0 0 1px var(--edge); color: var(--muted); text-decoration: none; font-weight: 550; font-size: 13px; }
.bucket-chip b { color: var(--ink); }
.bucket-chip.chip-now b { color: var(--bad-ink); }
.bucket-chip.chip-grow b { color: var(--good-ink); }
.bucket-chip:hover { box-shadow: 0 0 0 1px #b5b5b5; color: var(--ink); }
.insight-bucket { display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 12px; }
.bucket-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.bucket-head h2 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.bucket-head .n { font-size: 12px; font-weight: 650; padding: 1px 8px; border-radius: 999px; background: var(--edge); color: var(--ink); }
.bucket-now .bucket-head .n { background: var(--bad-bg); color: var(--bad-ink); }
.bucket-grow .bucket-head .n { background: var(--good-bg); color: var(--good-ink); }
.insight { display: flex; gap: 16px; padding: 14px 16px; align-items: flex-start; box-shadow: 0 0 0 1px var(--edge), inset 3px 0 0 var(--edge), 0 1px 0 rgba(0,0,0,0.05); }
.insight.tone-bad { box-shadow: 0 0 0 1px var(--edge), inset 3px 0 0 var(--bad-ink), 0 1px 0 rgba(0,0,0,0.05); }
.insight.tone-warn { box-shadow: 0 0 0 1px var(--edge), inset 3px 0 0 var(--warn-ink), 0 1px 0 rgba(0,0,0,0.05); }
.insight.tone-good { box-shadow: 0 0 0 1px var(--edge), inset 3px 0 0 var(--good-dot), 0 1px 0 rgba(0,0,0,0.05); }
.insight-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.insight-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.insight-stake { margin-left: auto; font-weight: 600; color: var(--ink); }
.insight-title { margin: 0; font-size: 15px; font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
.insight-title a { color: inherit; text-decoration: none; }
.insight-title a:hover { text-decoration: underline; }
.insight-why { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink); }
.insight-cta { flex: none; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.insight-cta:empty { display: none; }
.insight.grouped { flex-direction: column; gap: 10px; align-items: stretch; }
.insight.grouped .insight-cta { width: 100%; align-items: flex-end; }
.insight.tone-review { box-shadow: 0 0 0 1px var(--edge), inset 3px 0 0 var(--review-ink), 0 1px 0 rgba(0,0,0,0.05); }
.insight-more summary { cursor: pointer; font-size: 13px; color: var(--link); font-weight: 550; list-style: none; }
.insight-more summary::-webkit-details-marker { display: none; }
.insight-more summary::after { content: " ›"; }
.insight-more[open] summary::after { content: " ⌄"; }
.insight-more[open] { display: flex; flex-direction: column; gap: 8px; }
.insight-steps { margin: 4px 0 0; padding-left: 20px; font-size: 13px; line-height: 1.5; }
.insight-items { list-style: none; margin: 4px 0 0; padding: 0; border-radius: 8px; background: var(--head); }
.insight-items li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; }
.insight-items li + li { border-top: 1px solid var(--line); }
.insight-items li > div { display: flex; flex-direction: column; min-width: 0; }
.insight-item-name { font-weight: 600; font-size: 13px; overflow-wrap: anywhere; }
.insight-item-name a { color: inherit; }
.goals { padding: 0; }
.goals summary { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; cursor: pointer; list-style: none; }
.goals summary::-webkit-details-marker { display: none; }
.goals summary h2::after { content: " ›"; color: var(--faint); }
.goals[open] summary h2::after { content: " ⌄"; }
.goals-body { display: flex; flex-direction: column; gap: 14px; padding: 0 16px 16px; }
.goals .targets { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.goals .targets label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.goals .targets input { width: 100%; height: 32px; padding: 0 8px; border: 1px solid #d4d4d4; border-radius: 8px; font: inherit; }
.offers-block { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.goals .offer-row { grid-template-columns: minmax(0, 1fr) auto; }
.goals .offer-row .offer-name, .goals .offer-row .offer-words { grid-column: 1 / -1; }
.goals .offer-row + .offer-row { border-top: 1px dashed var(--line); padding-top: 8px; }
@media (max-width: 1100px) {
  .insights-grid { grid-template-columns: 1fr; }
  .insights-side { position: static; }
}
@media (max-width: 720px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi + .kpi { border-left: 0; }
  .kpi { border-top: 1px solid var(--line); }
  .kpi:nth-child(-n+2) { border-top: 0; }
  .kpi:nth-child(even) { border-left: 1px solid var(--line); }
  .kpi:last-child { grid-column: 1 / -1; }
  .insight { flex-direction: column; gap: 10px; }
  .insight-cta { align-items: stretch; width: 100%; }
  .insight-cta .btn { width: 100%; }
  .insight-items li { flex-direction: column; align-items: stretch; }
}

/* Insights: Done and Snooze. */
.insight-tidy { display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.insight-tidy .tool { height: 28px; padding: 0 8px; font-size: 12px; }
.insight-tidy .tool svg { width: 14px; height: 14px; }
select.snooze { height: 28px; min-width: 0; padding: 0 26px 0 8px; font-size: 12px; font-weight: 600; color: var(--muted); border-color: transparent; box-shadow: none; background-color: transparent; background-position: right 8px center; }
select.snooze:hover { background-color: var(--ground); color: var(--ink); border-color: transparent; }
.grouped-cta { flex-direction: row !important; justify-content: space-between; align-items: center !important; }
.insight-state { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.is-tidied { opacity: 0.6; }
.is-tidied:hover { opacity: 1; }
.bucket-hidden .bucket-head .link-btn { color: var(--link); font-weight: 600; }
@media (max-width: 720px) { .insight-tidy, .insight-state { justify-content: flex-start; } .grouped-cta { flex-direction: column !important; align-items: stretch !important; } }

/* Insights: the AI's one-line take, and panels that slide in from the right. */
.briefing-strip { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 14px; }
.ai-spark { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--review-bg); color: var(--review-ink); }
.briefing-line { flex: 1; min-width: 0; font-size: 14px; line-height: 1.4; }
.briefing-actions { display: flex; gap: 8px; flex: none; }
.drawer-wrap { position: fixed; inset: 0; z-index: 900; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.25); animation: fade-in 0.16s ease-out; }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); background: var(--card); box-shadow: -12px 0 40px rgba(0, 0, 0, 0.18); display: flex; flex-direction: column; animation: slide-in 0.18s ease-out; }
.drawer-wrap.closing .drawer { transform: translateX(100%); transition: transform 0.16s ease-in; }
.drawer-wrap.closing .drawer-backdrop { opacity: 0; transition: opacity 0.16s; }
@keyframes slide-in { from { transform: translateX(100%); } }
@keyframes fade-in { from { opacity: 0; } }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 16px; }
.icon-close { flex: none; width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.icon-close:hover { background: var(--ground); color: var(--ink); }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; line-height: 1.55; }
.drawer-body p { margin: 0; }
.ask-drawer .drawer-body { padding: 0; gap: 0; overflow: hidden; }
.chat { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 88%; padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.msg p { margin: 0; }
.msg p + p { margin-top: 8px; }
.msg.you { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.msg.ai { align-self: flex-start; background: var(--ground); border-bottom-left-radius: 4px; }
.msg.ai details { margin-top: 6px; font-size: 12px; }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: 0.2s; }
.typing i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
.chat-empty { margin: auto 0; display: flex; flex-direction: column; gap: 8px; }
.chat-ideas { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.chat-idea { text-align: left; padding: 10px 12px; border: 0; border-radius: 10px; background: var(--ground); color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.chat-idea:hover { background: var(--edge); }
.chat-input { display: flex; gap: 8px; align-items: flex-end; padding: 12px 14px; border-top: 1px solid var(--line); }
.chat-input textarea { flex: 1; min-height: 38px; max-height: 140px; resize: none; padding: 9px 12px; border: 1px solid #d4d4d4; border-radius: 12px; font: inherit; font-size: 14px; line-height: 1.4; }
.chat-input textarea:focus { outline: none; border-color: var(--link); box-shadow: 0 0 0 2px rgba(0, 91, 211, 0.2); }
.chat-input .btn { height: 38px; width: 38px; padding: 0; border-radius: 12px; }
@media (max-width: 720px) {
  .briefing-strip { flex-wrap: wrap; }
  .briefing-line { flex-basis: calc(100% - 44px); }
  .briefing-actions { width: 100%; }
  .briefing-actions .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { .drawer, .drawer-backdrop { animation: none; } }

/* Predictive: hourly tag and the budget what-if. */
.live-tag { font-size: 11px; font-weight: 600; color: var(--bad-ink); background: var(--bad-bg); padding: 1px 6px; border-radius: 999px; }
.whatif { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 8px; background: var(--head); font-size: 13px; }
.whatif-line b { font-variant-numeric: tabular-nums; }

/* Insights: this month's pacing and the Black Friday plan. */
.pace-row { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.pace-row span { color: var(--muted); }
.pace-row b { font-variant-numeric: tabular-nums; }
.pace-bar { height: 6px; border-radius: 999px; background: var(--edge); overflow: hidden; margin: 4px 0; }
.pace-bar i { display: block; height: 100%; background: var(--ink); border-radius: 999px; }
.season summary { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; cursor: pointer; list-style: none; }
.season summary::-webkit-details-marker { display: none; }
.season summary h2::after { content: " ›"; color: var(--faint); }
.season[open] summary h2::after { content: " ⌄"; }
.season { padding: 0; }

/* The free audit report. */
.report-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid #1a1a1a; border-bottom: 1px solid #e3e3e3; }
.report-kpis div { display: flex; flex-direction: column; gap: 2px; padding: 10px 8px 10px 0; }
.report-kpis span { font-size: 12px; color: var(--muted); }
.report-kpis b { font-size: 20px; }
.report-kpis em { font-style: normal; font-size: 12px; color: var(--muted); }
.report-issues { margin: 6px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.report-issues p { margin: 2px 0 0; }
.report-cta { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 8px; background: #f4f4f4; }
@media (max-width: 640px) { .report { padding: 28px 20px; } .report-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media print { .report-cta { background: #f4f4f4 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.banner.good { background: var(--good-bg); color: var(--good-ink); box-shadow: none; }
.banner.warn { background: var(--warn-bg); color: var(--warn-ink); box-shadow: none; }
.shopify-form input { max-width: 260px; }

/* Inside the Shopify admin: Shopify shows the app's name and the store is
   signed in already, so no brand mark or Sign out. */
.embedded .brand, .embedded #sign-out { display: none !important; }
.embedded .topbar { padding-left: 16px; }
.plan-card { display: grid; gap: 14px; }
.plan-price { display: flex; align-items: baseline; gap: 6px; }
.plan-price b { font-size: 32px; letter-spacing: -0.02em; }
.plan-price span { color: var(--muted); }
.plan-list { margin: 0; padding-left: 18px; display: grid; gap: 6px; }

/* Review mode: the caption bar for the Meta app review screencast. */
.review-bar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 60; width: min(760px, calc(100vw - 32px)); display: flex; align-items: center; gap: 16px; padding: 14px 16px 14px 20px; border-radius: 14px; background: #1a1a1a; color: #fff; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28); }
.review-text { flex: 1; min-width: 0; }
.review-text p { margin: 2px 0 0; font-size: 16px; line-height: 1.4; font-weight: 550; }
.review-count { font-size: 12px; color: #b5b5b5; letter-spacing: 0.02em; }
.review-hint { display: block; margin-top: 4px; font-size: 12px; color: #9a9a9a; }
.review-actions { display: flex; gap: 6px; flex-shrink: 0; }
.review-actions button { font: inherit; font-size: 13px; padding: 7px 12px; border-radius: 8px; border: 1px solid #444; background: transparent; color: #fff; cursor: pointer; }
.review-actions button.next { background: #fff; color: #1a1a1a; border-color: #fff; font-weight: 600; }
.review-actions button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 640px) { .review-bar { flex-direction: column; align-items: stretch; } .review-actions { justify-content: flex-end; } }
@media print { .review-bar { display: none; } }

/* Sign-in: the same look as Ad OS's (values taken from its live page). */
body.signed-out { background: #f6f4ef; }
.gauth-page { display: block; }
.gauth-screen { --g-ink: #1b1d1a; --g-muted: #6f7168; --g-olive: #727948; --g-olive-dark: #565d34; --g-line: rgba(217, 213, 204, 0.92);
  min-height: 100vh; position: relative; overflow: hidden; display: grid; place-items: center; padding: clamp(20px, 4vw, 56px);
  background: radial-gradient(circle at 82% 18%, rgba(125, 143, 88, 0.22), transparent 36%), linear-gradient(135deg, #f6f4ef 0%, #efece5 100%);
  color: var(--g-ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.45; }
.gauth-ambient { position: absolute; inset: auto -12% -34% 38%; height: 54vh; background: radial-gradient(circle, rgba(114, 121, 72, 0.18), transparent 64%); pointer-events: none; }
.gauth-shell { width: min(1180px, 100%); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.72fr); gap: clamp(28px, 5vw, 86px); align-items: center; position: relative; z-index: 1; min-width: 0; }
.gauth-intro { display: grid; gap: 26px; min-width: 0; }
.gauth-brand { display: inline-flex; align-items: center; gap: 12px; width: max-content; font-size: 15px; font-weight: 900; }
.gauth-brand .brand-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--brand); display: inline-flex; align-items: center; justify-content: center; }
.gauth-eyebrow { margin: 0; color: var(--g-muted); font-size: clamp(14px, 1.6vw, 20.5px); font-weight: 850; text-transform: uppercase; }
.gauth-intro h1 { max-width: 780px; margin: 0; font-size: clamp(44px, 6.4vw, 104px); line-height: 0.91; font-weight: 700; letter-spacing: 0; }
.gauth-lede { max-width: 650px; margin: 0; color: var(--g-muted); font-size: clamp(18px, 2vw, 28px); line-height: 1.45; }
.gauth-assurance { display: flex; flex-wrap: wrap; gap: 12px; }
.gauth-assurance span, .gauth-toggle { border: 1px solid rgba(217, 213, 204, 0.9); background: rgba(251, 250, 246, 0.72); border-radius: 999px; box-shadow: 0 16px 42px rgba(49, 46, 38, 0.06); }
.gauth-assurance span { padding: 12px 16px; color: var(--g-olive-dark); font-weight: 850; }
.gauth-card { background: rgba(251, 250, 246, 0.82); border: 1px solid var(--g-line); border-radius: 8px; box-shadow: 0 28px 90px rgba(49, 46, 38, 0.12); container-type: inline-size; width: 100%; min-width: 0; padding: clamp(28px, 4.6vw, 56px); display: grid; gap: 24px; backdrop-filter: blur(16px); overflow: hidden; }
.gauth-card-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: flex-start; min-width: 0; }
.gauth-card-eyebrow { margin: 0 0 6px; color: var(--g-olive-dark); font-size: 11px; font-weight: 850; text-transform: uppercase; letter-spacing: 0.04em; }
.gauth-card h2 { margin: 0; font-size: clamp(28px, 3vw, 42px); line-height: 1; font-weight: 700; overflow-wrap: break-word; }
.gauth-toggle { display: inline-flex; padding: 4px; justify-self: end; width: max-content; max-width: 100%; }
.gauth-toggle button { border: 0; border-radius: 999px; background: transparent; color: var(--g-muted); cursor: pointer; font: inherit; font-weight: 900; padding: 10px 14px; }
.gauth-toggle button.is-active { background: var(--g-olive); color: #fbfaf6; }
.gauth-social { display: grid; gap: 10px; min-width: 0; }
.gauth-social-button { min-height: 54px; display: flex; align-items: center; justify-content: center; gap: 11px; border: 1px solid rgba(217, 213, 204, 0.95); border-radius: 999px; background: rgba(255, 255, 252, 0.66); color: var(--g-ink); font: inherit; font-weight: 900; cursor: pointer; box-shadow: 0 16px 42px rgba(49, 46, 38, 0.055); transition: transform 160ms ease, border-color 160ms ease, background 160ms ease; }
.gauth-social-button:hover { transform: translateY(-1px); border-color: rgba(114, 121, 72, 0.38); background: rgba(255, 255, 252, 0.88); }
.gauth-mark { width: 24px; height: 24px; border-radius: 999px; display: inline-grid; place-items: center; font-size: 14px; font-weight: 950; line-height: 1; }
.gauth-mark-google { background: #fff; border: 1px solid rgba(217, 213, 204, 0.95); color: #24324a; }
.gauth-mark-facebook { background: #24324a; color: #fbfaf6; font-family: Georgia, serif; font-size: 18px; }
.gauth-divider { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: center; color: var(--g-muted); font-size: 12px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.gauth-divider::before, .gauth-divider::after { content: ""; height: 1px; background: var(--g-line); }
.gauth-form { display: grid; gap: 16px; min-width: 0; }
.gauth-form label { display: grid; gap: 8px; color: var(--g-muted); font-size: 13px; font-weight: 900; min-width: 0; }
.gauth-form input { min-width: 0; max-width: 100%; min-height: 43px; padding: 9px 11px; border: 1px solid rgba(217, 213, 204, 0.95); border-radius: 6px; background: #fbfaf6; color: var(--g-ink); font: inherit; font-weight: 600; }
.gauth-form input:focus { outline: 2px solid rgba(114, 121, 72, 0.45); outline-offset: 1px; border-color: var(--g-olive); }
.gauth-submit { width: 100%; min-height: 56px; margin-top: 6px; border: 1px solid rgba(114, 121, 72, 0.78); border-radius: 999px; background: linear-gradient(#727948 0%, #5d633b 100%); color: #f8f5ec; font: inherit; font-weight: 850; cursor: pointer; box-shadow: 0 18px 38px rgba(82, 88, 52, 0.18); }
.gauth-submit:disabled { opacity: 0.6; cursor: default; }
.gauth-error { margin: 0; padding: 14px 16px; border: 1px solid rgba(178, 122, 93, 0.32); background: rgba(178, 122, 93, 0.12); color: #7d4531; border-radius: 8px; font-weight: 850; }
.gauth-error.ok { border-color: rgba(114, 121, 72, 0.32); background: rgba(114, 121, 72, 0.1); color: var(--g-olive-dark); }
.gauth-legal { margin: 0; text-align: center; color: var(--g-muted); font-size: 12px; }
.gauth-legal a { color: inherit; }
@media (max-width: 980px) {
  .gauth-shell { grid-template-columns: 1fr; }
  .gauth-card-head { grid-template-columns: 1fr; }
  .gauth-toggle { justify-self: start; width: min(100%, 330px); }
  .gauth-toggle button { flex: 1; }
}
@container (max-width: 680px) {
  .gauth-card-head { grid-template-columns: 1fr; }
  .gauth-toggle { justify-self: start; width: min(100%, 330px); }
  .gauth-toggle button { flex: 1; }
}
@media (max-width: 640px) {
  .gauth-screen { padding: 14px; }
  .gauth-card { padding: 24px; }
  .gauth-toggle { width: 100%; }
}

/* Insights period: the date sits under the dropdown. */
.range-pick { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-right: auto; }
.range-pick .faint { font-size: 12px; }

/* ---------- Insights, modern look (2026-11-11) ---------- */
.insights-page { gap: 18px; }
.insights-page .card { border-radius: 14px; box-shadow: var(--soft-shadow); }
.insights-page .page-head h1 { font-size: 24px; letter-spacing: -0.01em; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 12px; }
.kpi-grid .kpi { display: flex; flex-direction: column; padding: 16px 16px 14px; gap: 6px; border-left: 0; min-width: 0; }
.kpi-grid .kpi + .kpi { border-left: 0; }
.kpi-grid .kpi-label { font-size: 12.5px; letter-spacing: 0.01em; }
.kpi-grid .kpi-value { font-size: clamp(18px, 1.45vw, 24px); line-height: 1.2; letter-spacing: -0.02em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.kpi-grid .kpi-delta { color: var(--faint); font-weight: 500; white-space: nowrap; }
.kpi-grid .kpi-target, .kpi-grid .kpi-note { font-size: 12px; line-height: 1.4; }
.kpi-delta .pill { display: inline-block; padding: 1px 7px; margin-right: 2px; border-radius: 999px; font-weight: 650; font-variant-numeric: tabular-nums; }
.kpi-delta.up .pill { background: #e3f4ea; color: var(--good-ink); }
.kpi-delta.down .pill { background: #fde8e6; color: var(--bad-ink); }
.spark { display: block; width: 100%; height: 32px; margin-top: auto; padding-top: 8px; overflow: visible; box-sizing: content-box; }
.spark-line { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark-area { fill: rgba(31, 107, 79, 0.09); }
.trend-card { padding: 18px 20px 12px; }
.trend-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.trend-head h2 { margin: 0 0 2px; font-size: 15px; }
.trend-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); align-items: center; }
.trend-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg-bar { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: #c9ddd2; }
.lg-line { display: inline-block; width: 14px; height: 3px; border-radius: 2px; background: var(--accent); }
.lg-roas { padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.trend-svg { display: block; width: 100%; height: auto; margin-top: 10px; }
.tc-bar { fill: #d4e4db; transition: fill 120ms ease; }
.tc-bar:hover { fill: #a9c8b8; }
.tc-line { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.tc-dot { fill: #fff; stroke: var(--accent); stroke-width: 2; }
.tc-tick { font-size: 11px; fill: #8a8a8a; font-family: inherit; }
.insights-page .briefing-strip { background: linear-gradient(120deg, #eef7f2 0%, #ffffff 55%); }
.insights-page .bucket-chip { box-shadow: var(--soft-shadow); padding: 7px 14px; }
.insights-page .insight { padding: 16px 18px; gap: 18px; }
.insights-page .insight.tone-bad { box-shadow: var(--soft-shadow), inset 3px 0 0 #d4543f; }
.insights-page .insight.tone-warn { box-shadow: var(--soft-shadow), inset 3px 0 0 #d9a514; }
.insights-page .insight.tone-good { box-shadow: var(--soft-shadow), inset 3px 0 0 #2f9a68; }
.insights-page .insight.tone-review { box-shadow: var(--soft-shadow), inset 3px 0 0 #3b7dd8; }
.insights-page .insight.tone-calm { box-shadow: var(--soft-shadow), inset 3px 0 0 #c4c4c4; }
.insights-page .insight-title { font-size: 15.5px; }
.insights-page .insight-why { color: #3d3d3d; }
.insights-page .side-card { padding: 16px 18px; }
@media (max-width: 640px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi-grid .kpi-value { font-size: 22px; line-height: 28px; }
  .trend-legend { font-size: 12px; gap: 10px; }
}

/* ---------- Every page, modern look (2026-11-11) ---------- */
.page { gap: 18px; }
.card, .insights-page .card { border-radius: 14px; box-shadow: var(--soft-shadow); }
.card-foot { border-radius: 0 0 14px 14px; }
.page-head h1 { font-size: 24px; line-height: 32px; letter-spacing: -0.01em; }
.banner { border-radius: 14px; padding: 14px 18px; }
.btn, .select { border-radius: 10px; }
.toolbar { padding: 10px 12px; }
.tabs .tab { border-radius: 8px; }
table.index th { background: #fafafa; font-size: 12px; letter-spacing: 0.01em; }
table.index td { border-top-color: #f0f0f0; }
table.index tbody tr:hover td { background: #fafcfb; }
table.index.reporting .name-col { background: var(--card); }
table.index tfoot td { border-top: 1px solid #dcdcdc; background: #fafafa; }
.roas-pill { display: inline-block; min-width: 44px; padding: 2px 8px; border-radius: 999px; font-weight: 650; text-align: center; font-variant-numeric: tabular-nums; }
.roas-pill.tone-good { background: #e3f4ea; color: var(--good-ink); }
.roas-pill.tone-warn { background: #fdf3d3; color: var(--warn-ink); }
.roas-pill.tone-bad { background: #fde8e6; color: var(--bad-ink); }
.roas-pill.tone-calm { background: #f1f1f1; color: var(--ink); }
.kpi-value .roas-pill { font-size: inherit; padding: 0 10px; min-width: 0; }
.report-summary:empty { display: none; }
.request { box-shadow: var(--soft-shadow); }
.request.open { box-shadow: var(--soft-shadow), inset 3px 0 0 #3b7dd8; }
.request.failed { box-shadow: var(--soft-shadow), inset 3px 0 0 #d4543f; }
.pf-check { border-radius: 10px; padding: 12px 14px; }
.pf-check.stop { background: #fdf4f3; box-shadow: inset 3px 0 0 #d4543f; }
.pf-check.warn { background: #fdf9ec; box-shadow: inset 3px 0 0 #d9a514; }
.pf-check.info { box-shadow: inset 3px 0 0 #c4c4c4; }
.request-change .edit-diff { border-radius: 10px; }
.card > table.index:first-child thead tr:first-child th:first-child, .card > .table-wrap:first-child thead tr:first-child th:first-child { border-top-left-radius: 14px; }
.card > table.index:first-child thead tr:first-child th:last-child, .card > .table-wrap:first-child thead tr:first-child th:last-child { border-top-right-radius: 14px; }
@media (max-width: 640px) {
  .kpi-grid .kpi { border-top: 0; border-left: 0; }
  .kpi-grid .kpi:last-child:nth-child(even) { grid-column: auto; }
}
table.index.reporting th.store-col { background: #f3f8f5; color: var(--accent); }
table.index.reporting td.store-col { background: #fbfdfc; }
table.index.reporting th.store-col:first-of-type, table.index.reporting td.store-col:nth-last-child(3) { box-shadow: inset 1px 0 0 #dbe9e1; }

/* Store row and budget planner (2026-11-11) */
.store-row { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.row-title { margin: 2px 0 -8px; font-size: 13px; font-weight: 650; color: var(--muted); display: flex; gap: 8px; align-items: baseline; }
.planner .plan-input { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-weight: 550; }
.planner .plan-input input { height: 36px; padding: 0 10px; border: 1px solid #d4d4d4; border-radius: 10px; font: inherit; font-size: 15px; font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }
#plan-out { display: flex; flex-direction: column; gap: 2px; }

/* Staging label (guard.jmdigitalcorp.com/staging/ only). */
.staging-label { position: sticky; top: 0; z-index: 1000; background: #8a4b00; color: #fff; font: 600 12px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; text-align: center; padding: 6px 12px; letter-spacing: .02em; }

/* Posts (Phase 6): calendar, list and composer. */
.post-banner { flex-direction: column; gap: 4px; }
.post-banner ul { margin: 0; padding-left: 18px; }
.post-cal { overflow: hidden; }
.post-cal-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 16px; }
.post-cal-nav { display: flex; align-items: center; gap: 6px; }
.post-cal-nav h2 { margin: 0 6px; font-size: 15px; min-width: 150px; text-align: center; }
.post-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.post-dow { padding: 6px 8px; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--head); border-bottom: 1px solid var(--line); }
.post-day { min-height: 104px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.post-day:nth-child(7n) { border-right: 0; }
.post-day.other { background: #fafafa; color: var(--faint); }
.post-day.today .post-day-head span { background: var(--ink); color: #fff; border-radius: 10px; padding: 0 7px; }
.post-day-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 600; }
.add-day { width: 22px; height: 22px; border: 0; border-radius: 6px; background: transparent; color: var(--faint); font-size: 16px; line-height: 1; cursor: pointer; opacity: 0; }
.post-day:hover .add-day, .add-day:focus-visible { opacity: 1; }
.add-day:hover { background: var(--edge); color: var(--ink); }
.post-day .more { font-size: 11px; padding-left: 4px; }
.post-chip { display: flex; align-items: center; gap: 4px; width: 100%; min-width: 0; padding: 3px 6px; border: 0; border-radius: 6px; font: inherit; font-size: 11.5px; line-height: 16px; text-align: left; cursor: pointer; background: var(--calm-bg); color: var(--calm-ink); }
.post-chip .chip-icons { display: inline-flex; gap: 1px; flex: none; }
.post-chip .chip-time { flex: none; font-weight: 600; }
.post-chip .chip-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-chip.s-proposed, .post-chip.s-publishing { background: var(--review-bg); color: var(--review-ink); }
.post-chip.s-approved, .post-chip.s-published { background: var(--good-bg); color: var(--good-ink); }
.post-chip.s-partly_published { background: var(--warn-bg); color: var(--warn-ink); }
.post-chip.s-failed, .post-chip.s-rejected { background: var(--bad-bg); color: var(--bad-ink); }
.post-list { display: flex; flex-direction: column; }
.post-row { display: flex; gap: 12px; align-items: center; padding: 10px 4px; border-top: 1px solid var(--line); cursor: pointer; }
.post-list .post-row:first-child { border-top: 0; }
.post-row:hover { background: #fafafa; }
.post-thumb { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex: none; }
.post-thumb-text { display: inline-flex; align-items: center; justify-content: center; background: var(--head); color: var(--muted); font-weight: 700; }
.post-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.post-row-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.post-row-top .pl { display: inline-flex; color: var(--muted); }
.post-row-caption { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-row-actions { display: flex; gap: 6px; flex: none; }
.post-error { color: var(--bad-ink); background: var(--bad-bg); border-radius: 8px; padding: 6px 10px; font-size: 12px; }
.post-attn { box-shadow: 0 0 0 1px #c8e1ff, 0 1px 0 rgba(0,0,0,0.05); }
.drawer.post-drawer { width: min(560px, 100vw); }
.post-drawer .drawer-body { display: flex; flex-direction: column; gap: 14px; }
.pc-block { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pc-block legend { font-weight: 650; padding: 0; margin-bottom: 6px; }
.pc-platforms { display: flex; flex-wrap: wrap; gap: 8px; }
.pc-platform { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; box-shadow: 0 0 0 1px #d4d4d4; cursor: pointer; }
.pc-platform.off { opacity: 0.55; cursor: not-allowed; }
.pc-formats .tab { box-shadow: 0 0 0 1px var(--edge); }
.pc-warn { margin: 0; color: var(--warn-ink); background: var(--warn-bg); border-radius: 8px; padding: 6px 10px; font-size: 12px; }
.pc-media { display: flex; flex-direction: column; gap: 6px; }
.pc-media-item { display: flex; align-items: center; gap: 10px; padding: 4px; border-radius: 8px; background: var(--head); }
.pc-media-item .thumb { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; }
.pc-video { display: inline-flex; align-items: center; justify-content: center; background: var(--ink); color: #fff; }
.pc-media-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-media-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pc-link { display: flex; gap: 6px; flex: 1; min-width: 220px; }
.pc-link .search { flex: 1; min-width: 0; height: 30px; }
.pc-store { border-radius: 10px; box-shadow: 0 0 0 1px var(--edge); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.pc-store-head { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.pc-store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; max-height: 280px; overflow-y: auto; }
.pc-pick { padding: 0; border: 0; border-radius: 8px; overflow: hidden; aspect-ratio: 1; cursor: pointer; background: var(--head); }
.pc-pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-pick:hover, .pc-pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
#pc-caption { width: 100%; border: 1px solid #d4d4d4; border-radius: 8px; padding: 8px 10px; font: inherit; resize: vertical; }
.pc-counts { display: flex; gap: 12px; color: var(--faint); font-size: 12px; }
.pc-counts .over { color: var(--bad-ink); font-weight: 600; }
.pc-radio { display: flex; align-items: center; gap: 6px; }
.pc-radio input[type="datetime-local"] { height: 30px; border: 1px solid #d4d4d4; border-radius: 8px; padding: 0 8px; font: inherit; }
.pc-preview { border-radius: 12px; box-shadow: 0 0 0 1px var(--edge); overflow: hidden; max-width: 340px; align-self: center; width: 100%; background: #fff; }
.pc-preview-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; }
.pc-preview-head .faint { margin-left: auto; font-size: 11px; }
.pc-avatar { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, #f5c16c, #d6249f); }
.pc-preview-media { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; background: var(--head); }
.pc-video-big { display: flex; align-items: center; justify-content: center; background: #1c1c1c; color: #fff; font-weight: 600; }
.pc-dots { display: flex; justify-content: center; gap: 4px; padding: 6px; }
.pc-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--edge); }
.pc-dots span.on { background: var(--link); }
.pc-preview-caption { margin: 0; padding: 4px 12px 12px; white-space: normal; overflow-wrap: anywhere; }
.pc-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; position: sticky; bottom: -16px; background: var(--card); padding: 12px 0; border-top: 1px solid var(--line); }
.pc-actions .spacer { flex: 1; }
.btn.danger-link { box-shadow: none; color: var(--bad-ink); background: transparent; }
.post-results { display: flex; flex-direction: column; gap: 4px; background: var(--good-bg); color: var(--good-ink); border-radius: 8px; padding: 8px 10px; }
.post-results > div { display: flex; align-items: center; gap: 6px; }
@media (max-width: 720px) {
  .post-day { min-height: 64px; padding: 4px; }
  .post-chip .chip-text, .post-chip .chip-time { display: none; }
  .post-row { flex-wrap: wrap; }
  .post-row-actions { width: 100%; justify-content: flex-end; }
}
.pc-pick.picked { outline: 2px solid var(--accent); outline-offset: 1px; position: relative; }
.pc-pick.picked::after { content: "✓"; position: absolute; top: 4px; right: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.pc-pick { position: relative; }

/* Studio (Phase 6). */
.st-create { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; }
.st-col { padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.st-col + .st-col { border-left: 1px solid var(--line); }
.st-col h2 { margin: 0; font-size: 14px; }
.st-refs { display: flex; gap: 8px; flex-wrap: wrap; min-height: 64px; align-items: center; }
.st-ref { position: relative; width: 64px; height: 64px; }
.st-ref img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; box-shadow: 0 0 0 1px var(--edge); }
.st-ref .icon-close { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: #fff; border: 0; font-size: 12px; line-height: 20px; padding: 0; cursor: pointer; }
.st-field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.st-field > span { font-weight: 600; }
.st-field .tabs .tab { box-shadow: 0 0 0 1px var(--edge); }
.st-field textarea { font: inherit; font-weight: 400; border: 1px solid #d4d4d4; border-radius: 8px; padding: 8px 10px; resize: vertical; }
.st-field .select { height: 32px; border: 1px solid #d4d4d4; border-radius: 8px; padding: 0 8px; font: inherit; font-weight: 400; }
.st-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.st-presets .chip { height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--head); box-shadow: 0 0 0 1px var(--edge); font: inherit; font-weight: 500; cursor: pointer; }
.st-presets .chip:hover { background: var(--edge); }
.st-shot-sets { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 10px; }
.st-shot-setrow { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.st-shot-set { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 9px 12px; border: 0; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--edge); font: inherit; text-align: left; cursor: pointer; }
.st-shot-set:hover { box-shadow: 0 0 0 1px var(--muted); }
.st-shot-set b { font-size: 13.5px; }
.st-shot-set span { font-size: 12px; color: var(--muted); }
.st-slide-shot { height: 28px; max-width: 170px; margin-left: 8px; border: 1px solid #d4d4d4; border-radius: 8px; padding: 0 8px; font: inherit; font-size: 12.5px; background: #fff; color: var(--ink); }
.st-shots { display: flex; flex-direction: column; gap: 10px; }
.st-shots-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.st-shot-clear { border: 0; background: none; padding: 0; font: inherit; font-size: 13px; color: var(--accent-ink); cursor: pointer; }
.st-shot-clear:hover { text-decoration: underline; }
.st-shot-group { display: flex; flex-direction: column; gap: 6px; }
.st-shot-glabel { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.st-shot-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 8px; }
.st-shot { display: flex; flex-direction: row; align-items: center; gap: 10px; min-height: 64px; padding: 7px 10px 7px 7px; border: 0; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--edge); font: inherit; text-align: left; color: var(--ink); cursor: pointer; transition: box-shadow .15s, background .15s; }
.st-shot:hover { box-shadow: 0 0 0 1px var(--muted); }
.st-shot.on { background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent); }
.st-shot { position: relative; }
.st-shot.off { opacity: .45; cursor: not-allowed; }
.st-shot.off:hover { box-shadow: 0 0 0 1px var(--edge); }
.st-shot-tag { position: absolute; top: -8px; right: 8px; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 600; letter-spacing: .02em; line-height: 16px; }
.st-shot-img { flex: none; width: 40px; height: 50px; border-radius: 8px; object-fit: cover; background: var(--head); }
.st-shot-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.st-shot:hover .st-shot-tip, .st-shot:focus-visible .st-shot-tip { display: grid; }
/* Below the card: above it, the top was cut off under the page header. */
.st-shot-tip { top: calc(100% + 8px); bottom: auto; width: 240px; }
.st-shot.off .st-shot-tip { display: none !important; }
.st-shot-row .st-shot:nth-child(3n+1) .st-shot-tip { left: 0; transform: none; }
.st-shot-row .st-shot:nth-child(3n) .st-shot-tip { left: auto; right: 0; transform: none; }
@media (max-width: 640px) { .st-shot-tip { display: none !important; } }
.st-shot-tag.best { background: #127a43; }
.st-shot-stat { font-size: 11.5px; line-height: 15px; color: #127a43; font-weight: 600; }
.st-shot-name { font-weight: 600; font-size: 14px; line-height: 18px; }
.st-shot-hint { font-size: 12.5px; line-height: 16px; color: var(--muted); }
.st-shot-note { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 12px; background: var(--head); font-size: 13px; line-height: 18px; color: var(--muted); }
.st-shot-note b { color: var(--ink); font-weight: 600; }
.st-shot-note span b { font-weight: 600; }
@media (max-width: 520px) { .st-shot-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.st-go { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: auto; }
.st-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.st-job { overflow: hidden; display: flex; flex-direction: column; }
.st-media { background: var(--head); aspect-ratio: 4 / 5; display: flex; }
.st-media > img, .st-media > video { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-media.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.st-media figure { margin: 0; position: relative; min-width: 0; }
.st-media figure img, .st-media figure video { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-media figcaption { position: absolute; left: 6px; bottom: 6px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 6px; }
.st-wait { margin: auto; color: var(--muted); display: flex; align-items: center; padding: 16px; text-align: center; }
.st-job-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.st-job-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.st-prompt { margin: 0; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.st-actions { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 820px) {
  .st-create { grid-template-columns: 1fr; }
  .st-col + .st-col { border-left: 0; border-top: 1px solid var(--line); }
}

/* ===== Phase 6 refresh: Posts, Ideas, composer, Studio (2026-11-13) ===== */
.posts-page, .studio-page { gap: 24px; }
.section-title { margin: 8px 0 -8px; font-size: 15px; font-weight: 650; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: #e9e9e9; flex-wrap: wrap; }
.seg button { height: 30px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: inherit; font-weight: 550; cursor: pointer; white-space: nowrap; }
.seg button[aria-selected="true"] { background: #fff; color: var(--ink); font-weight: 650; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.seg button .n { color: var(--faint); margin-left: 4px; font-weight: 500; }
.seg-wide { align-self: flex-start; }
.pc-note { margin: 0; padding: 10px 12px; border-radius: 10px; background: #eef4ff; color: #1f3d73; }

/* Ideas */
.ideas { display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: 16px; background: linear-gradient(180deg, #f7f5ff 0%, #ffffff 120px); box-shadow: 0 0 0 1px #e6e1fb, 0 1px 2px rgba(0,0,0,.04); }
.ideas-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.ideas-head h2 { margin: 0 0 2px; font-size: 16px; display: flex; align-items: center; gap: 6px; color: #3b2f8f; }
.ideas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.idea { display: flex; flex-direction: column; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px var(--edge), 0 2px 8px rgba(17,24,20,.05); transition: transform .15s ease, box-shadow .15s ease, opacity .2s; }
.idea:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px #d8d8d8, 0 8px 22px rgba(17,24,20,.08); }
.idea.leaving { opacity: 0; transform: scale(.97); }
.idea-media { position: relative; display: grid; gap: 2px; aspect-ratio: 16 / 10; background: var(--head); }
.idea-media.n1 { grid-template-columns: 1fr; }
.idea-media.n2 { grid-template-columns: 1fr 1fr; }
.idea-media.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.idea-media.n3 img:first-child { grid-row: span 2; }
.idea-media img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 0; }
.idea-format { position: absolute; left: 10px; top: 10px; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.92); font-size: 11.5px; font-weight: 650; }
.idea-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.idea-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 12px; }
.idea-pillar { padding: 2px 8px; border-radius: 999px; background: #efeaff; color: #4b3bb0; font-weight: 650; }
.idea h3 { margin: 0; font-size: 15px; line-height: 21px; }
.idea-why { margin: 0; display: flex; gap: 6px; color: #4b3bb0; font-size: 12.5px; line-height: 18px; }
.idea-why svg { flex: none; margin-top: 2px; }
.idea-caption { margin: 0; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.idea-products { display: flex; flex-wrap: wrap; gap: 4px; }
.idea-products span { font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: var(--head); color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idea-actions { display: flex; gap: 8px; align-items: center; margin-top: auto; padding-top: 4px; }
.idea-actions .icon-btn { margin-left: auto; border: 0; background: transparent; cursor: pointer; font-size: 18px; color: var(--faint); }
.ideas-empty { padding: 24px; text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.idea.skeleton .idea-media, .idea.skeleton .idea-body span, .pp-loading span { background: linear-gradient(90deg, #f0f0f0 25%, #f8f8f8 37%, #f0f0f0 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
.idea.skeleton .idea-body span { height: 12px; border-radius: 6px; }
.idea.skeleton .idea-body span.short { width: 60%; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* Calendar refresh */
.post-cal { border-radius: 16px; }
.post-cal-head { padding: 16px 20px; }
.post-cal-nav .icon-btn { border: 0; background: transparent; cursor: pointer; font-size: 18px; }
.post-day { min-height: 118px; padding: 8px; gap: 6px; }
.post-day-head span { display: inline-flex; min-width: 24px; height: 24px; align-items: center; justify-content: center; }
.post-day.today .post-day-head span { background: var(--ink); color: #fff; border-radius: 12px; padding: 0 8px; }
.post-chip { padding: 4px 6px; border-radius: 8px; gap: 6px; }
.post-chip img { width: 22px; height: 22px; border-radius: 5px; object-fit: cover; flex: none; }
.posts-switch { display: flex; justify-content: space-between; align-items: center; margin-bottom: -8px; }

/* Composer: form and live preview side by side */
.drawer.post-drawer { width: min(1000px, 100vw); }
.post-drawer .drawer-body { padding: 0; gap: 0; }
.pc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; padding: 20px 24px; align-items: start; }
.pc-form { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.pc-side { position: sticky; top: 0; }
.pc-block legend { font-size: 13px; font-weight: 650; margin-bottom: 8px; display: flex; gap: 8px; align-items: baseline; }
.pc-platform { padding: 8px 12px; border-radius: 10px; box-shadow: 0 0 0 1px #dcdcdc; background: #fff; }
.pc-platform.on { box-shadow: 0 0 0 2px var(--ink); }
.pc-platform input { margin: 0; }
.pc-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pc-media-item { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 10px; background: var(--head); min-width: 0; }
.pc-media-item img, .pc-media-item .pc-video { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex: none; }
.pc-media-item .icon-btn { border: 0; background: transparent; cursor: pointer; width: 24px; height: 24px; }
.pc-media-add { margin-top: 8px; }
#pc-caption { border-radius: 10px; padding: 10px 12px; line-height: 20px; }
.pc-when { display: flex; flex-direction: column; gap: 8px; }
.pc-preview { max-width: none; box-shadow: 0 0 0 1px var(--edge), 0 10px 30px rgba(17,24,20,.08); border-radius: 18px; }
.pc-preview-empty { display: flex; align-items: center; justify-content: center; color: var(--faint); font-weight: 550; }
.pc-preview-caption { max-height: 220px; overflow: auto; }
.pc-actions { position: sticky; bottom: 0; padding: 14px 24px; margin: 0; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); }

/* Product picker: one card per product */
.pp { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.pp-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.pp-search { flex: 1; min-width: 180px; height: 34px; border-radius: 10px; }
.pp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); grid-auto-rows: max-content; align-content: start; gap: 14px; max-height: 460px; overflow-y: auto; padding: 2px 4px 4px 2px; }
.pp-card { display: flex; flex-direction: column; gap: 6px; min-width: 0; position: relative; }
.pp-main { padding: 0; border: 0; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 5; background: var(--head); cursor: pointer; box-shadow: 0 0 0 1px var(--edge); transition: box-shadow .12s, transform .12s; }
.pp-main:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px #cfcfcf, 0 6px 16px rgba(0,0,0,.08); }
.pp-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-card.picked .pp-main { box-shadow: 0 0 0 2.5px var(--accent); }
.pp-card.picked::after, .pp-photo.picked::after { content: "✓"; position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; line-height: 22px; text-align: center; font-weight: 700; }
.pp-meta { display: flex; flex-direction: column; gap: 1px; padding: 0 2px; }
.pp-title { font-size: 12.5px; font-weight: 600; line-height: 17px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pp-price { font-size: 12px; color: var(--muted); }
.pp-price s { color: var(--faint); }
.pp-more { align-self: flex-start; border: 0; background: transparent; color: var(--link); font: inherit; font-size: 12px; padding: 0 2px; cursor: pointer; }
.pp-strip { display: flex; flex-direction: column; gap: 10px; }
.pp-strip-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pp-strip-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.pp-photo { position: relative; padding: 0; border: 0; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 5; cursor: pointer; box-shadow: 0 0 0 1px var(--edge); background: var(--head); }
.pp-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-photo.picked { box-shadow: 0 0 0 2.5px var(--accent); }
.pp-loading { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 14px; }
.pp-loading span { aspect-ratio: 4 / 5; border-radius: 12px; }

/* Studio */
.studio-usage { padding: 4px 10px; border-radius: 999px; background: #fff; box-shadow: 0 0 0 1px var(--edge); color: var(--muted); font-size: 12px; }
.studio-create { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.studio-step { padding: 20px; display: flex; flex-direction: column; gap: 14px; border-radius: 16px; }
.studio-make { position: sticky; top: 72px; }
.step-head { display: flex; gap: 12px; align-items: flex-start; }
.step-head h2 { margin: 0; font-size: 15px; }
.step-n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; }
.st-refs { display: flex; gap: 10px; flex-wrap: wrap; }
.st-ref { position: relative; display: flex; align-items: center; gap: 8px; padding: 6px 30px 6px 6px; border-radius: 12px; background: var(--head); max-width: 220px; height: auto; width: auto; }
.st-ref img { width: 44px; height: 54px; object-fit: cover; border-radius: 8px; box-shadow: none; }
.st-ref span { font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.st-ref .icon-btn { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: 0; background: transparent; cursor: pointer; }
#st-prompt { font: inherit; border: 1px solid #d4d4d4; border-radius: 12px; padding: 10px 12px; resize: vertical; line-height: 20px; }
.st-settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.st-settings label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 12px; color: var(--muted); }
.st-settings .select { height: 34px; border: 1px solid #d4d4d4; border-radius: 10px; padding: 0 10px; font: inherit; color: var(--ink); background: #fff; }
.st-go { padding-top: 6px; border-top: 1px solid var(--line); }
.st-gallery { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.st-job { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 0 0 1px var(--edge), 0 2px 8px rgba(17,24,20,.05); }
.st-job .icon-btn { text-decoration: none; }
@media (max-width: 900px) {
  .pc-layout { grid-template-columns: 1fr; }
  .pc-side { position: static; order: -1; max-width: 360px; }
  .studio-create { grid-template-columns: 1fr; }
  .studio-make { position: static; }
}
@media (max-width: 560px) {
  .ideas { padding: 14px; }
  .pp-grid, .pp-loading { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.idea-media { aspect-ratio: auto; height: 210px; overflow: hidden; grid-template-rows: minmax(0, 1fr); }
.idea-media.n3 { grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); }
.idea.skeleton .idea-media { height: 210px; }
/* Two more tabs (Posts, Studio): keep the bar on one line on smaller laptops. */
@media (min-width: 721px) and (max-width: 1180px) {
  .topbar { gap: 12px; padding: 0 14px; }
  .topnav { gap: 0; }
  .topnav a { padding: 0 7px; }
}

/* Social sub-menu and Strategy (Phase 6). */
.subnav { display: flex; gap: 4px; margin-bottom: -8px; border-bottom: 1px solid var(--edge); }
.subnav a { padding: 8px 14px; color: var(--muted); text-decoration: none; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subnav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.subnav a:hover { color: var(--ink); }
.lvl { display: inline-flex; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 650; }
.lvl.strategic { background: #e8f1ff; color: #1d4f91; }
.lvl.creative { background: #fdf0e6; color: #8a4b12; }
.idea-concepts { display: flex; flex-wrap: wrap; gap: 4px; }
.idea-concepts .aud { font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: #e9f6ef; color: #1c5c3a; font-weight: 600; }
.ideas-empty .btn { align-self: center; margin-top: 8px; }
.strategy-page { gap: 20px; }
.strat-progress { padding: 22px; display: flex; flex-direction: column; gap: 10px; border-radius: 16px; }
.strat-progress h2 { margin: 0; font-size: 16px; }
.strat-progress p { margin: 0; }
.strat-steps { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.strat-steps li { display: flex; align-items: center; gap: 10px; color: var(--faint); }
.strat-steps li .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--edge); margin: 0 3px; }
.strat-steps li.done { color: var(--good-ink); }
.strat-steps li.now { color: var(--ink); font-weight: 600; }
.strat-steps li .spinner { margin-right: 0; }
.strat-toc { position: sticky; top: 0; z-index: 5; display: flex; gap: 6px; overflow-x: auto; padding: 8px 0; background: var(--ground); scrollbar-width: none; }
.strat-toc a { flex: none; padding: 5px 12px; border-radius: 999px; background: #fff; box-shadow: 0 0 0 1px var(--edge); color: var(--ink); text-decoration: none; font-weight: 550; font-size: 12.5px; }
.strat-toc a:hover { box-shadow: 0 0 0 1px #c9c9c9; }
.strat-hero { padding: 28px; border-radius: 20px; background: linear-gradient(135deg, #1f2a24 0%, #2f4a3d 100%); color: #fff; display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 56px; }
.strat-hero .eyebrow { margin: 0; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 700; color: #b9d3c5; }
.strat-hero h2 { margin: 0; font-size: 24px; line-height: 32px; letter-spacing: -.01em; max-width: 820px; }
.strat-summary { margin: 0; color: #dfe9e3; max-width: 860px; font-size: 14px; line-height: 22px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 8px; }
.kpi { background: rgba(255,255,255,.08); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.kpi-label { font-size: 11.5px; color: #b9d3c5; line-height: 16px; }
.kpi-now { font-size: 20px; font-weight: 700; }
.kpi-target { font-size: 12px; color: #e8f3ec; }
.strat-sec { padding: 24px; display: flex; flex-direction: column; gap: 14px; border-radius: 16px; scroll-margin-top: 56px; }
.strat-sec > h2 { margin: 0; font-size: 18px; }
.strat-sec h3 { margin: 8px 0 0; font-size: 14px; display: flex; gap: 8px; align-items: baseline; }
.strat-sec p { margin: 0; line-height: 21px; }
.strat-actions { margin: 0; padding: 0; list-style: none; counter-reset: a; display: grid; gap: 10px; }
.strat-actions li { counter-increment: a; position: relative; padding: 12px 14px 12px 52px; border-radius: 12px; background: var(--head); display: flex; flex-direction: column; gap: 3px; }
.strat-actions li::before { content: counter(a); position: absolute; left: 14px; top: 12px; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.strat-actions .impact { font-size: 12px; color: var(--good-ink); font-weight: 600; }
.strat-table { overflow-x: auto; border-radius: 12px; box-shadow: 0 0 0 1px var(--edge); }
.strat-table table { width: 100%; border-collapse: collapse; min-width: 640px; }
.strat-table th { text-align: left; background: var(--head); color: var(--muted); font-weight: 600; padding: 8px 12px; font-size: 12px; white-space: nowrap; }
.strat-table td { padding: 9px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.strat-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.callout { padding: 14px 16px; border-radius: 12px; background: #fff7e6; box-shadow: 0 0 0 1px #f3dfb3; display: flex; flex-direction: column; gap: 4px; }
.callout.soft { background: #f3f7ff; box-shadow: 0 0 0 1px #dbe6fb; }
.strat-two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.strat-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.strat-fixes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.strat-fixes li { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--head); }
.strat-fixes li span { color: var(--muted); }
.strat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.mini { position: relative; padding: 14px; border-radius: 12px; box-shadow: 0 0 0 1px var(--edge); background: #fff; display: flex; flex-direction: column; gap: 6px; }
.mini.new { box-shadow: 0 0 0 1px #cfe6d8; background: #f6fbf8; }
.mini.win { box-shadow: 0 0 0 1px #d9d2f7; background: #faf8ff; }
.mini .tag { align-self: flex-start; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--ink); color: #fff; text-transform: capitalize; }
.mini dl { margin: 2px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; font-size: 12.5px; }
.mini dt { color: var(--faint); }
.mini dd { margin: 0; }
.evidence { font-size: 12px; color: #4b3bb0; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chips span:not(.lvl) { font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: #e9f6ef; color: #1c5c3a; font-weight: 600; }
.pillars { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.pillar { padding: 14px; border-radius: 12px; background: var(--head); display: flex; flex-direction: column; gap: 6px; }
.pillar-top { display: flex; justify-content: space-between; }
.pillar .bar { height: 6px; border-radius: 3px; background: #e2e2e2; overflow: hidden; }
.pillar .bar span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.strat-dims { align-self: flex-start; }
.strat-insights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.strat-insights-col { display: flex; flex-direction: column; gap: 10px; }
.strat-insights-col h3 { margin: 0; padding: 4px 10px; border-radius: 8px; align-self: flex-start; font-size: 12.5px; }
.strat-insights-col.pro h3 { background: #e8f1ff; color: #1d4f91; }
.strat-insights-col.pre h3 { background: #e9f6ef; color: #1c5c3a; }
.strat-insights-col.pred h3 { background: #f3eefe; color: #4b3bb0; }
.strat-insights-col article { padding: 12px; border-radius: 12px; box-shadow: 0 0 0 1px var(--edge); display: flex; flex-direction: column; gap: 4px; }
.strat-insights-col article p { color: var(--muted); }
.strat-checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.strat-checklist ul { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.strat-foot { text-align: center; }
@media (max-width: 820px) {
  .strat-two, .strat-insights { grid-template-columns: 1fr; }
  .strat-hero { padding: 20px; }
  .strat-hero h2 { font-size: 20px; line-height: 27px; }
  .strat-sec { padding: 18px; }
}
@media print {
  .topbar, .subnav, .strat-toc, .page-head .actions, .staging-label { display: none !important; }
  .strat-sec, .strat-hero { break-inside: avoid; box-shadow: none; }
}
.strat-cards.peers { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.peer-tactics { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.peer-tactics a { font-size: 12px; white-space: nowrap; }

/* Ad Studio (Phase 6). */
.adstudio-page { gap: 22px; }
.as-new { padding: 22px; display: flex; flex-direction: column; gap: 16px; border-radius: 16px; }
.as-goals { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.as-goal { text-align: left; padding: 14px; border: 0; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--edge); font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.as-goal span { color: var(--muted); font-size: 12.5px; line-height: 18px; }
.as-goal.on { box-shadow: 0 0 0 2px var(--ink); }
.as-goal.soon { cursor: default; background: var(--head); box-shadow: none; opacity: .75; }
.as-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; max-height: 380px; overflow-y: auto; padding: 2px; }
.as-option { text-align: left; padding: 12px; border: 0; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--edge); font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
.as-option img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 8px; }
.as-option.on { box-shadow: 0 0 0 2px var(--accent); background: #f6fbf8; }
.as-metrics { font-size: 12px; color: var(--muted); }
.as-plan { padding: 20px; display: flex; flex-direction: column; gap: 14px; border-radius: 16px; }
.as-plan.closed { padding: 14px 20px; }
.as-plan-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.as-plan-head h3 { margin: 6px 0 2px; font-size: 16px; }
.as-base summary, .as-variant details summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.as-grammar { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 10px 0 6px; font-size: 12.5px; }
.as-grammar dt { color: var(--faint); }
.as-grammar dd { margin: 0; }
.as-variants { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.as-variant { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 14px; background: var(--head); }
.as-variant h4 { margin: 0; font-size: 14px; }
.as-change { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; }
.as-change-dim { padding: 1px 8px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 650; font-size: 11.5px; }
.as-from { color: var(--faint); text-decoration: line-through; }
.as-notes { margin: 0; padding: 8px 10px 8px 26px; border-radius: 10px; background: var(--warn-bg); color: var(--warn-ink); font-size: 12px; }
.as-ok { margin: 0; color: var(--good-ink); font-size: 12px; font-weight: 600; }
.fb-ad { background: #fff; border-radius: 12px; box-shadow: 0 0 0 1px var(--edge), 0 4px 14px rgba(0,0,0,.06); overflow: hidden; }
.fb-head { display: flex; gap: 8px; align-items: center; padding: 10px 12px 6px; }
.fb-head div { display: flex; flex-direction: column; line-height: 16px; }
.fb-head span { font-size: 11.5px; color: var(--faint); }
.fb-text { margin: 0; padding: 0 12px 10px; white-space: pre-line; font-size: 13px; line-height: 19px; }
.fb-media { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; background: #eee; }
.fb-empty { display: flex; align-items: center; justify-content: center; color: var(--faint); font-weight: 600; }
.fb-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; background: #f5f6f7; }
.fb-foot div { display: flex; flex-direction: column; min-width: 0; line-height: 17px; }
.fb-foot div span { font-size: 12px; color: var(--muted); }
.fb-cta { flex: none; padding: 6px 12px; border-radius: 6px; background: #e4e6eb; font-weight: 650; font-size: 12.5px; }
.as-setup { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.as-setup div { padding: 12px; border-radius: 12px; background: var(--head); display: flex; flex-direction: column; gap: 3px; }
.as-setup span { font-size: 11.5px; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; font-weight: 650; }

/* Static ad maker (Ad Studio step 2). */
.drawer.static-drawer { width: min(1100px, 100vw); }
.sa-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 28px; padding: 20px 24px; align-items: start; }
.sa-controls { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.sa-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; margin-bottom: 8px; }
.sa-photo { padding: 0; border: 0; border-radius: 8px; overflow: hidden; aspect-ratio: 4 / 5; cursor: pointer; box-shadow: 0 0 0 1px var(--edge); background: var(--head); }
.sa-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sa-photo.on { box-shadow: 0 0 0 2.5px var(--accent); }
.sa-field { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 12px; color: var(--muted); }
.sa-field .search { height: 34px; border-radius: 10px; color: var(--ink); font-size: 13px; }
.sa-preview { position: sticky; top: 0; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.sa-preview canvas { width: 100%; height: auto; border-radius: 12px; box-shadow: 0 0 0 1px var(--edge), 0 10px 30px rgba(0,0,0,.1); background: #f3f3f3; }
.as-statics { display: flex; gap: 8px; flex-wrap: wrap; }
.as-statics a { position: relative; width: 72px; border-radius: 8px; overflow: hidden; box-shadow: 0 0 0 1px var(--edge); text-decoration: none; }
.as-statics img { width: 100%; display: block; }
.as-statics span { position: absolute; left: 4px; bottom: 4px; font-size: 10px; padding: 0 5px; border-radius: 6px; background: rgba(0,0,0,.6); color: #fff; }
@media (max-width: 900px) { .sa-layout { grid-template-columns: 1fr; } .sa-preview { position: static; order: -1; max-width: 360px; justify-self: center; } }

/* Truth checks (Ad Studio step 3). */
.as-plan-actions { display: flex; gap: 6px; flex: none; }
.as-static { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.as-static a { position: relative; width: 72px; border-radius: 8px; overflow: hidden; box-shadow: 0 0 0 1px var(--edge); text-decoration: none; display: block; }
.truth { background: #fff; border-radius: 12px; box-shadow: 0 0 0 1px var(--edge); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.truth-head { display: flex; flex-direction: column; gap: 1px; }
.truth-head .ok { color: var(--good-ink); }
.truth-head .no { color: var(--bad-ink); }
.truth ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.truth li { display: flex; gap: 8px; font-size: 12.5px; line-height: 17px; }
.truth li div { display: flex; flex-direction: column; gap: 1px; }
.truth li span:not(.t-icon) { color: var(--muted); }
.t-icon { flex: none; width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; }
.t-pass .t-icon { background: var(--good-bg); color: var(--good-ink); }
.t-warn .t-icon { background: var(--warn-bg); color: var(--warn-ink); }
.t-fail .t-icon { background: var(--bad-bg); color: var(--bad-ink); }
.t-info .t-icon { background: var(--calm-bg); color: var(--calm-ink); }

/* ===== Social, second pass (2026-11-13): calmer, editorial, data first ===== */
.strategy-page, .adstudio-page, .posts-page, .studio-page { gap: 20px; }
.next-step { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px 12px 16px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--edge); }
.next-step > span { flex: 1; min-width: 220px; font-weight: 550; }
.pagetabs { display: flex; gap: 22px; border-bottom: 1px solid var(--edge); overflow-x: auto; scrollbar-width: none; }
.pagetabs button { flex: none; padding: 10px 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
.pagetabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.tab-body { display: flex; flex-direction: column; gap: 18px; }
.plain-sec { padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; border-radius: 14px; }
.plain-sec.flat { padding: 0; background: none; box-shadow: none; }
.plain-sec h2 { margin: 0; font-size: 16px; letter-spacing: -.005em; }
.plain-sec h3 { margin: 6px 0 0; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); }
.plain-sec p { margin: 0; line-height: 21px; }
.sec-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.small { font-size: 12px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* Overview */
.brief { padding: 6px 2px 4px; display: flex; flex-direction: column; gap: 10px; }
.brief-kicker { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.brief-head { margin: 0; font-size: 26px; line-height: 33px; letter-spacing: -.015em; max-width: 760px; font-weight: 750; }
.brief-text { margin: 0; color: var(--muted); max-width: 760px; font-size: 14px; line-height: 22px; }
.figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 10px; background: #fff; border-radius: 14px; box-shadow: 0 0 0 1px var(--edge); }
.figure { padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; }
.figure + .figure { border-left: 1px solid var(--line); }
.figure-value { font-size: 28px; line-height: 34px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.figure-label { color: var(--muted); font-size: 12.5px; line-height: 17px; }
.figure-note { color: var(--faint); font-size: 12px; }
.todo { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.todo li { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.todo li:first-child { border-top: 0; }
.todo label { display: flex; align-items: flex-start; gap: 10px; padding-top: 1px; cursor: pointer; }
.todo input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--ink); }
.todo-n { display: none; }
.todo b { font-weight: 600; line-height: 20px; }
.todo li.is-done b { color: var(--faint); text-decoration: line-through; }
.todo details summary { cursor: pointer; color: var(--faint); font-size: 12px; margin-top: 2px; }
.todo details p { margin-top: 6px; color: var(--muted); }
.plain-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.plain-list li { display: flex; flex-direction: column; gap: 2px; padding-left: 14px; position: relative; line-height: 20px; }
.plain-list li::before { content: ""; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: #c4c4c4; }
.plain-list.good li::before { background: var(--good-dot); }
.plain-list li span { color: var(--muted); }
.ahead { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.ahead article { padding: 10px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; }
.ahead article p { color: var(--muted); }
.more summary { cursor: pointer; font-weight: 600; }
table.lean { width: 100%; border-collapse: collapse; margin-top: 10px; }
table.lean th { text-align: left; font-weight: 600; padding: 8px 12px 8px 0; vertical-align: top; width: 30%; }
table.lean td { padding: 8px 12px 8px 0; border-top: 1px solid var(--line); vertical-align: top; }
table.lean tr:first-child td, table.lean tr:first-child th { border-top: 0; }
table.lean th { border-top: 1px solid var(--line); }
.unavailable summary { cursor: pointer; }

/* Audience */
.hbars { display: flex; flex-direction: column; gap: 6px; }
.hbar { display: grid; grid-template-columns: 92px 1fr 40px; gap: 10px; align-items: center; font-size: 12.5px; }
.hbar-label { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { height: 8px; border-radius: 4px; background: #efefef; overflow: hidden; }
.hbar-track span { display: block; height: 100%; background: var(--ink); border-radius: 4px; }
.hbar-value { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.buyers { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.buyer { padding: 12px 14px; border-radius: 12px; background: var(--head); display: flex; flex-direction: column; gap: 0; }
.buyer-name { font-weight: 600; }
.buyer-n { font-size: 26px; font-weight: 750; line-height: 32px; font-variant-numeric: tabular-nums; }
.people, .concepts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.person, .concept { background: #fff; border-radius: 14px; box-shadow: 0 0 0 1px var(--edge); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.person p, .concept p { margin: 0; color: var(--muted); line-height: 20px; }
.person-top { display: flex; gap: 10px; align-items: center; }
.person-top div { display: flex; flex-direction: column; }
.avatar-letter { width: 36px; height: 36px; border-radius: 50%; background: #e9e4da; color: #5a4a2f; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.person dl, .concept dl, .day dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; font-size: 12.5px; }
.person dt, .concept dt, .day dt { color: var(--faint); }
.person dd, .concept dd, .day dd { margin: 0; }
.person .btn { align-self: flex-start; margin-top: 4px; }

/* What works */
.creatives { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.creative { background: #fff; border-radius: 14px; box-shadow: 0 0 0 1px var(--edge); overflow: hidden; display: flex; flex-direction: column; }
.creative-media { position: relative; aspect-ratio: 1; background: var(--head); display: flex; }
.creative-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.no-thumb { margin: auto; color: var(--faint); font-weight: 600; }
.creative-format { position: absolute; left: 8px; top: 8px; font-size: 11px; font-weight: 650; padding: 1px 7px; border-radius: 6px; background: rgba(255,255,255,.92); }
.creative-body { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.creative-title { font-size: 12.5px; line-height: 17px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.metrics { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 5px 10px; font-size: 12px; align-items: center; }
.metrics dt { color: var(--faint); }
.metrics dd { margin: 0; display: flex; align-items: center; gap: 8px; justify-content: flex-end; font-variant-numeric: tabular-nums; }
.metrics dd > span:last-child { min-width: 34px; text-align: right; }
.meter { flex: 1; height: 5px; border-radius: 3px; background: #efefef; overflow: hidden; max-width: 90px; }
.meter span { display: block; height: 100%; background: var(--good-dot); border-radius: 3px; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tags span { font-size: 11px; padding: 1px 7px; border-radius: 6px; background: var(--head); color: var(--muted); }
.matrix-wrap { overflow-x: auto; }
.matrix { border-collapse: separate; border-spacing: 4px; min-width: 620px; width: 100%; }
.matrix th { font-size: 12px; font-weight: 600; color: var(--muted); text-align: left; padding: 4px 6px; }
.matrix tbody th { color: var(--ink); max-width: 180px; }
.matrix .cell { background: rgba(31, 58, 46, var(--heat, 0)); border-radius: 8px; padding: 8px; vertical-align: top; min-width: 90px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.05); }
.matrix .cell b { display: block; font-size: 12.5px; }
.matrix .cell span { font-size: 11.5px; color: var(--muted); }
.matrix .cell.hot, .matrix .cell.hot span { color: #fff; }
.matrix .cell.empty { background: none; box-shadow: none; text-align: center; color: var(--faint); border: 1px dashed #d9d9d9; }
.matrix .cell.empty button { border: 0; background: none; color: var(--link); font: inherit; font-weight: 600; cursor: pointer; }
.concept b { font-size: 14px; }

/* Plan */
.stack { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 2px; }
.pillar-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 6px; }
.pillar-list p { margin: 4px 0 0; color: var(--muted); }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.week { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.day { background: #fff; border-radius: 12px; box-shadow: 0 0 0 1px var(--edge); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.day-caption { margin: 0; font-size: 12px; color: var(--muted); font-style: italic; }
.mini-rows { display: flex; flex-direction: column; }
.mini-row { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-top: 1px solid var(--line); }
.mini-row:first-of-type { border-top: 0; }
.checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.check-line { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; cursor: pointer; line-height: 19px; }
.check-line input { margin-top: 3px; accent-color: var(--ink); }
.check-line input:checked + span { color: var(--faint); text-decoration: line-through; }

/* Quieter versions of earlier Phase 6 pieces. */
.ideas { background: #fff; box-shadow: 0 0 0 1px var(--edge); }
.ideas-head h2 { color: var(--ink); }
.ideas-head h2 svg, .idea-why svg { display: none; }
.idea-why { color: var(--muted); font-size: 12.5px; }
.idea-why::before { content: "Why: "; font-weight: 650; color: var(--ink); }
.idea-pillar { background: var(--head); color: var(--ink); }
.lvl.strategic, .lvl.creative, .idea-concepts .aud, .chips span:not(.lvl) { background: var(--head); color: var(--muted); font-weight: 600; }
.studio-usage { box-shadow: none; background: transparent; }
.subnav a { font-weight: 600; }

@media (max-width: 820px) {
  .two-col, .ahead { grid-template-columns: 1fr; }
  .figures { grid-template-columns: 1fr 1fr; }
  .figure:nth-child(3) { border-left: 0; }
  .figure:nth-child(n+3) { border-top: 1px solid var(--line); }
  .brief-head { font-size: 21px; line-height: 28px; }
  .week { grid-template-columns: repeat(7, 200px); }
}
.creative { min-width: 0; }
.creative-media { flex: none; }
.creative-title { overflow-wrap: anywhere; }
.metrics { grid-template-columns: auto minmax(0, 1fr); }
.metrics dd { min-width: 0; }
.metrics .meter { flex: 1 1 auto; min-width: 20px; max-width: none; }
.metrics dd > span:last-child { flex: none; }
.creative-body { min-width: 0; }
.tags span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.creative-media { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.creative-media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.creative-media .no-thumb { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.creative-format { z-index: 1; }

/* Ad Studio, second pass: compact ad cards; full detail in a side panel. */
.as-hyp { margin: 0; color: var(--muted); line-height: 21px; }
.as-hyp b { color: var(--ink); }
.as-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.as-card { display: flex; flex-direction: column; padding: 0; border: 0; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px var(--edge); font: inherit; text-align: left; cursor: pointer; transition: box-shadow .12s, transform .12s; min-width: 0; }
.as-card:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px #cfcfcf, 0 8px 20px rgba(0,0,0,.07); }
.as-card-media { position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; background: var(--head); }
.as-card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.as-card-media .no-thumb { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.as-card-badge { position: absolute; left: 8px; top: 8px; font-size: 11px; font-weight: 650; padding: 1px 7px; border-radius: 6px; background: rgba(255,255,255,.92); }
.as-card-body { display: flex; flex-direction: column; gap: 4px; padding: 12px; min-width: 0; }
.as-card-change { font-size: 11.5px; color: var(--faint); }
.as-card-change s { color: var(--faint); }
.as-card-change b { color: var(--ink); }
.as-card-title { font-size: 14px; }
.as-card-line { font-size: 12.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.as-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: 12px; }
.st { font-weight: 650; color: var(--muted); }
.st.ok { color: var(--good-ink); }
.st.no { color: var(--bad-ink); }
.drawer.variant-drawer { width: min(920px, 100vw); }
.vd { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 24px; padding: 20px 24px; align-items: start; }
.vd-left { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 0; }
.vd-right { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.vd-h { margin: 6px 0 0; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); }
.vd .truth { box-shadow: none; padding: 0; }
@media (max-width: 760px) { .vd { grid-template-columns: 1fr; } .vd-left { position: static; } }

/* Refinements: building progress, option thumbnails, quieter ideas, skeletons. */
.build { padding: 22px; display: flex; flex-direction: column; gap: 16px; border-radius: 14px; }
.build-head { display: flex; flex-direction: column; gap: 2px; }
.build-head h2 { margin: 0; font-size: 17px; }
.build-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.build-steps li { display: flex; gap: 12px; position: relative; padding-bottom: 18px; }
.build-steps li:last-child { padding-bottom: 0; }
.build-steps li:not(:last-child)::after { content: ""; position: absolute; left: 11px; top: 26px; bottom: 2px; width: 2px; background: var(--line); }
.build-steps li.done:not(:last-child)::after { background: var(--good-dot); }
.build-mark { flex: none; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; background: var(--head); color: var(--faint); box-shadow: inset 0 0 0 1px var(--edge); }
.build-steps li.done .build-mark { background: var(--good-dot); color: #fff; box-shadow: none; }
.build-steps li.now .build-mark { background: #fff; box-shadow: inset 0 0 0 1.5px var(--ink); color: var(--ink); }
.build-mark .spinner { margin: 0; width: 10px; height: 10px; }
.build-steps li div { display: flex; flex-direction: column; gap: 2px; padding-top: 2px; }
.build-steps li.next b { color: var(--faint); font-weight: 550; }
.build-steps li div span { color: var(--muted); font-size: 12.5px; }
.as-option { gap: 4px; }
.as-option-media { display: block; width: 100%; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--head); margin-bottom: 4px; }
.as-option-media img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: auto; border-radius: 0; }
.as-options { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); max-height: 520px; }
.as-option .person-top > span { display: flex; flex-direction: column; }
.as-goal span { font-size: 12.5px; }
.idea-for { margin: 0; font-size: 12px; font-weight: 600; color: var(--good-ink); }
.idea-idea { margin: 0; font-size: 12px; color: var(--faint); }
.idea-top .idea-pillar { background: none; padding: 0; color: var(--faint); font-weight: 650; text-transform: uppercase; letter-spacing: .04em; font-size: 11px; }
.sk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.sk-card { background: #fff; border-radius: 14px; box-shadow: 0 0 0 1px var(--edge); padding: 0 0 14px; display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.sk-card span, .sk-lines span { display: block; height: 12px; margin: 0 14px; border-radius: 6px; background: linear-gradient(90deg, #efefef 25%, #f7f7f7 37%, #efefef 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
.sk-card .sk-media { height: 160px; margin: 0 0 6px; border-radius: 0; }
.sk-card .short, .sk-lines .short { width: 45%; }
.sk-lines { display: flex; flex-direction: column; gap: 10px; padding: 6px 0; }
.sk-lines span { margin: 0; }
.sk-lines .wide { height: 22px; width: 60%; }

/* Calendar: ideas on their day, retail days. Ad Studio: action bar stays in view. */
.retail { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #8a4b12; }
.idea-chip { display: block; width: 100%; padding: 3px 6px; border: 1px dashed #c9c9c9; border-radius: 7px; background: #fff; font: inherit; font-size: 11.5px; color: var(--muted); text-align: left; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idea-chip:hover { border-color: var(--ink); color: var(--ink); }
.as-new .st-go { position: sticky; bottom: 0; z-index: 3; margin: 0 -22px -22px; padding: 12px 22px; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); border-top: 1px solid var(--line); border-radius: 0 0 16px 16px; }

.delta { font-size: 12px; font-weight: 650; color: var(--faint); }
.delta.up { color: var(--good-ink); }
.delta.down { color: var(--bad-ink); }
.todo li { align-items: flex-start; }
.todo-main { flex: 1; min-width: 0; }
.todo-go { flex: none; align-self: center; }
.two-col.tight { gap: 28px; }
.two-col.tight h3 { margin-bottom: 6px; }
.plans-head { margin-bottom: -8px; }
.plans-head .section-title { margin: 0; }

/* Findings computed from data; followers vs engagers. */
.findings ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.findings li { display: flex; flex-direction: column; gap: 2px; padding: 10px 0 10px 16px; border-top: 1px solid var(--line); position: relative; }
.findings li:first-child { border-top: 0; }
.findings li::before { content: ""; position: absolute; left: 0; top: 17px; width: 6px; height: 6px; border-radius: 2px; background: var(--ink); }
.findings li span { color: var(--muted); }
.legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-left: 8px; }
.lg-f, .pb.f { background: #b9b9b9; }
.lg-e, .pb.e { background: var(--good-dot); }
.pairs { display: flex; flex-direction: column; gap: 8px; }
.pair { display: grid; grid-template-columns: 130px 1fr 74px; gap: 10px; align-items: center; font-size: 12.5px; }
.pair-bars { display: flex; flex-direction: column; gap: 3px; }
.pb { display: block; height: 7px; border-radius: 4px; min-width: 2px; }
.pair-vals { display: flex; flex-direction: column; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); line-height: 13px; font-size: 11.5px; }

/* Strategy PDF (Download PDF prints every tab in order). */
.print-title { display: none; }
body.printing-strategy .print-title { display: block; margin: 18px 0 0; font-size: 20px; }
@media print {
  @page { margin: 14mm; }
  body { background: #fff; }
  .topbar, .subnav, .next-step, .pagetabs, .page-head .actions, .staging-label, .unavailable, .todo-go, .person .btn, .matrix .cell.empty button, .seg, #toast { display: none !important; }
  .print-title { display: block; page-break-before: always; font-size: 20px; margin: 0 0 8px; }
  .tab-body > .print-title:first-child { page-break-before: auto; }
  .card, .plain-sec, .creative, .person, .concept, .day, .figure { box-shadow: 0 0 0 1px #ddd !important; break-inside: avoid; }
  .creatives { grid-template-columns: repeat(4, 1fr); }
  .week { grid-template-columns: repeat(4, 1fr); overflow: visible; }
  .page { max-width: none; padding: 0; }
  details > summary { display: none; }
}

/* Small screens: form first, compact goal picker. Keyboard focus everywhere. */
@media (max-width: 900px) {
  .pc-side { order: 2; max-width: 320px; width: 100%; justify-self: center; }
}
@media (max-width: 640px) {
  .as-new { padding: 16px; }
  .as-new .st-go { margin: 0 -16px -16px; padding: 12px 16px; }
  .as-goals { grid-template-columns: 1fr 1fr; gap: 8px; }
  .as-goal { padding: 10px; }
  .as-goal span { font-size: 12px; line-height: 16px; }
  .as-goal.soon { display: none; }
  .as-options { grid-template-columns: 1fr 1fr; }
  .icon-btn, .idea-actions .icon-btn { min-width: 36px; min-height: 36px; }
  .plain-sec { padding: 16px; }
  .figure-value { font-size: 24px; line-height: 30px; }
  .pair { grid-template-columns: 96px 1fr 44px; }
  .hbar { grid-template-columns: 80px 1fr 36px; }
}
.as-card:focus-visible, .as-option:focus-visible, .as-goal:focus-visible, .pp-main:focus-visible, .pp-photo:focus-visible, .idea-chip:focus-visible, .post-chip:focus-visible, .pagetabs button:focus-visible, .seg button:focus-visible, .subnav a:focus-visible, .sa-photo:focus-visible, .creative:focus-within {
  outline: 2px solid var(--link); outline-offset: 2px;
}
.as-option { min-width: 0; overflow: hidden; }
.as-option b { overflow-wrap: anywhere; }
.as-option-media { position: relative; }
.as-option-media img { position: absolute; inset: 0; }
/* Static ad maker on phones: a smaller preview stays in view while you edit. */
@media (max-width: 900px) {
  .sa-preview { position: sticky; top: 0; z-index: 2; background: var(--card); padding: 4px 0 8px; max-width: none; width: 100%; }
  .sa-preview canvas { width: auto; max-width: 100%; max-height: 40vh; }
}

/* First visit: the Social journey. */
.journey { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; counter-reset: j; }
.journey li { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--edge); }
.journey li span:last-child { color: var(--muted); font-size: 12.5px; line-height: 18px; }
.journey li.now { box-shadow: 0 0 0 2px var(--ink); }
.journey-n { width: 22px; height: 22px; border-radius: 50%; background: var(--head); color: var(--muted); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.journey li.now .journey-n { background: var(--ink); color: #fff; }
.fix-row { display: flex; gap: 8px; justify-content: center; margin-top: 6px; }
@media (max-width: 760px) { .journey { grid-template-columns: 1fr 1fr; } }

/* Creative cards open the real ad or post. */
.creative { cursor: pointer; transition: box-shadow .12s, transform .12s; }
.creative:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px #cfcfcf, 0 8px 20px rgba(0,0,0,.07); }
.play { position: absolute; right: 8px; bottom: 8px; width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; z-index: 1; }
.drawer.creative-drawer { width: min(900px, 100vw); }
.cd { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 24px; padding: 20px 24px; align-items: start; }
.cd-media img, .cd-media video { width: 100%; border-radius: 12px; display: block; background: #000; }
.cd-iframe { width: 100%; height: 640px; border: 0; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--edge); }
.cd-frame { min-height: 300px; border-radius: 12px; background: var(--head); display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center; padding: 12px; }
.cd-frame img { width: 100%; border-radius: 10px; }
.cd-info { display: flex; flex-direction: column; gap: 12px; }
.cd-text { margin: 0; white-space: pre-line; color: var(--muted); line-height: 21px; }
.cd-info .btn { align-self: flex-start; }
@media (max-width: 760px) { .cd { grid-template-columns: 1fr; } .cd-iframe { height: 560px; } }
.st-match { margin: 0; font-size: 12.5px; font-weight: 600; }
.st-match.ok { color: var(--good-ink); }
div.st-match.no { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-radius: 10px; background: var(--bad-bg); color: var(--bad-ink); }
div.st-match.no span { font-weight: 400; }
div.st-match.no .btn { align-self: flex-start; }

/* Less crowded: audiences, week agenda, brands like yours. */
.clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.person .faint.small { line-height: 17px; }
.person-test { margin: 0; display: flex; gap: 8px; font-size: 12.5px; }
.person-test span { color: var(--faint); flex: none; }
.person details summary { cursor: pointer; font-size: 12.5px; color: var(--link); }
.person details p { margin-top: 6px; font-size: 12.5px; }
.agenda { display: flex; flex-direction: column; background: #fff; border-radius: 14px; box-shadow: 0 0 0 1px var(--edge); }
.agenda-day { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 6px 18px; padding: 14px 18px; border-top: 1px solid var(--line); }
.agenda-day:first-child { border-top: 0; }
.agenda-label { display: flex; flex-direction: column; gap: 2px; }
.agenda-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 18px; }
.agenda-cols p { margin: 2px 0 0; line-height: 20px; }
.agenda-k { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); }
.agenda-caption { grid-column: 2; margin: 0; color: var(--muted); font-style: italic; }
.peers { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.peer { background: #fff; border-radius: 14px; box-shadow: 0 0 0 1px var(--edge); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.peer p { margin: 0; line-height: 20px; }
.peer h3 { margin: 4px 0 0; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); }
.peer-head { display: flex; gap: 10px; align-items: center; }
.peer-head div { display: flex; flex-direction: column; }
.peer-head b { font-size: 15px; }
.peer-facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 12.5px; padding: 10px 12px; border-radius: 10px; background: var(--head); }
.peer-facts dt { color: var(--faint); }
.peer-facts dd { margin: 0; }
.tactics { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tactics li { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line); }
.tactics li:first-child { border-top: 0; }
.tactics li p { color: var(--muted); font-size: 12.5px; }
.tactic-use { display: flex; gap: 6px; flex-wrap: wrap; }
.peer-take { padding: 10px 12px; border-radius: 10px; background: #f3f7ff; }
@media (max-width: 640px) { .agenda-day { grid-template-columns: 1fr; } .agenda-caption { grid-column: 1; } .peers { grid-template-columns: 1fr; } }
.peer { text-align: left; align-items: stretch; }
.sa-photo { position: relative; }
.sa-photo.off { opacity: .55; }
.sa-tag { position: absolute; right: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--good-dot); color: #fff; font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.sa-photo.off .sa-tag { background: var(--bad-ink); }
.pc-mismatch { display: block; font-style: normal; font-size: 11.5px; color: var(--bad-ink); white-space: normal; }
.post-day.drop { background: #eef4ff; box-shadow: inset 0 0 0 2px var(--link); }
[draggable="true"] { cursor: grab; }
.next-step.stale { box-shadow: 0 0 0 1px #f3dfb3; background: #fff7e6; }

/* ---------- Studio: gallery first, docked composer, one sheet at a time ---------- */
.sx.studio-create { display: flex; flex-direction: column; gap: 14px; grid-template-columns: none; }
.sx-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sx-head h1 { margin: 0; font-size: 26px; }
.sx-dock { position: sticky; bottom: 14px; z-index: 40; width: 100%; max-width: 1120px; align-self: center; margin-top: 6px; }
.sx-sheet { margin-bottom: 8px; display: flex; flex-direction: column; max-height: min(640px, calc(100vh - 330px)); min-height: 240px; overflow: hidden; border-radius: 20px; background: var(--card, #fff); box-shadow: 0 22px 60px -14px rgba(12, 12, 24, .38), 0 0 0 1px var(--edge); }
.sx-sheet[hidden], .sx-pane[hidden], [data-libpane][hidden] { display: none !important; }
.sx-pane { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.sx-pane-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.sx-pane-head b { font-size: 15px; }
.sx-pane-body { display: flex; flex-direction: column; gap: 14px; min-height: 0; overflow: auto; padding: 14px 16px 18px; }
.sx-tabs { display: flex; align-items: center; gap: 4px; padding: 10px 12px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.sx-tabs button[role="tab"] { flex: none; padding: 7px 14px; border: 0; border-radius: 999px; background: none; font: inherit; font-weight: 550; color: var(--muted); cursor: pointer; white-space: nowrap; }
.sx-tabs button[role="tab"]:hover { color: var(--ink); }
.sx-tabs button[aria-selected="true"] { background: var(--head); color: var(--ink); }
.sx-tabs-end { position: sticky; right: 0; display: flex; align-items: center; gap: 6px; margin-left: auto; padding-left: 8px; background: var(--card, #fff); }
.sx-q { width: 180px; height: 32px; }
.sx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px 12px; }
.sx-card { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 0; border: 0; background: none; font: inherit; color: var(--ink); text-align: left; text-decoration: none; cursor: pointer; }
.sx-card-img { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1; overflow: hidden; border-radius: 14px; background: var(--head); box-shadow: 0 0 0 1px var(--edge); transition: box-shadow .15s; }
.sx-card-img img { width: 100%; height: 100%; object-fit: cover; }
.sx-card:hover .sx-card-img { box-shadow: 0 0 0 1px var(--muted); }
.sx-card.on .sx-card-img { box-shadow: 0 0 0 3px var(--accent); }
.sx-card.off { opacity: .45; cursor: not-allowed; }
.sx-card b { overflow: hidden; font-size: 13.5px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.sx-card small { font-size: 12px; color: var(--muted); }
.sx-new .sx-card-img { background: none; box-shadow: none; border: 1.5px dashed var(--edge); }
.sx-new .sx-card-img span { font-size: 34px; font-weight: 300; color: var(--muted); }
.sx-tick { position: absolute; top: 8px; right: 8px; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; }
.sx-sheet .look-tip, .sx-sheet .st-shot-tip { display: none !important; }
.sx-sheet .st-shot-img { width: 52px; height: 64px; }
.sx-sheet .st-shot-row { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.sx-bar { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 20px; background: var(--card, #fff); box-shadow: 0 14px 40px -14px rgba(12, 12, 24, .3), 0 0 0 1px var(--edge); }
.sx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sx-chip { display: inline-flex; align-items: center; gap: 8px; max-width: 260px; min-height: 40px; padding: 4px 4px 4px 4px; border-radius: 12px; background: var(--head); box-shadow: 0 0 0 1px var(--edge); cursor: pointer; }
.sx-chip:hover { box-shadow: 0 0 0 1px var(--muted); }
.sx-chip img { flex: none; width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }
.sx-chip > span { display: flex; flex-direction: column; min-width: 0; padding: 0 4px; line-height: 1.2; }
.sx-chip b { overflow: hidden; font-size: 12.5px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.sx-chip small { font-size: 11px; color: var(--muted); }
.sx-x { flex: none; width: 24px; height: 24px; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 15px; line-height: 1; cursor: pointer; }
.sx-x:hover { background: var(--edge); color: var(--ink); }
.sx-bar #st-prompt { min-height: 48px; max-height: 200px; padding: 6px 4px; border: 0; border-radius: 0; background: transparent; font-size: 15px; line-height: 22px; resize: none; outline: none; box-shadow: none; }
.sx-bar .st-notice, .sx-bar .pc-warn { margin: 0; }
.sx-tools { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.sx-kind { margin: 0; }
.sx-kind button { padding: 6px 14px; }
.sx-plus-wrap { position: relative; }
.sx-plus { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--head); box-shadow: 0 0 0 1px var(--edge); font-size: 20px; line-height: 1; cursor: pointer; }
.sx-plus:hover, .sx-plus[aria-expanded="true"] { background: var(--ink); color: #fff; }
.sx-menu { position: absolute; z-index: 60; bottom: calc(100% + 8px); left: 0; display: flex; flex-direction: column; width: 290px; padding: 6px; border-radius: 14px; background: var(--card, #fff); box-shadow: 0 18px 44px -10px rgba(12, 12, 24, .38), 0 0 0 1px var(--edge); }
.sx-menu button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 8px 10px; border: 0; border-radius: 10px; background: none; font: inherit; text-align: left; cursor: pointer; }
.sx-menu button:hover { background: var(--head); }
.sx-menu b { font-size: 14px; font-weight: 600; }
.sx-menu span { font-size: 12px; color: var(--muted); }
.sx-tool { height: 34px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--head); box-shadow: 0 0 0 1px var(--edge); font: inherit; font-size: 13px; font-weight: 550; color: var(--ink); white-space: nowrap; cursor: pointer; }
.sx-tool:hover { box-shadow: 0 0 0 1px var(--muted); }
.sx-spacer { flex: 1; }
.sx-settings { min-width: 0; flex: 0 1 auto; overflow: hidden; }
.sx-settings .st-settings { display: flex; flex-wrap: nowrap; gap: 6px; }
.sx-go { flex: none; }
.sx-settings .st-settings label { gap: 0; font-size: 0; }
.sx-settings .st-settings .select { height: 34px; max-width: 160px; padding: 0 10px; border-radius: 999px; font-size: 13px; }
.sx-go { gap: 8px; margin: 0; padding: 0; border: 0; }
.sx-go #st-cost-line { display: none; }
.sx-go #st-generate { height: 36px; border-radius: 999px; padding: 0 18px; }
.sx-opt-notes { padding-top: 6px; border-top: 1px solid var(--line); }
@media (max-width: 980px) { .sx-tools { flex-wrap: wrap; } }
@media (max-width: 700px) {
  .sx-dock { bottom: 0; }
  .sx-bar { border-radius: 16px 16px 0 0; }
  .sx-sheet { max-height: calc(100vh - 410px); min-height: 180px; }
  .sx-tabs-end .sx-q { display: none; }
  .sx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sx-tabs-end .sx-q { width: 120px; }
  .sx-settings .st-settings .select { max-width: 140px; }
  .sx-tools { flex-wrap: wrap; row-gap: 8px; }
  .sx-spacer { display: none; }
  .sx-settings { order: 5; flex: 1 1 100%; overflow-x: auto; }
  .sx-tools > [data-pane-open="cost"] { order: 4; margin-left: auto; }
  .sx-go { order: 6; flex: 1 1 100%; }
  .sx-go #st-generate { width: 100%; }
  .sx-bar #st-prompt { min-height: 44px; }
  .sx-chips { flex-wrap: nowrap; overflow-x: auto; }
}

/* Inside the sheet the tab or panel title already names it. */
.sx-sheet .st-angle > .st-pick-label, .sx-sheet .st-shots-head .st-pick-label, .sx-sheet .st-look > .st-pick-label, .sx-sheet .st-refsup .st-talk-head > b { display: none; }
.sx-sheet .st-shots-head { justify-content: flex-end; }
.sx-settings .st-settings label { flex-direction: row; align-items: center; margin: 0; }

/* ---------- Camera moves: a tiny scene that moves the way the camera would ---------- */
.cm-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.cm-view { background: #eef0f4; perspective: 240px; overflow: hidden; }
.cm-scene { display: block; width: 100%; height: 100%; transform-origin: 50% 55%; }
.cm-scene svg { display: block; width: 100%; height: 100%; overflow: visible; }
.cm-scene .cm-bg, .cm-scene .cm-fig { transform-box: view-box; transform-origin: 50% 55%; }
.cm-card:hover .cm-scene, .cm-card:focus-visible .cm-scene, .cm-card.on .cm-scene, .sx-chip .cm-scene { animation: var(--cm-anim) 2.4s ease-in-out infinite alternate; }
.cm-card:hover .cm-bg, .cm-card:focus-visible .cm-bg, .cm-card.on .cm-bg, .sx-chip .cm-bg { animation: var(--cm-bg, none) 2.4s ease-in-out infinite alternate; }
.cm-card:hover .cm-fig, .cm-card:focus-visible .cm-fig, .cm-card.on .cm-fig, .sx-chip .cm-fig { animation: var(--cm-fig, none) 2.4s ease-in-out infinite alternate; }
.cm-chipicon { flex: none; display: block; width: 32px; height: 32px; padding: 0 !important; border-radius: 8px; }
.sx-cam-help { margin: 0; }
.cm-zoomin { --cm-anim: cm-zoomin; } .cm-zoomout { --cm-anim: cm-zoomout; }
.cm-dollyin { --cm-anim: cm-dollyin; } .cm-dollyout { --cm-anim: cm-dollyout; }
.cm-dollyzoom { --cm-anim: none; --cm-bg: cm-zoomout; }
.cm-rack { --cm-anim: none; --cm-bg: cm-blurin; --cm-fig: cm-blurout; }
.cm-truckleft { --cm-anim: cm-right; } .cm-truckright { --cm-anim: cm-left; }
.cm-panleft { --cm-anim: cm-panleft; } .cm-panright { --cm-anim: cm-panright; }
.cm-tracking { --cm-anim: none; --cm-bg: cm-dollyin; --cm-fig: cm-walk; }
.cm-sidetrack { --cm-anim: none; --cm-bg: cm-left; --cm-fig: cm-walk; }
.cm-whip { --cm-anim: cm-whip; }
.cm-tiltup { --cm-anim: cm-down; } .cm-tiltdown { --cm-anim: cm-up; }
.cm-pedup { --cm-anim: cm-pedup; } .cm-peddown { --cm-anim: cm-peddown; }
.cm-craneup { --cm-anim: cm-craneup; } .cm-cranedown { --cm-anim: cm-cranedown; }
.cm-arcleft { --cm-anim: cm-arcleft; } .cm-arcright { --cm-anim: cm-arcright; }
.cm-orbit { --cm-anim: cm-orbit; }
.cm-aerial { --cm-anim: cm-aerial; }
.cm-bullet { --cm-anim: cm-arcright; --cm-fig: cm-jump; }
.cm-handheld { --cm-anim: cm-shake; }
.cm-pov { --cm-anim: cm-pov; }
.cm-snorri { --cm-anim: none; --cm-bg: cm-sway; }
.cm-robot { --cm-anim: cm-robot; }
@keyframes cm-zoomin { from { transform: scale(1); } to { transform: scale(1.6); } }
@keyframes cm-zoomout { from { transform: scale(1.6); } to { transform: scale(1); } }
@keyframes cm-dollyin { from { transform: scale(1) translateY(0); } to { transform: scale(1.45) translateY(4%); } }
@keyframes cm-dollyout { from { transform: scale(1.45) translateY(4%); } to { transform: scale(1) translateY(0); } }
@keyframes cm-blurin { from { filter: blur(0); } to { filter: blur(2px); } }
@keyframes cm-blurout { from { filter: blur(2px); } to { filter: blur(0); } }
@keyframes cm-right { from { transform: translateX(-18%); } to { transform: translateX(18%); } }
@keyframes cm-left { from { transform: translateX(18%); } to { transform: translateX(-18%); } }
@keyframes cm-panleft { from { transform: translateX(-14%) rotateY(-8deg); } to { transform: translateX(14%) rotateY(8deg); } }
@keyframes cm-panright { from { transform: translateX(14%) rotateY(8deg); } to { transform: translateX(-14%) rotateY(-8deg); } }
@keyframes cm-walk { from { transform: translateY(0); } 25% { transform: translateY(-2%); } 50% { transform: translateY(0); } 75% { transform: translateY(-2%); } to { transform: translateY(0); } }
@keyframes cm-whip { 0%, 40% { transform: translateX(30%); filter: blur(0); } 50% { filter: blur(3px); } 60%, 100% { transform: translateX(-30%); filter: blur(0); } }
@keyframes cm-down { from { transform: translateY(-22%); } to { transform: translateY(22%); } }
@keyframes cm-up { from { transform: translateY(22%); } to { transform: translateY(-22%); } }
@keyframes cm-pedup { from { transform: translateY(-12%); } to { transform: translateY(12%); } }
@keyframes cm-peddown { from { transform: translateY(12%); } to { transform: translateY(-12%); } }
@keyframes cm-craneup { from { transform: translateY(0) scale(1); } to { transform: translateY(16%) scale(.72) rotateX(18deg); } }
@keyframes cm-cranedown { from { transform: translateY(16%) scale(.72) rotateX(18deg); } to { transform: translateY(0) scale(1); } }
@keyframes cm-arcleft { from { transform: rotateY(-28deg); } to { transform: rotateY(28deg); } }
@keyframes cm-arcright { from { transform: rotateY(28deg); } to { transform: rotateY(-28deg); } }
@keyframes cm-orbit { from { transform: rotateY(0); } to { transform: rotateY(-180deg); } }
@keyframes cm-aerial { from { transform: scale(1.2) translateY(0); } to { transform: scale(.45) translateY(18%) rotateX(30deg); } }
@keyframes cm-jump { from { transform: translateY(-6%); } to { transform: translateY(-6%); } }
@keyframes cm-shake { 0% { transform: translate(0, 0) rotate(0); } 20% { transform: translate(1.5%, -1%) rotate(.6deg); } 40% { transform: translate(-1%, 1.2%) rotate(-.5deg); } 60% { transform: translate(1%, .5%) rotate(.4deg); } 80% { transform: translate(-1.4%, -.8%) rotate(-.6deg); } 100% { transform: translate(.5%, 1%) rotate(.2deg); } }
@keyframes cm-pov { from { transform: scale(1.3) translateY(4%); } 50% { transform: scale(1.4) translateY(2%); } to { transform: scale(1.55) translateY(4%); } }
@keyframes cm-sway { from { transform: rotate(-4deg) translateX(-6%); } to { transform: rotate(4deg) translateX(6%); } }
@keyframes cm-robot { 0% { transform: rotateY(35deg) scale(1.3); } 70% { transform: rotateY(-35deg) scale(1.1); } 100% { transform: rotateY(-35deg) scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .cm-scene, .cm-bg, .cm-fig { animation: none !important; } }

/* A direction mark on each still card, so the moves read before hovering. */
.cm-view { position: relative; }
.cm-card .cm-view::after { position: absolute; left: 8px; bottom: 6px; padding: 1px 7px; border-radius: 999px; background: rgba(255,255,255,.88); color: #1d1f24; font-size: 15px; font-weight: 600; line-height: 20px; }
.cm-card .cm-view:has(.cm-static)::after { content: "■"; }
.cm-card .cm-view:has(.cm-zoomin)::after { content: "＋"; }
.cm-card .cm-view:has(.cm-zoomout)::after { content: "－"; }
.cm-card .cm-view:has(.cm-dollyin)::after { content: "⇧"; }
.cm-card .cm-view:has(.cm-dollyout)::after { content: "⇩"; }
.cm-card .cm-view:has(.cm-dollyzoom)::after { content: "⇕"; }
.cm-card .cm-view:has(.cm-rack)::after { content: "◎"; }
.cm-card .cm-view:has(.cm-truckleft)::after { content: "←"; }
.cm-card .cm-view:has(.cm-truckright)::after { content: "→"; }
.cm-card .cm-view:has(.cm-panleft)::after { content: "↶"; }
.cm-card .cm-view:has(.cm-panright)::after { content: "↷"; }
.cm-card .cm-view:has(.cm-tracking)::after { content: "⇢"; }
.cm-card .cm-view:has(.cm-sidetrack)::after { content: "⇉"; }
.cm-card .cm-view:has(.cm-whip)::after { content: "⇶"; }
.cm-card .cm-view:has(.cm-tiltup)::after { content: "↥"; }
.cm-card .cm-view:has(.cm-tiltdown)::after { content: "↧"; }
.cm-card .cm-view:has(.cm-pedup)::after { content: "⇑"; }
.cm-card .cm-view:has(.cm-peddown)::after { content: "⇓"; }
.cm-card .cm-view:has(.cm-craneup)::after { content: "⤴"; }
.cm-card .cm-view:has(.cm-cranedown)::after { content: "⤵"; }
.cm-card .cm-view:has(.cm-arcleft)::after { content: "↺"; }
.cm-card .cm-view:has(.cm-arcright)::after { content: "↻"; }
.cm-card .cm-view:has(.cm-orbit)::after { content: "⟳"; }
.cm-card .cm-view:has(.cm-aerial)::after { content: "⇱"; }
.cm-card .cm-view:has(.cm-bullet)::after { content: "✦"; }
.cm-card .cm-view:has(.cm-handheld)::after { content: "〰"; }
.cm-card .cm-view:has(.cm-pov)::after { content: "◉"; }
.cm-card .cm-view:has(.cm-snorri)::after { content: "⌖"; }
.cm-card .cm-view:has(.cm-robot)::after { content: "⤿"; }

/* ---------- Studio projects and folders ---------- */
.sx-body { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; align-items: start; }
.sx-content { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.sx-rail { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 110px); overflow: auto; padding: 10px; border-radius: 16px; background: rgba(255, 255, 255, .78); box-shadow: 0 0 0 1px var(--edge); backdrop-filter: blur(6px); }
.sx-rail-head { display: flex; align-items: center; justify-content: space-between; margin: 10px 4px 4px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sx-rail-head .sx-tool { height: 26px; padding: 0 10px; font-size: 12px; text-transform: none; letter-spacing: 0; }
.sx-rail-item { display: flex; flex: 1; align-items: center; gap: 8px; min-width: 0; padding: 7px 10px; border: 0; border-radius: 10px; background: none; font: inherit; font-size: 14px; color: var(--ink); text-align: left; cursor: pointer; }
.sx-rail-item:hover { background: var(--head); }
.sx-rail-item.on { background: var(--sx-violet-soft); color: var(--sx-violet-ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--sx-violet); }
.sx-rail-item.drop { background: var(--sx-green-soft); box-shadow: inset 0 0 0 2px var(--sx-green); }
.sx-node-name { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sx-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sx-dot { flex: none; width: 9px; height: 9px; border-radius: 3px; background: hsl(var(--h) 70% 58%); }
.sx-node-row { position: relative; display: flex; align-items: center; padding-left: calc(var(--d) * 14px); }
.sx-caret { flex: none; width: 18px; height: 22px; padding: 0; border: 0; background: none; font-size: 11px; color: var(--muted); cursor: pointer; }
.sx-caret:disabled { cursor: default; }
.sx-node-acts { display: none; position: absolute; right: 4px; gap: 2px; padding: 2px; border-radius: 8px; background: #fff; box-shadow: 0 0 0 1px var(--edge); }
.sx-node-row:hover .sx-node-acts, .sx-node-row:focus-within .sx-node-acts { display: flex; }
.sx-node-acts button { height: 22px; min-width: 22px; padding: 0 5px; border: 0; border-radius: 6px; background: none; font: inherit; font-size: 12px; color: var(--muted); cursor: pointer; }
.sx-node-acts button:hover { background: var(--head); color: var(--ink); }
.sx-node-acts button.armed { background: #fde8e8; color: #b42318; font-weight: 600; }
.sx-node-edit { display: flex; gap: 6px; padding: 4px 0 4px calc(var(--d) * 14px + 18px); }
.sx-node-edit input { flex: 1; min-width: 0; height: 30px; padding: 0 8px; border: 1px solid var(--sx-violet); border-radius: 8px; font: inherit; font-size: 13px; }
.sx-rail-empty { margin: 4px 6px; line-height: 1.45; }
.sx-crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 15px; }
.sx-crumbs > span { color: var(--muted); }
.sx-crumb-new { height: 28px; margin-left: 6px; font-size: 12.5px; }
.sx-selbar { position: relative; display: flex; align-items: center; gap: 10px; }
.sx-move-wrap { position: relative; display: inline-flex; }
.sx-pop { position: absolute; z-index: 30; top: calc(100% + 6px); right: 0; display: flex; flex-direction: column; gap: 1px; width: 240px; max-height: 300px; overflow: auto; padding: 6px; border-radius: 12px; background: #fff; box-shadow: 0 16px 40px -12px rgba(12, 12, 24, .35), 0 0 0 1px var(--edge); }
.sx-pop-head { padding: 4px 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.sx-pop-item { padding: 7px 8px 7px calc(8px + var(--d, 0) * 14px); border: 0; border-radius: 8px; background: none; font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.sx-pop-item:hover { background: var(--sx-violet-soft); color: var(--sx-violet-ink); }
.sx-pop .linklike { align-self: flex-start; margin: 4px 8px; }
.st-job { position: relative; }
.st-job.sel { box-shadow: 0 0 0 3px var(--sx-violet), 0 8px 24px -10px rgba(109, 94, 252, .5); }
.sx-check { position: absolute; z-index: 3; top: 10px; left: 10px; width: 28px; height: 28px; border: 2px solid #fff; border-radius: 50%; background: rgba(12, 12, 24, .35); color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; }
.sx-check.on { background: var(--sx-violet); }
.sx-infolder { margin: 0; font-size: 12px; font-weight: 600; color: var(--sx-violet-ink); cursor: pointer; }
.sx-dest { display: flex; flex-direction: column; padding: 0 6px; line-height: 1.2; }
.sx-dest small { font-size: 11px; color: var(--muted); }
.sx-dest b { font-size: 12.5px; }
@media (max-width: 900px) {
  .sx-body { grid-template-columns: 1fr; }
  .sx-rail { position: static; flex-direction: row; flex-wrap: nowrap; max-height: none; overflow-x: auto; }
  .sx-rail-head { margin: 0 4px; }
  .sx-rail .sx-node-row { padding-left: 0; }
  .sx-rail-item { flex: none; }
  .sx-rail-empty { display: none; }
}

/* ---------- Studio colour: a soft wash, tinted chips, a bright Make button ---------- */
:root { --sx-violet: #6d5efc; --sx-violet-soft: #efedff; --sx-violet-ink: #4a3fd6; --sx-pink: #ec4c93; --sx-green: #16a34a; --sx-green-soft: #e8f7ee; }
body:has(.studio-page) { background: radial-gradient(1100px 520px at 0% -8%, rgba(109, 94, 252, .11), transparent 62%), radial-gradient(900px 460px at 100% 0%, rgba(236, 76, 147, .09), transparent 60%), radial-gradient(800px 600px at 50% 110%, rgba(20, 184, 166, .07), transparent 60%), #f6f6fa; background-attachment: fixed; }
.studio-page .st-job { transition: transform .18s ease, box-shadow .18s ease; }
.studio-page .st-job:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--edge), 0 14px 30px -14px rgba(40, 30, 120, .28); }
.sx-bar { box-shadow: 0 18px 46px -16px rgba(80, 60, 220, .35), 0 0 0 1px rgba(109, 94, 252, .22); }
.sx-bar:focus-within { box-shadow: 0 18px 46px -16px rgba(80, 60, 220, .45), 0 0 0 2px rgba(109, 94, 252, .45); }
.sx-go #st-generate:not(:disabled) { border: 0; background: linear-gradient(135deg, #5b4cf5 0%, #8b5cf6 55%, #ec4c93 120%); color: #fff; box-shadow: 0 8px 20px -8px rgba(109, 94, 252, .8), inset 0 1px 0 rgba(255, 255, 255, .25); }
.sx-go #st-generate:not(:disabled):hover { filter: brightness(1.06); }
.sx-plus:hover, .sx-plus[aria-expanded="true"] { background: linear-gradient(135deg, #5b4cf5, #8b5cf6); color: #fff; box-shadow: none; }
.sx-tabs button[aria-selected="true"] { background: var(--sx-violet-soft); color: var(--sx-violet-ink); }
.sx-kind button[aria-selected="true"] { color: var(--sx-violet-ink); }
.sx-card.on .sx-card-img, .st-shot.on { box-shadow: 0 0 0 3px var(--sx-violet); }
.st-shot.on { background: var(--sx-violet-soft); }
.sx-tick { background: var(--sx-violet); }
.sx-chip { --c: #6b7280; background: color-mix(in srgb, var(--c) 10%, #fff); box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 28%, #fff); }
.sx-chip b { color: color-mix(in srgb, var(--c) 70%, #111); }
.sx-chip[data-pane-open="lib:products"] { --c: #2563eb; }
.sx-chip[data-pane-open="lib:characters"] { --c: #0d9488; }
.sx-chip[data-pane-open="lib:shots"] { --c: #6d5efc; }
.sx-chip[data-pane-open="lib:looks"] { --c: #d97706; }
.sx-chip[data-pane-open="lib:camera"] { --c: #0891b2; }
.sx-chip[data-pane-open="lib:refs"] { --c: #be185d; }
.sx-chip[data-pane-open="carousel"] { --c: #db2777; }
.sx-chip[data-pane-open="angle"] { --c: #7c3aed; }
.sx-chip[data-pane-open="options"], .sx-chip[data-pane-open="talk"] { --c: #475569; }
.sx-chip:has(.sx-dest) { --c: #16a34a; cursor: default; }
.st-shot-glabel, .sx-rail-head span { color: var(--sx-violet-ink); }
.sx-head h1 { background: linear-gradient(90deg, #1d1b3a, #5b4cf5 70%, #ec4c93); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (prefers-reduced-motion: reduce) { .studio-page .st-job { transition: none; } .studio-page .st-job:hover { transform: none; } }

/* ---------- Studio uses the full window: the rail on the left edge, the gallery fills the rest ---------- */
.page.studio-page { max-width: none; padding-left: 20px; padding-right: 24px; }
.studio-page .sx-body { grid-template-columns: 240px minmax(0, 1fr); gap: 24px; }
.studio-page .sx-rail { min-height: calc(100vh - 120px); }
.studio-page .st-gallery { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
/* The composer spans the gallery column, not the rail. */
.sx-body ~ .sx-dock { align-self: stretch; width: auto; max-width: none; margin-left: 264px; }
/* Cards: room inside, so the hover lift reads as a card, not text on the edge. */
.studio-page .st-job { background: #fff; border-radius: 18px; }
.studio-page .st-job .st-media { margin: 8px 8px 0; border-radius: 12px; overflow: hidden; }
/* The Safari width rule sets aspect-ratio boxes to 100%; with this card's 8px inset that ran 16px past the right edge. */
.studio-page .st-job .st-media { width: calc(100% - 16px); }
.studio-page .st-job-body { padding: 14px 16px 16px; gap: 8px; }
.studio-page .st-job .fix-row, .studio-page .st-job .st-actions { flex-wrap: wrap; gap: 8px; }
@media (max-width: 900px) {
  .studio-page .sx-body { grid-template-columns: 1fr; }
  .studio-page .sx-rail { min-height: 0; }
  .sx-body ~ .sx-dock { margin-left: 0; }
}
@media (max-width: 600px) { .page.studio-page { padding-left: 12px; padding-right: 12px; } }
/* Rail rows keep their own height in the taller rail (they only stretch sideways inside a folder row). */
.sx-rail > .sx-rail-item, .sx-rail > .sx-node, .sx-rail > .sx-rail-head, .sx-rail > .sx-node-edit { flex: none; }
.sx-rail { justify-content: flex-start; }

/* ---- Ads (Phase 1 of the Ads rebuild): Studio's layout, ad type library, business picker ---- */
.ads-page .sx-content { gap: 16px; padding-bottom: 8px; }
.ad-ric { flex: none; width: 18px; text-align: center; color: var(--muted); font-size: 13px; }
.sx-rail-item.on .ad-ric { color: var(--sx-violet); }
.ad-rail-prod img { flex: none; width: 22px; height: 22px; border-radius: 6px; object-fit: cover; }
.ad-rail-biz { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 12px 8px 4px; border-top: 1px solid var(--line); }
.ad-rail-biz > span:not(.biz-ic) { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.2; }
.ad-rail-biz small { font-size: 11px; color: var(--muted); }
.ad-rail-biz b { font-size: 13px; }
.av-block { display: flex; flex-direction: column; gap: 10px; }
.ad-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ad-stat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 16px; border: 0; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px var(--edge); font: inherit; color: var(--ink); text-align: left; cursor: pointer; transition: box-shadow .15s ease, transform .15s ease; }
.ad-stat:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px var(--sx-violet), 0 10px 24px -14px rgba(40, 30, 120, .35); }
.ad-stat b { font-size: 26px; font-weight: 650; font-variant-numeric: tabular-nums; }
.ad-stat span { font-size: 12.5px; color: var(--muted); }
.ad-stat:nth-child(1) b { color: var(--sx-violet-ink); } .ad-stat:nth-child(2) b { color: #0f766e; } .ad-stat:nth-child(3) b { color: #b45309; } .ad-stat:nth-child(4) b { color: var(--sx-green); }
.ad-recent { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.ad-recent-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; border: 0; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px var(--edge); font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.ad-recent-card:hover { box-shadow: 0 0 0 1px var(--sx-violet), 0 12px 28px -16px rgba(40, 30, 120, .35); }
.ad-recent-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--head); }
.ad-recent-media > img, .ad-recent-media > .at-mock { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; object-fit: cover; }
.ad-recent-body { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px 14px; }
.ad-recent-body small { font-size: 11.5px; font-weight: 600; letter-spacing: .02em; color: var(--sx-violet-ink); }
.ad-recent-body b { font-size: 14.5px; line-height: 1.3; }

/* Business picker */
.biz-card h2 { margin: 0 0 4px; font-size: 24px; letter-spacing: -.01em; }
.biz-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.biz-pick.compact { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 6px; }
.biz-opt { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--edge); border-radius: 18px; background: #fff; font: inherit; color: var(--ink); text-align: left; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.biz-pick.compact .biz-opt { padding: 12px 14px; gap: 10px; }
.biz-opt:hover { border-color: #b9c6dd; }
.biz-opt.on { border-color: #2f7cf6; box-shadow: 0 0 0 3px rgba(47, 124, 246, .14); }
.biz-ic { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: #e8f0fe; color: #2f7cf6; }
.biz-ic.small { width: 30px; height: 30px; }
.biz-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.biz-ic.small svg { width: 16px; height: 16px; }
.biz-pick.compact .biz-ic { width: 34px; height: 34px; }
.biz-txt { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.biz-txt b { font-size: 16px; font-weight: 650; }
.biz-pick.compact .biz-txt b { font-size: 14px; }
.biz-txt small { font-size: 13.5px; color: var(--muted); }
.biz-pick.compact .biz-txt small { font-size: 12px; }
.biz-radio { flex: none; width: 22px; height: 22px; border: 2px solid #cfd5df; border-radius: 50%; }
.biz-opt.on .biz-radio { border: 6px solid #2f7cf6; }

/* Ad type cards and their mock previews */
.at-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.at-pills .chip { padding: 6px 12px; }
.at-q { width: 200px; height: 34px; margin-left: auto; }
.at-sec { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.at-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 14px; align-items: stretch; }
.sx-sheet .at-grid { grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 12px; }
.at-card { position: relative; display: flex; flex-direction: column; overflow: hidden; padding: 8px; border: 0; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px var(--edge); font: inherit; color: var(--ink); text-align: left; cursor: pointer; transition: box-shadow .15s ease, transform .15s ease; }
.at-card:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--sx-violet), 0 14px 30px -16px rgba(40, 30, 120, .4); }
.at-card.on { box-shadow: 0 0 0 2.5px var(--sx-violet); }
.at-card.off .at-mock { filter: grayscale(.85); opacity: .55; }
.at-card .sx-tick { z-index: 5; }
.at-body { display: flex; flex: 1; flex-direction: column; gap: 3px; padding: 10px 6px 4px; }
.at-body b { font-size: 14px; font-weight: 620; }
.at-body small { font-size: 12.5px; color: var(--muted); }
.at-meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; padding-top: 8px; }
.at-meta span { padding: 2px 7px; border-radius: 999px; background: var(--head); font-size: 11px; font-weight: 550; color: var(--muted); }
.at-meta .at-own { background: #e8f0fe; color: #1d5fd1; }
.at-why { font-size: 11.5px; color: #0f766e; }
.at-need { font-size: 11.5px; line-height: 1.35; color: #b45309; }
.at-mock { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 5; border-radius: 12px; background: #e9e7f3; }
.at-mock > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.at-mock > span { position: absolute; z-index: 2; }
.at-cap { left: 8%; right: 8%; bottom: 8%; padding: 7px 8px; border-radius: 8px; background: rgba(255, 255, 255, .92); }
.at-cap i, .at-capt i, .at-meme i, .at-quote i, .at-reviews i, .at-press i, .at-big i, .at-cover i, .at-cal i, .at-ui i, .at-list i { display: block; height: 5px; border-radius: 3px; background: #c9c6d8; }
.at-cap.warn { background: #fff1e6; } .at-cap.warn i { background: #f4b183; }
.at-capt { left: 12%; right: 12%; bottom: 10%; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.at-capt i { width: 100%; height: 7px; background: rgba(255, 255, 255, .95); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.at-capt i + i { width: 70%; }
.at-play { top: 50%; left: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: rgba(0, 0, 0, .45); }
.at-play::after { content: ""; position: absolute; top: 10px; left: 13px; border-left: 11px solid #fff; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.at-dots { left: 0; right: 0; bottom: 4%; display: flex; justify-content: center; gap: 4px; }
.at-dots i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, .6); }
.at-dots i:first-child { background: #fff; }
.at-badge { top: 8%; right: 8%; min-width: 28px; padding: 4px 9px; border-radius: 999px; background: var(--sx-pink); font-size: 11px; font-weight: 700; color: #fff; text-align: center; }
.at-badge i { display: block; width: 26px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .8); margin: 3px 0; }
.at-ring { top: 22%; left: 28%; width: 44%; aspect-ratio: 1; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 999px rgba(0, 0, 0, .18); }
.at-splitline { top: 0; bottom: 0; left: 50%; width: 3px; margin-left: -1px; background: #fff; }
.at-vs { inset: 12% 8% 12% 8%; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.at-vs > span { display: flex; flex-direction: column; justify-content: space-around; align-items: center; border-radius: 10px; background: rgba(255, 255, 255, .9); }
.at-vs > span:first-child b { color: var(--sx-green); } .at-vs > span:last-child b { color: #c2410c; }
.at-rec { top: 7%; left: 8%; padding: 2px 7px; border-radius: 6px; background: rgba(220, 38, 38, .9); font-size: 10px; font-weight: 700; letter-spacing: .06em; color: #fff; }
.at-reviews { left: 8%; right: 8%; top: 12%; bottom: 12%; display: flex; flex-direction: column; justify-content: space-between; }
.at-reviews > span { display: flex; flex-direction: column; gap: 4px; padding: 7px 8px; border-radius: 9px; background: rgba(255, 255, 255, .94); }
.at-reviews em, .at-quote em, .at-press em { font-style: normal; font-size: 10px; letter-spacing: 1px; color: #f59e0b; }
.at-quote { inset: 18% 10% auto 10%; display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, .94); }
.at-quote em { font-size: 30px; line-height: .6; color: var(--sx-violet); }
.at-quote i { height: 7px; } .at-quote i.short, .at-meme i.short, .at-ui i.short { width: 60%; }
.at-chart { left: 8%; right: 8%; bottom: 8%; height: 42%; display: flex; align-items: flex-end; gap: 6%; padding: 8px; border-radius: 10px; background: rgba(255, 255, 255, .93); }
.at-chart i { flex: 1; height: var(--h); border-radius: 3px 3px 0 0; background: linear-gradient(#8b7ffd, var(--sx-violet)); }
.at-big { left: 10%; right: 10%; top: 26%; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, .93); }
.at-big b { width: 60%; height: 26px; border-radius: 6px; background: var(--sx-violet); } .at-big i { width: 80%; }
.at-press { left: 10%; right: 10%; top: 30%; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, .94); }
.at-press em { font-size: 20px; color: #111; } .at-press i { width: 90%; } .at-press b { width: 40%; height: 6px; border-radius: 3px; background: #111; }
.at-bow { top: 8%; right: 8%; width: 30px; height: 30px; border-radius: 8px; background: #ef4444; box-shadow: inset 0 0 0 10px #ef4444, inset 13px 0 0 0 #fecaca; }
.at-price { top: 10%; right: 8%; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; padding: 8px 10px; border-radius: 10px; background: #fff; }
.at-price s { display: block; width: 34px; height: 6px; border-radius: 3px; background: #c9c6d8; }
.at-price b { display: block; width: 46px; height: 12px; border-radius: 4px; background: #dc2626; }
.at-meme { left: 0; right: 0; top: 0; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 12% 12px; background: #fff; }
.at-meme i { width: 100%; height: 7px; background: #222; }
.at-list { left: 8%; right: 8%; top: 14%; bottom: 14%; display: flex; flex-direction: column; justify-content: space-between; }
.at-list > span { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 9px; background: rgba(255, 255, 255, .94); }
.at-list b { flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--sx-violet); font-size: 10.5px; line-height: 18px; color: #fff; text-align: center; }
.at-list i { flex: 1; }
.at-mic { bottom: 26%; right: 18%; width: 14px; height: 36px; border-radius: 7px 7px 3px 3px; background: #222; box-shadow: 0 -10px 0 2px #555; }
.at-screen { inset: 0; display: flex; flex-direction: column; background: linear-gradient(160deg, #eef2ff, #e0f2fe); }
.at-bar { display: flex; gap: 4px; padding: 7px 8px; background: #fff; border-bottom: 1px solid #e5e7eb; }
.at-bar i { width: 6px; height: 6px; border-radius: 50%; background: #d1d5db; }
.at-ui { display: flex; flex: 1; flex-direction: column; gap: 7px; margin: 10px; padding: 12px; border-radius: 10px; background: #fff; box-shadow: 0 6px 16px -10px rgba(30, 64, 175, .35); }
.at-ui b { width: 50%; height: 10px; border-radius: 4px; background: #2f7cf6; }
.at-cursor { top: 48%; left: 56%; width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 16px solid #111; transform: rotate(-30deg); }
.at-focus { top: 36%; left: 14%; width: 72%; height: 20%; border: 2px solid var(--sx-pink); border-radius: 10px; box-shadow: 0 0 0 999px rgba(15, 23, 42, .18); }
.at-cover { top: 14%; left: 22%; width: 56%; height: 58%; display: flex; flex-direction: column; gap: 6px; padding: 12px 10px; border-radius: 6px; background: #fff; box-shadow: 0 10px 20px -10px rgba(0, 0, 0, .45); }
.at-cover b { height: 30%; border-radius: 4px; background: #0f766e; }
.at-cal { top: 10%; left: 10%; width: 46px; display: flex; flex-direction: column; overflow: hidden; border-radius: 9px; background: #fff; box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .5); }
.at-cal b { height: 12px; background: #dc2626; } .at-cal i { height: 20px; margin: 6px 10px 8px; border-radius: 4px; background: #e5e7eb; }
.at-pin { top: 14%; left: 50%; width: 26px; height: 26px; margin-left: -13px; border-radius: 50% 50% 50% 0; background: #dc2626; transform: rotate(-45deg); box-shadow: inset 0 0 0 8px #dc2626, inset 0 0 0 13px #fff; }
.at-detail { display: flex; flex-direction: column; gap: 14px; }
.at-detail > .at-mock { width: 220px; max-width: 100%; align-self: center; }
.at-when { margin: 0; font-size: 15px; line-height: 1.5; }
.at-rules { padding: 12px 14px; border-radius: 12px; background: var(--sx-green-soft); }
.at-rules b { font-size: 13px; } .at-rules ul { margin: 6px 0 0; padding-left: 18px; font-size: 13.5px; line-height: 1.5; }

/* Composer bits */
.ad-chipic { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; background: var(--sx-violet-soft); color: var(--sx-violet-ink); font-size: 15px; }
.ad-chipmock { flex: none; width: 28px; }
.ad-chipmock .at-mock { border-radius: 6px; }
.ad-chipmock .at-mock > span:not(.at-screen) { display: none; }
#ad-facts { min-height: 40px; max-height: 160px; padding: 6px 4px; border: 0; border-radius: 0; background: transparent; font: inherit; font-size: 14.5px; line-height: 1.45; resize: none; outline: none; }
.av-hint { white-space: nowrap; }
.ad-nostrat { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; }
.av-places { display: flex; flex-wrap: wrap; gap: 12px; }
.av-place { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 150px; padding: 16px 12px; border: 1px solid var(--edge); border-radius: 16px; background: #fff; font: inherit; font-size: 13px; color: var(--ink); cursor: pointer; }
.av-place.on { border-color: var(--sx-violet); box-shadow: 0 0 0 3px var(--sx-violet-soft); }
.av-frame { display: block; width: 44px; border: 2px solid currentColor; border-radius: 6px; color: var(--muted); }
.av-place.on .av-frame { color: var(--sx-violet); background: var(--sx-violet-soft); }
.av-frame.r-4x5 { aspect-ratio: 4 / 5; } .av-frame.r-9x16 { width: 34px; aspect-ratio: 9 / 16; } .av-frame.r-1x1 { aspect-ratio: 1; }

/* What you sell */
.off-form { display: flex; flex-direction: column; gap: 12px; margin: 10px 0; background: #fbfaff; box-shadow: 0 0 0 1px var(--sx-violet-soft); }
.off-form h3 { margin: 0; }
.off-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 12px; }
.off-grid .off-wide { grid-column: 1 / -1; }
.off-grid input, .off-grid textarea { width: 100%; }
.off-imgs { display: flex; flex-wrap: wrap; gap: 8px; }
.off-img { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 86px; height: 86px; overflow: hidden; border-radius: 12px; background: var(--head); }
.off-img img { width: 100%; height: 100%; object-fit: cover; }
.off-img .sx-x { position: absolute; top: 4px; right: 4px; background: rgba(255, 255, 255, .9); }
.off-add { border: 1.5px dashed var(--edge); background: none; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.off-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.off-card { display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: 14px; box-shadow: 0 0 0 1px var(--edge); }
.off-media { flex: none; width: 64px; height: 64px; overflow: hidden; border-radius: 10px; background: var(--head); }
.off-media img { width: 100%; height: 100%; object-fit: cover; }
.off-body { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.off-body small { font-size: 12.5px; color: var(--muted); }
.off-acts { display: flex; gap: 6px; }
.off-acts .armed { background: #fde8e8; color: #b42318; }
.off-store { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.off-sp { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.off-sp img { width: 100%; aspect-ratio: 1; border-radius: 10px; object-fit: cover; }
.off-sp small { overflow: hidden; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.fact-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; padding: 0; list-style: none; }
.fact-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--head); font-size: 14px; }
.fact-list li > span:nth-child(2) { flex: 1; }
.fact-add { display: flex; gap: 8px; }
.fact-add input { flex: 1; min-width: 0; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

@media (max-width: 980px) { .ad-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .biz-pick.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); } .off-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .biz-pick, .biz-pick.compact { grid-template-columns: 1fr; }
  .at-grid, .sx-sheet .at-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .at-q { width: 100%; margin-left: 0; }
  .av-hint { display: none; }
  .ads-page .sx-body { grid-template-columns: 1fr; }
  .ads-page .sx-rail { position: static; min-height: 0; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; }
  .ads-page .sx-rail .sx-rail-item { flex: none; }
  .ads-page .sx-rail .sx-rail-head, .ads-page .ad-rail-prod, .ads-page .ad-rail-biz { display: none; }
  .off-card { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { .at-card, .ad-stat { transition: none; } .at-card:hover, .ad-stat:hover { transform: none; } }
.ads-page .sx-body { align-self: stretch; width: 100%; }
.ads-page .sx-content > .card, .ads-page .sx-content > section.card { padding: 20px 22px; border: 0; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px var(--edge); }
.ads-page .sx-content > .card h3 { margin: 0 0 8px; font-size: 16px; }
.ads-page .sx-crumbs { align-items: baseline; gap: 10px; }
.ads-page .sx-crumbs > b:first-child { font-size: 20px; }
.at-plain { inset: 0; background: radial-gradient(120% 80% at 20% 10%, #f1efff, transparent 60%), radial-gradient(90% 70% at 90% 90%, #e0f2fe, transparent 60%), #f6f5fb; }
.at-pills .chip { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 13px; border: 0; border-radius: 999px; background: #fff; box-shadow: 0 0 0 1px var(--edge); font: inherit; font-size: 13px; font-weight: 550; color: var(--ink); cursor: pointer; }
.at-pills .chip:hover { box-shadow: 0 0 0 1px var(--muted); }
.at-pills .chip.on { background: var(--sx-violet-soft); color: var(--sx-violet-ink); box-shadow: 0 0 0 1.5px var(--sx-violet); }
.at-sec > .st-pick-label { font-size: 12px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--ink); }
.at-sec > .st-pick-label .faint { font-weight: 450; letter-spacing: 0; text-transform: none; }
.at-drawer .at-detail > .at-mock { width: 200px; flex: none; }
.at-drawer .as-grammar { margin: 0; }
.ads-page .as-plan-head .lvl { display: inline-block; width: auto; margin: 0 4px 4px 0; }
.ads-page .sx-chip > span { min-width: 0; }
.ads-page .sx-chip small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 180px; }
@media (max-width: 720px) { .ads-page .sx-chip { max-width: 220px; } .ads-page .sx-go { flex: 1 1 100%; } .ads-page .sx-go #as-make { width: 100%; } }

/* Ads Phase 2: buyer signals and angles */
.sg-run-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sg-run-row > div, .sg-run-txt { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 220px; }
.sg-run-row > div b, .sg-run-txt b { font-size: 16px; }
.sg-run-row #an-product { max-width: 260px; }
.sg-add { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.sg-add textarea, .sg-add input[type="url"] { width: 100%; }
.sg-add .seg { align-self: flex-start; }
.sg-add-row { display: flex; gap: 8px; flex-wrap: wrap; }
.sg-add-row input { flex: 1 1 220px; min-width: 0; }
.sg-add-row .select { flex: 0 1 240px; }
.sg-shot { width: 220px; height: 64px; }
.sg-sources { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.sg-src { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--head); }
.sg-src-ic { flex: none; width: 28px; height: 28px; border-radius: 8px; background: #fff; text-align: center; line-height: 28px; color: var(--sx-violet); }
.sg-src-body { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.sg-src-body small { font-size: 12px; color: var(--muted); }
.pc-warn-inline { color: #b45309; }
.sx-x.armed { background: #fde8e8; color: #b42318; }
.sg-grid, .an-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; align-items: start; }
.sg-card, .an-card { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px var(--edge); }
.sg-card { border-top: 4px solid var(--k); }
.sg-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sg-kind { font-size: 11.5px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--k); }
.sg-n { padding: 2px 8px; border-radius: 999px; background: var(--head); font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
.sg-theme, .an-line { font-size: 15.5px; line-height: 1.35; }
.sg-card p, .an-card p { margin: 0; }
.sg-quotes { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.sg-quotes li { padding: 8px 10px; border-left: 3px solid var(--k); border-radius: 0 8px 8px 0; background: #fafafc; font-size: 13.5px; line-height: 1.45; }
.sg-words, .sg-foot, .an-meta { display: flex; flex-wrap: wrap; gap: 5px; }
.sg-words span { padding: 2px 8px; border-radius: 999px; background: var(--sx-violet-soft); font-size: 12px; color: var(--sx-violet-ink); }
.sg-foot span, .an-meta span { padding: 2px 8px; border-radius: 6px; background: var(--head); font-size: 11.5px; color: var(--muted); }
.sg-foot .sg-prod { background: #e8f0fe; color: #1d5fd1; }
.an-card.pinned { box-shadow: 0 0 0 2px var(--sx-violet); }
.an-fam { font-size: 11.5px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--sx-violet-ink); }
.an-pin { padding: 2px 8px; border-radius: 999px; background: var(--sx-violet); font-size: 11px; font-weight: 650; color: #fff; }
.an-evidence { display: flex; flex-direction: column; gap: 5px; padding: 10px; border-radius: 12px; background: var(--sx-green-soft); }
.an-evidence .st-pick-label { font-size: 11px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: #15803d; }
.an-ev { font-size: 13px; } .an-ev small { color: var(--muted); }
.an-q { font-size: 13px; font-style: italic; color: #166534; }
.an-hooks { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.5; }
.an-rejected { margin-top: 6px; } .an-rejected summary { cursor: pointer; color: var(--muted); }
.an-rej { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.an-pick { display: flex; flex-direction: column; gap: 6px; }
.an-pick-row { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border: 1px solid var(--edge); border-radius: 12px; background: #fff; font: inherit; text-align: left; cursor: pointer; }
.an-pick-row.on { border-color: var(--sx-violet); box-shadow: 0 0 0 3px var(--sx-violet-soft); }
.an-pick-row small { font-size: 12px; color: var(--muted); }
.ads-page .sx-content > .st-pick-label { font-size: 12px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; }
/* Safari gave aspect-ratio boxes with only positioned children zero height inside
   buttons: the box keeps its shape with a padding spacer instead. */
.at-mock { aspect-ratio: auto; height: auto; }
.at-mock::before { content: ""; display: block; padding-top: 125%; }
.ad-recent-media { aspect-ratio: auto; }
.ad-recent-media::before { content: ""; display: block; padding-top: 62.5%; }
.ad-recent-media > .at-mock::before { padding-top: 0; }
.av-frame { aspect-ratio: auto !important; height: auto; }
.av-frame::before { content: ""; display: block; padding-top: 125%; }
.av-frame.r-9x16::before { padding-top: 177.8%; }
.av-frame.r-1x1::before { padding-top: 100%; }
.at-ex { top: 8px; left: 8px; padding: 2px 7px; border-radius: 6px; background: rgba(17, 17, 17, .55); font-size: 10px; font-weight: 650; letter-spacing: .04em; color: #fff; }
.ad-chipmock .at-ex, .ad-chipmock .at-play, .ad-chipmock .at-dots { display: none; }
.st-limit-edit { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.st-limit-edit input { width: 96px; height: 30px; padding: 0 8px; border: 1px solid var(--edge); border-radius: 8px; font: inherit; }

/* Ads Phase 3: concepts and copy */
.cn-angle { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px var(--edge); }
.cn-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cn-head > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.cn-head small { font-size: 11.5px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--sx-violet-ink); }
.cn-head b { font-size: 16px; line-height: 1.35; }
.cn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.cn-card { position: relative; display: flex; flex-direction: column; padding: 8px; border: 0; border-radius: 16px; background: #fafafd; box-shadow: 0 0 0 1px var(--edge); font: inherit; color: var(--ink); text-align: left; cursor: pointer; transition: box-shadow .15s ease, transform .15s ease; }
.cn-card:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--sx-violet), 0 14px 30px -16px rgba(40, 30, 120, .4); }
.cn-score { position: absolute; z-index: 4; top: 16px; right: 16px; min-width: 34px; padding: 4px 8px; border-radius: 999px; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); font-size: 13px; font-weight: 700; text-align: center; color: var(--sx-violet-ink); }
.cn-body { display: flex; flex-direction: column; gap: 4px; padding: 10px 6px 4px; }
.cn-body small { font-size: 11.5px; font-weight: 650; color: var(--muted); }
.cn-body b { font-size: 14px; line-height: 1.35; }
.cn-st { align-self: flex-start; margin-top: 4px; padding: 2px 8px; border-radius: 999px; background: var(--head); font-size: 11.5px; font-weight: 600; color: var(--muted); }
.cn-st.ok { background: var(--sx-green-soft); color: #15803d; } .cn-st.bad { background: #fde8e8; color: #b42318; } .cn-st.warn { background: #fff4e5; color: #b45309; }
.cn-detail { display: flex; flex-direction: column; gap: 16px; }
.cn-top { display: grid; grid-template-columns: 160px 1fr; gap: 16px; align-items: start; }
.cn-top-side { display: flex; flex-direction: column; gap: 8px; }
.cn-scorebig { display: flex; align-items: baseline; gap: 8px; }
.cn-scorebig b { font-size: 34px; color: var(--sx-violet-ink); } .cn-scorebig span { color: var(--muted); font-size: 13px; }
.cn-reasons { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.5; }
.cn-checks ul { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.cn-checks li { display: flex; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--head); font-size: 13px; line-height: 1.45; }
.cn-checks li > span:first-child { flex: none; width: 16px; font-weight: 700; }
.cn-checks li.pass > span:first-child { color: #15803d; } .cn-checks li.fail { background: #fde8e8; } .cn-checks li.fail > span:first-child { color: #b42318; } .cn-checks li.warn { background: #fff4e5; } .cn-checks li.warn > span:first-child { color: #b45309; }
.cn-copy { display: flex; flex-direction: column; gap: 10px; }
.cn-group { display: flex; flex-direction: column; gap: 6px; } .cn-group > span { font-size: 12px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.cn-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.cn-field > span { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); }
.cn-field em { font-style: normal; font-variant-numeric: tabular-nums; } .cn-field em.over { color: #b42318; font-weight: 700; }
.cn-field input, .cn-field textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--edge); border-radius: 10px; font: inherit; font-size: 14px; line-height: 1.45; resize: vertical; }
.cn-actions { position: sticky; bottom: 0; padding: 10px 0; background: #fff; flex-wrap: wrap; }
@media (max-width: 600px) { .cn-top { grid-template-columns: 1fr; } .cn-top .at-mock { width: 160px; } }
/* Safari's own button style lines children up at the start (align-items:
   flex-start), so a box holding only positioned children shrank to 0 x 0 and
   the example images never showed. Cards stretch their children; the boxes
   take the full width. */
.at-card, .cn-card, .ad-recent-card, .an-pick-row, .ad-stat, .av-place, .biz-opt { align-items: stretch; }
.av-place { align-items: center; }
.at-mock, .ad-recent-media { width: 100%; }
.ad-chipmock .at-mock { width: 28px; }
.at-detail > .at-mock, .at-drawer .at-detail > .at-mock { width: 200px; }
.cn-top > .at-mock { width: 160px; }
/* Example images are 3:4 (Studio) or 4:5 (Higgsfield): a 3:4 box keeps text at their edges. */
.at-example::before { padding-top: 133.34%; }

/* Ads Phase 4: brand kit and creative */
.bk-card .sec-head .fix-row { flex-wrap: wrap; }
.bk-card #bk-url { width: 240px; height: 32px; }
.bk-grid { display: grid; grid-template-columns: 180px 1fr; gap: 18px 24px; margin: 12px 0; }
.bk-logo { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.bk-logo img { max-width: 170px; max-height: 90px; padding: 8px; border-radius: 10px; background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 0 / 14px 14px; object-fit: contain; }
.bk-colors { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.bk-color { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.bk-color input { width: 40px; height: 32px; padding: 0; border: 1px solid var(--edge); border-radius: 8px; background: none; }
.bk-palette { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; flex-basis: 100%; }
.bk-sw { width: 24px; height: 24px; border: 1px solid var(--edge); border-radius: 6px; cursor: pointer; }
.bk-fonts { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bk-font { display: flex; flex-direction: column; gap: 6px; }
.bk-font .search { flex: 1; min-width: 140px; height: 32px; }
.bk-font .select { width: 84px; }
.bk-preview { font-size: 26px; line-height: 1.2; color: var(--ink); }
.cn-creative { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 14px; background: #fafafd; box-shadow: 0 0 0 1px var(--edge); }
.cn-places { display: grid; grid-template-columns: 0.75fr 1fr 1fr; gap: 10px; align-items: end; }
.cn-place { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.cn-place img, .cn-place video { display: block; width: 100%; height: auto; border-radius: 10px; box-shadow: 0 0 0 1px var(--edge); }
.cn-place figcaption { font-size: 11.5px; color: var(--muted); }
.cn-chart { display: flex; flex-direction: column; gap: 6px; }
.cn-chart textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--edge); border-radius: 10px; font: inherit; }
.cn-made::before { padding-top: 125%; }
@media (max-width: 720px) { .bk-grid, .bk-fonts { grid-template-columns: 1fr; } .cn-places { grid-template-columns: 1fr 1fr; } }
.bk-font .fix-row { flex-wrap: wrap; }
.bk-preview { font-size: 22px; }

/* Cost per unit (What you sell) */
.ec-table td { vertical-align: middle; }
.ec-prod { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ec-prod img { width: 36px; height: 36px; object-fit: cover; border-radius: 6px; flex: none; }
.ec-prod span { overflow: hidden; text-overflow: ellipsis; }
.ec-cost { width: 88px; text-align: right; padding: 6px 8px; border: 1px solid var(--line, #ddd); border-radius: 6px; font: inherit; background: var(--panel, #fff); color: inherit; }
.ec-table th { white-space: nowrap; }
.ec-table td.num { white-space: nowrap; }
.ec-table .faint.small { display: block; }

/* The Ads guide: one step at a time */
.gd-card { background: #fff; border-radius: 20px; box-shadow: 0 0 0 1px var(--edge); padding: 22px 24px; display: grid; gap: 16px; }
.gd-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.gd-top h2 { margin: 2px 0 0; font-size: 22px; line-height: 1.25; }
.gd-k { display: block; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted, #6b6b76); font-weight: 600; }
.gd-count { font-size: 13px; color: var(--muted, #6b6b76); white-space: nowrap; }
.gd-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; counter-reset: none; }
.gd-step { min-width: 0; }
.gd-step button { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 4px 6px; border: 0; background: none; font: inherit; color: var(--muted, #6b6b76); cursor: pointer; border-radius: 12px; position: relative; }
.gd-step button:hover { background: var(--soft, #f4f3f8); }
.gd-step:not(:last-child) button::after { content: ""; position: absolute; top: 22px; left: calc(50% + 18px); right: calc(-50% + 18px); height: 2px; background: var(--edge, #e6e4ee); }
.gd-step.done:not(:last-child) button::after { background: #16a34a; }
.gd-dot { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; background: var(--soft, #f4f3f8); color: var(--muted, #6b6b76); box-shadow: inset 0 0 0 1px var(--edge, #e6e4ee); position: relative; z-index: 1; }
.gd-step.done .gd-dot { background: #16a34a; color: #fff; box-shadow: none; }
.gd-step.next .gd-dot, .gd-step.cur .gd-dot { background: var(--ink, #111); color: #fff; box-shadow: none; }
.gd-step.cur.done .gd-dot { background: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,.25); }
.gd-name { font-size: 12px; line-height: 1.25; text-align: center; overflow-wrap: anywhere; }
.gd-step.cur .gd-name, .gd-step.next .gd-name { color: var(--ink, #111); font-weight: 600; }
.gd-next { display: grid; gap: 12px; padding: 16px 18px; border-radius: 14px; background: var(--soft, #f6f5fa); }
.gd-next p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink, #111); }
.gd-parts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; }
.gd-parts li { display: flex; align-items: center; gap: 6px; color: var(--muted, #6b6b76); }
.gd-parts li.ok { color: #15803d; }
.gd-go { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.gd-all summary { cursor: pointer; font-size: 14px; color: var(--muted, #6b6b76); }
.gd-all ol { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14px; }
.gd-all li b { margin-right: 6px; }
.gd-all li span:last-child { display: block; color: var(--muted, #6b6b76); }
.gd-ok { color: #15803d; font-size: 13px; }
.gd-bar { display: grid; gap: 12px; margin-bottom: 18px; padding: 14px 16px; background: #fff; border-radius: 18px; box-shadow: 0 0 0 1px var(--edge); }
.gd-bar .gd-steps { gap: 2px; }
.gd-bar .gd-step button { padding: 4px 2px; gap: 4px; }
.gd-bar .gd-dot { width: 24px; height: 24px; font-size: 12px; }
.gd-bar .gd-step:not(:last-child) button::after { top: 16px; left: calc(50% + 15px); right: calc(-50% + 15px); }
.gd-here { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 10px; border-top: 1px solid var(--edge, #e6e4ee); }
.gd-here b { display: block; font-size: 17px; margin-top: 2px; }
.gd-here p { margin: 4px 0 0; font-size: 14px; line-height: 1.45; color: var(--muted, #6b6b76); max-width: 62ch; }
.gd-on { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.gd-rail { position: relative; }
.gd-rdot { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex: none; background: var(--soft, #f4f3f8); color: var(--muted, #6b6b76); box-shadow: inset 0 0 0 1px var(--edge, #e6e4ee); }
.gd-rail.done .gd-rdot { background: #16a34a; color: #fff; box-shadow: none; }
.gd-rail.next .gd-rdot { background: var(--ink, #111); color: #fff; box-shadow: none; }
.gd-rnext { margin-left: auto; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: var(--ink, #111); color: #fff; }
@media (max-width: 760px) {
  .gd-steps { grid-template-columns: repeat(7, minmax(36px, 1fr)); }
  .gd-name { display: none; }
  .gd-step.cur .gd-name, .gd-step.next .gd-name { display: none; }
  .gd-here { flex-direction: column; align-items: stretch; }
  .gd-on { align-items: stretch; }
  .gd-card { padding: 18px 16px; }
}
.gd-vert { margin-top: 14px; max-width: 520px; }
/* What Guard has learned */
.lr-card { display: grid; gap: 12px; }
.lr-card h3 { margin: 2px 0 0; }
.lr-verts { display: flex; flex-wrap: wrap; gap: 6px; }
.lr-v { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--soft, #f4f3f8); color: var(--muted, #6b6b76); }
.lr-v b { color: var(--ink, #111); font-weight: 600; margin-left: 4px; }
.lr-v.on { background: var(--ink, #111); color: #fff; }
.lr-v.on b { color: #fff; }
.lr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; font-size: 14px; }
.lr-grid ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; color: var(--muted, #6b6b76); }
@media (max-width: 760px) { .lr-grid { grid-template-columns: 1fr; } }
.lr-grid li b { color: var(--ink, #111); font-weight: 600; }
.lr-grid li span { display: block; font-size: 13px; }
.lr-now { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--edge, #e6e4ee); }

/* ---- Ads Phase 5: the whole test in one approval; evidence from real ads ---- */
.ev-pill { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; background: color-mix(in srgb, currentColor 8%, transparent); color: var(--muted, #6b6b75); white-space: nowrap; }
.ev-pill.good { color: var(--good-ink); background: var(--good-bg); }
.ev-pill.bad { color: var(--bad-ink); background: var(--bad-bg); }
.tt-box { margin-top: 16px; padding: 16px; border: 1px solid var(--line, #e4e2ea); border-radius: 12px; display: grid; gap: 14px; }
.tt-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.tt-head > div { display: grid; gap: 2px; }
.tt-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: end; }
.tt-form .tt-tpl, .tt-form .tt-wide { grid-column: 1 / -1; }
.tt-tpl { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tt-tpl legend { font-size: 12px; color: var(--muted, #6b6b75); margin-bottom: 6px; }
.tt-opt { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line, #e4e2ea); border-radius: 10px; cursor: pointer; }
.tt-opt.on { border-color: currentColor; box-shadow: 0 0 0 1px currentColor inset; }
.tt-opt input { position: absolute; opacity: 0; pointer-events: none; }
.tt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tt-grid > div { display: grid; gap: 3px; }
.tt-grid span { font-size: 12px; color: var(--muted, #6b6b75); }
.tt-cells { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.tt-cell { display: grid; gap: 4px; align-content: start; }
.tt-cell video, .tt-cell img, .tt-cell .no-thumb { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 8px; background: #f3f1f6; }
.tt-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.tt-checks li { display: flex; gap: 8px; }
.tt-checks li.fail span { color: var(--bad-ink); }
.tt-checks li.pass span { color: var(--good-ink); }
.ev-box { display: grid; gap: 6px; }
.ev-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.ev-list li { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
@media (max-width: 640px) {
  .tt-form, .tt-grid, .tt-tpl { grid-template-columns: 1fr; }
}

/* ---- Ads Phase 6: doctor, landing page check, rollup ---- */
.dr-form { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.dr-form details, .dr-form .tt-wide { grid-column: 1 / -1; }
.dr-result { display: grid; gap: 12px; margin-top: 14px; }
.dr-rewrites { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.dr-rw { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: grid; gap: 6px; align-content: start; }
.dr-rw .sec-head { display: flex; justify-content: space-between; gap: 8px; }
.ru-box { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.ru-box > *, .ru-box .sec-head > div { min-width: 0; }
.ru-box .ev-list li > span { min-width: 0; }
.ru-dim + .ru-dim { margin-top: 14px; }
.ru-dim h4 { margin: 0 0 6px; font-size: 13px; }
@media (max-width: 640px) { .dr-form { grid-template-columns: 1fr; } }
.tt-form > button { justify-self: start; }
.tt-grid b { font-size: 14px; font-weight: 600; line-height: 1.4; }
.dr-form > *, .tt-form > * { min-width: 0; }
.dr-form select, .dr-form input, .dr-form textarea { width: 100%; max-width: 100%; box-sizing: border-box; }
@media (max-width: 640px) { .dr-form { grid-template-columns: minmax(0, 1fr); } }
.dr-box .sec-head > div, .pc-box .sec-head > div, .ru-box .sec-head > div { display: grid; gap: 2px; }

.lr-combos { margin-top: 12px; }
.lr-combos ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.lr-combos li { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; min-width: 0; }

/* Research (adResearch.js) */
.rs-card .sec-head { gap: 12px; }
.rs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.rs-grid > div { min-width: 0; }
.rs-grid h4 { margin: 0 0 6px; font-size: 13px; }
.rs-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rs-list li { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.rs-list li b { font-size: 13.5px; }
.rs-more summary { cursor: pointer; margin-top: 6px; }
.rs-add { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 12px; }
.rs-add input { flex: 1 1 180px; min-width: 0; }
.rs-comps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-top: 12px; }
.rs-comp { border: 1px solid var(--line, #e7e5ef); border-radius: 12px; padding: 12px; min-width: 0; overflow-wrap: anywhere; }
.rs-comp p { margin: 4px 0; }
.rs-quote { margin: 8px 0 0; padding: 8px 10px; background: var(--soft, #f6f5fa); border-radius: 8px; font-size: 13px; display: grid; gap: 4px; }
.an-strat { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; margin: 8px 0; font-size: 13px; }
.an-strat dt { color: var(--muted, #6b6880); }
.an-strat dd { margin: 0; overflow-wrap: anywhere; }
.an-src b { font-weight: 600; margin-right: 4px; }
.an-src.t-S, .an-src.t-K, .an-src.t-A, .an-src.t-P { background: #efeafe; }
.an-src.t-C { background: #fdf0e6; }
.an-src.t-D { background: #e7f0fb; }
.an-src.t-W, .an-src.t-L { background: #e8f6ee; }
.sc-steps { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.sc-steps span { display: grid; padding: 6px 10px; border-radius: 8px; background: var(--soft, #f6f5fa); min-width: 64px; }
.sc-rules { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; }
.ov-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ov-list li { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }

/* Steps: where you are is unmistakable (2026-11-18). Current: a larger indigo
   circle with its number, a halo, a bold label and "You're here". Done: small
   green ticks, muted. Next: an indigo outline. Later: grey. */
.gd-steps { --here: #4338ca; --here-soft: rgba(67, 56, 202, .16); align-items: start; padding-top: 8px; }
.gd-step button { padding-bottom: 8px; }
.gd-step.done:not(.cur) .gd-dot { width: 24px; height: 24px; margin-top: 2px; font-size: 12px; }
.gd-step.done:not(.cur) .gd-name { color: var(--muted, #6b6b76); font-weight: 400; }
.gd-step.cur .gd-dot, .gd-step.cur.done .gd-dot { width: 36px; height: 36px; margin-top: -4px; font-size: 15px; background: var(--here); color: #fff; box-shadow: 0 0 0 5px var(--here-soft); }
.gd-step.cur button { background: var(--here-soft); }
.gd-step.cur button:hover { background: var(--here-soft); }
.gd-step.cur .gd-name { color: var(--here); font-weight: 700; font-size: 13px; }
.gd-step.next:not(.cur) .gd-dot { background: #fff; color: var(--here); box-shadow: inset 0 0 0 2px var(--here); }
.gd-step.next:not(.cur) .gd-name { color: var(--ink, #111); font-weight: 600; }
.gd-step:not(.done):not(.cur):not(.next) .gd-dot { background: #fff; color: #9a98a6; box-shadow: inset 0 0 0 1.5px #d9d7e2; }
.gd-youhere, .gd-tag { font-size: 10.5px; font-weight: 700; letter-spacing: .02em; border-radius: 999px; padding: 2px 8px; line-height: 1.4; white-space: nowrap; }
.gd-youhere { background: var(--here); color: #fff; }
.gd-tag { color: var(--here); box-shadow: inset 0 0 0 1px var(--here); }
.gd-step.cur:not(:last-child) button::after { background: var(--edge, #e6e4ee); }
.gd-step, .gd-step button { min-width: 0; }
.gd-youhere, .gd-tag { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) {
  .gd-steps { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .gd-youhere, .gd-tag { display: none; }
  .gd-step.cur .gd-dot, .gd-step.cur.done .gd-dot { width: 32px; height: 32px; margin-top: -2px; box-shadow: 0 0 0 4px var(--here-soft); }
}

/* Ad projects (adProjects.js) */
.prj-bar { padding: 14px 16px; }
.prj-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.prj-row .select { max-width: 320px; min-width: 0; }
.prj-what { flex: 1 1 180px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prj-empty { display: grid; gap: 12px; border: 2px dashed #c9c5f2; background: #f7f6ff; }
.prj-empty h2 { margin: 2px 0 4px; }
.prj-empty > .btn { justify-self: start; }
.prj-new { margin-top: 12px; display: grid; gap: 10px; border-top: 1px solid var(--edge, #e6e4ee); padding-top: 12px; }
.prj-new-top { display: flex; justify-content: space-between; align-items: center; }
.prj-brand { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.prj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; max-height: 360px; overflow: auto; }
.prj-p { position: relative; display: grid; gap: 6px; padding: 6px; border-radius: 10px; border: 1px solid var(--edge, #e6e4ee); cursor: pointer; font-size: 12.5px; line-height: 1.3; min-width: 0; }
.prj-p input { position: absolute; top: 10px; left: 10px; }
.prj-p img, .prj-p .no-thumb { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: #f3f1f6; }
.prj-p.on { border-color: #4338ca; box-shadow: 0 0 0 2px rgba(67, 56, 202, .25); }
.prj-chip { font-size: 13px; font-weight: 600; color: #4338ca; background: rgba(67, 56, 202, .1); border-radius: 999px; padding: 4px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 50%; }

/* An ad project's own research: status line in the project bar, and why each kept fact applies. */
.prj-rs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line, #ececf2); min-width: 0; }
.prj-rs > span { min-width: 0; flex: 1 1 260px; }
.prj-rs.ok b { color: #1f7a4d; }
.prs-why { display: block; margin-top: 2px; color: #4338ca; }

/* Evidence rows in the concept drawer: the verdict pill sits on its own, never under the label. */
.cn-checks .ev-list li { align-items: center; flex-wrap: wrap; row-gap: 4px; }
.cn-checks .ev-list li > .ev-pill:first-child { width: auto; flex: none; white-space: nowrap; font-weight: 600; }
.cn-checks .ev-list li > span:last-child { flex: 1 1 220px; min-width: 0; }
/* Angle card buttons wrap inside the card. */
.an-card .fix-row { flex-wrap: wrap; justify-content: flex-start; }
.an-card .fix-row .btn { flex: 0 1 auto; }
/* The test plan builder says what it is. */
.sx-bar-k { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted, #6b7280); padding: 0 4px 6px; }
.sx-bar-k .faint { text-transform: none; letter-spacing: 0; font-weight: 400; margin-left: 6px; }
.prj-scope-note { background: #eef0ff; color: #3730a3; border-radius: 8px; padding: 6px 10px; display: inline-block; margin: 0 0 6px; }
/* The project's research line spans the bar, under the project picker. */
.prj-bar .prj-rs { flex: 1 0 100%; width: 100%; order: 5; }
.prj-rs > .spinner { flex: none; }

/* A project's research as one column you read top to bottom: the short
   version, the price picture, then every fact folded by kind (a coloured dot
   marks the kind; no card per section). */
.prs { max-width: 1240px; display: grid; gap: 26px; padding: 6px 0 24px; }
.prs-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.prs-head h3 { margin: 2px 0 4px; font-size: 22px; }
.prs-thumbs { display: flex; gap: 6px; }
.prs-thumbs img { width: 64px; height: 80px; object-fit: cover; border-radius: 10px; background: #f1efe9; }
.prs-k { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #4338ca; }
.prs-sub { margin: 0; color: #6b7280; font-size: 13px; line-height: 1.5; }
.prs-sec h4 { margin: 0 0 6px; font-size: 16px; }
.prs-short { margin: 8px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.prs-s { border-radius: 12px; padding: 12px 14px; min-width: 0; }
.prs-s > span { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.prs-s ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 5px; }
.prs-s li { font-size: 14px; line-height: 1.45; color: #111827; overflow-wrap: anywhere; }
.s-who { background: #eef2ff; } .s-who > span { color: #3730a3; }
.s-against { background: #fff7e6; } .s-against > span { color: #92400e; }
.s-edge { background: #ecfdf3; } .s-edge > span { color: #166534; }
.s-yours { background: #f4f4f5; } .s-yours > span { color: #3f3f46; }
.prs-chart { overflow-x: auto; margin-top: 8px; }
.prs-chart svg { width: 100%; min-width: 440px; max-width: 760px; height: auto; display: block; }
.prs-chart .g { stroke: #eceef2; stroke-width: 1; }
.prs-chart .tk { font-size: 11px; fill: #6b7280; }
.prs-chart .lb { font-size: 12px; fill: #374151; font-weight: 600; }
.prs-chart .rg { fill: #fcd9a0; }
.prs-chart .md { fill: #b45309; stroke: #fff; stroke-width: 2; }
.prs-chart .us { stroke: #4338ca; stroke-width: 2.5; }
.prs-chart .usl { font-size: 12px; fill: #4338ca; font-weight: 700; }
.prs-fold { border-radius: 10px; margin-bottom: 8px; padding: 0 12px; background: #f6f6f8; }
.prs-fold.k-d { background: #eff6ff; } .prs-fold.k-c { background: #fff8eb; } .prs-fold.k-w { background: #effcf3; } .prs-fold.k-b { background: #f5f3ff; }
.prs-fold.k-s { background: #eef2ff; } .prs-fold.k-p { background: #f1f5f9; } .prs-fold.k-e { background: #fff1f2; }
.prs-fold summary { display: flex; align-items: center; gap: 10px; padding: 12px 2px; cursor: pointer; list-style: none; min-width: 0; }
.prs-fold summary::-webkit-details-marker { display: none; }
.prs-fold summary::after { content: "+"; margin-left: auto; color: #9ca3af; font-size: 18px; flex: none; }
.prs-fold[open] summary::after { content: "−"; }
.prs-fold summary b { flex: none; font-size: 14px; }
.prs-n { flex: none; font-size: 12px; color: #6b7280; background: #f3f4f6; border-radius: 999px; padding: 1px 8px; }
.prs-first { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #6b7280; font-size: 13px; }
.prs-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: #9ca3af; }
.k-d .prs-dot { background: #60a5fa; } .k-c .prs-dot { background: #f59e0b; } .k-w .prs-dot { background: #22c55e; } .k-b .prs-dot { background: #8b5cf6; }
.k-s .prs-dot { background: #6366f1; } .k-p .prs-dot { background: #64748b; } .k-e .prs-dot { background: #f43f5e; }
.prs-fold ul { list-style: none; margin: 0 0 12px 20px; padding: 0; display: grid; gap: 12px; }
.prs-fold li { font-size: 13.5px; line-height: 1.55; color: #374151; overflow-wrap: anywhere; }
.prs-fold li > b { color: #111827; }
.prs-fold li q { color: #5b21b6; font-style: italic; }
.prs-fold li em { display: block; margin-top: 3px; font-style: normal; color: #4338ca; font-size: 12.5px; }
@media (max-width: 560px) { .prs-first { display: none; } }
.prs, .prs > *, .prs-sec { min-width: 0; }
.prs-chart { max-width: 100%; }
@media (max-width: 560px) { .prs-chart svg { min-width: 380px; } }

/* Safari: a box sized by its shape (aspect-ratio) needs a definite width. WebKit doesn't
   stretch flex children inside a <button>, so without this the box (and its photo) collapses
   to nothing. Generated from every aspect-ratio rule in app.css and theme.css (zero
   specificity, so any width a box sets itself still wins); a test fails if a new one is
   added without being listed here. */
:where(.pg-pick, .pg-use .pg-use-img, .pg-img, .ads-plan .ag-wait span, .ads-plan .ap-card .ap-thumb, .ads-plan .ap-ph-media, .pm-ph-media, .cr-tile-img, .cr-grid.people .cr-tile-img, .cr-grid.looks .cr-tile-img, .apx-noimg, .apx-more.vid, .av-frame.r-1x1,
.av-frame.r-4x5,
.av-frame.r-9x16,
.ad-recent-media,
.an-cell,
.an-heat .an-cell,
.as-card-media,
.as-option img,
.as-option-media,
.as-rebuild-drop,
.at-mock,
.at-ring,
.bm-pic img,
.creative .ph,
.creative img,
.creative-media,
.deck-media,
.el-add,
.el-cover,
.el-photo,
.fb-media,
.idea-media,
.ig-tile,
.launch-media button,
.look-card > img,
.look-tip img,
.mk-pick button,
.off-sp img,
.pc-media-pic,
.pc-pick,
.pc-preview-media,
.pc-studio button,
.pp-loading span,
.pp-main,
.pp-photo,
.prj-p .no-thumb,
.prj-p img,
.pv-media,
.pv-media.tall,
.req-thumb,
.rv-pic,
.sa-photo,
.st-media,
.sx-card-img,
.tt-cell .no-thumb,
.tt-cell img,
.tt-cell video, .site-post img, .site-post .no-thumb, .rp-post img, .rp-shots img, .ux-shots img) { width: 100%; max-width: 100%; min-width: 0; }

/* Layout recipes review page (owner only). */
.rv-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin: 12px 0; padding: 14px; background: var(--card); border-radius: 12px; box-shadow: var(--soft-shadow); min-width: 0; }
.rv-bar .cn-field { min-width: 220px; flex: 1 1 260px; max-width: 420px; }
.rv-bar > .faint { flex: 1 1 240px; min-width: 0; padding-bottom: 6px; }
.rv-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
.rv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; align-items: start; }
.rv-card { display: flex; flex-direction: column; gap: 10px; padding: 10px; background: var(--card); border-radius: 12px; box-shadow: var(--soft-shadow); border: 2px solid transparent; min-width: 0; }
.rv-card.is-keep { border-color: var(--good-dot); }
.rv-card.is-fix { border-color: #e5a50a; }
.rv-card.is-reject { opacity: 0.6; }
.rv-pic { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 5; background: var(--head); border-radius: 8px; overflow: hidden; }
.rv-pic img { display: block; width: 100%; height: 100%; object-fit: contain; }
.rv-none { padding: 14px; color: var(--faint); font-size: 12px; text-align: center; }
.rv-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rv-meta b { font-size: 13px; line-height: 1.3; }
.rv-kind { align-self: flex-start; padding: 1px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 600; }
.rv-acts { display: flex; gap: 4px; }
.rv-b { flex: 1 1 auto; min-width: 0; white-space: nowrap; padding: 6px 4px; border: 1px solid var(--edge); border-radius: 8px; background: var(--card); color: var(--ink); font: inherit; font-size: 12px; cursor: pointer; }
.rv-b:hover { background: var(--head); }
.rv-b.rv-keep.on { background: var(--good-bg); color: var(--good-ink); border-color: var(--good-dot); }
.rv-b.rv-fix.on { background: var(--warn-bg); color: var(--warn-ink); border-color: #e5a50a; }
.rv-b.rv-reject.on { background: var(--bad-bg); color: var(--bad-ink); border-color: #e0a29a; }
.rv-note { display: flex; flex-direction: column; gap: 6px; }
.rv-note textarea { width: 100%; box-sizing: border-box; min-height: 64px; padding: 8px; border: 1px solid var(--edge); border-radius: 8px; font: inherit; font-size: 13px; resize: vertical; }
.rv-note .btn { align-self: flex-start; }
.rv-addnote { align-self: flex-start; }
.pc-design { position: absolute; left: 8px; bottom: 8px; z-index: 2; padding: 5px 10px; border: 0; border-radius: 999px; background: rgba(17, 24, 20, 0.78); color: #fff; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.pc-design:hover { background: rgba(17, 24, 20, 0.92); }
.pc-design[disabled] { opacity: 0.7; cursor: default; }
.rv-zoom { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.rv-zoom img { display: block; width: 100%; height: 100%; object-fit: contain; }
.rv-drawer .rv-big { margin-bottom: 14px; border-radius: 10px; overflow: hidden; background: var(--head); }
.rv-drawer .rv-big img { display: block; width: 100%; height: auto; }
.rv-drawer .rv-acts { margin-bottom: 12px; }

/* Post references: how admired brands post, in Guard's words. */
.refs .ref-top { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.refs .ref-h { font-size: 16px; margin: 18px 0 8px; }
.refs .ref-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; }
.refs .ref-card { border: 1px solid var(--line, #e3e0da); border-radius: 10px; padding: 14px; background: var(--card, #fff); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.refs .ref-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.refs .ref-head h3 { margin: 0; font-size: 15px; }
.refs .ref-card p { margin: 0; }
.refs .ref-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .refs .ref-grid { grid-template-columns: 1fr; } }
.refs .ref-b b, .refs .ref-l b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; opacity: .7; margin-bottom: 2px; }
.refs .ref-b ul, .refs .ref-b ol { margin: 0; padding-left: 18px; font-size: 13px; }
.refs .ref-l span { font-size: 13px; }
.refs .ref-ex { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.refs .ref-ex a { overflow-wrap: anywhere; }
.refs .ref-pieces { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.refs .ref-role { display: inline-block; min-width: 76px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; opacity: .7; }
.refs .ref-acts { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.refs .ref-ex-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.refs .ref-embeds { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 10px; margin-bottom: 8px; }
.refs .ref-embeds figure { margin: 0; min-width: 0; }
.refs .ref-embeds iframe { width: 100%; height: 520px; border: 1px solid var(--line, #e3e0da); border-radius: 8px; background: #fff; }

/* Add a brand by website, and the Website tab (brandSite.js) */
.add-brand { display: grid; gap: 12px; padding: 18px; }
.website-page section.card { padding: 16px; }
.add-brand .field { display: grid; gap: 6px; }
.add-brand input { width: 100%; }
.add-brand .actions, .empty .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.small-h { font-size: 15px; margin: 0 0 10px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.site-connect { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px 16px 20px; background: linear-gradient(90deg, var(--accent-soft), #fff 70%); border: 1px solid var(--edge); box-shadow: inset 4px 0 0 var(--accent); }
.site-connect strong { color: var(--brand); }
.site-connect .faint { color: var(--muted); }
.site-connect > div { display: grid; gap: 2px; }
.site-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.site-grid .card { padding: 16px; margin: 0; }
.site-logo-tile { display: inline-block; padding: 10px 14px; border-radius: 10px; margin-bottom: 10px; border: 1px solid var(--line); line-height: 0; }
/* A fixed height: SVG logos inside a shrink-to-fit box otherwise collapse to 0. */
.site-logo { height: 44px; width: auto; max-width: 220px; object-fit: contain; display: block; }
.site-name { font-size: 20px; display: block; margin-bottom: 8px; }
.site-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; margin: 10px 0 0; }
.site-facts dt { color: var(--muted); }
.site-facts dd { margin: 0; overflow-wrap: anywhere; }
.site-swatches span { display: inline-block; width: 18px; height: 18px; border-radius: 4px; border: 1px solid var(--line); margin-right: 4px; vertical-align: middle; }
.site-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-list b { display: inline-block; min-width: 86px; }
.site-ig { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.site-nums { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 6px 0; }
.site-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.site-post { display: grid; gap: 4px; color: inherit; text-decoration: none; font-size: 12px; }
.site-post img, .site-post .no-thumb { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: var(--head); display: grid; place-items: center; }
.site-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 16px; }
.site-apps > div { display: grid; gap: 2px; }
.cro { padding: 16px; }
.cro-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.cro-head h2 { margin: 0 0 4px; }
.cro-score { display: flex; align-items: baseline; gap: 2px; padding: 8px 14px; border-radius: 12px; }
.cro-score b { font-size: 28px; }
.cro-score.good { background: var(--good-bg); color: var(--good-ink); }
.cro-score.warn { background: var(--warn-bg); color: var(--warn-ink); }
.cro-score.bad { background: var(--bad-bg); color: var(--bad-ink); }
.cro-first { margin: 14px 0; padding: 12px 14px; border-radius: 10px; background: var(--head); }
.cro-first ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 8px; }
.cro-area { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 16px 0 6px; }
.cro-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cro-list li { display: flex; gap: 10px; align-items: flex-start; }
.cro-list li > div { display: grid; gap: 2px; min-width: 0; }
.cro-list .faint { overflow-wrap: anywhere; }
.cro-mark { flex: 0 0 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.cro-mark.good { background: var(--good-bg); color: var(--good-ink); }
.cro-mark.bad { background: var(--bad-bg); color: var(--bad-ink); }
.cro-mark.calm { background: var(--head); color: var(--muted); }
.good-note { color: var(--good-ink); }
@media (max-width: 720px) {
  .site-grid { grid-template-columns: minmax(0, 1fr); }
  .site-connect { flex-direction: column; align-items: stretch; }
  .cro-head { flex-direction: column; }
}

/* Client report (printed to PDF): only #report-root prints. */
#report-root { display: none; }
@media print {
  body.printing-report > *:not(#report-root) { display: none !important; }
  body.printing-report { background: #fff !important; }
  body.printing-report #report-root { display: block; }
}
@page { size: letter; margin: 0.55in 0.6in 0.6in; }
#report-root { color: #1d1d1b; font-family: "Geist", "Helvetica Neue", Arial, sans-serif; font-size: 10.5pt; line-height: 1.5; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
#report-root h1, #report-root h2, #report-root h3, #report-root h4 { font-family: var(--rp-head); color: var(--rp-ink); margin: 0; letter-spacing: -0.01em; }
#report-root p { margin: 0 0 6pt; }
.rp-cover { break-after: page; height: 9.55in; display: flex; flex-direction: column; background: var(--rp-ink); color: #fff; border-radius: 14pt; overflow: hidden; box-sizing: border-box; }
.rp-cover-img { height: 3.6in; flex: 0 0 auto; overflow: hidden; }
.rp-cover-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rp-cover-body { flex: 1; display: flex; flex-direction: column; justify-content: space-between; padding: 0.6in 0.65in 0.55in; }
.rp-has-img .rp-cover-body { padding-top: 0.4in; }
.rp-cover h1 { color: #fff !important; font-size: 46pt; line-height: 1; margin: 8pt 0 16pt; }
.rp-cover .rp-eyebrow { color: rgba(255,255,255,.7); }
.rp-cover-grade { display: inline-flex; align-items: center; gap: 12pt; border: 1px solid rgba(255,255,255,.35); border-radius: 12pt; padding: 10pt 16pt 10pt 12pt; }
.rp-cover-grade b { font-family: var(--rp-head); font-size: 34pt; line-height: 1; width: 0.62in; height: 0.62in; display: grid; place-items: center; background: #fff; color: var(--rp-ink); border-radius: 10pt; }
.rp-cover-grade span { font-size: 9.5pt; line-height: 1.35; color: rgba(255,255,255,.85); }
.rp-logo img { height: 0.62in; max-width: 3in; width: auto; object-fit: contain; display: block; }
.rp-logo-tile { display: inline-block; background: #fff; padding: 10pt 14pt; border-radius: 10pt; }
.rp-wordmark { font-family: var(--rp-head); font-size: 22pt; font-weight: 700; }
.rp-cover-foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 16pt; border-top: 1px solid rgba(255,255,255,.3); padding-top: 12pt; }
.rp-cover-foot span { display: block; font-size: 7.5pt; text-transform: uppercase; letter-spacing: .12em; color: rgba(255,255,255,.6); margin-bottom: 3pt; }
.rp-cover-foot b { display: block; font-size: 10.5pt; }
.rp-cover-foot em { display: block; font-style: normal; color: rgba(255,255,255,.75); font-size: 9pt; }
.rp-sec { break-before: page; }
.rp-toc { break-after: page; }
.rp-toc ol { font-family: var(--rp-head); font-size: 16pt; line-height: 1.9; padding-left: 22pt; margin: 6pt 0 24pt; color: var(--rp-ink); }
.rp-head { border-bottom: 2.5pt solid var(--rp-accent); padding-bottom: 8pt; margin-bottom: 14pt; }
.rp-eyebrow { display: block; font-size: 8pt; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--rp-accent); }
.rp-head h2 { font-size: 22pt; line-height: 1.15; margin-top: 3pt; }
.rp-lead { color: #555; }
#report-root h3 { font-size: 12.5pt; margin: 16pt 0 7pt; }
#report-root h4 { font-size: 10.5pt; margin: 0 0 4pt; }
.rp-card h3, .rp-card h4 { margin-top: 0 !important; }
.rp-headline { font-family: var(--rp-head); font-size: 17pt; line-height: 1.25; color: var(--rp-ink); font-weight: 600; margin-bottom: 10pt !important; }
.rp-body { font-size: 10.5pt; color: #333; }
.rp-small { font-size: 9pt; color: #666; }
.rp-note { font-size: 8.5pt; color: #777; margin-top: 8pt !important; }
.rp-numbers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8pt; margin: 14pt 0 4pt; }
.rp-numbers div { background: var(--rp-soft); border-radius: 8pt; padding: 10pt 12pt; break-inside: avoid; }
.rp-numbers b { display: block; font-family: var(--rp-head); font-size: 20pt; color: var(--rp-ink); line-height: 1.1; }
.rp-numbers span { font-size: 8.5pt; color: #555; }
.rp-priorities { list-style: none; counter-reset: rp; padding: 0; margin: 0; display: grid; gap: 8pt; }
.rp-priorities li { counter-increment: rp; position: relative; padding: 8pt 10pt 8pt 36pt; border-left: 2pt solid var(--rp-accent); background: var(--rp-soft); border-radius: 0 8pt 8pt 0; break-inside: avoid; }
.rp-priorities li::before { content: counter(rp); position: absolute; left: 10pt; top: 7pt; font-family: var(--rp-head); font-weight: 700; font-size: 14pt; color: var(--rp-accent); }
.rp-priorities li > b { display: block; color: var(--rp-ink); margin-bottom: 2pt; }
.rp-priorities p { font-size: 9.5pt; color: #444; margin-bottom: 3pt !important; }
.rp-compact li { padding-top: 6pt; padding-bottom: 6pt; }
.rp-impact { font-size: 9pt !important; color: #333 !important; }
.rp-impact span { font-size: 7.5pt; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--rp-accent); margin-right: 4pt; }
.rp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10pt; margin-top: 10pt; }
.rp-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10pt; }
.rp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10pt; }
.rp-card { border: 0.75pt solid #e2e0dc; border-radius: 8pt; padding: 11pt 12pt; break-inside: avoid; background: #fff; }
.rp-good { border-top: 3pt solid #2f7d4f; }
.rp-bad { border-top: 3pt solid #b3412e; }
.rp-dl { display: grid; grid-template-columns: max-content 1fr; gap: 4pt 12pt; margin: 0 0 8pt; }
.rp-dl dt { color: #777; font-size: 9pt; }
.rp-dl dd { margin: 0; }
.rp-dl-sm { font-size: 9pt; }
.rp-swatches span { display: inline-flex; align-items: center; gap: 4pt; margin-right: 10pt; font-size: 8.5pt; }
.rp-swatches i { width: 12pt; height: 12pt; border-radius: 3pt; border: 0.75pt solid #ccc; display: inline-block; }
.rp-list { margin: 0; padding-left: 14pt; display: grid; gap: 5pt; font-size: 9.5pt; }
.rp-list li { break-inside: avoid; }
.rp-mini { display: flex; gap: 18pt; margin-top: 10pt; }
.rp-mini b { display: block; font-family: var(--rp-head); font-size: 16pt; color: var(--rp-ink); }
.rp-mini span { font-size: 8.5pt; color: #666; }
.rp-table { width: 100%; border-collapse: collapse; font-size: 9pt; margin-top: 6pt; }
.rp-table th, .rp-table td { text-align: left; vertical-align: top; padding: 6pt 8pt; border-bottom: 0.75pt solid #e6e4e0; }
.rp-table thead th { font-size: 7.5pt; text-transform: uppercase; letter-spacing: .1em; color: #777; border-bottom: 1.5pt solid var(--rp-ink); }
.rp-table tbody th { color: var(--rp-ink); width: 28%; }
.rp-table tr { break-inside: avoid; }
.rp-val { font-weight: 600; color: var(--rp-accent); white-space: nowrap; }
.rp-checks td:first-child { width: 18pt; }
.rp-area { display: block; font-size: 7.5pt; text-transform: uppercase; letter-spacing: .08em; color: #888; font-weight: 400; }
.rp-mark { display: inline-grid; place-items: center; width: 14pt; height: 14pt; border-radius: 50%; font-size: 8pt; font-weight: 700; }
.rp-pass .rp-mark { background: #dcefe3; color: #1f6b3d; }
.rp-fail .rp-mark { background: #f6ddd8; color: #9a2f1e; }
.rp-unknown .rp-mark { background: #ececec; color: #777; }
.rp-score-row { display: flex; gap: 18pt; align-items: center; margin-bottom: 6pt; }
.rp-score { flex: 0 0 auto; width: 1.25in; height: 1.25in; border-radius: 50%; border: 5pt solid var(--rp-accent); display: flex; align-items: baseline; justify-content: center; padding-top: 0.32in; box-sizing: border-box; }
.rp-score b { font-family: var(--rp-head); font-size: 30pt; color: var(--rp-ink); line-height: 1; }
.rp-score span { font-size: 10pt; color: #777; }
.rp-ins { margin-bottom: 8pt; break-inside: avoid; }
.rp-ins b { display: block; font-size: 9.5pt; color: var(--rp-ink); }
.rp-ins p { font-size: 9pt; color: #555; }
.rp-ahead { break-before: page; }
.rp-ins-group { margin-bottom: 12pt; break-inside: avoid; }
#report-root h3, #report-root h4 { break-after: avoid; }
.rp-ins-group h4 { color: var(--rp-accent) !important; font-size: 8pt !important; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 6pt !important; }
.rp-quote { background: var(--rp-soft); border-radius: 8pt; padding: 11pt 14pt; margin: 4pt 0 12pt; font-size: 10pt; break-inside: avoid; }
.rp-quote span { display: block; font-size: 7.5pt; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--rp-accent); margin-bottom: 3pt; }
.rp-pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 10pt 16pt; }
.rp-pillar { break-inside: avoid; }
.rp-bar { height: 5pt; background: #ebe9e5; border-radius: 3pt; overflow: hidden; margin-bottom: 5pt; }
.rp-bar i { display: block; height: 100%; background: var(--rp-accent); }
.rp-pillar-head { display: flex; justify-content: space-between; color: var(--rp-ink); }
.rp-pillar-head span { font-weight: 600; color: var(--rp-accent); }
.rp-pillar p { font-size: 9pt; }
.rp-week { display: grid; gap: 8pt; }
.rp-day { border: 0.75pt solid #e2e0dc; border-radius: 8pt; padding: 9pt 12pt; break-inside: avoid; }
.rp-day-head { display: flex; justify-content: space-between; gap: 10pt; border-bottom: 0.75pt solid #eee; padding-bottom: 4pt; margin-bottom: 6pt; }
.rp-day-head b { color: var(--rp-ink); }
.rp-day-head span { font-size: 8.5pt; color: var(--rp-accent); text-align: right; }
.rp-caption { font-style: italic; color: #555; font-size: 9pt; margin: 4pt 0 0 !important; }
.rp-peer { margin-bottom: 10pt; }
.rp-peer-head { display: flex; justify-content: space-between; align-items: baseline; }
.rp-peer-head span { font-size: 8.5pt; color: #777; }
.rp-src { font-size: 7.5pt; color: #888; }
.rp-checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 5pt; font-size: 9.5pt; }
.rp-checklist li { padding-left: 16pt; position: relative; break-inside: avoid; }
.rp-checklist li::before { content: ""; position: absolute; left: 0; top: 2pt; width: 8pt; height: 8pt; border: 1pt solid var(--rp-ink); border-radius: 2pt; }
.rp-features .rp-card h3 { font-size: 11pt; }
.rp-features p { font-size: 9.5pt; color: #444; }
.rp-cta { margin-top: 18pt; display: grid; grid-template-columns: 1.6fr 1fr; gap: 16pt; background: var(--rp-ink); color: #fff; border-radius: 10pt; padding: 18pt 20pt; break-inside: avoid; }
.rp-cta h3 { color: #fff !important; margin: 0 0 6pt !important; font-size: 15pt !important; }
.rp-cta p { color: rgba(255,255,255,.85); font-size: 10pt; }
.rp-contact { display: grid; gap: 3pt; align-content: center; border-left: 1px solid rgba(255,255,255,.3); padding-left: 16pt; font-size: 10pt; }
.rp-contact b { font-size: 12pt; }

/* Report v2: scorecard, gallery, stack, roadmap, previews */
.rp-toc-list { list-style: none; padding: 0 !important; margin: 4pt 0 22pt !important; font-size: 13pt !important; line-height: 1.5 !important; columns: 2; column-gap: 24pt; }
.rp-toc-list li { padding: 6pt 0; border-bottom: 0.75pt solid #e6e4e0; break-inside: avoid; }
.rp-toc-list span { display: inline-block; width: 26pt; color: var(--rp-accent); font-size: 10pt; font-weight: 600; }
.rp-legendbox { font-size: 9pt; color: #555; display: flex; gap: 6pt; align-items: center; }
.rp-lock { display: inline-flex; align-items: center; gap: 3pt; font-size: 7.5pt; font-weight: 600; letter-spacing: .03em; color: var(--rp-accent); background: var(--rp-soft); border: 0.75pt solid #e2e0dc; border-radius: 20pt; padding: 1.5pt 7pt 1.5pt 5pt; white-space: nowrap; vertical-align: middle; }
.rp-lock svg { width: 8pt; height: 8pt; }
.rp-locked-line { margin-top: 8pt; padding-top: 6pt; border-top: 0.75pt dashed #ddd; font-size: 8.5pt; color: #777; display: flex; justify-content: space-between; align-items: center; gap: 8pt; }
.rp-more { margin-top: 10pt; padding: 9pt 12pt; border: 1pt dashed #cfccc6; border-radius: 8pt; font-size: 9pt; color: #555; display: flex; justify-content: space-between; align-items: center; gap: 10pt; break-inside: avoid; }
.rp-take { margin: 12pt 0; padding: 11pt 14pt; border-left: 3pt solid var(--rp-accent); background: var(--rp-soft); border-radius: 0 8pt 8pt 0; font-size: 10pt; break-inside: avoid; }
.rp-take span { display: block; font-size: 7.5pt; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--rp-accent); margin-bottom: 3pt; }
.rp-glance { display: grid; grid-template-columns: 1.45in 1fr; gap: 14pt; align-items: stretch; }
.rp-overall { background: var(--rp-ink); color: #fff; border-radius: 12pt; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 14pt; }
.rp-overall b { font-family: var(--rp-head); font-size: 54pt; line-height: 1; }
.rp-overall span { font-size: 8pt; text-transform: uppercase; letter-spacing: .14em; color: rgba(255,255,255,.7); margin-top: 6pt; }
.rp-overall em { font-style: normal; font-size: 10pt; margin-top: 2pt; }
.rp-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8pt; }
.rp-tile { border: 0.75pt solid #e2e0dc; border-radius: 9pt; padding: 9pt 11pt; break-inside: avoid; }
.rp-tile-top { display: flex; justify-content: space-between; align-items: center; }
.rp-tile-top span { font-size: 9pt; font-weight: 600; color: var(--rp-ink); }
.rp-tile-top b { font-family: var(--rp-head); font-size: 16pt; width: 22pt; height: 22pt; display: grid; place-items: center; border-radius: 6pt; color: #fff; background: #999; }
.rp-gA .rp-tile-top b { background: #2f7d4f; } .rp-gB .rp-tile-top b { background: #5b8c3a; } .rp-gC .rp-tile-top b { background: #b8860b; } .rp-gD .rp-tile-top b { background: #c0612b; } .rp-gF .rp-tile-top b { background: #b3412e; } .rp-na .rp-tile-top b { background: #cfcfcf; }
.rp-meter { height: 4pt; background: #ece9e4; border-radius: 3pt; margin: 6pt 0 5pt; overflow: hidden; }
.rp-meter i { display: block; height: 100%; background: var(--rp-accent); }
.rp-tile p { font-size: 8.5pt; color: #555; margin: 0 !important; }
.rp-opps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8pt; }
.rp-opp { background: var(--rp-soft); border-radius: 9pt; padding: 10pt 11pt; break-inside: avoid; }
.rp-opp span { font-family: var(--rp-head); font-size: 18pt; font-weight: 700; color: var(--rp-accent); line-height: 1; }
.rp-opp b { display: block; font-size: 9.5pt; color: var(--rp-ink); margin: 5pt 0 4pt; line-height: 1.35; }
.rp-opp p { font-size: 8.5pt; color: #555; margin: 0 !important; }
.rp-why { display: grid; grid-template-columns: 46pt 1fr; gap: 6pt; font-size: 9pt; color: #444; margin-top: 3pt; }
.rp-why span { font-size: 7.5pt; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: #888; padding-top: 1pt; }
.rp-imp span { color: var(--rp-accent); }
.rp-chips { display: flex; flex-wrap: wrap; gap: 5pt; }
.rp-chip { font-size: 8.5pt; background: var(--rp-soft); border-radius: 20pt; padding: 3pt 9pt; }
.rp-stack { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18pt; }
.rp-stack-row { display: flex; justify-content: space-between; gap: 10pt; padding: 6pt 0; border-bottom: 0.75pt solid #ebe8e3; font-size: 9pt; break-inside: avoid; }
.rp-stack-row span { color: #666; }
.rp-stack-row b { color: var(--rp-ink); text-align: right; }
.rp-gap b { color: #b3412e; }
.rp-score-side { flex: 1; }
.rp-stackbar { display: flex; height: 10pt; border-radius: 5pt; overflow: hidden; background: #eee; }
.rp-stackbar i, .rp-legend i { display: block; height: 100%; }
.rp-stackbar .ok, .rp-legend .ok { background: #2f7d4f; } .rp-stackbar .no, .rp-legend .no { background: #c0503a; } .rp-stackbar .na, .rp-legend .na { background: #c9c6c0; }
.rp-legend { display: flex; gap: 14pt; margin: 6pt 0; font-size: 8.5pt; color: #555; }
.rp-legend i { display: inline-block; width: 8pt; height: 8pt; border-radius: 2pt; margin-right: 4pt; vertical-align: -1pt; }
.rp-fixes { display: grid; gap: 7pt; }
.rp-fix { display: flex; gap: 10pt; background: var(--rp-soft); border-radius: 8pt; padding: 9pt 12pt; break-inside: avoid; }
.rp-fix > span { font-family: var(--rp-head); font-weight: 700; font-size: 14pt; color: #c0503a; line-height: 1.1; }
.rp-fix b { display: block; color: var(--rp-ink); font-size: 10pt; }
.rp-fix p { font-size: 9pt; color: #444; margin: 1pt 0 2pt !important; }
.rp-fix em { font-style: normal; font-size: 8.5pt; color: #777; }
.rp-checkgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6pt 14pt; }
.rp-chk { display: flex; gap: 7pt; align-items: flex-start; padding: 5pt 0; border-bottom: 0.75pt solid #efece8; break-inside: avoid; }
.rp-chk b { font-size: 8.8pt; color: var(--rp-ink); display: block; }
.rp-chk p { font-size: 8pt; color: #666; margin: 1pt 0 0 !important; overflow-wrap: anywhere; }
.rp-chk .rp-mark { flex: 0 0 14pt; }
.rp-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 14pt; margin-top: 4pt; }
.rp-posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6pt; }
.rp-post { break-inside: avoid; font-size: 8pt; }
.rp-post img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6pt; display: block; background: #eee; }
.rp-post-meta { margin-top: 4pt; color: var(--rp-ink); }
.rp-post-meta span { display: block; color: #888; font-size: 7.5pt; }
.rp-post p { color: #666; font-size: 7.5pt; margin: 2pt 0 0 !important; line-height: 1.3; }
.rp-weak img { filter: grayscale(.35); opacity: .85; }
.rp-bars, .rp-mix { display: grid; gap: 7pt; }
.rp-barrow { display: grid; grid-template-columns: 1.6in 1fr 40pt; gap: 10pt; align-items: center; font-size: 9pt; }
.rp-barrow em { font-style: normal; color: #999; font-size: 8pt; margin-left: 4pt; }
.rp-barrow b, .rp-pct { text-align: right; color: var(--rp-ink); }
.rp-bar2 { height: 9pt; background: #ece9e4; border-radius: 5pt; overflow: hidden; }
.rp-bar2 i { display: block; height: 100%; background: var(--rp-accent); border-radius: 5pt; }
.rp-mix-row { display: grid; grid-template-columns: 2.9in 1fr 30pt; gap: 12pt; align-items: center; break-inside: avoid; }
.rp-mix-name b { display: block; font-size: 9.5pt; color: var(--rp-ink); }
.rp-mix-name span { font-size: 8.5pt; color: #666; }
.rp-ins-group h4.up { color: #3b5bdb !important; } .rp-ins-group h4.now { color: #c0503a !important; } .rp-ins-group h4.risk { color: #a8730c !important; }
.rp-ins b { display: block; font-size: 9.5pt; color: var(--rp-ink); margin-bottom: 3pt; }
.rp-ins p { font-size: 8.8pt; color: #444; }
.rp-ev { font-size: 8pt !important; color: #888 !important; border-top: 0.75pt solid #eee; padding-top: 4pt; margin-top: 4pt !important; }
.rp-aud { position: relative; padding-left: 40pt; }
.rp-initial { position: absolute; left: 11pt; top: 11pt; width: 20pt; height: 20pt; border-radius: 50%; background: var(--rp-accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 10pt; }
.rp-day-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10pt; font-size: 8.8pt; }
.rp-day-grid span { display: block; font-size: 7.5pt; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--rp-accent); margin-bottom: 2pt; }
.rp-day-locked { display: flex; align-items: center; gap: 12pt; padding: 8pt 12pt !important; background: var(--rp-soft); border-style: dashed !important; }
.rp-day-locked b { min-width: 1.6in; color: var(--rp-ink); font-size: 9.5pt; }
.rp-day-locked span:not(.rp-lock) { flex: 1; font-size: 8.5pt; color: #666; }
.rp-phases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10pt; }
.rp-phase { border: 0.75pt solid #e2e0dc; border-top: 4pt solid var(--rp-accent); border-radius: 8pt; padding: 11pt 12pt; break-inside: avoid; }
.rp-phase-head { display: flex; gap: 9pt; align-items: center; margin-bottom: 8pt; }
.rp-phase-head > span { width: 22pt; height: 22pt; border-radius: 50%; background: var(--rp-ink); color: #fff; display: grid; place-items: center; font-weight: 700; }
.rp-phase-head b { display: block; color: var(--rp-ink); font-size: 10.5pt; }
.rp-phase-head em { font-style: normal; font-size: 8pt; color: #888; }
.rp-phase ul { margin: 0; padding-left: 13pt; display: grid; gap: 5pt; font-size: 8.8pt; color: #333; }
.rp-ico { display: inline-grid; place-items: center; width: 22pt; height: 22pt; border-radius: 6pt; background: var(--rp-soft); color: var(--rp-accent); font-size: 12pt; margin-bottom: 6pt; }
.rp-ok { background: #e4f1e8; color: #1f5c36; }
#rp-dummy {}
.rp-sec .rp-body { font-size: 9.8pt; }
.rp-priorities { gap: 6pt; }
.rp-priorities li { padding: 7pt 10pt 7pt 34pt; }
.rp-ins p { font-size: 8.5pt; }
.rp-mix { gap: 5pt; }
.rp-mix-name span { font-size: 8pt; }
.rp-headline { font-size: 15pt !important; }
.rp-why { font-size: 8.5pt; margin-top: 2pt; }
.rp-priorities li > b { font-size: 9.8pt; }
.rp-big { gap: 9pt; }
.rp-big li { padding: 11pt 12pt 11pt 38pt; }
.rp-big li > b { font-size: 11pt; margin-bottom: 4pt; }
.rp-big .rp-why { font-size: 9.3pt; }
.rp-head h2 .rp-lock, #report-root h3 .rp-lock { margin-left: 6pt; vertical-align: 3pt; }
.rp-facts3 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8pt; }
.rp-facts3 div { background: var(--rp-soft); border-radius: 8pt; padding: 8pt 10pt; }
.rp-facts3 b { display: block; font-family: var(--rp-head); font-size: 13pt; color: var(--rp-ink); line-height: 1.15; }
.rp-facts3 span { font-size: 8pt; color: #666; }
.rp-matrix { display: grid; grid-template-columns: 1fr 1fr; gap: 10pt 14pt; margin-top: 12pt; }
.rp-mx { break-inside: avoid; }
.rp-mx-head { display: flex; justify-content: space-between; border-bottom: 1.5pt solid var(--rp-ink); padding-bottom: 3pt; margin-bottom: 4pt; }
.rp-mx-head b { font-size: 9.5pt; color: var(--rp-ink); text-transform: uppercase; letter-spacing: .08em; }
.rp-mx-head span { font-size: 9pt; font-weight: 600; color: var(--rp-accent); }
.rp-mx-row { display: flex; gap: 7pt; padding: 4pt 0; border-bottom: 0.75pt solid #efece8; }
.rp-mx-row b { font-size: 8.6pt; color: var(--rp-ink); display: block; }
.rp-mx-row p { font-size: 7.8pt; color: #666; margin: 1pt 0 0 !important; overflow-wrap: anywhere; }
.rp-mx-row .rp-mark { flex: 0 0 14pt; }
.rp-tiles { grid-template-columns: 1fr 1fr; }
.rp-hidden b { color: #999; font-weight: 500; }
.rp-na .rp-tile-top b { font-size: 7.5pt; font-family: inherit; letter-spacing: .02em; }
.rp-tiles { grid-template-columns: repeat(3, 1fr) !important; gap: 7pt; }
.rp-tile { padding: 8pt 9pt; }
.rp-tile-top span { font-size: 8.5pt; }
.rp-tile p { font-size: 7.8pt; }
.rp-glance { grid-template-columns: 1.25in 1fr; }
.rp-bots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6pt; margin-bottom: 6pt; }
.rp-bot { border: 0.75pt solid #e2e0dc; border-radius: 8pt; padding: 7pt 8pt; position: relative; break-inside: avoid; }
.rp-bot b { display: block; font-size: 9pt; color: var(--rp-ink); }
.rp-bot span { display: block; font-size: 7.5pt; color: #666; font-family: ui-monospace, Menlo, monospace; }
.rp-bot em { display: block; font-style: normal; font-size: 7.5pt; color: #888; margin-top: 2pt; line-height: 1.3; }
.rp-bot i { position: absolute; top: 6pt; right: 7pt; font-style: normal; font-size: 7pt; font-weight: 700; padding: 1pt 5pt; border-radius: 10pt; }
.rp-bot.ok i { background: #dcefe3; color: #1f6b3d; }
.rp-bot.no i { background: #f6ddd8; color: #9a2f1e; }
.site-bots { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.site-bots span { font-size: 12px; padding: 3px 9px; border-radius: 20px; background: var(--good-bg); color: var(--good-ink); }
.site-bots span.no { background: var(--bad-bg); color: var(--bad-ink); }
.rp-shots { display: grid; grid-template-columns: 1.35fr 1fr 0.42fr; gap: 8pt; align-items: start; margin-bottom: 8pt; }
.rp-shots figure { margin: 0; break-inside: avoid; }
.rp-shots img { width: 100%; border: 0.75pt solid #ddd; border-radius: 6pt; display: block; }
.rp-shots figcaption { font-size: 7.5pt; color: #666; margin-top: 3pt; }
.ux-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin: 6px 0 12px; }
.ux-shots figure { margin: 0; }
.ux-shots img { width: 100%; border: 1px solid var(--line); border-radius: 8px; display: block; cursor: zoom-in; }
.ux-shots figure.phone img { max-width: 120px; }
.ux-shots figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; }
.ux-shots .missing span { display: block; font-size: 12px; color: var(--muted); padding: 10px; border: 1px dashed var(--line); border-radius: 8px; }

/* Header buttons: one primary action, outlined secondary actions, a quiet ghost link, red for removal. */
.btn .bi { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-right: 4px; }
.btn.ghost { background: transparent; box-shadow: none; color: var(--muted); }
.btn.ghost:hover { background: rgba(12, 12, 24, .05); color: var(--ink); box-shadow: none; }
.btn.danger-link { background: transparent; box-shadow: none; color: var(--bad-ink); }
.btn.danger-link:hover { background: var(--bad-bg); }
.page-head .head-actions { align-items: center; }

/* Website audit tabs */
.site-tabs { display: flex; gap: 4px; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 4px; margin: 4px 0 16px; background: var(--head); border: 1px solid var(--line); border-radius: 999px; }
.site-tabs::-webkit-scrollbar { display: none; }
.site-tabs button { flex: none; display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; color: var(--muted, #555); font: inherit; font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.site-tabs button:hover { color: var(--ink); }
.site-tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08), inset 0 0 0 1px var(--line); }
.site-tabs .st-score { font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--line); color: var(--ink); }
.site-tabs .st-score.good { background: #dcf3e4; color: #13693a; }
.site-tabs .st-score.warn { background: #fdf0cf; color: #7a5300; }
.site-tabs .st-score.bad { background: #fbdddb; color: #9b1c14; }
.site-pane[hidden], [data-pane][hidden] { display: none !important; }

/* Info icon and tooltip beside audit checks */
.ci { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; margin-left: 6px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--faint); font: 700 11px/1 Georgia, "Times New Roman", serif; font-style: italic; cursor: help; vertical-align: 2px; flex: none; }
.ci:hover, .ci:focus-visible, .ci[aria-describedby] { color: var(--ink); border-color: var(--ink); outline: none; }
.ci-tip { position: fixed; z-index: 1000; max-width: 340px; padding: 12px 14px; border-radius: 10px; background: #111; color: #fff; font-size: 13px; line-height: 1.5; font-weight: 400; box-shadow: 0 8px 24px rgba(0,0,0,.18); pointer-events: none; }
.ci-tip[hidden] { display: none; }
@media print { .ci, .ci-tip { display: none !important; } }

/* Locked previews: what connecting Meta and Shopify adds */
.lk-section { margin-top: 18px; padding: 18px; border-radius: 14px; background: var(--card); border: 1px dashed #cfd6d2; }
.lk-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.lk-head h2 { margin: 0 0 2px; font-size: 16px; }
.lk-head .head-actions { flex: none; }
.lk-grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.lk-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card); display: flex; flex-direction: column; }
.lk-card .lk-body { flex: 1; }
.lk-mock { min-height: 120px; padding: 12px 14px; background: #f6f7f6; color: var(--muted); filter: grayscale(.85); opacity: .72; position: relative; display: grid; align-content: start; gap: 6px; }
.lk-sample { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 40px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: rgba(60, 70, 65, .22); transform: rotate(-12deg); pointer-events: none; z-index: 2; }
.lk-mock { overflow: hidden; }
.lk-kpi { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.lk-kpi b { font-size: 17px; color: var(--ink); }
.lk-kpi span { font-size: 11px; }
.lk-up { color: #2f7a52; font-weight: 600; }
.lk-axis { display: flex; justify-content: space-between; font-size: 10px; color: #9aa19d; }
.lk-hbars { display: grid; gap: 6px; }
.lk-hbars div { display: grid; grid-template-columns: 74px 1fr 44px; align-items: center; gap: 8px; font-size: 11px; }
.lk-hbars i { height: 8px; background: #e4e7e5; border-radius: 4px; overflow: hidden; }
.lk-hbars em { display: block; height: 100%; background: #8d9691; border-radius: 4px; }
.lk-hbars b { text-align: right; color: var(--ink); }
.lk-table { display: grid; gap: 7px; padding-top: 4px; }
.lk-table div { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; border-bottom: 1px solid #e6e9e7; padding-bottom: 5px; }
.lk-table span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lk-table b { color: var(--ink); white-space: nowrap; }
.lk-mock svg { width: 100%; height: 56px; }
.lk-mock .lk-grid { stroke: #dcdfdd; stroke-width: 1; fill: none; }
.lk-mock .lk-line { stroke: #b0b7b3; stroke-width: 3; fill: none; stroke-linejoin: round; stroke-linecap: round; }
.lk-bars { display: flex; align-items: flex-end; gap: 8px; height: 80px; }
.lk-bars i { flex: 1; background: #c9cfcb; border-radius: 4px 4px 0 0; }
.lk-rows { display: grid; gap: 9px; padding-top: 4px; }
.lk-rows div { display: flex; gap: 10px; }
.lk-rows i { height: 9px; border-radius: 5px; background: #cdd2cf; }
.lk-rows i + i { width: 18%; margin-left: auto; background: #dadedb; }
.lk-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-top: 14px; }
.lk-tiles div { background: #fff; border-radius: 8px; padding: 8px; display: grid; align-content: center; }
.lk-tiles b { font-size: 15px; color: var(--ink); }
.lk-tiles span { font-size: 10px; color: var(--muted); line-height: 1.2; }
.lk-heat { display: grid; grid-template-columns: repeat(14, 1fr); gap: 3px; padding-top: 10px; }
.lk-heat i { height: 10px; background: #9aa39e; border-radius: 2px; }
.lk-body { padding: 12px 14px 14px; display: grid; gap: 4px; align-content: start; background: var(--card); }
.lk-body b { font-size: 14px; color: var(--ink); }
.lk-body p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.lk-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; letter-spacing: .02em; color: var(--accent); }
.lk-ico { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; }
@media (max-width: 700px) { .lk-head { flex-direction: column; } }
.lk-print { border: 0; padding: 0; margin: 0; background: transparent; }
.lk-print .lk-grid-cards { grid-template-columns: repeat(3, 1fr); }

/* Sample previews of connected pages */
.sample-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 16px; padding: 16px 18px 16px 20px; border-radius: 14px; background: linear-gradient(90deg, var(--accent-soft), #fff 70%); border: 1px solid var(--edge); box-shadow: inset 4px 0 0 var(--accent); }
.sample-banner > div:first-child { display: grid; gap: 3px; }
.sample-banner strong { color: var(--ink); font-size: 14px; }
.sample-banner span { color: var(--muted); }
.sample-pill { justify-self: start; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent) !important; }
.sample-dim { filter: grayscale(.85); opacity: .62; }
@media (max-width: 700px) { .sample-banner { flex-direction: column; align-items: stretch; } }

.sample-watermark { position: fixed; left: 50%; top: 58%; transform: translate(-50%, -50%) rotate(-14deg); font-size: clamp(72px, 14vw, 200px); font-weight: 800; letter-spacing: .2em; color: rgba(40, 50, 45, .12); pointer-events: none; z-index: 5; white-space: nowrap; user-select: none; }
@media print { .sample-watermark { display: none; } }
.lk-table span { flex: 1; min-width: 0; }
.lk-table b { flex: none; }
.lk-tiles div { min-width: 0; padding: 8px 6px; }
.lk-tiles b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lk-print .lk-tiles b { font-size: 12.5px; }
.lk-print .lk-table div { font-size: 10.5px; }
.lk-print .lk-tiles { gap: 5px; }

/* ---------- Strategy, Website, Posts, Analytics and Elements share the Ads and Studio look ---------- */
body:has(.strategy-page), body:has(.website-page), body:has(.posts-page), body:has(.analytics-page), body:has(.elements-page) { background: radial-gradient(1100px 520px at 0% -8%, rgba(109, 94, 252, .11), transparent 62%), radial-gradient(900px 460px at 100% 0%, rgba(236, 76, 147, .09), transparent 60%), radial-gradient(800px 600px at 50% 110%, rgba(20, 184, 166, .07), transparent 60%), #f6f6fa; background-attachment: fixed; }
.page.strategy-page, .page.website-page, .page.posts-page, .page.analytics-page, .page.elements-page { max-width: none; padding-left: 20px; padding-right: 24px; }
@media (max-width: 600px) { .page.strategy-page, .page.website-page, .page.posts-page, .page.analytics-page, .page.elements-page { padding-left: 12px; padding-right: 12px; } }
:is(.strategy-page, .website-page, .posts-page, .analytics-page, .elements-page) .card { border: 0; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px var(--edge); }
:is(.strategy-page, .website-page, .posts-page, .analytics-page, .elements-page) .card .card { box-shadow: 0 0 0 1px var(--line); border-radius: 14px; }
@media print { body:has(.strategy-page), body:has(.website-page), body:has(.posts-page), body:has(.analytics-page), body:has(.elements-page) { background: #fff; } }
:is(.strategy-page, .website-page, .posts-page, .analytics-page, .elements-page) .card.site-connect { background: linear-gradient(90deg, var(--accent-soft), #fff 70%); box-shadow: inset 4px 0 0 var(--accent), 0 0 0 1px var(--edge); }

/* One real section shown with sample data on a not-yet-connected brand */
.sample-card { position: relative; overflow: hidden; }
.sample-card > :not(.sample-card-note):not(.sample-card-mark) { filter: grayscale(.85); opacity: .62; }
.sample-card-note { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -4px 0 12px; color: var(--muted); }
.sample-card-note .btn { margin-left: auto; }
.sample-card-mark { position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%) rotate(-12deg); font-size: clamp(60px, 9vw, 140px); font-weight: 800; letter-spacing: .2em; color: rgba(40, 50, 45, .12); pointer-events: none; white-space: nowrap; z-index: 3; }
@media print { .sample-card-mark { display: none; } }

/* Section rails on Strategy, Website and Analytics (same look as Ads and Studio) */
.rail-body { margin-top: 4px; }
.rail-body .sx-rail { top: 76px; }
.rail-body .sx-rail-item { flex: none; }
.rail-ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.rail-body .sx-rail-item .st-score { margin-left: auto; }
.rail-body .sx-rail-item[aria-current="page"], .rail-body .sx-rail-item[aria-selected="true"] { background: var(--sx-violet-soft); color: var(--sx-violet-ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--sx-violet); }
@media (max-width: 900px) {
  .rail-body { grid-template-columns: 1fr; }
  .rail-body .sx-rail { position: static; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; max-height: none; }
  .rail-body .sx-rail-head { display: none; }
}
@media print { .rail-body { display: block; } .rail-body .sx-rail { display: none; } }

/* Elements cards follow the Studio card style */
.elements-page .el-card { background: #fff; border: 0; border-radius: 18px; box-shadow: 0 0 0 1px var(--edge); padding: 8px 8px 12px; transition: transform .18s ease, box-shadow .18s ease; }
.elements-page .el-card:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--edge), 0 14px 30px -14px rgba(40, 30, 120, .28); }
.elements-page .el-card .el-cover { border-radius: 12px; overflow: hidden; }
.elements-page .el-group { padding: 20px 22px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px var(--edge); }
@media (prefers-reduced-motion: reduce) { .elements-page .el-card { transition: none; } .elements-page .el-card:hover { transform: none; } }
.rail-body .st-score { font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--line); color: var(--ink); }
.rail-body .st-score.good { background: #dcf3e4; color: #13693a; }
.rail-body .st-score.warn { background: #fdf0cf; color: #7a5300; }
.rail-body .st-score.bad { background: #fbdddb; color: #9b1c14; }

/* Where to post */
.ch-list { display: grid; gap: 8px; margin-top: 12px; }
.ch-row { display: grid; grid-template-columns: 190px 1fr auto; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--head); box-shadow: inset 3px 0 0 var(--line); }
.ch-row p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.ch-name { display: grid; gap: 2px; }
.ch-name b { font-size: 14px; }
.ch-pri { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.ch-have { font-size: 12px; color: var(--muted); white-space: nowrap; }
.ch-good { box-shadow: inset 3px 0 0 var(--good-dot); } .ch-good .ch-pri { color: var(--good-ink); }
.ch-review { box-shadow: inset 3px 0 0 #4b6bdc; } .ch-review .ch-pri { color: var(--review-ink); }
.ch-calm .ch-pri { color: var(--muted); }
.ch-muted { opacity: .7; } .ch-muted .ch-pri { color: var(--faint); }
@media (max-width: 700px) { .ch-row { grid-template-columns: 1fr; gap: 4px; } .ch-have { white-space: normal; } }
.ch-print .ch-row { grid-template-columns: 150px 1fr; } .ch-print .ch-have { grid-column: 2; }

/* Pre-launch scorecard (BRD Phase 1, B1) */
.psc-card { border: 1px solid var(--line, #e6e6ea); border-radius: 14px; padding: 14px 16px; margin: 12px 0; background: var(--panel, #fff); }
.psc-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.psc-head > div { display: flex; flex-direction: column; gap: 4px; }
.psc-state { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; width: fit-content; }
.psc-state.good { background: #e7f4ec; color: #17633a; }
.psc-state.warn { background: #fdf0d8; color: #7a4b06; }
.psc-total { font-size: 30px; line-height: 1; }
.psc-total small { font-size: 13px; font-weight: 500; opacity: .6; margin-left: 2px; }
.psc-note { font-size: 13px; margin: 10px 0 0; color: var(--muted, #5f6470); }
.psc-rows { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.psc-line { display: grid; grid-template-columns: 120px 1fr 32px; align-items: center; gap: 10px; }
.psc-label { font-size: 13px; font-weight: 600; }
.psc-bar { height: 6px; border-radius: 3px; background: #eceef2; overflow: hidden; }
.psc-bar i { display: block; height: 100%; border-radius: 3px; }
.psc-row.good .psc-bar i { background: #2f8f5b; } .psc-row.warn .psc-bar i { background: #d49a1c; } .psc-row.bad .psc-bar i { background: #c8452f; }
.psc-num { font-size: 13px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.psc-detail { font-size: 12.5px; margin: 4px 0 0 130px; color: var(--muted, #5f6470); }
.psc-fix { font-size: 12.5px; margin: 4px 0 0 130px; font-weight: 600; }
@media (max-width: 560px) { .psc-line { grid-template-columns: 96px 1fr 28px; } .psc-detail, .psc-fix { margin-left: 0; } }

/* Why? reason picker and Brand memory (BRD Phase 1, C1) */
.why-wrap { position: fixed; inset: 0; z-index: 1000; background: rgba(15, 17, 21, .42); display: grid; place-items: center; padding: 16px; }
.why-card { background: var(--panel, #fff); border-radius: 16px; padding: 20px; width: min(440px, 100%); box-shadow: 0 24px 60px -24px rgba(0,0,0,.45); }
.why-card h3 { margin: 0 0 4px; font-size: 17px; }
.why-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.why-chip { border: 1px solid var(--line, #dcdde2); background: transparent; border-radius: 999px; padding: 7px 12px; font: inherit; font-size: 13.5px; cursor: pointer; }
.why-chip[aria-pressed="true"] { background: var(--ink, #15171c); color: #fff; border-color: transparent; }
.why-note { display: grid; gap: 4px; }
.why-note input { border: 1px solid var(--line, #dcdde2); border-radius: 10px; padding: 9px 11px; font: inherit; }
.why-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.bm-add { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; margin: 12px 0; }
.bm-add input { border: 1px solid var(--line, #dcdde2); border-radius: 10px; padding: 8px 11px; font: inherit; min-width: 0; }
.bm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bm-rule { border: 1px solid var(--line, #e6e6ea); border-radius: 12px; padding: 10px 12px; }
.bm-meta { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.bm-kind { font-size: 11.5px; font-weight: 700; letter-spacing: .02em; padding: 2px 8px; border-radius: 999px; background: #eef0f4; }
.bm-rule.k-avoid .bm-kind { background: #fde9e4; color: #8a2a17; }
.bm-rule.k-rewrite .bm-kind { background: #e6eefc; color: #1d3f8a; }
.bm-rule.k-rule .bm-kind { background: #e7f4ec; color: #17633a; }
.bm-text { margin: 6px 0; font-size: 14px; outline: none; border-radius: 6px; padding: 2px 4px; margin-left: -4px; }
.bm-text:focus { background: #f6f7f9; box-shadow: 0 0 0 2px #c9d3e6; }
.bm-actions { display: flex; gap: 8px; justify-content: flex-end; }
.bm-empty { font-size: 13.5px; color: var(--muted, #5f6470); }
@media (max-width: 560px) { .bm-add { grid-template-columns: 1fr; } }

/* What to do next (BRD Phase 1, E3/E4/A2) */
.ns-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.ns-col { border: 1px solid var(--line, #e6e6ea); border-radius: 14px; padding: 12px; min-width: 0; }
.ns-col header { display: grid; gap: 2px; margin-bottom: 10px; }
.ns-col header b { font-size: 14px; }
.ns-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ns-hook header b::before, .ns-room header b::before, .ns-tired header b::before, .ns-cut header b::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.ns-hook header b::before { background: #4f6bed; } .ns-room header b::before { background: #2f8f5b; } .ns-tired header b::before { background: #d49a1c; } .ns-cut header b::before { background: #c8452f; }
.ns-item { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; }
.ns-thumb { width: 56px; height: 70px; border-radius: 8px; overflow: hidden; background: #f1f2f5; display: grid; place-items: center; }
.ns-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ns-name { font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ns-body p { margin: 3px 0; }
.ns-action { font-weight: 600; }
.ns-none { margin: 0; }
.ns-rates { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.ns-rates > p { grid-column: 1 / -1; margin: 0; }
.ns-rate h4 { margin: 0 0 6px; font-size: 13px; }
@media (max-width: 1100px) { .ns-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .ns-cols, .ns-rates { grid-template-columns: minmax(0, 1fr); } }

.as-res-table .as-vs{display:block;margin-top:2px;max-width:220px;line-height:1.3}
.as-base{margin:6px 0 0}

/* Approvals: finished ads and the one-at-a-time review */
.page-head #ib-focus{align-self:center;white-space:nowrap}
.ib-ad .req-thumb{width:132px;height:auto;max-height:200px;object-fit:cover;border-radius:8px}
.ib-score{display:flex;align-items:center;gap:10px;margin:8px 0 4px}
.ib-num{font-weight:700;font-size:20px;line-height:1}
.ib-num small{font-size:11px;font-weight:500;opacity:.7}
.ib-num.good{color:var(--good,#1f7a4d)}
.ib-num.warn{color:var(--warn,#a86b00)}
.req-checks li.warn{color:var(--warn,#a86b00)}
.ib-why{margin:6px 0 0}
.ib-bar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:10px 14px;border:1px solid var(--line,#e5e3df);border-radius:10px;background:var(--panel,#fff);margin-bottom:10px;position:sticky;top:8px;z-index:2}
.ib-bar .ib-nav{margin-left:auto;display:flex;gap:6px}
.ib-keys kbd{display:inline-block;min-width:18px;padding:1px 5px;margin:0 2px 0 6px;border:1px solid var(--line,#d9d6d0);border-bottom-width:2px;border-radius:4px;font:600 11px/1.4 ui-monospace,monospace;text-align:center}
.ib-focus article.request{box-shadow:0 6px 24px rgba(0,0,0,.08)}
.ib-focus .ib-ad .req-thumb{width:220px;max-height:320px}
@media (max-width:640px){
  .ib-keys{display:none}
  .ib-ad{flex-direction:column}
  .ib-ad .req-thumb,.ib-focus .ib-ad .req-thumb{width:100%;max-height:none}
  .request-actions{width:100%;display:flex;gap:8px}
  .request-actions .btn{flex:1;min-height:40px}
  .ib-bar .ib-nav .btn{min-width:44px;min-height:40px}
}

/* Posts calendar: states, weekly batch, move */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.cal-week{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:10px 12px;margin:4px 0 10px;border-radius:10px;background:var(--head,#f6f4f1)}
.cal-week-act{display:flex;gap:8px;flex-wrap:wrap}
.cal-legend{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 10px}
.cal-state{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border:1px solid var(--line,#e5e3df);border-radius:999px;background:transparent;font:inherit;font-size:12px;cursor:pointer;color:inherit}
.cal-state i{width:8px;height:8px;border-radius:50%;background:var(--faint,#999)}
.cal-state.t-review i{background:var(--review-ink,#8a5a00)}
.cal-state.t-good i{background:var(--good-ink,#1f7a4d)}
.cal-state.t-bad i{background:var(--bad-ink,#b42318)}
.cal-state .n{opacity:.65;font-variant-numeric:tabular-nums}
.cal-state.on{border-color:currentColor;font-weight:600}
.cal-state.clear{border-style:dashed}
.post-chip.dim{opacity:.28}
.move-time input{font:inherit;font-size:12px;padding:4px 6px;border:1px solid var(--line,#e5e3df);border-radius:8px;background:transparent;color:inherit;max-width:190px}
@media (max-width:640px){.cal-week-act{width:100%}.cal-week-act .btn{flex:1;min-height:40px}.move-time input{max-width:none;width:100%;min-height:40px}}
.ib-on .approval-filters{display:none}
@media (max-width:640px){
  .ib-on .page-head .sub{display:none}
  .ib-focus .ib-ad .req-thumb{max-height:42vh;object-fit:contain;background:var(--head,#f3f1ee)}
  .ib-focus article.request .request-foot{position:sticky;bottom:0;background:var(--panel,#fff);padding-top:10px;padding-bottom:max(10px,env(safe-area-inset-bottom));z-index:2}
}
.cal-state.t-calm i{background:var(--tertiary-ink,#999)}
.idea-receipts{list-style:none;margin:8px 0;padding:0;display:grid;gap:4px;font-size:12.5px}
.idea-receipts li{display:flex;gap:8px;align-items:baseline}
.idea-receipts .rc-k{flex:none;min-width:52px;font-size:10.5px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--good-ink,#1f7a4d)}
.cl-src{display:block;margin-top:2px;font-size:11.5px;color:var(--faint,#888)}
.cl-src a{color:inherit;text-decoration:underline}
.cl-src i{font-style:normal}
.an-typ{display:inline-block;margin-left:6px;font-size:10.5px;white-space:nowrap;vertical-align:middle}
.an-card .an-typ{margin:4px 0 0;align-self:flex-start}
.cn-prev{margin:8px 0}.cn-prev summary{cursor:pointer;font-size:12.5px}
.cn-prev-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:8px}.cn-prev-row figure{margin:0;width:120px}.cn-prev-row img{width:100%;border-radius:8px;display:block}
.as-res-table td:has(.as-vs),.as-res-table th:nth-last-child(2){min-width:180px}
@media (max-width:640px){
  .as-res-table thead{display:none}
  .as-res-table,.as-res-table tbody{display:block}
  .as-res-table tr{display:grid;grid-template-columns:1fr 1fr 1fr;gap:6px 10px;padding:12px 0;border-bottom:1px solid var(--line,#e5e3df)}
  .as-res-table td{display:block;padding:0;border:0;text-align:left}
  .as-res-table td:first-child{grid-column:1/-1}
  .as-res-table td[data-l]::before{content:attr(data-l);display:block;font-size:10.5px;color:var(--faint,#888);text-transform:uppercase;letter-spacing:.04em}
  .as-res-table td.as-vs-cell{grid-column:1/-1;min-width:0}
  .as-res-table td:last-child:empty{display:none}
  .as-res-table .as-vs{max-width:none}
}
@media (max-width:640px){.as-res-table td,.as-res-table tr td{border-top:0 !important;border-bottom:0 !important;box-shadow:none !important}}

/* Post scorecard */
.ps-card{margin-top:10px;border:1px solid var(--line,#e5e3df);border-radius:12px;padding:12px 14px;background:var(--panel,#fff)}
.ps-card header{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}
.ps-num{font-weight:700;font-size:18px}.ps-num small{font-size:11px;font-weight:500;opacity:.7}
.ps-num.good{color:var(--good-ink,#1f7a4d)}.ps-num.warn{color:var(--warn-ink,#a86b00)}
.ps-list{list-style:none;margin:0;padding:0;display:grid;gap:6px;font-size:12.5px}
.ps-list li{display:flex;gap:8px;align-items:baseline}
.ps-mark{flex:none;width:14px;text-align:center;font-weight:700}
.ps-pass .ps-mark{color:var(--good-ink,#1f7a4d)}.ps-warn .ps-mark{color:var(--warn-ink,#a86b00)}.ps-fail .ps-mark{color:var(--bad-ink,#b42318)}
.ps-fix{display:block;color:var(--faint,#777);margin-top:1px}
.ps-compact{display:flex;align-items:center;gap:10px;margin:8px 0 4px}
.bd-warn{border:1px solid var(--warn-bg,#f3e2b8);background:var(--warn-bg,#fdf6e3);color:var(--warn-ink,#7a5200);border-radius:10px;padding:10px 14px;margin:8px 0 12px;font-size:13px}
.bd-warn ul{margin:4px 0 4px 18px;padding:0}

/* Competitor Scout swipe file */
.sc-swipe{display:grid;gap:8px;margin-top:10px}
.sc-item{border:1px solid var(--line,#e5e3df);border-radius:10px;padding:10px 12px;background:var(--panel,#fff)}
.sc-top{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-bottom:4px}
.sc-days{font-size:11px;font-weight:600;padding:2px 8px;border-radius:999px;background:var(--head,#f3f1ee)}
.sc-days.long{background:var(--good-bg,#e5f4e4);color:var(--good-ink,#1f7a4d)}
.sc-head{display:block;margin-bottom:2px}
.sc-rec{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin-top:6px;padding-top:6px;border-top:1px dashed var(--line,#e5e3df)}
.flop-list{list-style:none;margin:6px 0;padding:0;display:grid;gap:4px;font-size:12.5px}
.flop-list li{display:flex;gap:8px;align-items:baseline}
.flop-list li span{flex:none;width:14px;text-align:center;font-weight:700}
.fl-warn span{color:var(--warn-ink,#a86b00)}.fl-good span{color:var(--good-ink,#1f7a4d)}

/* Creative scores (Hook, Hold, Click, Convert) */
.cs-card .sec-head{flex-wrap:wrap;gap:8px}
.cs-sort button{font-size:12px}
.cs-pill{display:inline-block;min-width:34px;text-align:center;padding:2px 6px;border-radius:999px;font-weight:600;font-variant-numeric:tabular-nums;font-size:12px}
.cs-pill.t-good{background:var(--good-bg,#e5f4e4);color:var(--good-ink,#1f7a4d)}
.cs-pill.t-bad{background:var(--bad-bg,#fbebeb);color:var(--bad-ink,#b42318)}
.cs-pill.t-calm{background:var(--head,#f3f1ee)}
.cs-pill.t-none{color:var(--faint,#999)}
.cs-ad{display:flex;align-items:center;gap:8px;min-width:0}
.cs-ad img{width:32px;height:32px;border-radius:6px;object-fit:cover;flex:none}
.cs-ad b{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:280px}
@media (max-width:640px){
  .cs-table thead{display:none}
  .cs-table,.cs-table tbody{display:block}
  .cs-table tr{display:grid;grid-template-columns:repeat(5,1fr);gap:4px 6px;padding:10px 0;border-bottom:1px solid var(--line,#e5e3df)}
  .cs-table td{display:block;padding:0;border:0 !important;text-align:left}
  .cs-table td:first-child{grid-column:1/-1}
  .cs-table td[data-l]::before{content:attr(data-l);display:block;font-size:10px;color:var(--faint,#888);text-transform:uppercase;letter-spacing:.04em}
  .cs-ad b{max-width:none;white-space:normal}
}

/* Swipe triage (keep or discard in one gesture) */
.swipe-card{position:relative;touch-action:pan-y;user-select:none;-webkit-user-select:none;will-change:transform;--swipe:0}
.swipe-card::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;background:linear-gradient(90deg,rgba(180,35,24,calc(max(0,-1 * var(--swipe)) * .14)),rgba(31,122,77,calc(max(0,var(--swipe)) * .14)))}
.swipe-tag{position:absolute;top:14px;z-index:3;padding:4px 10px;border-radius:8px;border:2px solid currentColor;font-weight:700;font-size:14px;letter-spacing:.04em;text-transform:uppercase;pointer-events:none;opacity:0}
.swipe-tag.right{left:14px;color:var(--good-ink,#1f7a4d);transform:rotate(-8deg);opacity:calc(max(0,var(--swipe)))}
.swipe-tag.left{right:14px;color:var(--bad-ink,#b42318);transform:rotate(8deg);opacity:calc(max(0,-1 * var(--swipe)))}
.deck-card{border-radius:14px;background:var(--panel,#fff)}
.cn-triage{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:4px 0 12px}
.deck-card{display:flex;flex-direction:column;gap:16px}
.swipe-tag{background:rgba(255,255,255,.88)}
.kh-list{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.kh-item{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 12px;border:1px solid var(--line,#e5e3df);border-radius:10px}
.kh-item>div{display:flex;flex-direction:column;gap:2px;min-width:0}
.kh-sum{color:var(--muted,#555)}

/* Brand documents and per-ad context */
.bd-add{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:8px 0}
.bd-paste{display:grid;gap:6px;margin:6px 0 10px}
.bd-paste input,.bd-paste textarea,.cn-ctx textarea{font:inherit;font-size:13px;padding:8px 10px;border:1px solid var(--line,#e5e3df);border-radius:8px;background:var(--panel,#fff);color:inherit;width:100%;box-sizing:border-box}
.bd-list{list-style:none;margin:8px 0 0;padding:0;display:grid;gap:8px}
.bd-list li{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;padding:10px 12px;border:1px solid var(--line,#e5e3df);border-radius:10px}
.bd-list li>div{display:flex;flex-direction:column;gap:2px;min-width:0}
.bd-prev{color:var(--muted,#555);margin:4px 0 0;overflow-wrap:anywhere}
.cn-ctx{display:grid;gap:8px;margin-top:10px;padding:10px 12px;border-radius:10px;background:var(--head,#f6f4f1)}
.cn-ctx label{display:grid;gap:4px}

/* What Guard knows (brand profile completeness) */
.kg-meter{height:8px;border-radius:999px;background:var(--line,#e5e3df);overflow:hidden;margin:6px 0 10px}
.kg-meter i{display:block;height:100%;background:var(--good-ink,#1f7a4d);border-radius:999px}
.kg-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:6px 16px;font-size:13px}
.kg-list li{display:flex;gap:8px;align-items:baseline}
.kg-list li.ok span:first-child{color:var(--good-ink,#1f7a4d);font-weight:700}
.kg-list li.gap{color:var(--muted,#666)}
.kg-card h3{margin:4px 0 10px;font-size:18px;line-height:1.3}
.kg-card .why-note input{width:100%}
.kg-reward{margin:0 0 10px;padding:8px 12px;border-radius:10px;background:var(--head,#f6f4f1);font-size:13px;display:flex;flex-wrap:wrap;gap:6px 10px;align-items:center}
.kg-reward.ready{background:var(--good-bg,#e5f4e4)}
.kg-reward.done{background:var(--good-bg,#e5f4e4);color:var(--good-ink,#1f7a4d)}
.share-row{width:100%;display:flex;justify-content:flex-end;margin-top:4px}
.share-card .why-note input{width:100%}

/* Today's three (daily picks) */
.today3{margin:6px 0 14px;padding:12px 14px;border-radius:12px;background:var(--head,#f6f4f1)}
.today3-head{display:flex;gap:10px;align-items:baseline;flex-wrap:wrap;margin-bottom:8px}
.today3-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.today3-card{display:flex;flex-direction:column;gap:4px;text-align:left;font:inherit;color:inherit;padding:10px 12px;border:1px solid var(--line,#e5e3df);border-radius:10px;background:var(--panel,#fff);cursor:pointer}
.today3-why{color:var(--muted,#555);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.idea.flash{box-shadow:0 0 0 3px var(--accent,#4a6cf7);transition:box-shadow .3s}
@media (max-width:640px){.today3-row{grid-template-columns:1fr}}

/* Weekly retro */
.retro-cols{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:6px 0 10px}
.retro-h{margin:0 0 6px;font-size:13px;display:flex;align-items:center;gap:6px}
.retro-h::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--ink,#111)}
.retro-h.good::before{background:var(--good-ink,#1f7a4d)}.retro-h.bad::before{background:var(--bad-ink,#b42318)}
.retro-list{margin:0;padding-left:18px;display:grid;gap:6px;font-size:13px}
.retro-list li span{display:block}
.retro-set{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding-top:10px;border-top:1px solid var(--line,#e5e3df)}
.retro-set input[type=text]{flex:1;min-width:200px;font:inherit;font-size:13px;padding:6px 10px;border:1px solid var(--line,#e5e3df);border-radius:8px;background:transparent;color:inherit}
@media (max-width:760px){.retro-cols{grid-template-columns:1fr}}
.st-notify{display:inline-flex;align-items:center;gap:6px;margin-right:auto;color:var(--muted,#555)}

/* Preview and compare (instant preview, side by side) */
.cmp-card{margin:12px 0;padding:12px;border:1px solid var(--line,#e5e3df);border-radius:12px}
.cmp-controls{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0}
.cmp-controls label{display:grid;gap:2px;min-width:150px;flex:1}
.cmp-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:8px}
.cmp-grid figure{margin:0;min-width:0}
.cmp-grid figcaption{margin-bottom:4px}
.cmp-pv .pv{font-size:12px}
.cmp-pv .pv-media{max-height:340px;object-fit:cover}
.cmp-hist ol{margin:6px 0 0;padding-left:18px;display:grid;gap:6px}
.cmp-hist li{display:flex;justify-content:space-between;align-items:center;gap:8px}
@media (max-width:640px){.cmp-grid{grid-template-columns:1fr 1fr}.cmp-pv .pv{font-size:10.5px}}

/* Match a reference ad */
.ref-add{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:8px 0}
.ref-add input[type=url]{flex:1;min-width:200px;font:inherit;font-size:13px;padding:6px 10px;border:1px solid var(--line,#e5e3df);border-radius:8px;background:transparent;color:inherit}
.ref-out{display:grid;grid-template-columns:110px 1fr;gap:12px;align-items:start}
.ref-img{width:110px;border-radius:8px;display:block}
.ref-list{list-style:none;margin:6px 0 0;padding:0;display:grid;gap:6px}
.ref-list li{display:flex;justify-content:space-between;align-items:center;gap:8px}

/* Use Guard from Claude or ChatGPT (MCP keys) */
.mcp-card code{font:12px/1.4 ui-monospace,Menlo,monospace;background:var(--head,#f3f1ee);padding:2px 6px;border-radius:6px;overflow-wrap:anywhere}
.mcp-fresh{display:grid;gap:6px;padding:10px 12px;border-radius:10px;background:var(--good-bg,#e5f4e4);margin:8px 0}
.mcp-fresh code{display:block;padding:8px;background:var(--panel,#fff)}
.mcp-steps{margin:8px 0;padding-left:18px;display:grid;gap:4px}
.mcp-new input{flex:1;min-width:200px;font:inherit;font-size:13px;padding:6px 10px;border:1px solid var(--line,#e5e3df);border-radius:8px;background:transparent;color:inherit}
.mcp-list{list-style:none;margin:10px 0 0;padding:0;display:grid;gap:6px}
.mcp-list li{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:8px 10px;border:1px solid var(--line,#e5e3df);border-radius:10px}
.mcp-list li.off{opacity:.55}
.ev-line{color:var(--good-ink,#1f7a4d);margin:6px 0 0}

/* Big bets */
.bet-form{display:grid;gap:8px;margin:8px 0 12px}
.bet-form input[type=text]{font:inherit;font-size:13px;padding:7px 10px;border:1px solid var(--line,#e5e3df);border-radius:8px;background:transparent;color:inherit}
.bet-row{display:flex;gap:8px;flex-wrap:wrap}.bet-row input{flex:1;min-width:120px}
.bet-list{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.bet{display:flex;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid var(--line,#e5e3df);border-radius:10px}
.bet>div:first-child{display:flex;flex-direction:column;gap:2px;min-width:0}
.bet-side{display:flex;flex-direction:column;align-items:flex-end;gap:6px}
.lang-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:8px}
.lang-item{display:flex;flex-direction:column;gap:6px;align-items:flex-start;padding:10px;border:1px solid var(--line,#e5e3df);border-radius:10px}
.lang-item img{width:100%;max-width:200px;border-radius:8px;display:block}
.pb-strip{display:grid;gap:6px;margin:6px 0 12px;padding:10px 12px;border-radius:10px;background:var(--head,#f6f4f1)}
.pb-item{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.pb-item>span{display:flex;flex-direction:column;flex:1;min-width:180px}
.pb-item select{max-width:220px}
.drop-card{margin:6px 0 12px;padding:10px 12px;border:1px solid var(--line,#e5e3df);border-radius:10px}
.drop-card summary{cursor:pointer}
.drop-card h4{margin:10px 0 6px}
.drop-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:8px}
.drop-item{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:8px 10px;border:1px solid var(--line,#e5e3df);border-radius:10px}
.drop-item>span{display:flex;flex-direction:column;min-width:0}
.vbadge{display:inline-flex;align-items:center;gap:4px;margin:0 8px;padding:2px 8px;border-radius:999px;background:var(--good-bg,#e5f4e4);color:var(--good-ink,#1f7a4d);font-size:12px;font-weight:600}
.pm-fixes{margin:8px 0 10px;padding-left:20px;display:grid;gap:8px}.pm-fixes li{font-size:13px}.pm-fixes code{display:block;margin:4px 0;padding:6px 8px;border-radius:8px;background:var(--soft,#f3f2ef);word-break:break-all;white-space:normal}.pm-fixes span{display:block}.pm-ok{color:var(--good-ink,#1f7a4d)}
.ec-floor{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:8px 0}.ec-floor input{width:72px}.ec-floor .faint{flex-basis:100%}
.sea-list{list-style:none;margin:8px 0 0;padding:0;display:grid;gap:8px}.sea-item{display:grid;grid-template-columns:64px 1fr auto;gap:10px;align-items:start;padding:8px 0;border-top:1px solid var(--line,#e5e3df)}.sea-item .faint{display:block}.sea-date{font-weight:600;font-size:13px}.sea-lift{margin-left:6px;font-size:12px;font-weight:600}.sea-lift.up{color:var(--good-ink,#1f7a4d)}.sea-lift.down{color:var(--muted,#5d6470)}@media(max-width:560px){.sea-item{grid-template-columns:52px 1fr}.sea-item .btn{grid-column:2}}
.svc-form{display:grid;gap:8px;margin-bottom:12px}.svc-goal{border:0;padding:0;margin:0;display:flex;flex-wrap:wrap;gap:12px}.svc-goal legend{margin-bottom:4px}.svc-checks{list-style:none;padding:0;margin:6px 0;display:grid;gap:6px}.svc-checks li{display:grid;grid-template-columns:18px 1fr;gap:6px;font-size:13px}.svc-checks li.pass span:first-child{color:var(--good-ink,#1f7a4d)}.svc-checks li.fail span:first-child{color:#b42318}.svc-checks li.warn span:first-child{color:#8a5a00}.svc-snip{margin:10px 0}.svc-snip pre{white-space:pre-wrap;word-break:break-all;font-size:11px;background:var(--soft,#f3f2ef);padding:8px;border-radius:8px;max-height:220px;overflow:auto}.svc-rv{margin:6px 0;padding:8px;border:1px solid var(--line,#e5e3df);border-radius:10px}.svc-pre{white-space:pre-line}
.ag-form{display:grid;gap:8px;margin:8px 0 12px}.ag-all{display:flex;gap:6px;align-items:center}.ag-table td .linklike{font-weight:600}
.bm-table td:first-child{max-width:260px}
.cn-checks .pm-fixes li{display:block}.pm-fixes li .linklike{margin-top:2px}

/* Friendlier panels and forms (drawer checks, service and agency cards). */
.ux-card-head{margin-bottom:14px}.ux-card-head h3{margin:0 0 4px}.ux-card-head p{margin:0;max-width:62ch}
.ux-sec{margin:0 0 16px}.ux-sub{margin:0 0 8px;font-size:12px;font-weight:700;letter-spacing:.02em;text-transform:uppercase;color:var(--muted)}
.ux-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px 16px;max-width:760px}
.ux-field{display:flex;flex-direction:column;gap:5px;min-width:0}.ux-label{font-size:13px;font-weight:600;color:var(--ink)}.ux-hint{font-size:12px;color:var(--faint)}
.ux-field input{width:100%;box-sizing:border-box;height:38px;padding:0 12px;border-radius:10px;border:1px solid var(--edge);background:#fff;font:inherit;font-size:14px;color:var(--ink)}
.ux-field input:focus{outline:2px solid var(--accent-soft);border-color:var(--accent)}
.ux-choice{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px;max-width:760px}
.ux-opt{display:flex;gap:10px;align-items:flex-start;padding:12px 14px;border:1px solid var(--edge);border-radius:12px;cursor:pointer;background:#fff}
.ux-opt:has(input:checked){border-color:var(--accent);background:var(--accent-soft)}.ux-opt input{margin:3px 0 0}.ux-opt > span{display:flex;flex-direction:column;gap:2px}
.ux-foot{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-start;margin-top:12px}
.ux-check{display:flex;gap:8px;align-items:center;font-size:13px;margin-top:12px}
.ux-colour{display:flex;align-items:center;gap:8px}.ux-swatch{flex:none;width:26px;height:26px;border-radius:8px;border:1px solid var(--edge)}
.ag-preview{display:flex;align-items:center;gap:12px;margin-top:14px;padding:10px 14px;border-radius:12px;background:var(--head);max-width:760px;box-sizing:border-box}
.ag-prev-head{display:flex;align-items:center;gap:8px;font-size:15px}.ag-prev-head img{height:22px;width:auto;max-width:120px;object-fit:contain}
.card .ux-panel{margin-top:18px;padding:14px 16px;border:1px solid var(--edge);border-radius:14px;max-width:760px;box-sizing:border-box}
.ux-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.ux-pill{display:inline-flex;align-items:center;padding:2px 10px;border-radius:999px;font-size:12px;font-weight:650;background:var(--head);color:var(--muted);white-space:nowrap}
.ux-pill.good{background:var(--good-bg);color:var(--good-ink)}.ux-pill.bad{background:var(--bad-bg);color:var(--bad-ink)}
.ux-lead{font-size:14px;font-weight:600;margin:6px 0 2px !important}.ux-note{font-size:13px;margin:6px 0 0 !important;padding:8px 10px;border-radius:10px;background:#fff4e5;color:#7a4a00}
.ux-url{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:2px 0 0 !important}
.ux-chips{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 4px}.ux-chip{padding:3px 10px;border-radius:999px;font-size:12.5px;font-weight:600;background:var(--head)}
.ux-chip.good{background:var(--good-bg);color:var(--good-ink)}.ux-chip.bad{background:var(--bad-bg);color:var(--bad-ink)}
.ux-panel .ux-sub{margin-top:12px}
.cn-checks.ux-panel{display:block;padding:14px 16px;border:1px solid var(--edge);border-radius:14px;background:#fff}
.cn-checks .ux-steps{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.cn-checks .ux-steps li{display:flex;gap:10px;align-items:flex-start;padding:10px 12px;background:var(--head);border-radius:12px}
.ux-num{flex:none;width:22px;height:22px;border-radius:50%;background:var(--ink);color:#fff;font-size:12px;font-weight:700;display:flex;align-items:center;justify-content:center;margin-top:1px}
.cn-checks .ux-steps li > span.ux-num{width:22px;color:#fff}
.ux-step{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px}.ux-step p{margin:0}
.ux-copy{display:flex;gap:8px;align-items:center;min-width:0}
.ux-copy code{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:7px 10px;border-radius:8px;background:#fff;border:1px solid var(--edge);font-size:12.5px}
.ux-copy .btn{flex:none}
.cn-actions{justify-content:flex-start !important;gap:8px;border-top:1px solid var(--edge);margin-top:4px;padding:12px 0 !important;z-index:2}
.btn.ghost-danger{color:var(--bad-ink)}
.svc-form{display:block;margin:0}.ag-form{display:block;margin:0}
.svc-rv{background:#fff}.svc-rv .ux-head{margin-bottom:4px}
.ag-table th,.ag-table td{white-space:nowrap}
@media (max-width:640px){.card .ux-panel,.cn-checks.ux-panel{padding:12px}.ux-copy{flex-wrap:nowrap}}
.cn-checks.ux-panel{min-width:0;max-width:100%;box-sizing:border-box;overflow:hidden}.cn-checks .ux-steps{grid-template-columns:minmax(0,1fr)}.cn-checks .ux-steps li{min-width:0}
.ag-table th,.ag-table td{white-space:normal}.ag-table .num{white-space:nowrap}.card .ux-panel .table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
@media (max-width:640px){.cn-actions{display:grid !important;grid-template-columns:1fr 1fr;gap:8px}.cn-actions .btn{width:100%;justify-content:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cn-actions .btn.primary{grid-column:1/-1}.ag-table th,.ag-table td{padding-left:6px;padding-right:6px;font-size:13px}}

.ux-foot{align-items:center}.ux-saved{font-size:13px;font-weight:600;color:var(--good-ink)}.ux-saved.bad{color:var(--bad-ink)}
.ag-table td.ag-name{white-space:nowrap;text-align:left}
/* On a phone the drawer's buttons sit after the content instead of floating over it, and each brand row reads as a card. */
@media (max-width:640px){
  .cn-actions{position:static !important;border-top:1px solid var(--edge);margin-top:8px}
  .ag-table thead{display:none}.ag-table,.ag-table tbody,.ag-table tr,.ag-table td{display:block;width:100%}
  .ag-table tr{display:grid;grid-template-columns:1fr 1fr;gap:4px 12px;padding:10px 0;border-bottom:1px solid var(--line)}
  .ag-table td{padding:0 !important;text-align:left !important;border:0 !important}.ag-table td.ag-name{grid-column:1/-1;font-size:15px}
  .ag-table td[data-l]::before{content:attr(data-l) " ";color:var(--faint);font-size:12px;margin-right:4px}
}
/* On a wider screen the drawer's buttons stay in reach, with a soft edge so content clearly scrolls under them. */
@media (min-width:641px){.cn-actions{box-shadow:0 -10px 14px -10px rgba(0,0,0,.12)}}
.lang-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px}.lang-item{min-width:0}.lang-item .btn{max-width:100%;white-space:normal;text-align:center;height:auto;min-height:32px;line-height:1.25;padding-top:6px;padding-bottom:6px}
@media (min-width:641px){.cn-actions{flex-wrap:nowrap !important;gap:6px;margin:4px -18px -16px !important;padding:12px 18px 16px !important;bottom:-16px !important}.cn-actions .btn{padding-left:12px;padding-right:12px;white-space:nowrap}}
@media (min-width:641px){.cn-actions .ghost-danger{box-shadow:none !important;background:none;margin-left:auto;padding-left:8px;padding-right:8px}}
/* The drawer action bar sits under the scrolling body, never over it. */
.drawer > .cn-actions{position:static !important;flex:none;display:flex !important;flex-wrap:wrap !important;gap:8px;margin:0 !important;padding:12px 18px 14px !important;border-top:1px solid var(--edge);background:#fff;box-shadow:none !important;bottom:auto !important}
.drawer > .cn-actions .btn{width:auto;white-space:nowrap}
@media (max-width:640px){.drawer > .cn-actions{display:grid !important;grid-template-columns:1fr 1fr}.drawer > .cn-actions .btn{width:100%}.drawer > .cn-actions .btn.primary{grid-column:1/-1}}
@media (max-width:640px){.drawer > .cn-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:10px 12px 12px !important}.drawer > .cn-actions .btn{padding-left:8px;padding-right:8px;font-size:13px;white-space:normal;overflow:visible;text-overflow:clip;line-height:1.25;min-height:40px}}
/* Buttons wrap to a second row instead of shrinking under their labels (they overlapped, 2026-11-27). */
@media (min-width:641px){.drawer > .cn-actions{flex-wrap:wrap !important;gap:8px}.drawer > .cn-actions .btn{flex:0 0 auto;min-width:max-content;padding-left:12px;padding-right:12px}.drawer > .cn-actions .ghost-danger{margin-left:auto}}

.pc-ailabel{margin:10px 0 2px;padding:10px 12px;border:1px solid var(--edge);border-radius:12px;background:#fff}.pc-ailabel.on{border-color:var(--accent);background:var(--accent-soft)}
.pc-ailabel-row{display:flex;gap:10px;align-items:flex-start;cursor:pointer}.pc-ailabel-row input{margin-top:3px}.pc-ailabel-row > span{display:flex;flex-direction:column;gap:1px}.pc-ailabel p{margin:6px 0 0 26px !important}

.pc-voice{margin:0 0 8px !important;font-size:13px}.pc-voice .faint{margin-left:4px}
.pc-ai-foot{display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin-top:8px}.pc-ai-foot .faint{flex:1 1 260px}

.pc-refine{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:8px 0 4px}.pc-refine .chip{font-size:12.5px}.pc-refine-err{color:var(--bad-ink);flex-basis:100%}

.pc-words{margin:6px 0 4px;border:1px solid var(--edge);border-radius:12px;padding:8px 12px;background:#fff}.pc-words summary{cursor:pointer}
.pc-words-body{display:grid;gap:8px;margin-top:8px}.pc-words-body p{margin:0 !important}
.pc-word-row{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) auto;gap:8px;align-items:center}.pc-word-row .search{height:34px;min-width:0}
.pc-words-foot{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.pc-words-ok{color:var(--good-ink)}
.gen-cause{display:block;margin-top:4px;font-size:12.5px;color:var(--muted)}.gen-cause b{color:var(--ink);font-weight:650}.gen-cause .linklike{font-size:12.5px}.gen-cause-done{display:block;margin-top:4px;font-size:12.5px;color:var(--good-ink)}

.el-quality{margin:8px 0 10px;padding:10px 12px;border-radius:12px;background:var(--good-bg);display:flex;flex-direction:column;gap:4px}.el-quality.warn{background:#fff4e5}.el-quality ul{margin:2px 0 0;padding-left:18px;font-size:13px}
.st-quality{margin:6px 0 0 !important;padding:8px 10px;border-radius:10px;background:#fff4e5;color:#7a4a00}
.el-angle{font-size:11.5px;padding:2px 4px;border-radius:8px;border:1px solid var(--edge);background:#fff;max-width:100%}
.gen-motion{margin:10px 0;padding:10px 12px;border-radius:12px;background:var(--good-bg);display:flex;flex-direction:column;gap:4px}.gen-motion.no{background:#fdecea}.gen-motion ul{margin:4px 0 0;padding-left:18px;font-size:13px}.gen-motion li.major{color:var(--bad-ink)}
.gen-items{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0}.gen-item{padding:3px 10px;border-radius:999px;font-size:12.5px;font-weight:600;background:var(--good-bg);color:var(--good-ink)}.gen-item.no{background:var(--bad-bg);color:var(--bad-ink)}.gen-el{font-weight:650}

.st-plan{margin:6px 0 0 !important;color:var(--muted)}.st-plan b{color:var(--ink)}

.gen-compare{position:relative;margin:10px 0;border-radius:12px;overflow:hidden;line-height:0}.gen-compare img{width:100%;display:block}.gen-compare-top{position:absolute;inset:0}.gen-compare-top img{width:100%;height:100%;object-fit:cover}
.gen-compare input[type=range]{position:absolute;left:0;right:0;bottom:10px;width:90%;margin:0 5%}.gen-compare-l,.gen-compare-r{position:absolute;top:8px;font-size:12px;line-height:1.4;padding:2px 8px;border-radius:999px;background:rgba(0,0,0,.55);color:#fff}.gen-compare-l{left:8px}.gen-compare-r{right:8px}
.gen-swap{margin:10px 0;padding:8px 12px;border:1px solid var(--edge);border-radius:12px}.gen-swap summary{cursor:pointer}.gen-swap-row{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 4px}.gen-swap-row select{max-width:100%;padding:6px 8px;border-radius:10px;border:1px solid var(--edge);background:#fff}

.gen-finish{margin:10px 0;padding:8px 12px;border:1px solid var(--edge);border-radius:12px}.gen-finish summary{cursor:pointer}.gen-finish-row{display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center;margin:8px 0 4px}
.gen-finish-out{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:8px;margin:8px 0}.gen-finish-out a{display:flex;flex-direction:column;gap:4px;text-decoration:none;color:inherit}.gen-finish-out img{width:100%;height:120px;object-fit:contain;background:var(--head);border-radius:8px}

/* The plan reads as a full line above the Studio controls, never squeezed between them. */
.sx-tools{flex-wrap:wrap}.sx-tools .st-plan{order:-1;flex:1 0 100%;margin:0 0 4px !important}
.st-hits{margin:4px 0 0}.st-hits summary{cursor:pointer;color:var(--muted)}.st-hits p{margin:4px 0 0 !important}
.sx-tools .st-go{margin-left:auto}

.ins-next{display:flex;flex-direction:column;gap:10px;padding:16px 18px;margin-bottom:14px}.ins-next > div:first-child{display:flex;flex-direction:column;gap:2px}
.ins-next-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px}.ins-next-item{display:flex;flex-direction:column;gap:2px;padding:12px 14px;border:1px solid var(--edge);border-radius:12px;text-decoration:none;color:var(--ink);background:#fff}.ins-next-item:hover{border-color:var(--accent);background:var(--accent-soft)}

.el-q{display:inline-block;margin-left:6px;padding:1px 8px;border-radius:999px;font-size:11.5px;font-weight:650;background:var(--good-bg);color:var(--good-ink)}.el-q.mid{background:#fff4e5;color:#7a4a00}.el-q.low{background:var(--bad-bg);color:var(--bad-ink)}
.brief-head.long{font-size:clamp(20px,2.2vw,28px) !important;line-height:1.3 !important;max-width:62ch}

.gen-repair{display:flex;gap:12px;align-items:flex-start;margin:8px 0;padding:10px;border:1px solid var(--edge);border-radius:12px;background:#fff}.gen-repair video{width:140px;max-height:250px;border-radius:8px;background:#000;flex:none}.gen-repair > div{display:flex;flex-direction:column;gap:6px;min-width:0}
@media (max-width:560px){.gen-repair{flex-direction:column}.gen-repair video{width:100%}}

/* ================= Visual cues, the whole platform (BRD UI review) =================
   Every section has its own colour and icon, so you always know where you are.
   Colour means one thing everywhere: red = fix now, amber = waiting for you,
   green = opportunity or done well, section colour = information.
   Every page can lead with one "next step" card. */
:root { --sec: #2563eb; --sec-soft: #eaf1ff; --sec-ink: #1d4ed8;
  --act: #c0352b; --act-soft: #fdecea; --wait: #b45309; --wait-soft: #fdf2e2; --grow: #16794c; --grow-soft: #e3f6ec; }
body[data-section="insights"]  { --sec: #2563eb; --sec-soft: #eaf1ff; --sec-ink: #1d4ed8; --sec-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 13V8M8 13V3M13 13V6' stroke='white' stroke-width='2' stroke-linecap='round' fill='none'/%3E%3C/svg%3E"); }
body[data-section="ads"]       { --sec: #4f46e5; --sec-soft: #eeedfd; --sec-ink: #4338ca; --sec-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='5.5' stroke='white' stroke-width='1.7' fill='none'/%3E%3Ccircle cx='8' cy='8' r='2' fill='white'/%3E%3C/svg%3E"); }
body[data-section="changes"]   { --sec: #0f766e; --sec-soft: #e3f4f1; --sec-ink: #0f766e; --sec-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='5.5' stroke='white' stroke-width='1.7' fill='none'/%3E%3Cpath d='M8 5v3.3l2.2 1.4' stroke='white' stroke-width='1.7' stroke-linecap='round' fill='none'/%3E%3C/svg%3E"); }
body[data-section="fixes"]     { --sec: #c2410c; --sec-soft: #fdeee5; --sec-ink: #b3400f; --sec-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M10.5 2.3a3 3 0 00-3.6 3.9L2.6 10.5a1.3 1.3 0 001.9 1.9l4.3-4.3a3 3 0 003.9-3.6l-1.9 1.9-1.6-.3-.3-1.6z' stroke='white' stroke-width='1.5' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E"); }
body[data-section="create"]    { --sec: #7c3aed; --sec-soft: #f2ecfe; --sec-ink: #6d28d9; --sec-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.8l1.5 4.2 4.3 1.5-4.3 1.5L8 13.2 6.5 9 2.2 7.5 6.5 6z' stroke='white' stroke-width='1.5' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E"); }
body[data-section="social"]    { --sec: #db2777; --sec-soft: #fde9f2; --sec-ink: #be185d; --sec-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='2.5' y='3.5' width='11' height='10' rx='2' stroke='white' stroke-width='1.6' fill='none'/%3E%3Cpath d='M2.5 7h11M5.5 2v3M10.5 2v3' stroke='white' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); }
body[data-section="comments"]  { --sec: #0891b2; --sec-soft: #e2f5f9; --sec-ink: #0e7490; --sec-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 3.5h11v7h-6l-3 2.5v-2.5h-2z' stroke='white' stroke-width='1.6' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E"); }
body[data-section="approvals"] { --sec: #b45309; --sec-soft: #fdf2e2; --sec-ink: #9a4708; --sec-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.2 8.4l3 3 6.6-7' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E"); }
body[data-section="settings"]  { --sec: #475569; --sec-soft: #eef1f4; --sec-ink: #334155; --sec-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 5h10M3 11h10' stroke='white' stroke-width='1.6' stroke-linecap='round'/%3E%3Ccircle cx='6' cy='5' r='1.8' fill='white'/%3E%3Ccircle cx='10.5' cy='11' r='1.8' fill='white'/%3E%3C/svg%3E"); }

/* Page title with the section's icon tile. */
.page-head h1 { display: flex; align-items: center; gap: 10px; }
body[data-section] .page-head h1::before { content: ""; flex: none; width: 32px; height: 32px; border-radius: 9px; background: var(--sec) var(--sec-icon) center / 17px no-repeat; box-shadow: 0 4px 10px -4px var(--sec); }
.page-head .sub { display: block; margin-top: 4px; margin-left: 42px; max-width: 72ch; }
body:not([data-section]) .page-head .sub { margin-left: 0; }

/* Top nav: the current section in its colour. */
.topnav a[aria-current="page"], .nav-group.current .nav-more { color: var(--sec-ink) !important; background: var(--sec-soft) !important; box-shadow: none !important; }
.topnav > a[data-nav]::before { content: ""; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; background: #c9c9c9; flex: none; }
.topnav > a[data-nav="insights"]::before { background: #2563eb; } .topnav > a[data-nav="ads"]::before { background: #4f46e5; }
.topnav > a[data-nav="changes"]::before { background: #0f766e; } .topnav > a[data-nav="fixes"]::before { background: #c2410c; }
.topnav > a[data-nav="create"]::before { background: #7c3aed; } .topnav > a[data-nav="posts"]::before { background: #db2777; }
.topnav > a[data-nav="comments"]::before { background: #0891b2; } .topnav > a[data-nav="approvals"]::before { background: #b45309; }

/* The next-step card: one per page, the single most useful thing to do now. */
.cue-next { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 18px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--edge), 0 6px 20px -12px rgba(0,0,0,.25); position: relative; overflow: hidden; }
.cue-next::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--cue, var(--sec)); }
.cue-next-ic { flex: none; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--cue-soft, var(--sec-soft)); color: var(--cue, var(--sec)); }
.cue-next-text { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cue-kicker { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--cue, var(--sec)); }
.cue-title { font-size: 16px; line-height: 1.35; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.cue-why { color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.cue-next-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cue-next-actions .btn.primary { background: var(--cue, var(--sec)); box-shadow: none; }
.cue-act { --cue: var(--act); --cue-soft: var(--act-soft); background: linear-gradient(90deg, #fff7f6, #fff 60%); }
.cue-wait { --cue: var(--wait); --cue-soft: var(--wait-soft); background: linear-gradient(90deg, #fffaf2, #fff 60%); }
.cue-grow { --cue: var(--grow); --cue-soft: var(--grow-soft); background: linear-gradient(90deg, #f4fbf7, #fff 60%); }
.cue-info { background: linear-gradient(90deg, var(--sec-soft), #fff 70%); }
.cue-done { --cue: var(--grow); --cue-soft: var(--grow-soft); box-shadow: 0 0 0 1px var(--edge); padding: 12px 16px; }
.cue-done .cue-title { font-size: 14.5px; }
.cue-done .cue-next-ic { width: 32px; height: 32px; }
@media (max-width: 560px) { .cue-next { padding: 14px; } .cue-next-actions { width: 100%; } .cue-next-actions .btn { flex: 1; } }

/* Section titles with an icon. */
.cue-sec-title { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; font-size: 16px; font-weight: 700; }
.cue-sec-title .cue-ic { color: var(--sec); }
.cue-sec-title .faint { font-weight: 500; margin-left: 4px; }

/* Steps: Create (Elements, Studio, Ads) and Social (Strategy, Website, Posts, Analytics). */
.subnav.cue-steps { display: flex; gap: 0; padding: 6px; background: #fff; border-radius: 14px; box-shadow: 0 0 0 1px var(--edge); overflow-x: auto; scrollbar-width: none; }
.subnav.cue-steps a { flex: 1 1 0; min-width: 132px; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; position: relative; box-shadow: none !important; background: none; }
.subnav.cue-steps a + a::before { content: ""; position: absolute; left: -6px; top: 50%; width: 12px; height: 2px; background: var(--edge); }
.subnav.cue-steps a i { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 12px; background: #f1f1f1; color: #7a7a7a; }
.subnav.cue-steps a span { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.subnav.cue-steps a b { font-weight: 650; color: var(--ink); font-size: 13.5px; }
.subnav.cue-steps a small { font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.subnav.cue-steps a:hover { background: #f7f7f7; }
.subnav.cue-steps a[aria-current="page"] { background: var(--sec-soft); }
.subnav.cue-steps a[aria-current="page"] i { background: var(--sec); color: #fff; }
.subnav.cue-steps a[aria-current="page"] b { color: var(--sec-ink); }
.subnav.cue-steps a.done i { background: var(--sec-soft); color: var(--sec-ink); }

/* Insights: the day's list as three coloured steps, then the work, then the numbers. */
.cue-flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cue-flow-step { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--edge); text-decoration: none; color: var(--ink); }
.cue-flow-step span { display: flex; flex-direction: column; min-width: 0; }
.cue-flow-step b { font-size: 14px; }
.cue-flow-step small { color: var(--muted); font-size: 12px; line-height: 1.3; }
.cue-flow-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid !important; place-items: center; }
.flow-now .cue-flow-ic { background: var(--act-soft); color: var(--act); } .flow-now b { color: var(--act); }
.flow-grow .cue-flow-ic { background: var(--grow-soft); color: var(--grow); } .flow-grow b { color: var(--grow); }
.flow-watch .cue-flow-ic { background: var(--wait-soft); color: var(--wait); }
.cue-flow-step:hover { box-shadow: 0 0 0 1px #bdbdbd; }
.cue-flow-step.is-zero { opacity: .6; }
.cue-flow-step.is-zero b { color: var(--muted); }
@media (max-width: 720px) { .cue-flow { grid-template-columns: 1fr; } }
.bucket-head h2 { gap: 8px; }
.bucket-ic { width: 26px; height: 26px; border-radius: 8px; display: inline-grid; place-items: center; }
.bucket-now .bucket-ic { background: var(--act-soft); color: var(--act); } .bucket-now .bucket-head h2 { color: var(--act); }
.bucket-grow .bucket-ic { background: var(--grow-soft); color: var(--grow); } .bucket-grow .bucket-head h2 { color: var(--grow); }
.bucket-watch .bucket-ic { background: var(--wait-soft); color: var(--wait); }
.insight { box-shadow: 0 0 0 1px var(--edge), inset 4px 0 0 #d6d6d6, 0 1px 0 rgba(0,0,0,.04) !important; }
.insight.tone-bad { box-shadow: 0 0 0 1px #f3d2ce, inset 4px 0 0 var(--act), 0 1px 0 rgba(0,0,0,.04) !important; }
.insight.tone-warn { box-shadow: 0 0 0 1px #f1dfbf, inset 4px 0 0 var(--wait), 0 1px 0 rgba(0,0,0,.04) !important; }
.insight.tone-good { box-shadow: 0 0 0 1px #cfe9da, inset 4px 0 0 var(--grow), 0 1px 0 rgba(0,0,0,.04) !important; }
.insight.tone-review { box-shadow: 0 0 0 1px var(--edge), inset 4px 0 0 var(--sec), 0 1px 0 rgba(0,0,0,.04) !important; }
.insight-more summary { color: var(--sec-ink); font-weight: 650; }
.insight.cue-flash { animation: cueFlash 1.6s ease; }
@keyframes cueFlash { 0%, 40% { background: #fff8db; } 100% { background: #fff; } }
.ins-start { display: flex; flex-direction: column; gap: 10px; }
.ins-next-item { position: relative; padding: 14px 16px !important; gap: 4px !important; }
.ins-next-item b { font-size: 14px; }
.tile-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 4px; }
.tile-create .tile-ic { background: #f2ecfe; color: #7c3aed; } .tile-social .tile-ic { background: #fde9f2; color: #db2777; } .tile-web .tile-ic { background: #e2f5f9; color: #0891b2; }
.ins-next-item:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -12px rgba(0,0,0,.35); }
.perf-title { margin-top: 18px; }
.perf-quiet { opacity: .55; filter: saturate(.4); }
.perf-quiet:hover { opacity: .9; filter: none; }
.insights-main > div:last-child > .kpi-grid { margin-top: 10px; }
.insights-main > div:last-child > .trend-card { margin-top: 10px; }
#view > .cue-next, .page > .cue-next { margin: 0; }

.subnav.cue-steps { width: 100%; }
@media (max-width: 640px) { .subnav.cue-steps a { min-width: 0; padding: 8px; gap: 6px; } .subnav.cue-steps a small { display: none; } .subnav.cue-steps a b { font-size: 12.5px; } }

.range-custom { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.range-custom label { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 12.5px; }
.range-custom input[type="date"] { height: 32px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--edge); font: inherit; background: #fff; }
.idea-media-none p{white-space:pre-line}
@media (max-width: 560px) { .sx-tools { min-width: 0; } .sx-tools .st-go { margin-left: 0 !important; flex: 1 1 100%; } .sx-tools .st-go .btn { width: 100%; } .st-settings { flex-wrap: wrap; min-width: 0; } .sx-settings { max-width: 100%; } .st-settings label { flex: 1 1 140px; min-width: 0; } .st-settings select { width: 100%; } }
@media (max-width: 560px) { .sx-tools .st-go { flex-wrap: wrap !important; justify-content: flex-end; } .sx-tools .st-go > * { max-width: 100%; } .st-settings { flex-wrap: wrap !important; } }

/* ---- Cues, round 2 ---- */
/* Studio's title gets the section tile too. */
.sx-head h1.sec-title { display: flex; align-items: center; gap: 10px; background: none !important; -webkit-text-fill-color: currentColor !important; color: var(--ink) !important; }
.sx-head h1.sec-title::before { content: ""; flex: none; width: 32px; height: 32px; border-radius: 9px; background: var(--sec) var(--sec-icon) center / 17px no-repeat; box-shadow: 0 4px 10px -4px var(--sec); }
/* Changes: a coloured dot per kind of change. */
.chg-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; background: var(--sec); vertical-align: 1px; }
.chg-act .chg-dot { background: var(--act); } .chg-grow .chg-dot { background: var(--grow); } .chg-wait .chg-dot { background: var(--wait); }
.chg-act td { background: #fffafa; }
/* The old one-line "next step" bars read like the new cards. */
.next-step { position: relative; overflow: hidden; padding: 14px 16px 14px 20px !important; background: linear-gradient(90deg, var(--sec-soft), #fff 70%) !important; box-shadow: 0 0 0 1px var(--edge), 0 6px 20px -14px rgba(0,0,0,.25) !important; border-radius: 14px !important; }
.next-step::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--sec); }
.next-step > span { font-weight: 600; color: var(--ink); }
.next-step .btn.primary { background: var(--sec); box-shadow: none; }
.next-step.stale { background: linear-gradient(90deg, #fffaf2, #fff 60%) !important; }
.next-step.stale::before { background: var(--wait); }
.next-step.stale .btn.primary { background: var(--wait); }
/* Setup progress inside its next-step card. */
.setup-dots { display: flex; gap: 6px; list-style: none; margin: 0 6px 0 0; padding: 0; }
.setup-dots button { width: 26px; height: 26px; border-radius: 50%; border: 0; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; background: #fff; color: var(--muted); box-shadow: 0 0 0 1px var(--edge); }
.setup-dots .done button { background: var(--sec-soft); color: var(--sec-ink); box-shadow: none; }
.setup-dots .now button { background: var(--sec); color: #fff; box-shadow: none; }
.cue-slot { margin-bottom: 4px; }
/* One empty state everywhere: an icon in the section's colour, a title, one line, an action. */
.empty:has(> strong) { padding: 36px 20px; gap: 6px; }
.empty:has(> strong)::before { content: ""; width: 44px; height: 44px; border-radius: 14px; margin-bottom: 6px; background: var(--sec-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.8l1.5 4.2 4.3 1.5-4.3 1.5L8 13.2 6.5 9 2.2 7.5 6.5 6z' stroke='%23888' stroke-width='1.3' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E") center / 20px no-repeat; }
.empty:has(> strong) strong { font-size: 15px; }
.empty:has(> strong) > span { max-width: 46ch; line-height: 1.45; }
.empty .btn { margin-top: 6px; }

.gen-pcheck { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; padding: 10px 12px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--edge), inset 4px 0 0 #d6d6d6; }
.gen-pcheck.ok { box-shadow: 0 0 0 1px #cfe9da, inset 4px 0 0 var(--grow); } .gen-pcheck.no { box-shadow: 0 0 0 1px #f3d2ce, inset 4px 0 0 var(--act); }
.gen-pcheck ul { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.gen-pcheck li { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 13px; }
.gen-pcheck .pc-name { font-weight: 600; min-width: 0; }
.gen-pcheck li.ok .pc-name { color: var(--grow); } .gen-pcheck li.no .pc-name { color: var(--act); }
.pc-marks { display: inline-flex; gap: 4px; }
.pc-mark { border: 0; font: inherit; font-size: 11.5px; font-weight: 650; padding: 1px 8px; border-radius: 999px; cursor: pointer; background: #eee; color: var(--muted); }
.pc-mark.ok { background: var(--grow-soft); color: var(--grow); } .pc-mark.no { background: var(--act-soft); color: var(--act); }
.gen-safe { margin-top: 6px !important; }

.cmp-pick { display: inline-flex; gap: 4px; align-items: center; }
.cmp-pick .select { height: 26px; padding: 0 26px 0 8px; font-size: 12px; }

/* Studio composer stands apart from the gallery behind it: a tinted panel, a white writing field,
   and a fade under the dock so results don't read as part of the prompt. */
.sx-dock::before { content: ""; position: absolute; left: -40px; right: -40px; top: -36px; bottom: -14px; z-index: -1; pointer-events: none; background: linear-gradient(to bottom, rgba(241, 241, 244, 0), rgba(241, 241, 244, .92) 38%, rgba(241, 241, 244, .98)); }
.sx-bar { background: linear-gradient(180deg, #f7f3ff, #efe8fe) !important; box-shadow: 0 24px 54px -20px rgba(60, 30, 160, .5), 0 0 0 1.5px rgba(124, 58, 237, .5) !important; }
.sx-bar:focus-within { box-shadow: 0 24px 54px -20px rgba(60, 30, 160, .55), 0 0 0 2.5px #7c3aed !important; }
.sx-bar #st-prompt { background: #fff !important; border-radius: 12px !important; padding: 10px 12px !important; box-shadow: inset 0 0 0 1px rgba(124, 58, 237, .28), 0 1px 2px rgba(0, 0, 0, .04) !important; }
.sx-bar #st-prompt:focus { box-shadow: inset 0 0 0 1.5px #7c3aed !important; }
.sx-bar .sx-chip, .sx-bar .sx-card { background: #fff; }
.sx-dock { isolation: isolate; }
.sx-dock::before { display: none; }
.pc-studio button { position: relative; }
.sa-slides { position: absolute; left: 6px; bottom: 6px; padding: 1px 7px; border-radius: 999px; background: rgba(0,0,0,.72); color: #fff; font-size: 11px; font-weight: 650; }

/* Studio composer in black (replaces the purple tint): the writing field stays white. */
.sx-bar { background: #111113 !important; box-shadow: 0 24px 54px -18px rgba(0, 0, 0, .55), 0 0 0 1px #000 !important; color: #f4f4f5; }
.sx-bar:focus-within { box-shadow: 0 24px 54px -18px rgba(0, 0, 0, .6), 0 0 0 2px #111113, 0 0 0 4px rgba(255, 255, 255, .35) !important; }
.sx-bar #st-prompt { background: #fff !important; color: #111 !important; box-shadow: none !important; }
.sx-bar #st-prompt:focus { box-shadow: 0 0 0 2px rgba(255, 255, 255, .5) !important; }
.sx-bar .st-plan, .sx-bar .st-plan b, .sx-bar label, .sx-bar .faint, .sx-bar .small, .sx-bar .sx-bar-k { color: #d4d4d8 !important; }
.sx-bar .st-plan b { color: #fff !important; }
.sx-bar .sx-tools hr, .sx-bar hr { border-color: #2a2a2e !important; }
.sx-bar .st-go { background: transparent !important; }
.sx-bar .st-go .btn.primary { background: #fff !important; background-image: none !important; color: #111 !important; box-shadow: none !important; }
.sx-bar .st-go .btn.primary:hover { background: #e9e9ec !important; }
.sx-bar input[type="checkbox"] { accent-color: #fff; }
.sx-bar .st-notice, .sx-bar .pc-warn { color: #fbbf24 !important; }
.sx-bar .st-notice a, .sx-bar .pc-warn a { color: #fde68a !important; }
/* Image / Video switch on the black composer: the picked one white on black text, the other light. */
.sx-bar .seg.sx-kind { background: #27272a !important; box-shadow: none !important; }
.sx-bar .seg.sx-kind button { color: #d4d4d8 !important; background: transparent !important; }
.sx-bar .seg.sx-kind button:hover { color: #fff !important; }
.sx-bar .seg.sx-kind button[aria-selected="true"] { background: #fff !important; color: #111 !important; box-shadow: none !important; }

/* Messages always show above the Studio composer and any panel (they were hidden behind the sticky prompt box). */
.toast { z-index: 10000; max-width: min(92vw, 640px); text-align: center; }
body[data-section="create"] .toast { bottom: auto; top: 72px; }

/* Notices inside the black Studio composer: dark amber panels with light text, readable on black. */
.sx-bar .st-notice, .sx-bar .st-quality, .sx-bar .st-shot-hint, .sx-bar .post-banner, .sx-bar .pc-warn, .sx-bar .banner {
  background: #2b2310 !important; color: #fde9b0 !important; border: 1px solid #5c4a1a !important; box-shadow: none !important;
}
.sx-bar .st-notice *, .sx-bar .st-quality *, .sx-bar .st-shot-hint * { color: inherit !important; }
.sx-bar .st-notice a, .sx-bar .st-quality a, .sx-bar .st-notice .linklike, .sx-bar .st-quality .linklike { color: #fff !important; text-decoration: underline; }
.sx-bar .st-notice.block, .sx-bar .st-notice.dupe { background: #3a1512 !important; color: #fecaca !important; border-color: #7f1d1d !important; }
.sx-bar .st-notice .btn { background: #fff !important; color: #111 !important; }

/* Studio video types (voice-over, UGC, founder, explainer, walkthrough): the picker and the step strip
   inside the black composer, then the Inputs, Script and Voice sheet above it. */
.sx-bar .vt-types { display: flex; gap: 6px; min-width: 0; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.sx-bar .vt-type { flex: none; display: flex; flex-direction: column; gap: 2px; width: 172px; padding: 8px 10px; border: 0; border-radius: 12px; background: #1c1c1f; box-shadow: 0 0 0 1px #2a2a2e; color: #f4f4f5; font: inherit; text-align: left; cursor: pointer; }
.sx-bar .vt-type:hover { box-shadow: 0 0 0 1px #52525b; }
.sx-bar .vt-type b { font-size: 13px; font-weight: 650; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sx-bar .vt-type small { font-size: 11.5px; line-height: 1.3; color: #a1a1aa; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.sx-bar .vt-type.on { background: #fff; box-shadow: none; color: #111; }
.sx-bar .vt-type.on small { color: #52525b; }
.vt-fit { margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--grow, #16794c); color: #fff; font-size: 10px; font-weight: 650; vertical-align: 1px; }
.sx-bar .vt-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sx-bar .vt-step { display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; padding: 5px 12px 5px 6px; border: 0; border-radius: 999px; background: #1c1c1f; box-shadow: 0 0 0 1px #2a2a2e; color: #f4f4f5; font: inherit; text-align: left; cursor: pointer; }
.sx-bar .vt-step:hover, .sx-bar .vt-step.open { box-shadow: 0 0 0 1.5px #a1a1aa; }
.sx-bar .vt-step > span:last-child { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.sx-bar .vt-step b { font-size: 12px; font-weight: 650; }
.sx-bar .vt-step small { font-size: 11.5px; color: #d4d4d8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.vt-step-dot, .vt-tabdot { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; font-size: 11px; font-weight: 700; }
.vt-step.ok .vt-step-dot, .vt-tabdot.ok { background: var(--grow, #16794c); color: #fff; }
.vt-step.need .vt-step-dot { background: transparent; box-shadow: inset 0 0 0 2px var(--wait, #b45309); }
.sx-bar .vt-step.need .vt-step-dot { box-shadow: inset 0 0 0 2px #fbbf24; }
.vt-tabdot { width: 16px; height: 16px; margin-right: 6px; font-size: 10px; vertical-align: -3px; }
.vt-tabdot.need { box-shadow: inset 0 0 0 2px var(--wait, #b45309); }
.vt-play { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: #111113; color: #fff; font: inherit; font-size: 12px; cursor: pointer; }
.vt-play:hover { background: #3f3f46; }
.vt-play:disabled { opacity: .6; cursor: progress; }
.vt-play .spinner { margin: 0; }
.sx-bar .vt-play { background: #fff; color: #111; }
.vt-tabname { margin-right: 4px; white-space: nowrap; }
.vt-pane .sx-tabs-end .icon-btn { border: 0; background: none; font: inherit; font-size: 18px; cursor: pointer; }
.vt-pane .sx-pane-body { gap: 18px; }
.vt-block { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.vt-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; }
.vt-head > b { font-size: 14.5px; }
.vt-count { padding: 1px 8px; border-radius: 999px; background: var(--head); box-shadow: 0 0 0 1px var(--edge); font-size: 11.5px; font-weight: 600; color: var(--muted); }
.vt-acts { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.vt-empty { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--head); color: var(--muted); font-size: 13px; }
.vt-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px 10px; }
.vt-grid .sx-card { overflow: hidden; }
.vt-grid .sx-card b, .vt-grid .sx-card small { display: block; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.vt-pick .sx-card-img video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.vt-upload { align-self: flex-start; cursor: pointer; }
.vt-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.vt-inline { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.vt-inline .select { min-width: 0; max-width: 100%; }
.vt-finish { padding-top: 14px; border-top: 1px solid var(--line); }
.vt-finish .seg { align-self: flex-start; }
.vt-screens { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.vt-screen { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.vt-frame { position: relative; overflow: hidden; border-radius: 12px; background: var(--head); box-shadow: 0 0 0 1px var(--edge); user-select: none; -webkit-user-select: none; }
.vt-frame img { display: block; width: 100%; height: auto; max-height: 360px; object-fit: contain; pointer-events: none; }
.vt-hl { position: absolute; box-sizing: border-box; border: 2.5px solid #f59e0b; border-radius: 6px; background: rgba(245, 158, 11, .14); box-shadow: 0 0 0 9999px rgba(0, 0, 0, .28); cursor: move; touch-action: none; }
.vt-hl.drag { border-color: #fbbf24; }
.vt-hl-h { position: absolute; right: -8px; bottom: -8px; width: 18px; height: 18px; border-radius: 50%; background: #f59e0b; box-shadow: 0 0 0 2px #fff; cursor: nwse-resize; touch-action: none; }
.vt-up { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; background: rgba(0, 0, 0, .72); color: #fff; font-size: 12px; }
.vt-up.bad { background: var(--act, #c0352b); }
.vt-screen-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.vt-screen-row .select { min-width: 0; flex: 1 1 100px; }
.vt-num { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: #111113; color: #fff; font-size: 11.5px; }
.vt-screen-acts { display: inline-flex; margin-left: auto; }
.vt-script, .vt-voice { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.vt-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.vt-tags .chip, .vt-deliv .chip { height: 28px; padding: 0 10px; border: 0; border-radius: 999px; background: var(--head); box-shadow: 0 0 0 1px var(--edge); font: inherit; font-size: 12.5px; font-weight: 550; color: var(--ink); cursor: pointer; }
.vt-tags .chip:hover:not(:disabled), .vt-deliv .chip:hover { box-shadow: 0 0 0 1px var(--muted); }
.vt-tags .chip:disabled { opacity: .4; cursor: not-allowed; text-decoration: line-through; }
.vt-deliv .chip.on { background: #111113; color: #fff; box-shadow: none; }
.vt-section { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; background: #fafafa; box-shadow: 0 0 0 1px var(--edge); min-width: 0; }
.vt-section-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.vt-section-head .icon-btn { margin-left: auto; }
.vt-by { padding: 0 7px; border-radius: 999px; background: var(--grow-soft, #e3f6ec); color: var(--grow, #16794c); font-size: 11px; font-weight: 650; }
.vt-section textarea, .vt-onscreen, .vt-dnote, .vt-vname { width: 100%; box-sizing: border-box; border: 1px solid #d4d4d4; border-radius: 10px; padding: 8px 10px; background: #fff; font: inherit; font-size: 14px; line-height: 20px; color: var(--ink); }
.vt-section textarea { resize: vertical; min-height: 60px; }
.vt-onscreen { font-size: 13px; }
.vt-deliv { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.vt-dnote { flex: 1 1 160px; width: auto; min-width: 0; height: 30px; padding: 4px 10px; font-size: 13px; }
.vt-voices { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.vt-v { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 6px 6px 6px 4px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--edge); }
.vt-v.on { box-shadow: 0 0 0 2px #111113; background: #fafafa; }
.vt-v-pick { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow: hidden; padding: 2px 6px; border: 0; background: none; font: inherit; text-align: left; color: var(--ink); cursor: pointer; }
.vt-v-pick b { font-size: 13.5px; }
.vt-v-pick small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vt-v .icon-btn.armed { width: auto; padding: 0 8px; color: var(--act, #c0352b); font-size: 12px; font-weight: 650; }
.vt-brand { padding: 0 6px; border-radius: 999px; background: #111113; color: #fff; font-size: 10px; font-weight: 650; vertical-align: 1px; }
.vt-actrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.vt-actrow audio { height: 34px; max-width: 100%; }
.vt-vname { flex: 1 1 180px; width: auto; min-width: 0; height: 30px; padding: 4px 10px; font-size: 13px; }
.vt-takes { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; background: #fafafa; box-shadow: 0 0 0 1px var(--edge); }
.vt-take { display: flex; align-items: center; gap: 10px; min-width: 0; }
.vt-take > span:not(.vt-inuse) { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.vt-take small { font-size: 12px; color: var(--muted); }
.vt-take.off { opacity: .8; }
.vt-inuse { font-size: 12px; font-weight: 650; color: var(--grow, #16794c); }
.vt-rec { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.vt-recording { background: var(--act, #c0352b) !important; color: #fff !important; border-color: transparent !important; }
.vt-rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--act, #c0352b); animation: vt-blink 1s steps(2, start) infinite; }
@keyframes vt-blink { to { visibility: hidden; } }
.vt-mirrored { display: flex; flex-direction: column; gap: 6px; }
.vt-mirrored p { margin: 0; }
/* The result card in the generation drawer. */
.vt-result { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 10px; }
.vt-r-check { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 12px; }
.vt-r-check.ok { background: var(--grow-soft, #e3f6ec); color: var(--grow, #16794c); }
.vt-r-check.no { background: var(--act-soft, #fdecea); color: var(--act, #c0352b); }
.vt-r-check .small, .vt-r-check .faint { color: inherit; }
.vt-r-warn { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 12px; background: var(--wait-soft, #fdf2e2); color: var(--wait, #b45309); font-size: 13px; }
.vt-r-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 0; font-size: 13px; }
.vt-r-facts dt { color: var(--muted); }
.vt-r-facts dd { margin: 0; overflow-wrap: anywhere; }
.vt-r-time ol { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.vt-r-time li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.4; }
.vt-r-seek { flex: none; min-width: 44px; height: 24px; border: 0; border-radius: 999px; background: #111113; color: #fff; font: inherit; font-size: 11.5px; font-weight: 650; font-variant-numeric: tabular-nums; cursor: pointer; }
.vt-r-on { font-style: normal; padding: 0 6px; border-radius: 6px; background: var(--head); box-shadow: 0 0 0 1px var(--edge); }
/* With a video type the composer is taller: the sheet above it gives up the room. */
.sx-dock.has-vt .sx-sheet { max-height: min(640px, calc(100vh - 440px)); }
.vt-screen-acts .icon-btn, .vt-section-head .icon-btn, .vt-v .icon-btn { border: 0; background: none; font: inherit; cursor: pointer; }
.vt-v .icon-btn { flex: none; }
@media (max-width: 640px) {
  .sx-bar .vt-type { width: auto; max-width: 200px; padding: 7px 10px; }
  .sx-bar .vt-type small, .vt-tabname { display: none; }
  .sx-bar .vt-type b { -webkit-line-clamp: 1; white-space: nowrap; display: block; text-overflow: ellipsis; }
  .sx-bar .vt-strip { flex-wrap: nowrap; overflow-x: auto; }
  .sx-bar .vt-step { flex: none; padding: 4px 10px 4px 5px; }
  .sx-bar .vt-step small { max-width: 120px; }
  .sx-dock.has-vt .sx-sheet { max-height: calc(100vh - 360px); min-height: 200px; }
  /* On a phone the video type's sheet opens over the page, above the composer; × closes it. */
  .sx-dock.vt-open .sx-sheet { position: fixed; left: 8px; right: 8px; top: 64px; bottom: 8px; z-index: 70; max-height: none; min-height: 0; margin: 0; }
  .vt-voices { grid-template-columns: 1fr; }
  .vt-screens { grid-template-columns: 1fr; }
  .vt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vt-acts { margin-left: 0; }
}

/* Edit in layers */
.gen-layers { margin: 10px 0; }
.lay-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-top: 10px; align-items: start; }
@media (max-width: 720px) { .lay-wrap { grid-template-columns: 1fr; } }
.lay-stage { position: relative; width: 100%; border-radius: 10px; overflow: hidden; background: #eee; box-shadow: 0 0 0 1px var(--edge); container-type: inline-size; }
.lay-stage .lay-base { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; }
.lay-stage .lay-it { position: absolute; object-fit: fill; pointer-events: none; }
.lay-stage .lay-txt { position: absolute; pointer-events: none; }
.lay-stage .lay-txt > span { position: absolute; left: var(--cx, 50%); top: var(--cy, 50%); transform: translate(-50%, -50%); text-align: center; white-space: pre; line-height: 1.12; font-size: calc(var(--fs) * 100cqw / var(--W)); }
.lay-stage.moving { cursor: move; touch-action: none; outline: none; }
.lay-stage.moving:focus-visible { box-shadow: 0 0 0 2px var(--brand, #111); }
.lay-sel { position: absolute; border: 2px dashed #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.55); border-radius: 4px; pointer-events: none; }
.lay-list li.on { box-shadow: 0 0 0 2px #111; }
.lay-row { justify-content: space-between; }
.lay-row label { display: flex; align-items: center; gap: 8px; min-width: 0; cursor: pointer; }
.lay-hint { margin: 6px 2px 0; }
.lay-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 520px; overflow: auto; }
.lay-list li { display: flex; flex-direction: column; gap: 4px; padding: 8px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px var(--edge); }
.lay-row { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.lay-row img { width: 34px; height: 34px; object-fit: contain; border-radius: 6px; background: repeating-conic-gradient(#e6e6e6 0 25%, #fff 0 50%) 0 0 / 10px 10px; flex: none; }
.lay-row label span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lay-edit { width: 100%; font: inherit; font-size: 13px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--edge); resize: vertical; }
.lay-bg-row .input { width: 100%; }

.lay-wrap.solo { grid-template-columns: 1fr; }
.gen-media.lay-left { display: block; }
.gen-media.lay-left .lay-stage { border-radius: 14px; }
.gen-layers .fix-row { flex-wrap: wrap; }

.vt-say-rows { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; }
.vt-say-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.vt-say-row .input { min-width: 0; }
.vt-say .vt-head { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }

.vt-own { margin: 6px 0 10px; display: flex; flex-direction: column; gap: 8px; }
.vt-own[open] { padding: 10px 12px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--edge); }
.vt-own > * + * { margin-top: 8px; }
.vt-own audio { height: 32px; max-width: 100%; }

.vt-fmts { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.vt-fmt { border: 1px solid var(--edge); background: #fff; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.vt-fmt:hover { border-color: #bbb; }
.vt-fmt.on { background: #111; color: #fff; border-color: #111; }

/* Guided video composer: a step bar, numbered sections, a next bar. */
.vt-stepbar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin: 0 0 12px; border-radius: 12px; background: var(--accent-soft, #f1efff); color: #2c2a6b; font-size: 13.5px; font-weight: 550; }
.vt-stepn { flex: none; padding: 2px 10px; border-radius: 999px; background: #4f46e5; color: #fff; font-size: 12px; font-weight: 700; }
.vt-nextbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--edge); }
.vt-step > .vt-head b, .vt-step h3 { font-size: 15px; }
.vt-fmt-more { border-style: dashed !important; color: #555; }

.vt-full { margin: 6px 0 12px; padding: 12px 14px; border-radius: 12px; background: #fafafa; box-shadow: 0 0 0 1px var(--edge); }
.vt-full p { margin: 4px 0 6px; line-height: 1.5; font-size: 14px; }
.vt-scenes { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.vt-scene { padding: 10px 12px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--edge); display: flex; flex-direction: column; gap: 6px; }
.vt-scene-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.vt-scene-n { width: 22px; height: 22px; border-radius: 999px; background: #111; color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.vt-scene-line { font-size: 13px; font-style: italic; color: #333; }
.vt-scene textarea { width: 100%; font: inherit; font-size: 13px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--edge); resize: vertical; }

.el-voice-pick .select { width: 100%; max-width: 520px; }
.el-voice .vt-own { margin-top: 10px; }

/* The script's naturalness check (scriptLint.js) */
.vt-lint { border: 1px solid #e0b25a; background: #fff8ea; border-radius: 10px; padding: 10px 12px; margin: 8px 0; font-size: 13px; color: #5a4310; }
.vt-lint ul { margin: 6px 0 6px 18px; padding: 0; }
.vt-lint li { margin: 2px 0; }

/* Leak checks card (U11 to U13) */
.leak-card .mini-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 6px; }
.leak-card .mini-table th, .leak-card .mini-table td { text-align: left; padding: 3px 4px; border-bottom: 1px solid var(--line, #e6e6e6); }
.leak-card .mini-table th { font-weight: 600; color: var(--muted, #666); }

/* Scored library ads (U5) */
.lib-list { margin-top: 12px; }
.lib-ad { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line, #e6e6e6); }
.lib-score { display: flex; flex-direction: column; gap: 2px; min-width: 74px; font-size: 12px; font-weight: 600; }
.lib-ad p { margin: 0 0 2px; }

/* Plan and billing (stripeBilling.js) */
.bill-toggle { display: flex; gap: 8px; margin: 14px 0; flex-wrap: wrap; }
.bill-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.bill-plan { display: grid; gap: 8px; align-content: start; }
.bill-plan.on { outline: 2px solid var(--good, #2f7a4f); }
.bill-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.bill-price { font-size: 22px; font-weight: 700; }
.bill-price small { font-size: 12px; font-weight: 400; margin-left: 4px; color: var(--muted, #666); }

/* Studio credits on the Billing page (credits.js) */
.bill-gets { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; }
.bill-meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.bill-meters > div { display: grid; gap: 2px; }
.bill-meters b { font-size: 20px; }
.bill-rates { width: 100%; border-collapse: collapse; font-size: 14px; margin: 8px 0; }
.bill-rates th, .bill-rates td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line, #e5e5e5); }
.small-h { font-size: 16px; margin: 0 0 10px; }

/* Embedded Stripe checkout on the Billing page */
.co-wrap { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45); display: grid; place-items: center; z-index: 1000; padding: 16px; }
.co-panel { background: var(--bg, #fff); color: inherit; border-radius: 14px; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 16px; display: grid; gap: 10px; }
.co-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
#co-mount { min-height: 200px; }
.co-foot { margin: 0; }

/* Guard's order sheet: a bottom sheet on phones, a centred card on wider screens */
.co-sheet { gap: 14px; padding: 18px; animation: co-up 0.22s ease-out; }
@keyframes co-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 640px) { .co-wrap { place-items: end center; padding: 0; } .co-sheet { width: 100%; border-radius: 18px 18px 0 0; max-height: 92vh; } }
.co-brand { font-weight: 700; letter-spacing: 0.02em; }
.co-x { border: 0; background: transparent; font-size: 24px; line-height: 1; cursor: pointer; color: inherit; padding: 4px 8px; }
.co-title { font-size: 20px; margin: 0; }
.co-row { display: flex; gap: 12px; align-items: center; background: var(--soft, #f3f4f7); border-radius: 12px; padding: 12px; }
.co-row > div:not(.co-ico):not(.co-card) { display: grid; gap: 2px; flex: 1; min-width: 0; }
.co-row span { font-size: 13px; color: var(--muted, #666); }
.co-ico { width: 44px; height: 44px; border-radius: 10px; background: #111; color: #fff; display: grid !important; place-items: center; font-weight: 700; flex: 0 0 44px; }
.co-card { width: 40px; height: 28px; border-radius: 5px; background: linear-gradient(135deg, #2f6bff, #6a9bff); flex: 0 0 40px; }
.co-el-wrap { display: grid; gap: 8px; width: 100%; }
.co-lines { display: grid; gap: 6px; font-size: 14px; }
.co-lines > div { display: flex; justify-content: space-between; gap: 8px; }
.co-total { border-top: 1px solid var(--line, #e5e5e5); padding-top: 8px; font-size: 16px; }
.co-total small { font-size: 11px; color: var(--muted, #666); font-weight: 400; }
.co-paybtn { width: 100%; border: 0; border-radius: 999px; background: #111; color: #fff; font-size: 16px; font-weight: 600; padding: 14px; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 8px; }
.co-paybtn:disabled { opacity: 0.7; cursor: default; }
.co-err { color: var(--bad, #b42318); margin: 0; font-size: 14px; }
.co-ok { display: flex; justify-content: space-between; align-items: center; }
.co-check { width: 30px; height: 30px; border-radius: 50%; background: #1a56db; color: #fff; display: grid; place-items: center; font-weight: 700; }

/* What a credit pack makes: 2 x 30s videos or 4 x 15s videos or 6 x 10s reels */
.co-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 2px; }
.co-opts em { font-style: normal; font-size: 13px; font-weight: 600; background: var(--bg, #fff); border: 1px solid var(--line, #e2e4ea); border-radius: 999px; padding: 3px 10px; color: inherit; white-space: nowrap; }
.co-opts i { font-style: normal; font-size: 12px; color: var(--muted, #888); }
.co-item .co-ico { width: 48px; height: 48px; flex-basis: 48px; border-radius: 12px; font-size: 16px; }
.co-item { align-items: flex-start; }

/* ---- Plan and billing (redesign 2026-11-26) ---- */
.bill-pill { font-size: 12px; font-weight: 600; color: #9a4708; background: #fdf2e2; border-radius: 999px; padding: 4px 10px; cursor: help; }
.bill-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; padding: 24px; border-radius: 18px; color: #fff; margin: 16px 0 8px;
  background: radial-gradient(120% 140% at 100% 0%, #2f6f55 0%, rgba(47,111,85,0) 55%), linear-gradient(135deg, #16291f 0%, #1f3a2e 60%, #24473a 100%); box-shadow: 0 18px 40px -24px rgba(16, 40, 30, 0.7); }
@media (max-width: 760px) { .bill-hero { grid-template-columns: 1fr; padding: 20px; } }
.bh-kicker { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; opacity: .7; font-weight: 700; }
.bh-plan h2 { font-size: 34px; line-height: 1.1; margin: 6px 0 6px; letter-spacing: -0.02em; color: #fff; }
.bh-line { font-size: 14px; opacity: .85; }
.bh-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.bh-btn { border: 0; border-radius: 999px; padding: 10px 16px; font-weight: 600; font-size: 14px; background: #fff; color: #16291f; cursor: pointer; text-decoration: none; }
.bh-btn.ghost { background: rgba(255,255,255,.12); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.3); }
.bh-meters { display: grid; gap: 10px; align-content: center; }
.bh-meter { display: grid; gap: 6px; background: rgba(255,255,255,.08); border-radius: 14px; padding: 14px 16px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.bh-label { font-size: 12.5px; opacity: .75; }
.bh-num { font-size: 26px; line-height: 1; letter-spacing: -0.01em; }
.bh-num small { font-size: 13px; font-weight: 500; opacity: .7; margin-left: 4px; }
.bh-bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,.15); overflow: hidden; }
.bh-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #7ee2b0, #c8f5dc); }
.bh-sub { font-size: 12.5px; opacity: .75; }
.bill-sec { margin-top: 28px; }
.bill-sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.bill-sec-head h2 { font-size: 20px; margin: 0 0 2px; letter-spacing: -0.01em; }
.seg-toggle { display: inline-flex; background: #f1f2f4; border-radius: 999px; padding: 4px; gap: 2px; }
.seg-toggle button { border: 0; background: transparent; border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: 13.5px; cursor: pointer; color: var(--muted); }
.seg-toggle button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg-toggle em { font-style: normal; font-size: 11.5px; color: var(--accent); margin-left: 4px; }
.bp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; align-items: stretch; }
.bp-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 22px 20px 20px; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 6px 20px -16px rgba(0,0,0,.3); }
.bp-card.pop { box-shadow: 0 0 0 2px var(--accent), 0 16px 36px -22px rgba(31,107,79,.55); }
.bp-card.on { box-shadow: 0 0 0 2px #2563eb; }
.bp-flag { position: absolute; top: -11px; left: 18px; font-size: 11.5px; font-weight: 700; color: #fff; background: var(--accent); border-radius: 999px; padding: 3px 10px; }
.bp-flag.cur { left: auto; right: 18px; background: #2563eb; }
.bp-card h3 { margin: 0; font-size: 16px; }
.bp-price { display: flex; align-items: baseline; gap: 6px; }
.bp-price b { font-size: 34px; letter-spacing: -0.02em; line-height: 1; }
.bp-price span { color: var(--muted); font-size: 13px; }
.bp-was { margin: -4px 0 0; font-size: 12.5px; color: var(--accent); min-height: 16px; }
.bp-was s { color: var(--muted); }
.bp-feats { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; font-size: 14px; flex: 1; }
.bp-feats li { display: flex; gap: 8px; align-items: flex-start; }
.bp-feats svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--accent); }
.bp-extra { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); }
.bp-extra input { width: 72px; }
.bp-btn { border: 0; border-radius: 999px; padding: 12px 14px; font-weight: 600; font-size: 14.5px; background: #111; color: #fff; cursor: pointer; text-align: center; }
.bp-btn.light { background: #fff; color: #111; box-shadow: inset 0 0 0 1px #d6d8dd; }
.bp-btn.done { background: #eaf1ff; color: #1d4ed8; cursor: default; }
.pk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.pk-card { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 22px 20px 20px; border-radius: 16px; background: linear-gradient(180deg, #fbfbfc, #fff); box-shadow: 0 0 0 1px var(--line); }
.pk-card.best { background: linear-gradient(180deg, #f1f8f4, #fff); box-shadow: 0 0 0 2px var(--accent); }
.pk-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; }
.pk-num b { font-size: 40px; line-height: .9; letter-spacing: -0.03em; display: block; }
.pk-num span, .pk-price span { font-size: 12.5px; color: var(--muted); }
.pk-price { text-align: right; display: grid; }
.pk-price b { font-size: 22px; }
.pk-card .co-opts { flex: 1; align-content: flex-start; }
.cr-table { margin-top: 18px; padding: 18px 20px; border-radius: 16px; background: #f7f8f9; }
.cr-table h3 { margin: 0 0 10px; font-size: 15px; }
.cr-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 90px 90px; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.cr-row:last-of-type { border-bottom: 0; }
.cr-per, .cr-30 { color: var(--muted); font-size: 13px; text-align: right; }
.cr-dots { display: inline-flex; gap: 4px; }
.cr-dots i { width: 9px; height: 9px; border-radius: 50%; background: #dfe2e6; }
.cr-dots i.on { background: var(--accent); }
@media (max-width: 640px) { .cr-row { grid-template-columns: 1fr auto; } .cr-per { display: none; } }
.bill-owner { margin-top: 24px; padding: 14px 16px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.bill-owner summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.bill-foot { margin-top: 16px; }
/* The admin's message to every customer, and the View as bar. */
.g-topbar-note { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 9px 16px; font-size: 13.5px; line-height: 1.4; text-align: center; background: #15161a; color: #fff; }
.g-topbar-note.warn { background: #fdf3dc; color: #5c3d00; border-bottom: 1px solid #f0d58c; }
.g-topbar-note.g-viewas { background: #fff7e0; color: #3d2c00; border-bottom: 1px solid #f0d58c; }
.g-topbar-note .btn.small { padding: 5px 12px; }
