/* Creadify calm layer: applies to both themes. Shorter text, drawn icons, three numbers per card. No colour decisions here
   except dark-theme tokens. */
:root{--ov:rgba(255,255,255,.05);--ov2:rgba(255,255,255,.09);--bad-ink:#1a0507}
/* the sidebar is the card; controls inside it carry no frame of their own */
body .sidetog,body .acct-btn{border-color:transparent;background:transparent;box-shadow:none}
body .sidetog:hover,body .acct-btn:hover,body .acct-btn[aria-expanded=true]{background:var(--bg2)}
/* dark theme: Create is lime, Analyze is blue, and "make ads" buttons stay lime in both */
/* no kicker above the page title */
body[data-ws] .page-head h1::before{content:none!important;display:none!important}
/* drawn icons in place of text glyphs: delta arrows, sort arrow, play badge, remove-x */
body .vz-ar{display:inline-block;width:8px;height:7px;margin-right:5px;background:currentColor;clip-path:polygon(50% 0,100% 100%,0 100%);vertical-align:.04em}
body .vz-ar.dn{clip-path:polygon(0 0,100% 0,50% 100%)}
body table.cr-t th[aria-sort=descending]::after{content:"";display:inline-block;width:8px;height:6px;margin-left:6px;background:currentColor;clip-path:polygon(0 0,100% 0,50% 100%);vertical-align:.05em}
body .th-play::before{content:"";display:block;width:11px;height:13px;margin-left:3px;background:#fff;clip-path:polygon(0 0,100% 50%,0 100%)}
body .th-play{display:grid;place-items:center;font-size:0}
body .chip2 em.x{position:relative;display:inline-block;width:10px;height:10px;margin-left:3px;opacity:.85}
body .chip2 em.x::before,body .chip2 em.x::after{content:"";position:absolute;left:0;top:4px;width:10px;height:2px;border-radius:1px;background:currentColor}
body .chip2 em.x::before{transform:rotate(45deg)}body .chip2 em.x::after{transform:rotate(-45deg)}


/* the toolbar reads as a sentence: no captions above the menus */
body .cr-bar .f>span,body .cr-bar .f>label>span{display:none}
body .cr-bar{padding:8px 0 12px}
body .cr-r1{align-items:center;gap:10px}
body .cr-apb,body .cr-bar select{min-height:36px}
/* sidebar groups: a hairline instead of a heading */
body .nav .nsub{font-size:0;height:1px;padding:0;margin:10px 10px;background:var(--line)}
body .nav .nsub:first-child,body .nav #adsnav>.nsub:first-child{display:none}
/* page title: just the title and a quiet status */
body .page-head{margin-bottom:14px}
body .page-head p{margin-top:4px}
body .page-head h1{font-size:clamp(1.6rem,1.25rem + 1.2vw,2rem)}
body .cr-sh{margin-bottom:10px}
body .cr-kpis>.cr-kpi{padding:16px 18px 12px}
body .cr-kpi>b{font-size:1.75rem}
body .cr-fact{padding:14px 16px}
body .cr-fn{font-size:.82rem}
body .cr-act p{display:none}                       /* each action is its title and its button; the reason sits in the tooltip */
body .cr-act{padding:13px 0;align-items:center}
body .cr-kwrap .cr-kpis2{margin-top:12px}

/* campaign detail: id and Ads Manager links */
.cm-ids{display:flex;flex-wrap:wrap;gap:10px 18px;align-items:center;margin:0 0 18px;padding:10px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.cm-id{display:inline-flex;align-items:center;gap:8px;min-width:0;font-size:.9rem}
.cm-id small{color:var(--mute);font-size:.82rem}
.cm-id code{font:600 .88rem ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--ink);background:var(--bg2);padding:3px 8px;border-radius:7px;overflow-wrap:anywhere}
.cm-copy{display:inline-grid;place-items:center;width:28px;height:28px;border:0;border-radius:8px;background:transparent;color:var(--mute);cursor:pointer;transition:background .16s,color .16s}
.cm-copy:hover{background:var(--bg2);color:var(--ink)}
.cm-go{display:inline-flex;gap:8px;flex-wrap:wrap;margin-left:auto}
@media (max-width:700px){.cm-go{margin-left:0}}
.r2l{display:inline-flex;gap:4px;align-items:center;flex-wrap:wrap}.cname .lk{padding:2px 0 0;justify-self:start;text-align:left}

/* creative card numbers: same three columns on every card, each label above its value, change chip under its number */
body .cr-m4{display:grid;grid-template-columns:1.4fr 1fr 1.15fr;column-gap:8px;row-gap:0;align-items:start}
body .cr-m4>div{display:grid;grid-auto-rows:min-content;gap:3px;justify-items:start;align-content:start;min-width:0}
body .cr-m4>div>span{font-size:.78rem;line-height:1.2;color:var(--mute);font-weight:500}
body .cr-m4>div>b{font-size:.92rem;line-height:1.2;font-weight:720;letter-spacing:-.015em;white-space:nowrap}
body .cr-m4 .vz-d{justify-self:start;align-self:start;width:auto;margin:3px 0 0}

/* the filter panel keeps its captions (the top toolbar reads as a sentence, this panel is a form) */
body .cr-more .f>span{display:block}

/* what's working */
.cr-learn{padding:20px 22px}
.cr-lgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:20px 28px}
.cr-lcol h3{font-size:.95rem;margin:0 0 10px;display:flex;align-items:center;gap:8px}
.cr-lcol h3::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--mute)}
.cr-lcol.good h3::before{background:var(--vz-good,#3ecf8e)}.cr-lcol.bad h3::before{background:var(--vz-bad,#ef6a5b)}
.cr-li2{display:grid;gap:2px;width:100%;padding:11px 12px;margin:0 -12px;width:calc(100% + 24px);border:0;border-radius:12px;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer;transition:background .16s}
.cr-li2:hover{background:var(--ov)}
.cr-lt{display:flex;justify-content:space-between;gap:12px;align-items:baseline}.cr-lt b{font-weight:650}
.cr-lp{font-weight:720;font-size:.95rem}.cr-lcol.good .cr-lp{color:var(--vz-good,#3ecf8e)}.cr-lcol.bad .cr-lp{color:var(--vz-bad,#ef6a5b)}
.cr-ls{font-size:.9rem;color:var(--ink2)}

/* the filter panel: an even grid, every field the same height, labels on one line, Clear on the right */
body .cr-more{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:14px 16px;align-items:end;padding:16px 18px}
body .cr-more[hidden]{display:none}
body .cr-more .f{display:grid;gap:6px;min-width:0;margin:0}
body .cr-more .f>span{font-size:.82rem}
body .cr-more select,body .cr-more input{width:100%;min-height:40px}
body .cr-more .btn.ghost{grid-column:-2/-1;justify-self:end;align-self:end}

/* summary verdict */
.cr-summary{display:grid;gap:8px;padding:20px 24px}
.cr-vh{display:flex;align-items:center;gap:10px}.cr-vh h2{margin:0;font-size:1.35rem;letter-spacing:-.02em}
.cr-vh i{width:11px;height:11px;border-radius:50%;background:var(--mute);flex:none}
.cr-vh.good i{background:var(--vz-good,#3ecf8e)}.cr-vh.warn i{background:var(--vz-4,#e8b04a)}.cr-vh.bad i{background:var(--vz-bad,#ef6a5b)}
.cr-vd{margin:0;color:var(--ink2);max-width:75ch}
.cr-va{display:flex;gap:14px;align-items:center;flex-wrap:wrap;margin-top:6px;padding-top:12px;border-top:1px solid var(--line)}.cr-va span{font-weight:600}

/* ===== Refinement layer: one quieter, denser visual language for both themes (visual only) =====
   Smaller radii, flat surfaces, neutral tables, text-only change indicators, one set of control heights. */
html body{--r:10px;--r-sm:7px}
/* surfaces: hairline borders carry the structure, shadows only on floating menus */
html body .card,html body .cr-kwrap,html body .cr-kpis,html body .setsec .card{box-shadow:none}
html body .card{border-radius:10px;padding:18px}
/* sidebar: a full-height rail, not a floating card */
html body .side{margin:0;height:100vh;border:0;border-right:1px solid var(--line);border-radius:0;box-shadow:none}
html body .wsw{border-radius:9px;padding:3px}
html body .wsw>*{border-radius:7px}
html body .nav .ni,html body .nav .gh{border-radius:7px;padding:8px 10px;font-weight:550;font-size:.9rem;gap:10px}
html body .nav .ni[aria-current=page]{background:var(--accent-soft);color:var(--accent);font-weight:650}
/* type: smaller titles, weight does the work */
html body h1,html body .page-head h1{font-size:1.5rem;font-weight:650;letter-spacing:-.015em;line-height:1.2}
html body h2{font-size:1rem;font-weight:650}
html body .page-head{margin-bottom:12px}
html body table.cr-t,html body .ctable,html body .kpis,html body .cr-kpi b,html body .cr-ks b,html body .vz-d{font-variant-numeric:tabular-nums}
/* controls: one height, one radius */
html body .btn{min-height:36px;padding:7px 14px;border-radius:7px;font-size:.875rem;font-weight:600}
html body .btn.sm{min-height:30px;padding:5px 10px;font-size:.8rem}
html body .btn.lg{min-height:42px;padding:10px 20px;font-size:.95rem}
html body input,html body select,html body textarea,html body .cr-apb{border-radius:7px}
html body .chip,html body .chip2,html body .seg button{border-radius:7px}
html body .chip,html body .chip2{padding:5px 11px;font-size:.84rem}
html body .badge{border-radius:5px;padding:1px 8px;font-size:.74rem;font-weight:600}
/* change indicators: coloured text and an arrow, no pill behind them */
html body .vz-d{padding:0;border-radius:0;background:transparent!important;font-size:.78rem;font-weight:650}
html body .vz-d.flat{color:var(--mute)}
/* tables: neutral cells, a hairline between rows, a quiet header, the Total row set off by one rule */
html body table.cr-t td[class*=tc-],html body table.cr-t th[class*=tc-]{background:transparent;box-shadow:none}
html body table.cr-t thead th{background:transparent;color:var(--mute);font-size:.74rem;font-weight:600;border-bottom:1px solid var(--line2)}
html body table.cr-t tbody td{border-bottom:1px solid var(--line)}
html body table.cr-t tbody tr:nth-child(even) td{background-image:none}
html body table.cr-t tbody tr:hover td{background-image:linear-gradient(var(--ov),var(--ov))}
html body .cr-t tfoot td,html body table.cr-t tfoot td[class*=tc-]{background:var(--bg2)!important;background-image:none!important;border-top:1px solid var(--line2);border-bottom:0;font-weight:650;padding-top:10px;padding-bottom:10px}
html body .cr-t tfoot td:first-child,html body .cr-t tfoot td:last-child{border-radius:0}
/* Manage campaigns list follows the same table language */
html body .chead{background:transparent;border-bottom:1px solid var(--line2)}
/* selected and applied states are tinted, not solid fills */
html body .chip2[aria-current=true],html body .cr-fchips .chip2{background:var(--accent-soft);border-color:var(--accent-line);color:var(--accent)}
html body .addbtn .plus{width:32px;height:32px}

/* Audience: one toolbar row, highlights as a single strip, the table straight on the page */
html body .aud-bar{display:flex;align-items:center;justify-content:space-between;gap:12px 20px;flex-wrap:wrap;margin:4px 0 14px}
html body .aud-bar .f{display:flex;align-items:center;gap:10px;margin:0}
html body .aud-bar .f>span{display:inline;font-size:.8rem;font-weight:600;color:var(--mute);margin:0}
html body .aud-bar select{width:auto;min-width:120px;min-height:34px;padding:6px 30px 6px 10px}
html body .aud-bar .seg{max-width:100%;overflow-x:auto}
html body .aud-bar .seg button{padding:6px 14px;font-size:.85rem;white-space:nowrap}
html body .aud-hl{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;margin:0 0 20px;border:1px solid var(--line);border-radius:10px;background:var(--panel);overflow:hidden}
html body .aud-hl .cr-fact{border:0;border-radius:0;box-shadow:none;background:transparent;padding:14px 16px;border-right:1px solid var(--line);gap:3px}
html body .aud-hl .cr-fact:last-child{border-right:0}
html body .aud-hl .cr-fl{font-size:.7rem}
html body .aud-hl .cr-ft{font-size:1rem}
html body .aud-hl .cr-fm{font-size:.9rem}
html body .aud-hl .cr-fn{font-size:.78rem}
@media (max-width:900px){html body .aud-hl{grid-template-columns:repeat(2,minmax(0,1fr))}html body .aud-hl .cr-fact:nth-child(2){border-right:0}html body .aud-hl .cr-fact:nth-child(-n+2){border-bottom:1px solid var(--line)}}
@media (max-width:520px){html body .aud-hl{grid-template-columns:1fr}html body .aud-hl .cr-fact{border-right:0;border-bottom:1px solid var(--line)}html body .aud-hl .cr-fact:last-child{border-bottom:0}}
html body .aud-tbl .cr-tw{border:1px solid var(--line);border-radius:10px;overflow:auto}
html body .aud-tbl td .cr-rb{margin-top:5px;margin-left:auto;width:100%;max-width:90px}
html body .aud-bar select{width:150px;flex:none}
html body .aud-tbl td.c1{white-space:nowrap}
html body .aud-tbl td.c1 .cr-hb{margin-left:10px}

/* Creative leaderboard: no collisions between metrics, air under the rank chips */
html body .cr-grid{grid-template-columns:repeat(auto-fill,minmax(262px,1fr))}
html body .cr-m4{grid-template-columns:auto auto auto;justify-content:space-between;column-gap:14px}
html body .cr-m4>div>b{font-size:.9rem}
html body .cr-sh~.chips2{margin-bottom:18px}

/* bridge: AI-made badge, remakes in the drawer, link picker in the brand viewer */
html body .th-ov .badge.ai{background:var(--accent);color:var(--accent-ink,#0b0b0b)}
html body .dr-ai{margin:10px 0 0;font-size:.84rem;color:var(--mute)}
html body .dr-rm{display:flex;gap:10px;flex-wrap:wrap}
html body .dr-rmi{display:grid;gap:4px;width:92px;text-decoration:none}
html body .dr-rmi img{width:92px;aspect-ratio:4/5;object-fit:cover;border-radius:8px;border:1px solid var(--line)}
html body .lbperf{display:grid;gap:10px;margin:12px 0;padding:12px 14px;border:1px solid var(--line);border-radius:10px;background:var(--panel2,transparent)}
html body .lbperf[hidden]{display:none}
html body .lbpg{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 14px}
html body .lbpg>div{display:grid;gap:2px}
html body .lkdlg{width:min(560px,94vw);max-height:84vh;padding:20px;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--ink)}
html body .lkdlg::backdrop{background:rgba(0,0,0,.55)}
html body .lkh{display:flex;justify-content:space-between;align-items:center;gap:12px}
html body .lkh h3{margin:0;font-size:1.05rem}
html body .lkdlg input[type=search]{width:100%;margin:10px 0}
html body .lklist{display:grid;gap:6px;max-height:50vh;overflow:auto}
html body .lkrow{display:flex;gap:12px;align-items:center;text-align:left;padding:8px;border:1px solid var(--line);border-radius:10px;background:transparent;color:inherit;cursor:pointer;font:inherit}
html body .lkrow:hover{border-color:var(--accent)}
html body .lkrow img{width:44px;height:44px;object-fit:cover;border-radius:8px;flex:none;background:var(--line)}
html body .lkrow span{display:grid;gap:2px;min-width:0}
html body .lkrow b{font-size:.88rem;overflow-wrap:anywhere}

html body .refstrip .rs{position:relative}
html body .refstrip .rsw{position:absolute;left:6px;bottom:6px;right:6px;font-style:normal;font-size:.7rem;font-weight:650;line-height:1.2;padding:2px 6px;border-radius:6px;background:rgba(0,0,0,.72);color:#fff;text-align:center}

/* results: compare with the winner */
html body button.refmini{padding:0;cursor:zoom-in;background:none}
html body .cmpdlg{width:min(860px,94vw);max-height:90vh;padding:20px;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--ink)}
html body .cmpdlg::backdrop{background:rgba(0,0,0,.6)}
html body .cmph{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}
html body .cmph h3{margin:0;font-size:1.05rem}
html body .cmpg{display:grid;grid-template-columns:1fr 1fr;gap:14px}
html body .cmpg figure{margin:0;display:grid;gap:6px}
html body .cmpg figcaption{font-size:.8rem;color:var(--mute);font-weight:600}
html body .cmpg figure>div{display:grid}
html body .cmpg img{width:100%;max-height:62vh;object-fit:contain;border-radius:10px;border:1px solid var(--line);background:var(--bg2,transparent)}
html body .cmpa{display:flex;gap:10px;flex-wrap:wrap;margin-top:10px}
@media (max-width:600px){html body .cmpg{grid-template-columns:1fr}}

html body .myh{margin:22px 0 10px;font-size:.92rem}
html body #myrefwrap[hidden]{display:none}
html body #myrefs .plate{position:relative}
html body #myrefs .xdel{position:absolute;top:6px;right:6px;left:auto;z-index:3;width:28px;height:28px;padding:0;border:2px solid #fff;border-radius:50%;background:#d93a3a;color:#fff;font:700 18px/1 var(--font);display:grid;place-items:center;cursor:pointer;box-shadow:0 2px 6px rgba(0,0,0,.45);transition:transform .15s,background .15s}
html body #myrefs .xdel:hover,html body #myrefs .xdel:focus-visible{background:#b82424;transform:scale(1.1)}
html body #myrefs .plate .tick{top:6px;left:6px;right:auto}
