/* Client Portal — NoA Connect brand system.
 * Palette + type follow the NoA Connect brand kit (April 2026):
 *   - Inter for body / UI (Google Fonts)
 *   - NoaGrotesk2.0 for headings + stats (self-hosted woff2)
 *   - NoaSerif2.0 for editorial / hero serif (self-hosted woff2)
 *   - Space Grotesk + Fraunces kept as system fallbacks behind the NoA
 *     fonts in the var() stacks, so missing-font loads still render in
 *     a reasonable substitute rather than the OS default.
 */

/* Google Fonts (Inter + fallbacks) load from base.html <head> with
 * preconnect — NOT via @import here. An @import serializes the chain
 * style.css → googleapis CSS → gstatic woff2 behind this file's own
 * download+parse; head-level links let the browser start both fetches
 * immediately. Templates that don't extend base.html but need the UI font
 * must carry the same <link> tags. */

/* Brand fonts — self-hosted to avoid the CDN coupling on a private typeface. */
@font-face {
  font-family: 'NoaGrotesk';
  src: url('/static/fonts/NoaGrotesk2.0-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'NoaGrotesk';
  src: url('/static/fonts/NoaGrotesk2.0-Medium.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'NoaGrotesk';
  src: url('/static/fonts/NoaGrotesk2.0-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'NoaSerif';
  src: url('/static/fonts/NoaSerif2.0-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'NoaSerif';
  src: url('/static/fonts/NoaSerif2.0-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
  /* Palette — verbatim from noaconnect.com */
  --p-yellow:#E4FB00;
  --p-sage:#6C7A63;
  --p-darkgreen:#253519;
  --p-peach:#FFE8C8;
  --p-offwhite:#FDFFE5;
  --p-lightgray:#EBEAEA;
  --p-midgray:#545050;
  --p-darkgray:#292929;
  --p-dark:#0F0F0E;
  --p-white:#FFFFFF;
  --p-red:#D82F15;
  --p-lightred:#FF5C43;

  /* Semantic mappings */
  --bg:var(--p-offwhite);
  --surface:var(--p-white);
  --surface-warm:var(--p-peach);
  --surface-inverted:var(--p-darkgray);
  --text:var(--p-darkgray);
  --text-muted:var(--p-midgray);
  --text-on-dark:var(--p-offwhite);
  --accent:var(--p-yellow);
  --accent-deep:var(--p-darkgreen);
  --divider:rgba(41,41,41,.18);
  --error:var(--p-red);
  --error-bg:#fde4df;
  --r:4px;
  --r-card:8px;

  --font-ui:Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  --font-display:'NoaGrotesk','Space Grotesk',Inter,-apple-system,'Segoe UI',sans-serif;
  --font-serif:'NoaSerif',Fraunces,Georgia,'Times New Roman',serif;

  /* Per-client brand override (set inline via style="" on <html>). Defaults
   * to the NoA Connect yellow. Used as the topbar dot + card accent. */
  --client-accent:var(--p-yellow);
}

/* ── White-label profile (PORTAL_BRAND=neutral) ───────────────────────────
 *
 * base.html stamps data-theme="neutral" on <html>; everything below simply
 * re-points the SAME variables the rest of this file already consumes, so no
 * component rule needs a branded/unbranded branch. Without the attribute
 * (the default) not one declaration here applies.
 *
 * Warm off-white page, white surfaces, charcoal text, one muted slate-blue
 * accent, system fonts. Measured contrast, all AA or better (recompute these
 * if you touch a colour — they are what the next person will trust):
 *   text     #22252A on #F7F5F2 → 14.13:1
 *   muted    #5C616B on #F7F5F2 →  5.71:1
 *   accent   #3F5A78 on #FFFFFF →  7.13:1  (and white on it, same ratio)
 *   error    #A63A22 on #FFFFFF →  6.46:1
 */
:root[data-theme="neutral"]{
  --p-yellow:#C08457;      /* the "highlight" slot: a warm ochre, not yellow */
  --p-sage:#8A8177;
  --p-darkgreen:#2E4257;
  --p-peach:#EFEBE5;
  --p-offwhite:#F7F5F2;
  --p-lightgray:#EAE7E3;
  --p-midgray:#5C616B;
  --p-darkgray:#22252A;
  --p-dark:#14161A;
  --p-white:#FFFFFF;
  --p-red:#A63A22;
  --p-lightred:#C4573B;

  --bg:var(--p-offwhite);
  --surface:var(--p-white);
  --surface-warm:var(--p-peach);
  --surface-inverted:#2A2D33;
  --text:var(--p-darkgray);
  --text-muted:var(--p-midgray);
  --text-on-dark:#F7F5F2;
  /* --accent is a decorative fill (login rule, pills); --accent-deep carries
   * text and button backgrounds, so it is the one that must hold contrast. */
  --accent:#C9D4E2;
  --accent-deep:#3F5A78;
  --divider:rgba(34,37,42,.14);
  --error:var(--p-red);
  --error-bg:#F6E7E2;

  /* System stack in all three slots: the NoA faces are a licensed typeface
   * and must not ship on a white-label instance. The @font-face rules above
   * stay declared but are never referenced, so the woff2 files are not
   * fetched. */
  --font-ui:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;
  --font-display:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;
  --font-serif:Georgia,'Times New Roman',serif;

  --client-accent:var(--accent-deep);
}
html,body{font-family:var(--font-ui);background:var(--bg);color:var(--text);min-height:100vh;-webkit-font-smoothing:antialiased}
button{font:inherit;cursor:pointer;border:none;background:none;color:inherit}
input,select{font:inherit;color:var(--text)}
.muted{color:var(--text-muted);font-size:.85rem}
.error{color:var(--error);font-size:.85rem;margin-top:8px;min-height:1.2em}
a{color:var(--accent-deep);text-decoration:none}
a:hover{text-decoration:underline}

/* ── Login page ───────────────────────────────────────────────────────── */
.login-page{display:flex;align-items:center;justify-content:center;background:var(--bg);min-height:100vh;padding:32px 16px}
.login-card{background:var(--surface);padding:40px 36px;border-radius:var(--r-card);max-width:400px;width:100%;border:1px solid var(--divider);position:relative;overflow:hidden}
.login-card::before{content:"";position:absolute;top:0;left:0;right:0;height:6px;background:var(--accent)}
.login-card h1{font-family:var(--font-display);color:var(--text);font-size:1.55rem;font-weight:700;letter-spacing:-.01em;margin-bottom:6px;margin-top:6px}
.login-card .lead{color:var(--text-muted);font-size:.88rem;margin-bottom:4px}
.login-card form{margin-top:22px;display:flex;flex-direction:column;gap:12px}
.login-card label{font-size:.78rem;font-weight:600;color:var(--text-muted);letter-spacing:.02em;margin-bottom:-6px}
.login-card input{padding:13px 14px;border:1px solid var(--divider);border-radius:var(--r);outline:none;background:var(--p-white);transition:border-color .15s}
.login-card input:focus{border-color:var(--accent-deep)}
.login-card button{padding:13px;background:var(--accent-deep);color:var(--p-offwhite);border-radius:var(--r);font-weight:600;letter-spacing:.01em;transition:background .15s,transform .05s}
.login-card button:hover{background:var(--p-dark)}
.login-card button:active{transform:translateY(1px)}
.login-error{background:var(--error-bg);color:var(--error);font-size:.83rem;padding:10px 12px;border-radius:var(--r);margin-bottom:4px;border-left:3px solid var(--error)}
/* Non-error banner (the "a sign-in link is on its way" confirmation). Shares
   the error banner's geometry so the card doesn't reflow between the two, and
   uses semantic vars only, so a white-label theme restyles it for free. */
.login-notice{background:var(--surface-warm);color:var(--text);font-size:.83rem;padding:10px 12px;border-radius:var(--r);margin-bottom:4px;border-left:3px solid var(--accent-deep)}
/* Agency eyebrow above the heading — same display face as the h1, sized and
   spaced as a mark rather than a title. Conditional in the template, so a
   white-label card simply starts at "Sign in". */
.login-wordmark{font-family:var(--font-display);font-size:.68rem;font-weight:700;letter-spacing:.2em;text-transform:uppercase;color:var(--text-muted);margin-bottom:10px}
/* The divider above already carries 6px below; the form's default 22px on top
   of that reads as a gap in the group rather than a beat inside it. */
.login-card form.login-link-form{margin-top:8px}
/* The legacy password door, folded. The summary reads as a quiet text action;
   open, it yields to the form it reveals. Native <details> so the fold works
   with no script at all. */
.pw-disclosure{margin-top:16px}
.pw-disclosure summary{cursor:pointer;font-size:.8rem;font-weight:600;color:var(--text-muted);list-style:none;display:inline-block}
.pw-disclosure summary::-webkit-details-marker{display:none}
.pw-disclosure summary::after{content:" →"}
.pw-disclosure summary:hover{color:var(--accent-deep)}
.pw-disclosure[open] summary{color:var(--text)}
.pw-disclosure[open] summary::after{content:""}
.pw-disclosure form{margin-top:8px}
.login-forgot{font-size:.75rem;color:var(--text-muted);margin-top:-2px}
.login-foot{text-align:center;color:var(--text-muted);font-size:.75rem;margin-top:18px;line-height:1.7}
.login-foot a.login-foot-team{font-weight:600;color:var(--text-muted);letter-spacing:.02em}
.login-foot a.login-foot-team:hover{color:var(--accent-deep);text-decoration:none}
.sso-btn{
  display:flex;align-items:center;justify-content:center;gap:10px;
  width:100%;margin-top:18px;padding:12px;
  border:1px solid var(--divider);border-radius:var(--r);
  background:var(--p-white);color:var(--text);font-weight:600;font-size:.92rem;
  cursor:pointer;text-decoration:none;
  transition:border-color .15s,background .15s,transform .05s;
}
.sso-btn:hover{border-color:var(--accent-deep);background:var(--p-offwhite);text-decoration:none}
.sso-btn:active{transform:translateY(1px)}
.sso-btn svg{flex-shrink:0}
/* Providers lead the card now; the first one takes the vertical beat the
   old top form used to provide. */
.login-card .sso-btn:first-of-type{margin-top:22px}
.sso-hint{font-size:.74rem;color:var(--text-muted);text-align:center;margin-top:8px}
.divider{display:flex;align-items:center;gap:10px;margin:18px 0 6px;color:var(--text-muted);font-size:.72rem;text-transform:uppercase;letter-spacing:.1em;font-weight:600;font-family:var(--font-display)}
.divider::before,.divider::after{content:"";flex:1;height:1px;background:var(--divider)}

/* ── Topbar ───────────────────────────────────────────────────────────── */
.topbar{background:var(--surface-inverted);color:var(--text-on-dark);border-bottom:1px solid var(--p-dark);padding:16px 28px;display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.topbar h1{font-family:var(--font-display);font-size:1.25rem;font-weight:700;letter-spacing:-.01em;color:var(--p-offwhite);display:flex;align-items:center;gap:12px}
.topbar h1 .dot{display:inline-block;width:9px;height:9px;border-radius:50%;background:var(--client-accent);box-shadow:0 0 0 1px rgba(228,251,0,.4)}
.topbar h1 img{max-height:28px;width:auto;display:block}
.topbar .subtitle{color:rgba(253,255,229,.55);font-family:var(--font-ui);font-size:.75rem;font-weight:500;letter-spacing:.04em;text-transform:uppercase;margin-left:4px}
.topbar-left,.topbar-right{display:flex;align-items:center;gap:18px}
.topbar .muted{color:rgba(253,255,229,.65)}
.btn-link{color:rgba(253,255,229,.7);font-size:.85rem;font-weight:500;padding:6px 10px;background:none;border-radius:var(--r);transition:color .15s,background .15s}
.btn-link:hover{color:var(--accent);background:rgba(253,255,229,.06);text-decoration:none}

/* ── Main grid ────────────────────────────────────────────────────────── */
main.shell{max-width:1280px;margin:0 auto;padding:36px 28px 48px;display:flex;flex-direction:column;gap:28px}
.page-head h2{font-family:var(--font-display);font-size:1.55rem;font-weight:700;letter-spacing:-.015em;color:var(--text);margin-bottom:6px}
.page-head h2 em{font-family:var(--font-serif);font-style:italic;font-weight:500;color:var(--accent-deep)}
.page-head p{color:var(--text-muted);font-size:.92rem;max-width:640px;line-height:1.5}

/* ── Hero KPI strip (above feature cards on the dashboard) ──────────── */
.hero-kpi-strip{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:14px;
}
.hero-kpi{
  position:relative;overflow:hidden;
  background:var(--surface);
  border:1px solid var(--divider);
  border-radius:var(--r-card);
  padding:20px 22px;
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:16px;
  min-height:96px;
  color:inherit;text-decoration:none;
  transition:border-color .15s,transform .08s,box-shadow .15s;
}
.hero-kpi::before{
  content:"";position:absolute;left:0;top:0;bottom:0;width:4px;
  background:var(--client-accent);
  border-radius:var(--r-card) 0 0 var(--r-card);
}
.hero-kpi.hero-kpi-good::before{background:var(--accent)}
.hero-kpi.hero-kpi-neutral::before{background:var(--accent-deep)}
.hero-kpi.hero-kpi-warning::before{background:#E5A93B}
.hero-kpi.hero-kpi-bad::before{background:var(--error)}
.hero-kpi.hero-kpi-muted::before{background:var(--p-sage)}

.hero-kpi-link{cursor:pointer}
.hero-kpi-link:hover{
  border-color:var(--accent-deep);
  transform:translateY(-1px);
  box-shadow:0 6px 18px rgba(15,15,14,.06);
  text-decoration:none;
}
.hero-kpi-link:hover .hero-kpi-arrow{transform:translateX(3px)}

.hero-kpi-icon{
  flex-shrink:0;
  width:42px;height:42px;
  border-radius:var(--r);
  background:var(--surface-warm);
  color:var(--accent-deep);
  display:inline-flex;align-items:center;justify-content:center;
}
.hero-kpi-icon svg{width:22px;height:22px}
.hero-kpi.hero-kpi-bad .hero-kpi-icon{background:#fde4df;color:var(--error)}
.hero-kpi.hero-kpi-warning .hero-kpi-icon{background:#fbecd3;color:#8a5a14}
.hero-kpi.hero-kpi-good .hero-kpi-icon{background:#eef2ec;color:var(--accent-deep)}
.hero-kpi.hero-kpi-muted .hero-kpi-icon{background:var(--p-lightgray);color:var(--p-sage)}

.hero-kpi-body{display:flex;flex-direction:column;gap:2px;min-width:0}
.hero-kpi-label{
  font-size:.66rem;color:var(--text-muted);font-weight:700;
  text-transform:uppercase;letter-spacing:.08em;
}
.hero-kpi-value{
  font-family:var(--font-display);
  font-size:1.85rem;font-weight:700;line-height:1.05;
  letter-spacing:-.02em;color:var(--text);
  margin-top:2px;
  font-variant-numeric:tabular-nums;
}
.hero-kpi.hero-kpi-bad .hero-kpi-value{color:var(--error)}
.hero-kpi-sub{
  font-size:.78rem;color:var(--text-muted);
  margin-top:3px;line-height:1.3;
}
.hero-kpi-arrow{
  font-family:var(--font-display);
  color:var(--accent-deep);font-weight:700;font-size:1.05rem;
  transition:transform .12s;align-self:center;
}
.hero-kpi:not(.hero-kpi-link) .hero-kpi-arrow{display:none}

/* ── News feed (above feature cards) ─────────────────────────────────── */
.news-feed{
  background:var(--surface);border:1px solid var(--divider);
  border-radius:var(--r-card);padding:22px 24px;
  display:flex;flex-direction:column;gap:14px;
}
.news-feed-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;flex-wrap:wrap;border-bottom:2px solid var(--accent);padding-bottom:8px}
.news-feed-head h3{font-family:var(--font-display);font-size:1.1rem;font-weight:700;letter-spacing:-.01em;color:var(--text)}
.news-feed-sub{font-size:.8rem;color:var(--text-muted)}
.news-items{display:flex;flex-direction:column;gap:0}
/* Each item is an accordion via <details>/<summary>. First one opens by
 * default; clicking any summary toggles it independently. */
.news-item{display:flex;flex-direction:column;gap:6px;padding:14px 0}
.news-item + .news-item{border-top:1px dashed var(--divider)}
.news-item-summary{
  list-style:none;cursor:pointer;
  display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:14px;
}
.news-item-summary::-webkit-details-marker{display:none}
.news-item-summary:hover .news-item-title{color:var(--accent-deep)}
.news-item-meta{display:flex;align-items:center;gap:8px}
.news-item-meta time{
  font-family:var(--font-display);font-size:.66rem;font-weight:800;
  letter-spacing:.1em;text-transform:uppercase;color:var(--accent-deep);
  background:var(--accent);padding:3px 9px;border-radius:999px;
  white-space:nowrap;
}
.news-item-chev{
  font-family:var(--font-display);color:var(--text-muted);
  font-size:1.4rem;line-height:1;font-weight:400;
  transition:transform .15s ease;
}
.news-item[open] > .news-item-summary .news-item-chev{transform:rotate(90deg)}
.news-item-title{font-family:var(--font-display);font-size:1.05rem;font-weight:700;letter-spacing:-.01em;color:var(--text);margin:0;line-height:1.3}
.news-item-body{font-size:.92rem;line-height:1.55;color:var(--text);padding-top:12px;margin-left:74px}
.news-item-body p{margin:8px 0}
.news-item-body p:first-child{margin-top:4px}
.news-item-body h2,.news-item-body h3{
  font-family:var(--font-display);font-weight:700;letter-spacing:-.005em;
  color:var(--text);margin:18px 0 6px;
}
.news-item-body h2{font-size:.78rem;text-transform:uppercase;letter-spacing:.09em;color:var(--accent-deep);border-bottom:1px solid var(--divider);padding-bottom:4px}
.news-item-body h3{font-size:.98rem}
.news-item-body h4{font-family:var(--font-display);font-size:.92rem;font-weight:700;color:var(--text);margin:10px 0 2px}
.news-item-body ul,.news-item-body ol{margin:6px 0 8px 20px;padding:0}
.news-item-body li{margin:3px 0;line-height:1.5}
.news-item-body strong{font-weight:700;color:var(--text)}
.news-item-body em{font-style:italic}
.news-item-body code{font-family:Menlo,Consolas,monospace;background:var(--surface-warm);padding:1px 5px;border-radius:3px;font-size:.86em}

/* ── Feature cards ────────────────────────────────────────────────────── */
.feature-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px}
.feature-card{
  background:var(--surface);border:1px solid var(--divider);border-radius:var(--r-card);
  padding:22px 22px 20px;position:relative;overflow:hidden;
  display:flex;flex-direction:column;gap:12px;min-height:160px;
  transition:border-color .15s,transform .08s,box-shadow .15s;
  color:inherit;text-decoration:none;
}
.feature-card::before{
  content:"";position:absolute;left:0;top:0;bottom:0;width:4px;
  background:var(--client-accent);border-radius:var(--r-card) 0 0 var(--r-card);
}
.feature-card.enabled:hover{
  border-color:var(--accent-deep);transform:translateY(-1px);
  box-shadow:0 6px 18px rgba(15,15,14,.06);text-decoration:none;
}
.feature-card.enabled:hover .fc-arrow{transform:translateX(3px)}
.feature-card.disabled{opacity:.55;cursor:not-allowed}
.feature-card.disabled::before{background:var(--divider)}
.fc-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.fc-icon{
  flex-shrink:0;width:36px;height:36px;border-radius:var(--r);
  background:var(--surface-warm);color:var(--accent-deep);
  display:inline-flex;align-items:center;justify-content:center;
}
.feature-card.disabled .fc-icon{background:var(--p-lightgray);color:var(--text-muted)}
.fc-icon svg{width:20px;height:20px}
.fc-tag{
  font-size:.62rem;font-weight:800;letter-spacing:.1em;text-transform:uppercase;
  padding:3px 7px;border-radius:999px;font-family:var(--font-display);
}
.fc-tag.soon{background:var(--accent);color:var(--p-dark)}
.fc-tag.off{background:var(--p-lightgray);color:var(--text-muted)}
.fc-title{font-family:var(--font-display);font-size:1.05rem;font-weight:700;letter-spacing:-.005em;color:var(--text);line-height:1.25}
.fc-desc{font-size:.83rem;color:var(--text-muted);line-height:1.5;flex:1}
.fc-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:2px}
.fc-action{font-family:var(--font-display);font-size:.72rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--accent-deep)}
.feature-card.disabled .fc-action{color:var(--text-muted)}
.fc-arrow{font-family:var(--font-display);color:var(--accent-deep);font-weight:700;transition:transform .12s}
.feature-card.disabled .fc-arrow{color:var(--text-muted)}

/* "?" info badge — shown next to status tag in card header */
.fc-head-right{display:flex;align-items:center;gap:8px}
.fc-info{
  display:inline-flex;align-items:center;justify-content:center;
  width:20px;height:20px;border-radius:50%;border:1px solid var(--divider);
  background:var(--surface);color:var(--text-muted);
  font-family:var(--font-display);font-weight:800;font-size:.74rem;
  line-height:1;cursor:help;flex-shrink:0;transition:background .12s,color .12s,border-color .12s;
}
.fc-info:hover,.fc-info:focus{background:var(--accent-deep);color:var(--p-offwhite);border-color:var(--accent-deep);outline:none}

/* Centred modal popover */
.fc-info-modal{position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;padding:24px}
.fc-info-modal[hidden]{display:none}
.fc-info-backdrop{position:absolute;inset:0;background:rgba(15,15,14,.45);backdrop-filter:blur(2px);cursor:pointer}
.fc-info-card{
  position:relative;background:var(--surface);border:1px solid var(--divider);
  border-radius:var(--r-card);padding:28px 28px 24px;max-width:520px;width:100%;
  box-shadow:0 12px 32px rgba(15,15,14,.18);
  border-left:4px solid var(--accent-deep);
}
.fc-info-card h3{font-family:var(--font-display);font-size:1.15rem;font-weight:700;letter-spacing:-.01em;color:var(--text);margin-bottom:10px;padding-right:30px}
.fc-info-card p{font-size:.92rem;line-height:1.6;color:var(--text)}
.fc-info-close{
  position:absolute;top:14px;right:14px;width:28px;height:28px;border:none;
  background:transparent;color:var(--text-muted);font-size:1.5rem;line-height:1;
  cursor:pointer;border-radius:var(--r);transition:background .12s,color .12s;
}
.fc-info-close:hover{background:var(--bg);color:var(--text)}
body.fc-info-open{overflow:hidden}

/* ── Footer ──────────────────────────────────────────────────────────── */
.footer{max-width:1280px;margin:0 auto;padding:20px 28px 36px;color:var(--text-muted);font-size:.78rem;display:flex;justify-content:space-between;flex-wrap:wrap;gap:10px}
.footer em{font-family:var(--font-serif);font-style:italic}

/* ── Embed page ──────────────────────────────────────────────────────── */
body.embed-page{display:flex;flex-direction:column;min-height:100vh;overflow:hidden}
body.embed-page .topbar{flex:0 0 auto}
.embed-shell{flex:1 1 auto;display:flex;min-height:0;background:var(--surface)}
.embed-shell iframe{width:100%;height:100%;border:0;display:block;background:var(--surface)}

/* ── KPI strip (shared by view_seo + view_sba) ───────────────────────── */
.kpi-strip{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:14px}
.kpi{background:var(--surface);border:1px solid var(--divider);border-radius:var(--r-card);padding:18px 20px;position:relative;overflow:hidden}
.kpi::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--accent);border-radius:var(--r-card) 0 0 var(--r-card)}
.kpi.kpi-good::before{background:var(--accent)}
.kpi.kpi-neutral::before{background:var(--accent-deep)}
.kpi.kpi-bad::before{background:var(--error)}
.kpi.kpi-muted::before{background:var(--p-sage)}
.kpi-label{font-size:.68rem;color:var(--text-muted);font-weight:700;text-transform:uppercase;letter-spacing:.08em}
.kpi-value{font-family:var(--font-display);font-size:1.85rem;font-weight:700;margin-top:6px;letter-spacing:-.02em;color:var(--text);line-height:1.05}
.kpi-sub{font-family:var(--font-ui);font-size:.78rem;font-weight:500;color:var(--text-muted);letter-spacing:0}
.kpi-delta-text{font-size:.74rem;color:var(--text-muted);margin-top:5px;letter-spacing:0}
.dashboard-kpi-strip{margin-top:-8px}

/* Two visually distinct sections on the dashboard:
 *   Performance (KPI sparklines)  |  Reporting tools (cards)
 */
.dash-section{display:flex;flex-direction:column;gap:14px}
.dash-section + .dash-section{
  margin-top:8px;padding-top:32px;border-top:1px dashed var(--divider);
}
.dash-section-head{display:flex;align-items:baseline;justify-content:space-between;gap:14px;flex-wrap:wrap;border-bottom:2px solid var(--accent);padding-bottom:8px}
.dash-section-head h3{font-family:var(--font-display);font-size:1.15rem;font-weight:700;letter-spacing:-.01em;color:var(--text)}
.dash-section-head h3 em{font-family:var(--font-serif);font-style:italic;font-weight:500;color:var(--accent-deep)}
.dash-section-sub{font-size:.8rem;color:var(--text-muted);max-width:520px;text-align:right}
/* Explicit missing-data copy for a section whose live read came back empty.
   Deliberately NOT styled as a tile, so it can't be mistaken for a value. */
.dash-section-empty{
  font-size:.9rem;color:var(--text-muted);line-height:1.5;max-width:640px;
  background:var(--surface);border:1px dashed var(--divider);
  border-radius:var(--r-card);padding:16px 18px;margin:0;
}

/* KPI tiles with inline sparklines (dashboard top strip) */
.kpi-spark-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px}
.kpi-spark-tile{
  background:var(--surface);border:1px solid var(--divider);border-radius:var(--r-card);
  padding:16px 18px 12px;display:flex;flex-direction:column;gap:8px;
  position:relative;overflow:hidden;
}
.kpi-spark-tile::before{
  content:"";position:absolute;left:0;top:0;bottom:0;width:3px;
  background:var(--accent);border-radius:var(--r-card) 0 0 var(--r-card);
}
.kpi-spark-meta{display:flex;flex-direction:column;gap:2px}
.kpi-spark-label{font-size:.66rem;color:var(--text-muted);font-weight:700;text-transform:uppercase;letter-spacing:.08em}
.kpi-spark-value{font-family:var(--font-display);font-size:1.6rem;font-weight:700;letter-spacing:-.02em;color:var(--text);line-height:1.05;margin-top:4px}
.kpi-spark-delta{font-size:.72rem;font-weight:600;color:var(--text-muted);letter-spacing:.01em}
.kpi-spark-delta.up{color:var(--accent-deep)}
.kpi-spark-delta.down{color:var(--error)}
.kpi-spark-svg{display:block;width:100%;height:36px;margin-top:6px}

/* ── Errors / empty states ───────────────────────────────────────────── */
.view-error,.empty-state{background:var(--surface);border:1px solid var(--divider);border-radius:var(--r-card);padding:36px 28px;text-align:center}
.view-error h2,.empty-state h3{font-family:var(--font-display);font-size:1.2rem;font-weight:700;margin-bottom:8px;color:var(--text)}
.view-error p,.empty-state p{color:var(--text-muted);font-size:.92rem}
.view-error{border-left:4px solid var(--error)}
.empty-state{border-left:4px solid var(--accent)}

/* ── SEO task list ───────────────────────────────────────────────────── */
.seo-category{background:var(--surface);border:1px solid var(--divider);border-radius:var(--r-card);padding:22px 26px;border-left:4px solid var(--accent)}
.seo-category-name{font-family:var(--font-display);font-size:1.05rem;font-weight:700;letter-spacing:-.005em;color:var(--text);margin-bottom:14px;display:flex;align-items:baseline;gap:10px;border-bottom:1px solid var(--divider);padding-bottom:10px}
.seo-category-name .muted{font-family:var(--font-ui);font-size:.75rem;font-weight:500;color:var(--text-muted);text-transform:uppercase;letter-spacing:.06em}
.task-list{list-style:none;padding:0;margin:0;counter-reset:task}
.task{counter-increment:task;display:grid;grid-template-columns:80px 1fr;gap:14px;align-items:start;padding:14px 0;border-bottom:1px dashed var(--divider)}
.task:last-child{border-bottom:none;padding-bottom:0}
.task:first-child{padding-top:6px}
.task-priority{font-family:var(--font-display);font-size:.66rem;font-weight:800;text-transform:uppercase;letter-spacing:.1em;padding:5px 0;border-radius:999px;text-align:center;background:var(--p-lightgray);color:var(--text-muted);border:1px solid var(--divider);height:max-content}
.task-priority.priority-high{background:#fde4df;color:var(--error);border-color:#f5b7b0}
.task-priority.priority-medium{background:var(--surface-warm);color:var(--accent-deep);border-color:#f0d6a8}
.task-priority.priority-low{background:#eef2ec;color:var(--p-sage);border-color:#d6dbd1}
.task-item{font-size:.96rem;color:var(--text);font-weight:600;line-height:1.4}
.task-meta{font-size:.78rem;color:var(--text-muted);margin-top:4px;letter-spacing:.01em}

/* ── SBA dashboard ───────────────────────────────────────────────────── */
.chart-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(360px,1fr));gap:14px}
.chart-card{background:var(--surface);border:1px solid var(--divider);border-radius:var(--r-card);padding:22px 24px;display:flex;flex-direction:column;gap:14px;min-height:340px}
.chart-card h3{font-family:var(--font-display);font-size:.95rem;font-weight:700;letter-spacing:-.005em;color:var(--text);border-bottom:2px solid var(--accent);padding-bottom:8px;display:inline-block;width:fit-content}
.chart-wrap{flex:1 1 auto;min-height:240px;max-height:280px;position:relative}
.chart-wrap canvas{max-height:280px}
.legend{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:6px;font-size:.84rem}
.legend li{display:grid;grid-template-columns:14px 1fr auto;align-items:center;gap:10px;padding:4px 0}
.legend-swatch{width:14px;height:14px;border-radius:3px;display:inline-block}
.legend-label{color:var(--text);font-weight:500}
.legend-value{color:var(--text-muted);font-family:var(--font-display);font-size:.78rem;font-variant-numeric:tabular-nums}

.table-card{background:var(--surface);border:1px solid var(--divider);border-radius:var(--r-card);padding:22px 26px}
.table-card h3{font-family:var(--font-display);font-size:.95rem;font-weight:700;letter-spacing:-.005em;color:var(--text);margin-bottom:14px;border-bottom:2px solid var(--accent);padding-bottom:8px;display:inline-block;width:fit-content}
.kw-table-wrap{overflow-x:auto}
.kw-table{width:100%;border-collapse:collapse;font-size:.88rem}
.kw-table th,.kw-table td{text-align:left;padding:10px 12px;border-bottom:1px solid var(--divider);vertical-align:middle}
.kw-table th{font-family:var(--font-display);font-weight:700;color:var(--text-muted);text-transform:uppercase;font-size:.68rem;letter-spacing:.08em;border-bottom:2px solid var(--text);background:transparent}
.kw-table th.num,.kw-table td.num{text-align:right;font-variant-numeric:tabular-nums;font-family:var(--font-display)}
.kw-table tr:hover td{background:var(--surface-warm)}
.intent-chip{display:inline-block;padding:3px 9px;border-radius:999px;font-size:.7rem;font-weight:700;font-family:var(--font-display);text-transform:uppercase;letter-spacing:.06em;border:1px solid var(--divider);background:var(--p-lightgray);color:var(--text-muted)}
.intent-chip.intent-informational{background:#eef2ec;color:var(--accent-deep);border-color:#cad3c2}
.intent-chip.intent-commercial{background:var(--accent);color:var(--p-dark);border-color:#c8db00}
.intent-chip.intent-transactional{background:var(--surface-warm);color:var(--accent-deep);border-color:#f0d6a8}
.intent-chip.intent-navigational{background:#eef0eb;color:var(--p-sage);border-color:#d4d8cf}

/* Severity chips (anomaly view) reuse the intent-chip shape */
.severity-chip{display:inline-block;padding:3px 9px;border-radius:999px;font-size:.7rem;font-weight:700;font-family:var(--font-display);text-transform:uppercase;letter-spacing:.06em;border:1px solid var(--divider);background:var(--p-lightgray);color:var(--text-muted)}
.severity-chip.severity-critical{background:#fde4df;color:var(--error);border-color:#f5b7b0}
.severity-chip.severity-high{background:var(--surface-warm);color:var(--accent-deep);border-color:#f0d6a8}
.severity-chip.severity-medium{background:#eef2ec;color:var(--p-sage);border-color:#d6dbd1}

.chart-wrap-tall{min-height:320px;max-height:420px}

/* ── Performance Dashboard (chat UI) ─────────────────────────────────── */
/* Page-flow scroll with sticky chrome — topbar, sidebar and input row
 * stay pinned, the thread between them scrolls with the page. This
 * plays nicely with trackpad / scroll-anchor behaviour, unlike the
 * previous flex-locked layout where the whole thread tried to scroll
 * inside a height-constrained shell.
 */
body.perf-page{background:var(--bg);min-height:100vh}
body.perf-page .topbar{position:sticky;top:0;z-index:20}
.perf-shell{display:grid;grid-template-columns:260px 1fr;max-width:1640px;margin:0 auto;width:100%;align-items:start}
@media (max-width:880px){.perf-shell{grid-template-columns:1fr}.perf-sidebar{display:none}}

.perf-sidebar{
  background:var(--surface);border-right:1px solid var(--divider);
  padding:18px 16px;display:flex;flex-direction:column;gap:14px;
  position:sticky;top:60px;align-self:start;
  max-height:calc(100vh - 60px);overflow-y:auto;
}
.perf-sidebar-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-bottom:8px;border-bottom:2px solid var(--accent)}
.perf-sidebar-head h3{font-family:var(--font-display);font-size:.78rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--text)}
.perf-new-btn{font-family:var(--font-display);font-size:.7rem;font-weight:700;letter-spacing:.02em;color:var(--accent-deep);background:var(--accent);border:none;padding:5px 9px;border-radius:var(--r);cursor:pointer}
.perf-new-btn:hover{background:#d8f000}
.perf-sidebar-note{font-size:.78rem;line-height:1.5;color:var(--text-muted);margin:0;padding:4px 2px}

/* Saved-chat sidebar list */
.chat-session-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:2px}
.chat-session-empty{padding:8px 4px;color:var(--text-muted);font-size:.78rem;font-style:italic}
.chat-session-item{
  position:relative;border-radius:var(--r);padding:0;
  transition:background .12s;display:flex;align-items:stretch;
}
.chat-session-item:hover{background:var(--bg)}
.chat-session-item.active{background:var(--surface-warm)}
.chat-session-pick{
  flex:1 1 auto;display:flex;flex-direction:column;gap:2px;
  background:none;border:none;padding:9px 32px 9px 11px;text-align:left;
  cursor:pointer;font:inherit;color:inherit;min-width:0;
}
.chat-session-title{
  font-size:.84rem;font-weight:600;color:var(--text);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.chat-session-time{font-size:.68rem;color:var(--text-muted);letter-spacing:.01em}
.chat-session-delete{
  position:absolute;right:6px;top:50%;transform:translateY(-50%);
  width:22px;height:22px;border:none;background:transparent;
  color:var(--text-muted);font-size:1.1rem;line-height:1;cursor:pointer;
  border-radius:var(--r);opacity:0;transition:opacity .12s,background .12s,color .12s;
}
.chat-session-item:hover .chat-session-delete,
.chat-session-item.active .chat-session-delete{opacity:.7}
.chat-session-delete:hover{opacity:1;background:var(--bg);color:var(--error)}

/* ── Performance overview (dashboard-first view) ─────────────────────── */
.perf-overview-shell{max-width:1640px;margin:0 auto;padding:28px 32px 60px;display:flex;flex-direction:column;gap:28px}
.perf-overview-page .perf-main-head h2{font-family:var(--font-display);font-size:1.55rem;font-weight:700;letter-spacing:-.015em;color:var(--text)}
.perf-overview-page .perf-main-head h2 em{font-family:var(--font-serif);font-style:italic;font-weight:500;color:var(--accent-deep)}
.perf-overview-page .perf-main-head p{color:var(--text-muted);font-size:.9rem;margin-top:4px}

/* Rich head: title + period tabs + compare + date chip on one row */
.perf-main-head-rich{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;flex-wrap:wrap}
.perf-main-head-title{flex:1 1 280px;min-width:0}
.perf-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.perf-period-tabs{
  display:inline-flex;gap:2px;background:var(--surface);
  border:1px solid var(--divider);border-radius:6px;padding:3px;
}
.perf-period-tab{
  font-family:var(--font-ui);font-size:.78rem;font-weight:600;letter-spacing:.02em;
  color:var(--text-muted);background:transparent;border:0;border-radius:4px;
  padding:6px 14px;cursor:pointer;transition:background .12s,color .12s;
}
.perf-period-tab:hover:not(:disabled):not(.active){color:var(--text)}
.perf-period-tab.active{background:var(--accent-deep);color:var(--p-offwhite)}
.perf-period-tab.active:hover{color:var(--p-offwhite)}
.perf-period-tab:disabled{cursor:not-allowed;opacity:.4}
.perf-period-custom-wrap{position:relative;display:inline-flex}
.perf-custom-pop{
  position:absolute;top:calc(100% + 6px);right:0;z-index:30;
  display:flex;flex-direction:column;gap:10px;
  background:var(--surface);
  border:1px solid var(--divider);border-radius:8px;
  padding:14px 14px 12px;min-width:280px;
  box-shadow:0 8px 24px rgba(0,0,0,.08);
}
.perf-custom-pop[hidden]{display:none}
.perf-custom-pop-row{display:flex;gap:10px}
.perf-custom-pop-field{display:flex;flex-direction:column;gap:4px;flex:1 1 0;min-width:0}
.perf-custom-pop-field span{
  font-size:.66rem;font-weight:700;text-transform:uppercase;letter-spacing:.08em;
  color:var(--text-muted);
}
.perf-custom-pop-field input[type=date]{
  font-family:var(--font-ui);font-size:.82rem;color:var(--text);
  background:var(--p-offwhite);border:1px solid var(--divider);border-radius:4px;
  padding:6px 8px;
}
.perf-custom-pop-field input[type=date]:focus{outline:2px solid var(--accent-deep);outline-offset:1px}
.perf-custom-pop-err{
  font-size:.74rem;color:var(--error);margin:0;line-height:1.35;
}
.perf-custom-pop-err[hidden]{display:none}
.perf-custom-pop-actions{display:flex;justify-content:flex-end;gap:8px}
.perf-custom-pop-cancel,.perf-custom-pop-apply{
  font-family:var(--font-ui);font-size:.78rem;font-weight:600;
  border-radius:4px;padding:6px 14px;cursor:pointer;border:1px solid var(--divider);
}
.perf-custom-pop-cancel{background:var(--surface);color:var(--text-muted)}
.perf-custom-pop-cancel:hover{color:var(--text)}
.perf-custom-pop-apply{background:var(--accent-deep);color:var(--p-offwhite);border-color:var(--accent-deep)}
.perf-custom-pop-apply:hover{opacity:.92}
.perf-custom-pop-apply:disabled{opacity:.55;cursor:wait}
.perf-compare{display:inline-flex;align-items:center;gap:6px}
.perf-compare-label{font-size:.72rem;font-weight:600;color:var(--text-muted);text-transform:uppercase;letter-spacing:.06em}
.perf-compare-select{
  font-family:var(--font-ui);font-size:.82rem;font-weight:500;color:var(--text);
  background:var(--surface);border:1px solid var(--divider);border-radius:4px;
  padding:6px 28px 6px 10px;cursor:pointer;
  appearance:none;-webkit-appearance:none;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><path d='M2 4l3 3 3-3' stroke='%23545050' stroke-width='1.5' fill='none' stroke-linecap='round'/></svg>");
  background-repeat:no-repeat;background-position:right 9px center;
}
.perf-compare-select:focus{outline:2px solid var(--accent-deep);outline-offset:1px}
.perf-date-chip{
  display:inline-flex;align-items:center;gap:8px;
  background:var(--surface);border:1px solid var(--divider);border-radius:4px;
  padding:5px 12px;white-space:nowrap;color:var(--text-muted);
}
.perf-date-chip-text{display:flex;flex-direction:column;line-height:1.25}
#perf-date-cur{font-size:.78rem;font-weight:600;color:var(--text);font-variant-numeric:tabular-nums}
#perf-date-cmp{font-size:.66rem;color:var(--text-muted);margin-top:1px;font-variant-numeric:tabular-nums}

/* Anomaly callout — sits above the KPIs */
.perf-anomaly-section{padding-top:2px}
.perf-anomaly-card{
  display:flex;align-items:flex-start;gap:18px;
  background:linear-gradient(180deg,#FFF8E6 0%, var(--surface) 100%);
  border:1px solid var(--divider);border-left:4px solid var(--accent);
  border-radius:var(--r-card);padding:18px 22px;
}
.perf-anomaly-card[data-severity="good"]{
  background:linear-gradient(180deg,#EEF5EB 0%, var(--surface) 100%);
  border-left-color:var(--accent-deep);
}
.perf-anomaly-card[data-severity="alert"]{
  background:linear-gradient(180deg,#FDECE7 0%, var(--surface) 100%);
  border-left-color:var(--error);
}
.perf-anomaly-card[data-severity="neutral"]{
  background:var(--surface);
  border-left-color:var(--divider);
}
.perf-anomaly-icon{
  flex:0 0 auto;display:flex;align-items:center;justify-content:center;
  width:36px;height:36px;border-radius:50%;
  background:var(--accent);color:var(--text);
  font-family:var(--font-display);font-size:1.15rem;font-weight:700;
  margin-top:2px;
}
.perf-anomaly-card[data-severity="good"] .perf-anomaly-icon{background:var(--accent-deep);color:var(--p-offwhite)}
.perf-anomaly-card[data-severity="alert"] .perf-anomaly-icon{background:var(--error);color:var(--p-offwhite)}
.perf-anomaly-card[data-severity="neutral"] .perf-anomaly-icon{background:var(--divider);color:var(--text)}
.perf-anomaly-body{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:4px}
.perf-anomaly-eyebrow{font-size:.66rem;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:var(--text-muted)}
.perf-anomaly-headline{font-family:var(--font-display);font-size:1.02rem;font-weight:700;color:var(--text);line-height:1.3;letter-spacing:-.005em}
.perf-anomaly-detail{font-size:.86rem;color:var(--text);line-height:1.5;max-width:780px}
.perf-anomaly-cta{
  flex:0 0 auto;align-self:flex-start;margin-top:4px;
  font-size:.78rem;font-weight:600;color:var(--accent-deep);
  white-space:nowrap;
}
.perf-anomaly-cta:hover{text-decoration:underline}

/* Hero KPI — the "north-star" card above the regular KPI row */
.perf-kpi-hero{
  position:relative;overflow:hidden;
  display:grid;grid-template-columns:1fr minmax(180px,360px);gap:24px;align-items:center;
  background:var(--surface);
  border:1px solid var(--divider);border-radius:var(--r-card);
  padding:22px 26px;
}
.perf-kpi-hero::before{
  content:"";position:absolute;left:0;top:0;bottom:0;width:5px;background:var(--accent);
}
.perf-kpi-hero-left{display:flex;flex-direction:column;gap:4px;min-width:0}
.perf-kpi-hero-eyebrow{
  font-size:.66rem;font-weight:700;text-transform:uppercase;letter-spacing:.1em;
  color:var(--accent-deep);
}
.perf-kpi-hero-label{
  font-size:.78rem;font-weight:600;color:var(--text-muted);
  text-transform:uppercase;letter-spacing:.08em;margin-top:2px;
}
.perf-kpi-hero-value{
  font-family:var(--font-display);font-size:2.6rem;font-weight:700;
  letter-spacing:-.025em;color:var(--text);line-height:1;margin-top:4px;
}
.perf-kpi-hero-delta{
  display:inline-flex;align-items:center;gap:6px;
  font-size:.92rem;font-weight:600;
  margin-top:8px;
  padding:4px 10px;border-radius:999px;
  width:fit-content;
}
.perf-kpi-hero-delta.up{color:var(--accent-deep);background:#EAF1E5}
.perf-kpi-hero-delta.down{color:var(--error);background:#FDECE7}
.perf-kpi-hero-delta-sub{font-size:.72rem;font-weight:500;color:var(--text-muted);margin-left:4px}
.perf-kpi-hero-spark{display:block;width:100%;height:64px}
@media (max-width:720px){
  .perf-kpi-hero{grid-template-columns:1fr}
  .perf-kpi-hero-value{font-size:2.1rem}
}

.perf-kpi-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:14px}
.perf-kpi-card{
  background:var(--surface);border:1px solid var(--divider);border-radius:var(--r-card);
  padding:16px 18px 12px;display:flex;flex-direction:column;gap:6px;
  position:relative;overflow:hidden;
}
.perf-kpi-card::before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--accent)}
.perf-kpi-card-label{font-size:.66rem;color:var(--text-muted);font-weight:700;text-transform:uppercase;letter-spacing:.08em}
.perf-kpi-card-value{font-family:var(--font-display);font-size:1.55rem;font-weight:700;letter-spacing:-.02em;color:var(--text);line-height:1.05;margin-top:2px}
.perf-kpi-card-delta{font-size:.74rem;font-weight:600;color:var(--text-muted)}
.perf-kpi-card-delta.up{color:var(--accent-deep)}
.perf-kpi-card-delta.down{color:var(--error)}
.perf-kpi-card-spark{display:block;width:100%;height:34px;margin-top:4px}

/* Δ column in the channels table */
.perf-delta{font-variant-numeric:tabular-nums;font-weight:600;white-space:nowrap}
.perf-delta-up{color:var(--accent-deep)}
.perf-delta-down{color:var(--error)}
.perf-delta-flat{color:var(--text-muted)}
.perf-delta-pct{margin-left:6px;font-size:.78em;font-weight:500;opacity:.7}

/* Embedded chat card inside the overview page */
.perf-overview-chat-section{margin-top:8px}
.perf-chat-embed{
  display:grid;grid-template-columns:240px 1fr;gap:0;
  background:var(--surface);border:1px solid var(--divider);border-radius:var(--r-card);
  overflow:hidden;min-height:520px;
}
@media (max-width:880px){.perf-chat-embed{grid-template-columns:1fr}.perf-chat-embed-sidebar{display:none}}
.perf-chat-embed-sidebar{
  background:var(--bg);border-right:1px solid var(--divider);
  padding:16px 14px;display:flex;flex-direction:column;gap:12px;
  max-height:600px;overflow-y:auto;
}
.perf-chat-embed-sidebar .perf-sidebar-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-bottom:6px;border-bottom:2px solid var(--accent)}
.perf-chat-embed-sidebar h4{font-family:var(--font-display);font-size:.74rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--text)}
.perf-chat-embed-main{
  display:flex;flex-direction:column;padding:18px 22px 14px;gap:12px;min-width:0;
  min-height:520px;
}
.perf-chat-embed-main .perf-thread{padding-bottom:8px}
.perf-chat-embed-main .perf-input-row{
  position:static;bottom:auto;z-index:auto;
  box-shadow:none;border:1px solid var(--divider);background:var(--bg);
}

.perf-main{display:flex;flex-direction:column;padding:24px 28px 28px;gap:16px;min-width:0}
.perf-main-head h2{font-family:var(--font-display);font-size:1.4rem;font-weight:700;letter-spacing:-.015em;color:var(--text)}
.perf-main-head h2 em{font-family:var(--font-serif);font-style:italic;font-weight:500;color:var(--accent-deep)}
.perf-main-head p{color:var(--text-muted);font-size:.88rem;margin-top:2px}

/* Date-range picker — Looker-Studio-style preset buttons. */
.perf-range-picker{
  display:inline-flex;flex-wrap:wrap;gap:0;margin-top:14px;
  border:1px solid var(--divider);border-radius:999px;overflow:hidden;
  background:var(--surface);
}
.perf-range-btn{
  font-family:var(--font-display);font-size:.78rem;font-weight:600;
  letter-spacing:.01em;color:var(--text-muted);
  padding:7px 14px;background:var(--surface);
  border:none;border-right:1px solid var(--divider);
  cursor:pointer;text-decoration:none;
  transition:background .12s,color .12s;
}
.perf-range-btn:last-child{border-right:none}
.perf-range-btn:hover{background:var(--surface-warm);color:var(--accent-deep);text-decoration:none}
.perf-range-btn.active{
  background:var(--accent-deep);color:var(--p-offwhite);
}
.perf-range-btn.active:hover{background:var(--p-dark);color:var(--p-offwhite)}

/* Share of Search — table accents + tiny row-sparklines. */
.kw-focal td{background:var(--surface-warm);font-weight:600}
.kw-focal:hover td{background:var(--surface-warm)}
.row-spark{display:block;width:120px;height:24px}

/* Custom Reports — Drive folder file grid. */
.cr-grid{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px;
}
.cr-card{
  display:flex;flex-direction:column;gap:10px;
  background:var(--surface);border:1px solid var(--divider);border-radius:var(--r-card);
  padding:16px 18px;min-height:120px;
  color:inherit;text-decoration:none;
  transition:border-color .15s,transform .08s,box-shadow .15s;
}
.cr-card:hover{
  border-color:var(--accent-deep);transform:translateY(-1px);
  box-shadow:0 6px 18px rgba(15,15,14,.06);text-decoration:none;
}
.cr-card-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.cr-mime{
  font-family:var(--font-display);font-size:.62rem;font-weight:800;
  letter-spacing:.1em;text-transform:uppercase;
  background:var(--accent);color:var(--p-dark);
  padding:3px 8px;border-radius:999px;
}
.cr-modified{font-size:.72rem;color:var(--text-muted)}
.cr-name{
  font-family:var(--font-display);font-size:.98rem;font-weight:700;
  letter-spacing:-.005em;color:var(--text);line-height:1.3;flex:1;
  word-break:break-word;
}
.cr-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:auto}
.cr-owner{font-size:.74rem;color:var(--text-muted)}
.cr-action{
  font-family:var(--font-display);font-size:.72rem;font-weight:700;
  letter-spacing:.06em;text-transform:uppercase;color:var(--accent-deep);
  display:inline-flex;align-items:center;gap:4px;
}
.cr-card:hover .cr-action .fc-arrow{transform:translateX(3px)}
.cr-more-hint{margin-top:14px;font-size:.84rem;text-align:center}
.cr-card-folder{background:var(--surface-warm)}
.cr-card-folder:hover{background:var(--surface)}
.cr-mime-folder{background:var(--p-dark);color:var(--p-offwhite)}
.cr-breadcrumbs{
  display:flex;flex-wrap:wrap;align-items:center;gap:6px;
  margin:-8px 0 18px;font-size:.84rem;color:var(--text-muted);
}
.cr-crumb{color:var(--accent-deep);text-decoration:none}
.cr-crumb:hover{text-decoration:underline}
.cr-crumb-current{color:var(--text);font-weight:600}
.cr-crumb-sep{color:var(--text-muted);user-select:none}

.perf-thread{display:flex;flex-direction:column;gap:18px;padding-bottom:80px}
.perf-empty{margin:24px auto;text-align:center;max-width:560px;color:var(--text-muted);font-size:.92rem}
.perf-empty p{margin-bottom:14px}
.perf-starters{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
.perf-starter{font-family:var(--font-ui);font-size:.82rem;font-weight:500;color:var(--text);background:var(--surface);border:1px solid var(--divider);padding:8px 13px;border-radius:999px;cursor:pointer;transition:border-color .12s,background .12s}
.perf-starter:hover{border-color:var(--accent-deep);background:var(--surface-warm)}

.perf-turn{display:flex;flex-direction:column;gap:8px}
.perf-bubble{padding:14px 18px;border-radius:14px;max-width:100%}
.perf-bubble-user{align-self:flex-end;background:var(--accent);color:var(--p-dark);font-size:.92rem;font-weight:500;max-width:80%;border-bottom-right-radius:4px}
.perf-bubble-bot{align-self:flex-start;background:var(--surface);border:1px solid var(--divider);color:var(--text);font-size:.92rem;width:100%;border-bottom-left-radius:4px}
.perf-summary{margin:0 0 12px;line-height:1.55}
.perf-summary:last-child{margin-bottom:0}
.perf-chart-card{margin-top:8px;background:var(--bg);border:1px solid var(--divider);border-radius:var(--r-card);padding:16px 18px;display:flex;flex-direction:column;gap:10px}
.perf-chart-head h4{font-family:var(--font-display);font-size:.95rem;font-weight:700;letter-spacing:-.005em;color:var(--text);border-bottom:2px solid var(--accent);padding-bottom:5px;display:inline-block;width:fit-content}
.perf-chart-wrap{position:relative;min-height:280px;max-height:340px}
.perf-chart-wrap canvas{max-height:340px}

.perf-kpi-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}
.perf-kpi-tile{background:var(--surface);border:1px solid var(--divider);border-radius:var(--r-card);padding:14px 16px;position:relative;overflow:hidden}
.perf-kpi-tile::before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--accent)}
.perf-kpi-label{font-size:.66rem;color:var(--text-muted);font-weight:700;text-transform:uppercase;letter-spacing:.08em}
.perf-kpi-value{font-family:var(--font-display);font-size:1.5rem;font-weight:700;letter-spacing:-.02em;color:var(--text);margin-top:4px;line-height:1.05}
.perf-kpi-delta{font-size:.72rem;color:var(--text-muted);margin-top:3px}

.perf-typing{display:inline-flex;gap:5px;padding:4px 2px}
.perf-typing span{
  width:7px;height:7px;border-radius:50%;background:var(--text-muted);opacity:.6;
  animation:perf-typing-bounce 1.2s infinite ease-in-out;
}
.perf-typing span:nth-child(2){animation-delay:.15s}
.perf-typing span:nth-child(3){animation-delay:.3s}
@keyframes perf-typing-bounce{
  0%,80%,100%{transform:translateY(0);opacity:.4}
  40%{transform:translateY(-4px);opacity:1}
}

.perf-input-row{
  position:sticky;bottom:16px;z-index:15;
  display:flex;gap:10px;align-items:center;
  background:var(--surface);border:1px solid var(--divider);
  border-radius:999px;padding:6px 6px 6px 8px;
  box-shadow:0 6px 18px rgba(15,15,14,.08);
}
.perf-input-row input{
  flex:1 1 auto;padding:11px 14px;border:none;border-radius:999px;outline:none;
  background:transparent;font-size:.92rem;color:var(--text);
}
.perf-input-row input::placeholder{color:var(--text-muted)}
.perf-input-row button{
  padding:11px 22px;border-radius:999px;background:var(--accent-deep);color:var(--p-offwhite);
  font-weight:600;border:none;cursor:pointer;font-size:.88rem;transition:background .15s;
}
.perf-input-row button:hover{background:var(--p-dark)}
.perf-input-row button:disabled{opacity:.5;cursor:wait}

/* ── Admin directory ─────────────────────────────────────────────────── */
.client-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:14px}
.client-card{
  background:var(--surface);border:1px solid var(--divider);border-radius:var(--r-card);
  padding:20px 22px;display:flex;flex-direction:column;justify-content:space-between;
  gap:18px;min-height:140px;position:relative;overflow:hidden;
  color:inherit;text-decoration:none;
  transition:border-color .15s,transform .08s,box-shadow .15s;
}
.client-card::before{
  content:"";position:absolute;left:0;top:0;bottom:0;width:4px;
  background:var(--client-accent);border-radius:var(--r-card) 0 0 var(--r-card);
}
.client-card:hover{
  border-color:var(--accent-deep);transform:translateY(-1px);
  box-shadow:0 6px 18px rgba(15,15,14,.06);text-decoration:none;
}
/* Namespaced `ccard-`, not `cc-`: the concierge widget further down owns the
   `cc-` prefix and its unqualified `.cc-head` was overriding this one, painting
   every client card's header dark green under equally dark name text. */
.client-card:hover .ccard-arrow{transform:translateX(3px)}
.ccard-head{display:flex;align-items:center;gap:12px;min-width:0}
.ccard-logo{height:32px;width:auto;flex-shrink:0}
.ccard-initial{
  flex-shrink:0;width:36px;height:36px;border-radius:var(--r);
  background:var(--surface-warm);color:var(--accent-deep);
  display:inline-flex;align-items:center;justify-content:center;
  font-family:var(--font-display);font-weight:700;font-size:1rem;
}
.ccard-name{
  font-family:var(--font-display);font-size:1.05rem;font-weight:700;
  letter-spacing:-.005em;color:var(--text);line-height:1.25;
  /* Wrap to two lines rather than ellipsing: the full client name is the
     whole point of the card, and names like "Rajala Pro Shop" don't fit one. */
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;
  overflow:hidden;overflow-wrap:anywhere;
}
.ccard-meta{display:flex;align-items:center;justify-content:space-between;gap:8px}
.ccard-count{font-size:.78rem;color:var(--text-muted);font-weight:500}
.ccard-arrow{font-family:var(--font-display);color:var(--accent-deep);font-weight:700;transition:transform .12s}

/* ── Ad library native view ──────────────────────────────────────────── */
.kpi .kpi-link a{font-family:var(--font-display);font-size:1.25rem;font-weight:700;color:var(--accent-deep);text-decoration:none;letter-spacing:-.005em}
.kpi .kpi-link a:hover{text-decoration:underline}

.adlib-brand-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px}
.adlib-brand-card{
  background:var(--surface);border:1px solid var(--divider);border-radius:var(--r-card);
  padding:20px 22px;position:relative;overflow:hidden;
  display:flex;flex-direction:column;gap:14px;
}
.adlib-brand-card::before{
  content:"";position:absolute;left:0;top:0;bottom:0;width:5px;
  background:var(--client-accent);border-radius:var(--r-card) 0 0 var(--r-card);
}
.adlib-brand-card.focal{border-color:var(--accent-deep);border-width:2px}
.ab-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.ab-name{font-family:var(--font-display);font-size:1.05rem;font-weight:700;letter-spacing:-.005em;color:var(--text)}
.ab-tag{font-family:var(--font-display);font-size:.6rem;font-weight:800;letter-spacing:.12em;color:var(--accent-deep);background:var(--accent);padding:3px 7px;border-radius:999px}
.ab-row{display:flex;gap:24px}
.ab-stat{display:flex;flex-direction:column;gap:2px}
.ab-stat-value{font-family:var(--font-display);font-size:1.5rem;font-weight:700;letter-spacing:-.02em;color:var(--text);line-height:1.05}
.ab-stat-label{font-size:.66rem;color:var(--text-muted);font-weight:700;text-transform:uppercase;letter-spacing:.08em}

.brand-dot{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:8px;vertical-align:middle;outline:1.5px solid var(--text);outline-offset:1px}
.creative-cell{max-width:520px;line-height:1.45;color:var(--text-muted);white-space:normal}

.view-deep-link{text-align:center;margin-top:8px;font-size:.92rem}
.view-deep-link a{font-family:var(--font-display);font-weight:700;color:var(--accent-deep);text-decoration:none;letter-spacing:.005em}
.view-deep-link a:hover{text-decoration:underline}
.view-deep-link .muted{display:inline-block;margin-top:6px}

/* ── Portal Concierge (cc-*) ─────────────────────────────────────────── */
.cc-fab{
  position:fixed;right:24px;bottom:24px;z-index:9000;
  display:flex;align-items:center;gap:8px;
  padding:12px 18px 12px 14px;
  background:var(--accent-deep);color:var(--p-offwhite);
  border-radius:999px;
  box-shadow:0 6px 20px rgba(15,15,14,.22), 0 2px 6px rgba(15,15,14,.14);
  font-family:var(--font-display);font-weight:700;font-size:.95rem;letter-spacing:.005em;
  cursor:pointer;
  transition:transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.cc-fab:hover{transform:translateY(-1px);box-shadow:0 8px 26px rgba(15,15,14,.28), 0 2px 6px rgba(15,15,14,.16);background:var(--p-dark)}
.cc-fab:active{transform:translateY(0)}
.cc-fab svg{stroke:var(--accent)}
.cc-fab-label{display:inline-block}
body.cc-open .cc-fab{opacity:0;pointer-events:none;transform:scale(.9)}

.cc-panel[hidden],
.cc-sessions[hidden]{display:none !important}

.cc-panel{
  position:fixed;right:24px;bottom:24px;z-index:9001;
  width:min(420px, calc(100vw - 32px));
  height:min(640px, calc(100vh - 48px));
  background:var(--surface);
  border-radius:var(--r-card);
  box-shadow:0 20px 60px rgba(15,15,14,.32), 0 6px 18px rgba(15,15,14,.18);
  display:flex;flex-direction:column;
  border:1px solid var(--divider);
  overflow:hidden;
  animation:cc-slide-up .18s ease-out;
}
@keyframes cc-slide-up{
  from{transform:translateY(12px);opacity:0}
  to{transform:translateY(0);opacity:1}
}
.cc-head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:10px;
  /* min-width:0 was previously inherited from the client-card `.cc-head` rule
     that this widget was unintentionally sharing; kept explicit so the header's
     computed style is unchanged now that the two are separate namespaces. */
  padding:14px 16px;min-width:0;
  background:var(--accent-deep);color:var(--p-offwhite);
  border-bottom:1px solid rgba(15,15,14,.14);
}
.cc-head-titles{display:flex;flex-direction:column;gap:2px;min-width:0}
.cc-head-eyebrow{
  font-family:var(--font-display);font-size:.62rem;font-weight:700;
  letter-spacing:.14em;text-transform:uppercase;color:var(--accent);
}
.cc-head h3{
  font-family:var(--font-display);font-size:1.05rem;font-weight:700;letter-spacing:-.01em;
  color:var(--p-offwhite);line-height:1.2;
}
.cc-head-actions{display:flex;align-items:center;gap:2px}
.cc-icon-btn{
  display:inline-flex;align-items:center;justify-content:center;
  width:30px;height:30px;border-radius:var(--r);
  color:rgba(253,255,229,.85);
  transition:background .12s, color .12s;
}
.cc-icon-btn:hover{background:rgba(253,255,229,.12);color:var(--accent)}

.cc-sessions{
  list-style:none;margin:0;padding:6px 8px;
  background:var(--surface-warm);border-bottom:1px solid var(--divider);
  max-height:200px;overflow-y:auto;
}
.cc-sessions-empty{color:var(--text-muted);font-size:.82rem;padding:10px 8px}
.cc-session-item{
  display:flex;align-items:center;gap:4px;
  padding:2px 4px;border-radius:var(--r);
}
.cc-session-item.active{background:rgba(37,53,25,.08)}
.cc-session-pick{
  flex:1;display:flex;flex-direction:column;gap:2px;
  text-align:left;padding:8px 10px;border-radius:var(--r);
  font-family:var(--font-ui);color:var(--text);
  transition:background .12s;
}
.cc-session-pick:hover{background:rgba(37,53,25,.06)}
.cc-session-title{font-size:.86rem;font-weight:600;line-height:1.25;
  display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}
.cc-session-time{font-size:.7rem;color:var(--text-muted)}
.cc-session-del{
  width:24px;height:24px;border-radius:var(--r);font-size:1.05rem;line-height:1;
  color:var(--text-muted);
}
.cc-session-del:hover{color:var(--error);background:rgba(216,47,21,.08)}

.cc-thread{
  flex:1;overflow-y:auto;padding:16px;
  display:flex;flex-direction:column;gap:14px;
  background:var(--bg);
}
.cc-empty{display:flex;flex-direction:column;gap:14px;color:var(--text-muted)}
.cc-intro{font-size:.92rem;line-height:1.5;color:var(--text)}
.cc-starters{display:flex;flex-direction:column;gap:6px;align-items:flex-start}
.cc-starter{
  font-size:.85rem;color:var(--accent-deep);
  background:var(--surface);border:1px solid var(--divider);
  padding:8px 12px;border-radius:999px;
  text-align:left;line-height:1.3;
  transition:border-color .12s, background .12s, color .12s;
}
.cc-starter:hover{border-color:var(--accent-deep);background:var(--accent-deep);color:var(--accent)}

.cc-turn{display:flex;flex-direction:column;gap:6px}
.cc-bubble{
  max-width:88%;padding:10px 13px;border-radius:14px;
  font-size:.9rem;line-height:1.45;
  word-wrap:break-word;overflow-wrap:break-word;
}
.cc-bubble-user{
  align-self:flex-end;
  background:var(--accent-deep);color:var(--p-offwhite);
  border-bottom-right-radius:4px;
}
.cc-bubble-bot{
  align-self:flex-start;
  background:var(--surface);color:var(--text);
  border:1px solid var(--divider);
  border-bottom-left-radius:4px;
}
.cc-link{color:var(--accent-deep);font-weight:600;text-decoration:underline}
.cc-link:hover{color:var(--p-dark)}
.cc-link-chip{
  display:inline-block;margin-top:8px;
  font-family:var(--font-display);font-size:.78rem;font-weight:700;letter-spacing:.01em;
  padding:6px 12px;border-radius:999px;
  background:var(--accent);color:var(--accent-deep);
  text-decoration:none;
}
.cc-link-chip:hover{background:var(--accent-deep);color:var(--accent);text-decoration:none}

/* Slow-answer progress line, under the typing dots */
.cc-progress{
  align-self:flex-start;max-width:88%;
  font-size:.78rem;line-height:1.4;color:var(--text-muted);
  padding:0 4px;
}
/* Failed turn: same bubble, muted warning edge, with a resend button */
.cc-bubble-error{border-color:var(--text-muted)}
.cc-error-text{margin:0}
.cc-retry{
  display:inline-block;margin-top:8px;cursor:pointer;
  font-family:var(--font-display);font-size:.78rem;font-weight:700;letter-spacing:.01em;
  padding:6px 12px;border-radius:999px;border:0;
  background:var(--accent);color:var(--accent-deep);
}
.cc-retry:hover{background:var(--accent-deep);color:var(--accent)}

/* Typing dots animation */
.cc-typing{display:inline-flex;align-items:center;gap:4px;padding:14px 14px}
.cc-typing span{
  display:inline-block;width:6px;height:6px;border-radius:50%;
  background:var(--text-muted);opacity:.55;
  animation:cc-dot 1.1s infinite ease-in-out;
}
.cc-typing span:nth-child(2){animation-delay:.18s}
.cc-typing span:nth-child(3){animation-delay:.36s}
@keyframes cc-dot{
  0%,80%,100%{transform:translateY(0);opacity:.45}
  40%{transform:translateY(-3px);opacity:1}
}

.cc-form{
  display:flex;align-items:center;gap:8px;
  padding:10px 12px;border-top:1px solid var(--divider);
  background:var(--surface);
}
.cc-form input{
  flex:1;padding:10px 12px;
  border:1px solid var(--divider);border-radius:999px;
  background:var(--bg);font-size:.9rem;outline:none;
  transition:border-color .12s;
}
.cc-form input:focus{border-color:var(--accent-deep)}
.cc-send{
  width:38px;height:38px;border-radius:50%;
  background:var(--accent-deep);color:var(--accent);
  display:inline-flex;align-items:center;justify-content:center;
  transition:background .12s, transform .05s;
}
.cc-send:hover:not(:disabled){background:var(--p-dark)}
.cc-send:active:not(:disabled){transform:translateY(1px)}
.cc-send:disabled{opacity:.6;cursor:not-allowed}

@media (max-width:520px){
  .cc-panel{right:8px;left:8px;bottom:8px;width:auto;height:min(78vh, 620px)}
  .cc-fab{right:14px;bottom:14px}
}

/* ─────────────────────────────────────────────────────────────────────── */
/* 7-tab Performance Dashboard — Funnel-equivalent layout                  */
/* Tabs: Overview / Campaigns / Products / Brands / Categories /          */
/* Behavior / Creative. All elements use the Bluebird palette only.        */
/* ─────────────────────────────────────────────────────────────────────── */

.perf-dashboard-page{background:var(--bg)}
.dash-empty{max-width:600px;margin:80px auto;text-align:center;padding:32px}
.dash-empty h2{font-family:var(--font-display);font-size:1.5rem}
.dash-empty h2 em{font-family:var(--font-serif);font-style:italic;color:var(--accent-deep)}

/* Tab nav */
.dash-tabnav{position:sticky;top:53px;z-index:19;display:flex;gap:2px;padding:0 32px;background:var(--surface);border-bottom:1px solid var(--divider);overflow-x:auto}
.dash-tab{padding:14px 18px;font-family:var(--font-display);font-weight:600;font-size:.85rem;color:var(--text-muted);border:none;background:none;cursor:pointer;border-bottom:3px solid transparent;white-space:nowrap;transition:color .15s}
.dash-tab:hover{color:var(--text)}
.dash-tab.active{color:var(--accent-deep);border-bottom-color:var(--accent-deep)}
.dash-tab-icon{display:inline-block;margin-right:6px;opacity:.7}

/* Filter bar */
.dash-filterbar{position:sticky;top:107px;z-index:18;display:flex;gap:14px;align-items:center;flex-wrap:wrap;padding:14px 32px;background:var(--surface);border-bottom:1px solid var(--divider)}
.dash-filter-group{display:flex;gap:6px;align-items:center}
.dash-filter-label{font-size:.72rem;font-weight:600;color:var(--text-muted);letter-spacing:.05em;text-transform:uppercase}
.dash-period-tabs{display:flex;gap:0;border:1px solid var(--divider);border-radius:var(--r);overflow:hidden}
.dash-period-tab{padding:6px 12px;background:var(--surface);border:none;font-family:var(--font-display);font-weight:600;font-size:.78rem;color:var(--text-muted);cursor:pointer}
.dash-period-tab.active{background:var(--accent-deep);color:var(--p-offwhite)}
.dash-filter-select{padding:6px 28px 6px 10px;border:1px solid var(--divider);border-radius:var(--r);background:var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23545050' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center;font-family:var(--font-ui);font-size:.82rem;color:var(--text);appearance:none;cursor:pointer;min-width:140px}
/* Per-section creative sort dropdown (Creative tab headers) — groups with the
   sub-label on the right of the section header. */
.dash-sort-select{min-width:122px;font-size:.78rem;align-self:center;padding-top:4px;padding-bottom:4px}
#dash-creative-meta-section .dash-section-sub,#dash-google-creative-section .dash-section-sub,#dash-pmax-section .dash-section-sub{margin-left:auto}
.dash-date-chip{display:flex;align-items:center;gap:8px;padding:6px 12px;background:var(--surface-warm);border-radius:var(--r);font-size:.78rem;color:var(--accent-deep);font-weight:500}

/* Shell */
.perf-dashboard-shell{max-width:1640px;margin:0 auto;padding:24px 32px 60px;display:flex;flex-direction:column;gap:24px}
.dash-panel{display:none;flex-direction:column;gap:24px}
.dash-panel.active{display:flex}

/* Section heads */
.dash-section{display:flex;flex-direction:column;gap:14px}
.dash-section-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap}
.dash-section-head h3{font-family:var(--font-display);font-size:1.05rem;font-weight:700;letter-spacing:-.01em;color:var(--text)}
.dash-section-head h3 em{font-family:var(--font-serif);font-style:italic;color:var(--accent-deep);font-weight:500}
.dash-section-sub{color:var(--text-muted);font-size:.82rem}

/* Card */
.dash-card{background:var(--surface);border-radius:var(--r-card);border:1px solid var(--divider);padding:18px 22px}
.dash-card-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;flex-wrap:wrap;gap:10px}
.dash-card-title{font-family:var(--font-display);font-size:.95rem;font-weight:700;color:var(--text)}

/* Hero strip (Kuvio 13-cell) */
.dash-hero-strip{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:1px;background:var(--divider);border-radius:var(--r-card);overflow:hidden;border:1px solid var(--divider)}
.dash-hero-cell{padding:14px 16px;background:var(--surface);display:flex;flex-direction:column;gap:6px}
.dash-hero-label{font-family:var(--font-display);font-size:.68rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--text-muted)}
.dash-hero-value{font-family:var(--font-display);font-size:1.35rem;font-weight:700;letter-spacing:-.02em;color:var(--text)}
.dash-hero-delta{display:flex;gap:8px;font-size:.72rem;align-items:baseline}
.dash-hero-delta .label{color:var(--text-muted);font-weight:600;letter-spacing:.04em}
.dash-hero-delta .up{color:#1b6e1b}
.dash-hero-delta .down{color:#c44}
.dash-hero-delta .flat{color:var(--text-muted)}
/* Hero KPI help bubbles — every hero tile's label carries a "?" explaining that
   KPI in one line. This replaced per-tile footnote paragraphs, which stretched a
   strip's row to ~2x height as soon as one wrapped.

   `.dash-tip` is the trigger; the bubble is ONE shared node parked on <body> and
   positioned by JS (perf_dashboard.js), NOT a ::before on the trigger. That is
   forced by `.dash-hero-strip{overflow:hidden}` above, which is load-bearing —
   it produces the hairline dividers (1px gap over a divider-coloured strip) and
   rounds the strip's corners — and would clip any bubble drawn inside a tile. A
   position:fixed node outside the strip escapes the clip without touching the
   strip's look. The visual style deliberately mirrors `.info-tip`
   (ad_library_view.css, the Ad Library board) so the two read as one affordance;
   it lives here rather than there because that stylesheet is loaded only by
   view_ad_library.html. */
.dash-tip{
  display:inline-flex;align-items:center;justify-content:center;
  width:15px;height:15px;padding:0;border:0;border-radius:50%;
  background:var(--divider);color:var(--text-muted);
  font-family:var(--font-display);font-size:.62rem;font-weight:800;line-height:1;
  margin-left:5px;vertical-align:middle;cursor:help;user-select:none;
  flex:0 0 auto;transition:background .12s,color .12s;
}
.dash-tip:hover,.dash-tip:focus-visible,.dash-tip[data-open="1"]{
  background:var(--accent-deep);color:var(--p-offwhite);outline:none;
}
/* `.dash-featured` big cells paint on --accent-deep, where the default grey-on-
   grey trigger is almost invisible and its accent-deep hover state disappears
   into the tile entirely — so the chip inverts to light-on-dark here.
   A LIGHT chip with a dark glyph, not the reverse: a translucent light-glyph
   chip lands near 3.3:1 on the white-label `neutral` palette (--accent-deep
   #3F5A78), under AA for a ~10px glyph. Measured, per the palette block's own
   rule at the top of this file — recompute if you touch these:
     noa      #253519 → glyph 9.93:1, chip vs tile 9.93:1
     neutral  #3F5A78 → glyph 5.69:1, chip vs tile 5.69:1 */
.dash-hero-big-cell.dash-featured .dash-tip{
  background:rgba(255,255,255,.85);color:var(--accent-deep);
}
.dash-hero-big-cell.dash-featured .dash-tip:hover,
.dash-hero-big-cell.dash-featured .dash-tip:focus-visible,
.dash-hero-big-cell.dash-featured .dash-tip[data-open="1"]{
  background:#fff;color:var(--accent-deep);box-shadow:0 0 0 2px rgba(255,255,255,.35);
}
.dash-tip-bubble{
  position:fixed;top:0;left:0;z-index:200;
  width:max-content;max-width:300px;
  background:var(--p-dark);color:var(--p-offwhite);
  font-family:var(--font-ui);font-size:.76rem;font-weight:500;
  line-height:1.45;letter-spacing:.005em;text-align:left;text-transform:none;
  padding:10px 12px;border-radius:var(--r);
  box-shadow:0 4px 14px rgba(0,0,0,.22);
  pointer-events:none;opacity:0;visibility:hidden;
  transition:opacity .12s,visibility .12s;
}
.dash-tip-bubble[data-open="1"]{opacity:1;visibility:visible}
/* Arrow. `--tip-arrow` is the trigger's centre in bubble-local px, set by JS, so
   it keeps pointing at the "?" even when the bubble is clamped to a screen edge. */
.dash-tip-bubble::after{
  content:"";position:absolute;left:var(--tip-arrow,50%);transform:translateX(-50%);
  border:5px solid transparent;
}
.dash-tip-bubble[data-place="below"]::after{bottom:100%;border-bottom-color:var(--p-dark)}
.dash-tip-bubble[data-place="above"]::after{top:100%;border-top-color:var(--p-dark)}

/* Data-quality panel (attribution gap) ─────────────────────────────────────
   A hero ratio whose denominator was zero renders "—". This panel says WHY, in
   the open: spend was recorded and nothing was attributed against it, which
   almost always means a third-party feed stopped delivering rather than that
   performance was zero. Written by renderDqBanner (perf_dashboard.js) from the
   hero payload's `attribution_gap`; `hidden` in the template, so a healthy
   window costs one empty div and no layout.

   MUST come after the `.dash-tip` block above: `.dash-hero-warn` shares that
   class for its geometry and the shared tooltip bubble, and only repaints it —
   same specificity, so source order is what makes the amber win.

   Amber literals, not palette tokens, on purpose. Both shipped palettes drive
   --accent-* / --surface-warm to a BRAND colour (noa lime, neutral blue), and a
   brand-coloured warning reads as decoration. Contrast measured on #fff9ec:
   title #6b4600 → 8.00:1, body #7a5200 → 6.60:1; the chip's white glyph on
   #9a6600 → 4.91:1, on the #6b4600 hover → 8.40:1. All AA or better at these
   sizes. Recompute if you touch any of them. */
.dash-dq-banner{
  display:flex;align-items:flex-start;gap:14px;
  padding:14px 18px;margin-bottom:12px;
  border-radius:var(--r-card);
  background:#fff9ec;border:1px solid rgba(154,102,0,.38);
}
/* Class rules beat the UA `[hidden]` rule, so the hidden state needs saying. */
.dash-dq-banner[hidden]{display:none}
.dash-dq-icon{
  flex-shrink:0;width:26px;height:26px;border-radius:50%;
  background:#9a6600;color:#fff;
  display:flex;align-items:center;justify-content:center;
  font-size:.82rem;line-height:1;
}
.dash-dq-body{flex:1;min-width:0}
.dash-dq-title{
  font-family:var(--font-display);font-weight:700;font-size:.9rem;
  color:#6b4600;margin-bottom:3px;
}
.dash-dq-text{font-size:.82rem;line-height:1.5;color:#7a5200;margin:0}
/* The per-tile ⚠ beside an unknown value. A grey `.dash-tip` chip beside a "—"
   does not read as a warning, so this one is amber. */
.dash-hero-warn{background:#9a6600;color:#fff;font-size:.72rem;font-weight:400}
.dash-hero-warn:hover,.dash-hero-warn:focus-visible,.dash-hero-warn[data-open="1"]{
  background:#6b4600;color:#fff;
}

/* Big hero (Campaigns / Products / Behavior tabs) */
.dash-hero-big{display:grid;grid-template-columns:repeat(5,1fr);gap:14px}
.dash-hero-big-4{grid-template-columns:repeat(4,1fr)}
/* The Behavior hero drops its featured-event cells when the client fired none
   of them, so it swaps between these modifiers at render time (see
   renderBehavior) rather than sitting on a fixed 4-up grid with holes in it. */
.dash-hero-big-3{grid-template-columns:repeat(3,1fr)}
.dash-hero-big-2{grid-template-columns:repeat(2,1fr)}
.dash-hero-big-cell{background:var(--surface);border-radius:var(--r-card);padding:18px 22px;border:1px solid var(--divider)}
.dash-hero-big-cell.dash-featured{background:var(--accent-deep);color:var(--p-offwhite);border:none}
.dash-hero-big-cell.dash-featured .dash-hero-label,.dash-hero-big-cell.dash-featured .dash-hero-delta .label{color:rgba(253,255,229,.7)}
.dash-hero-big-cell.dash-featured .dash-hero-value{color:var(--p-offwhite);font-size:2.2rem}
.dash-hero-big-cell .dash-hero-value{font-size:1.7rem;margin-top:6px}

/* Chart wrappers */
.dash-chart-wrap{height:280px;position:relative}
.dash-chart-tall{height:340px}
.dash-chart-row{display:grid;grid-template-columns:1fr 1fr;gap:14px}

/* Tables */
.dash-table-wrap{overflow-x:auto;margin:0 -22px;padding:0 22px}
table.dash-kpi{width:100%;border-collapse:collapse;font-size:.82rem}
table.dash-kpi thead th{text-align:left;padding:9px 10px;font-family:var(--font-display);font-weight:600;font-size:.72rem;letter-spacing:.05em;text-transform:uppercase;color:var(--text-muted);border-bottom:2px solid var(--divider);background:var(--surface);white-space:nowrap}
table.dash-kpi tbody td{padding:11px 10px;border-bottom:1px solid var(--divider);color:var(--text);white-space:nowrap;vertical-align:middle}
table.dash-kpi tbody tr:hover td{background:rgba(228,251,0,.06)}
table.dash-kpi td.num,table.dash-kpi th.num{text-align:right;font-variant-numeric:tabular-nums}
.dash-row-sub{color:var(--text-muted);font-size:.72rem}

/* Channel dot + name */
.dash-ch-dot{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:8px;vertical-align:middle}
.dash-ch-name{font-weight:600}

/* Share bar inside table cell */
.dash-share-bar{position:relative;display:inline-block;width:90px;height:6px;background:var(--p-lightgray);border-radius:3px;overflow:hidden;margin-right:8px;vertical-align:middle}
.dash-share-bar-fill{position:absolute;left:0;top:0;bottom:0;background:var(--accent-deep);border-radius:3px}

/* Anomaly callout */
.dash-anomaly{display:flex;align-items:flex-start;gap:18px;padding:18px 22px;border-radius:var(--r-card);background:var(--surface-warm);border:1px solid rgba(228,251,0,.4)}
.dash-anomaly-icon{flex-shrink:0;width:38px;height:38px;border-radius:50%;background:var(--accent-deep);color:var(--p-offwhite);display:flex;align-items:center;justify-content:center;font-weight:700;font-family:var(--font-display);font-size:1.1rem}
.dash-anomaly-body{flex:1}
.dash-anomaly-eyebrow{font-size:.68rem;letter-spacing:.08em;text-transform:uppercase;color:var(--text-muted);font-weight:600;margin-bottom:4px}
.dash-anomaly-headline{font-family:var(--font-display);font-weight:700;font-size:1.05rem;color:var(--text);margin-bottom:4px}
.dash-anomaly-detail{font-size:.85rem;color:var(--text-muted);line-height:1.5}
.dash-anomaly-cta{flex-shrink:0;font-family:var(--font-display);font-weight:600;font-size:.78rem;color:var(--accent-deep);text-decoration:none;padding:8px 14px;border:1px solid var(--accent-deep);border-radius:var(--r);background:transparent;cursor:pointer}
.dash-anomaly-cta:hover{background:var(--accent-deep);color:var(--p-offwhite)}

/* Pills */
.dash-pill{display:inline-block;padding:2px 8px;border-radius:99px;background:var(--surface-warm);color:var(--accent-deep);font-size:.7rem;font-weight:600;letter-spacing:.03em}
.dash-pill-paid{background:var(--accent-deep);color:var(--accent)}
.dash-pill-organic{background:var(--p-lightgray);color:var(--text-muted)}
/* Manual offline-cost channel rows (chat-configured, pro-rated) */
.dash-pill-manual{background:var(--surface-warm);color:var(--text-muted);border:1px dashed var(--p-lightgray)}
/* Extra-costs hero tile: names the sheet as the source, inline in the label */
.dash-pill-sheet{background:var(--surface-warm);color:var(--text-muted);border:1px dashed var(--p-lightgray);text-transform:none;letter-spacing:0;vertical-align:baseline}
.dash-ch-manual{background:var(--surface-warm)}
.dash-ch-manual .dash-ch-name{font-style:italic}
.dash-channels-manual-note{margin:10px 2px 0;font-size:.72rem;color:var(--text-muted);line-height:1.4}

/* Search input */
.dash-search{padding:7px 11px;border:1px solid var(--divider);border-radius:var(--r);font-family:var(--font-ui);font-size:.82rem;background:var(--surface);min-width:240px}
.dash-search:focus{outline:none;border-color:var(--accent-deep)}

@media (max-width:1024px){
  .dash-hero-big{grid-template-columns:repeat(3,1fr)}
  /* ...but never widen a 2-up hero back out into a 3-up grid with a hole. The
     3-up modifier is spelled out rather than left to coincide with the base. */
  .dash-hero-big-3{grid-template-columns:repeat(3,1fr)}
  .dash-hero-big-2{grid-template-columns:repeat(2,1fr)}
  .dash-chart-row{grid-template-columns:1fr}
}
@media (max-width:760px){
  .dash-hero-big,.dash-hero-big-4,.dash-hero-big-3,.dash-hero-big-2{grid-template-columns:1fr 1fr}
  .dash-tabnav{padding:0 16px}
  .dash-filterbar{padding:14px 16px}
  /* Keep the status region aligned with the filter bar it hangs off. */
  .dash-filter-status{padding:0 16px}
  .perf-dashboard-shell{padding:16px 16px 60px}
}

/* Dashboard — custom date picker popover */
.dash-period-custom-btn{position:relative}
.dash-custom-pop{
  position:absolute;top:calc(100% + 4px);left:0;z-index:30;
  background:var(--surface);border:1px solid var(--divider);
  border-radius:var(--r);padding:14px;box-shadow:0 4px 14px rgba(0,0,0,.08);
  min-width:260px;
}
.dash-custom-pop[hidden]{display:none}
.dash-custom-pop-row{display:flex;gap:10px;margin-bottom:10px}
.dash-custom-pop-field{display:flex;flex-direction:column;gap:4px;flex:1 1 0}
.dash-custom-pop-field span{font-size:.7rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--text-muted)}
.dash-custom-pop-field input[type=date]{padding:6px 8px;border:1px solid var(--divider);border-radius:var(--r);font:inherit;font-size:.85rem}
.dash-custom-pop-actions{display:flex;justify-content:flex-end;gap:8px}
.dash-custom-pop-actions button{padding:6px 14px;font-family:var(--font-display);font-weight:600;font-size:.78rem;border-radius:var(--r);border:1px solid var(--divider);background:var(--surface);cursor:pointer}
/* Qualified by the parent on purpose: a bare `.dash-custom-pop-apply` (0,1,0)
   LOSES the background to `.dash-custom-pop-actions button` (0,1,1) above, and
   the button paints off-white text on white. Same fix as ai-custom-pop in
   view_seo_section.html — do not "simplify" this selector. */
.dash-custom-pop-actions .dash-custom-pop-apply{background:var(--accent-deep);color:var(--p-offwhite);border-color:var(--accent-deep)}
.dash-custom-pop-actions .dash-custom-pop-apply:hover{background:#1a2510}

/* Loading dim during SPA refetch */
.perf-dashboard-shell.dash-loading{opacity:.55;pointer-events:none;transition:opacity .12s ease}
.perf-dashboard-shell{transition:opacity .12s ease}

/* ── Section render states: loading / failed / legitimately empty ─────────
   .dash-empty-hint moved here from view_performance_overview.html's inline
   <style>: it is now shared by the tri-state section renderer across several
   panels, so it can no longer live in one view's block. */
.dash-empty-hint{padding:20px;text-align:center;color:var(--text-muted);font-size:.82rem}
.dash-state-block{display:flex;align-items:center;justify-content:center;gap:9px;
  padding:20px;text-align:center;font-size:.82rem;color:var(--text-muted)}
td.dash-state-block{display:table-cell;text-align:center}
.dash-state-failed{color:var(--text)}
.dash-state-icon{display:inline-flex;align-items:center;justify-content:center;
  width:17px;height:17px;flex:none;border-radius:50%;background:#B3261E;color:#fff;
  font-size:.7rem;font-weight:700;line-height:1;margin-right:6px}
.dash-spinner{display:inline-block;width:14px;height:14px;flex:none;border-radius:50%;
  border:2px solid var(--divider);border-top-color:var(--text-muted);
  animation:dash-spin .9s linear infinite;vertical-align:-2px;margin-right:6px}
@keyframes dash-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.dash-spinner{animation:none}}
/* Panel-level failure notice — one per tab, covering the failed payload keys
   no individual section spoke for (see renderFailureNotices). */
.dash-panel-failure{margin:0 0 14px;padding:9px 12px;border-radius:8px;
  background:#FDECEA;color:#7A1B14;font-size:.82rem}

/* ── Filter-bar status region: in-flight indicator + failure banner ──
   A sibling of .dash-filterbar and OUTSIDE .perf-dashboard-shell, because the
   shell is pointer-events:none while dimmed — a Retry button inside it would
   be unclickable for the whole of the next attempt. Padding mirrors the
   filter bar's so the two line up. */
.dash-filter-status{padding:0 32px}
.dash-filter-progress,.dash-filter-error{display:flex;align-items:center;gap:9px;
  margin:10px 0 0;padding:8px 12px;border-radius:8px;font-size:.82rem}
.dash-filter-progress[hidden],.dash-filter-error[hidden]{display:none}
.dash-filter-progress{background:color-mix(in srgb, var(--divider) 40%, transparent);
  color:var(--text-muted)}
.dash-filter-error{background:#FDECEA;color:#7A1B14}
#dash-filter-error-text{flex:1;min-width:0}
.dash-filter-retry,.dash-filter-dismiss{flex:none;font:inherit;font-size:.78rem;
  font-weight:600;padding:4px 10px;border-radius:var(--r);border:1px solid currentColor;
  background:transparent;color:inherit;cursor:pointer}
.dash-filter-dismiss{border-color:transparent;padding:4px 7px;font-size:.9rem;line-height:1}
.dash-filter-retry:hover,.dash-filter-dismiss:hover{background:rgba(0,0,0,.06)}
.dash-filter-retry:focus-visible,.dash-filter-dismiss:focus-visible{outline:2px solid currentColor;outline-offset:2px}

/* Creative grid (Meta ad-level) */
.dash-creative-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:14px}
.dash-creative-card{background:var(--surface);border-radius:var(--r-card);border:1px solid var(--divider);overflow:hidden;display:flex;flex-direction:column;transition:box-shadow .15s,transform .05s}
.dash-creative-card:hover{box-shadow:0 4px 14px rgba(0,0,0,.06)}
.dash-creative-thumb{aspect-ratio:1;background:var(--p-lightgray);display:flex;align-items:center;justify-content:center;color:var(--text-muted);font-size:.78rem;overflow:hidden}
.dash-creative-thumb img{width:100%;height:100%;object-fit:cover;display:block;image-rendering:auto;-webkit-backface-visibility:hidden}
/* No-upscale safety net: a creative whose resolved image is smaller than its card
   renders at native size (sharp, centered) instead of being stretched to fill (blur).
   The class is added by the dashboard's 'load' handler when naturalWidth << card. */
.dash-creative-thumb img.dash-thumb-native{width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain}
/* Image-bearing creative thumbs (Meta / Google / TikTok / Programmatic): creative
   sets mix 1:1 / 4:5 / 9:16 and the IAB display zoo, so cover-cropping the square
   thumb loses the edges (or half) of anything non-square. .dash-thumb-fit contains
   the whole creative and fills the letterbox with a blurred copy of itself:
   --thumb-bg (set inline by the renderers via thumbFitAttrs) is the same URL as
   the <img>, so it costs no extra fetch, and when it 404s the background simply
   doesn't paint — placeholders degrade exactly as before. z-index:0 makes the
   thumb a stacking context so the ::before can sit at z-index:-1, under static
   imgs and the positioned ▶ overlays alike (the social grids' imgs are static —
   without this the positioned ::before would paint over them). scale(1.12)
   pushes the blur's faded edge outside the clip box. */
.dash-creative-thumb.dash-thumb-fit{position:relative;z-index:0}
.dash-creative-thumb.dash-thumb-fit::before{content:"";position:absolute;inset:0;z-index:-1;background-image:var(--thumb-bg);background-size:cover;background-position:center;filter:blur(16px) saturate(1.15);transform:scale(1.12);opacity:.55}
.dash-creative-thumb.dash-thumb-fit img{object-fit:contain}
.dash-creative-body{padding:14px 16px;display:flex;flex-direction:column;gap:10px}
.dash-creative-title{font-family:var(--font-display);font-weight:700;font-size:.88rem;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dash-creative-title a{color:var(--text)}
.dash-creative-title a:hover{color:var(--accent-deep);text-decoration:underline}
.dash-creative-meta{font-size:.72rem;color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dash-creative-stats{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding-top:10px;border-top:1px solid var(--divider)}
.dash-creative-stat-label{font-size:.66rem;letter-spacing:.05em;text-transform:uppercase;color:var(--text-muted);font-weight:600}
.dash-creative-stat-value{font-family:var(--font-display);font-weight:700;font-size:.95rem;color:var(--text);font-variant-numeric:tabular-nums}

/* Performance Max asset-group cards (Creative tab, Google) */
.dash-pmax-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:14px}
.dash-pmax-card{background:var(--surface);border-radius:var(--r-card);border:1px solid var(--divider);padding:14px 16px;display:flex;flex-direction:column;gap:12px;transition:box-shadow .15s}
.dash-pmax-card:hover{box-shadow:0 4px 14px rgba(0,0,0,.06)}
.dash-pmax-head{display:flex;flex-direction:column;gap:2px}
.dash-pmax-name{font-family:var(--font-display);font-weight:700;font-size:.92rem;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dash-pmax-campaign{font-size:.72rem;color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dash-pmax-thumbs{display:flex;flex-wrap:wrap;gap:6px;align-items:center;min-height:46px}
.dash-pmax-thumbs img{width:46px;height:46px;border-radius:6px;object-fit:cover;background:var(--p-lightgray);border:1px solid var(--divider)}
.dash-pmax-more{display:inline-flex;align-items:center;justify-content:center;width:46px;height:46px;border-radius:6px;background:var(--p-lightgray);color:var(--text-muted);font-size:.74rem;font-weight:700}
.dash-pmax-stats{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding-top:10px;border-top:1px solid var(--divider)}
.dash-pmax-stats > div{display:flex;flex-direction:column;gap:2px}
.dash-pmax-stats .dash-creative-stat-label{font-size:.66rem;letter-spacing:.05em;text-transform:uppercase;color:var(--text-muted);font-weight:600}
.dash-pmax-stats b{font-family:var(--font-display);font-weight:700;font-size:.92rem;color:var(--text);font-variant-numeric:tabular-nums}

/* Sortable tables — Performance by channel */
.dash-sortable th[data-sort]{position:relative;user-select:none}
.dash-sortable th[data-sort]:hover{color:var(--accent-deep)}
.dash-sortable th[data-sort]::after{
  content:'';display:inline-block;width:8px;height:8px;margin-left:6px;
  border-left:3px solid transparent;border-right:3px solid transparent;
  opacity:.3;vertical-align:middle;
}
.dash-sortable th.sort-asc::after{border-bottom:5px solid currentColor;opacity:1}
.dash-sortable th.sort-desc::after{border-top:5px solid currentColor;opacity:1}

/* Δ% delta cells */
.dash-delta{display:inline-block;font-family:var(--font-display);font-weight:600;font-variant-numeric:tabular-nums;font-size:.82rem}
.dash-delta-up{color:#2a7d2a}
.dash-delta-down{color:var(--p-red)}
.dash-delta-flat{color:var(--text-muted)}
.dash-delta-null{color:var(--text-muted);opacity:.55}
/* Secondary per-metric delta shown UNDER a value cell (every column, not just Δ) */
.dash-cell-delta{display:block;font-family:var(--font-display);font-weight:600;font-variant-numeric:tabular-nums;font-size:.66rem;line-height:1.25;margin-top:1px;opacity:.9}

/* Campaign trends chart — empty-state hint + selectable rows */
.dash-chart-empty{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:var(--text-muted);font-size:.85rem;text-align:center;padding:1rem;pointer-events:none}
.dash-camp-row{cursor:pointer}
.dash-camp-row.selected{background:var(--p-lightgray)}
.dash-camp-sel{width:30px;text-align:center}
.dash-camp-check{cursor:pointer}

/* Chart granularity toggle */
.dash-granularity{display:inline-flex;gap:2px;background:var(--p-lightgray);border-radius:var(--r);padding:2px}
.dash-granularity-btn{padding:4px 10px;font-size:.72rem;font-family:var(--font-display);font-weight:600;letter-spacing:.04em;text-transform:uppercase;border-radius:calc(var(--r) - 1px);color:var(--text-muted);background:transparent;transition:background .12s,color .12s}
.dash-granularity-btn:hover{color:var(--text)}
.dash-granularity-btn.active{background:var(--surface);color:var(--text);box-shadow:0 1px 2px rgba(0,0,0,.08)}

/* ── Admin wizard ───────────────────────────────────────────────────────── */
.wiz-shell{max-width:980px;margin:0 auto;padding:32px 24px}
.wiz-progress{display:flex;gap:14px;margin-bottom:28px;padding:14px 18px;background:var(--surface);border-radius:var(--r-card);border:1px solid var(--divider)}
.wiz-step{display:flex;align-items:center;gap:8px;color:var(--text-muted);font-size:.86rem;flex:1}
.wiz-step.active{color:var(--text);font-weight:600}
.wiz-step.done{color:var(--accent-deep)}
.wiz-step-num{display:inline-flex;width:24px;height:24px;align-items:center;justify-content:center;border-radius:50%;background:var(--p-lightgray);font-family:var(--font-display);font-size:.78rem}
.wiz-step.active .wiz-step-num{background:var(--accent);color:var(--accent-deep)}
.wiz-step.done .wiz-step-num{background:var(--accent-deep);color:var(--p-offwhite)}
.wiz-mode-toggle{display:flex;gap:6px;margin-bottom:18px}
.wiz-mode-btn{padding:8px 14px;border-radius:var(--r);background:var(--surface);border:1px solid var(--divider);color:var(--text-muted);font-size:.86rem;font-family:var(--font-display)}
.wiz-mode-btn.active{background:var(--accent-deep);color:var(--p-offwhite);border-color:var(--accent-deep)}
.wiz-card{background:var(--surface);border-radius:var(--r-card);border:1px solid var(--divider);padding:28px}
.wiz-step-head h2{font-family:var(--font-serif);font-weight:500;font-size:1.55rem;margin-bottom:4px}
.wiz-step-head p{margin-bottom:18px}
.wiz-form{display:flex;flex-direction:column;gap:18px}
.wiz-field{display:flex;flex-direction:column;gap:6px}
.wiz-field label{font-family:var(--font-display);font-weight:600;font-size:.86rem}
.wiz-field input[type=text],.wiz-field input[type=url],.wiz-field input[type=password]{padding:10px 12px;border-radius:var(--r);border:1px solid var(--divider);background:var(--bg);font-family:inherit;font-size:.92rem}
.wiz-field input[type=color]{width:54px;height:36px;padding:2px;border-radius:var(--r);border:1px solid var(--divider);background:var(--bg)}
.wiz-help{margin-top:4px;font-size:.78rem}
.wiz-help summary{cursor:pointer;color:var(--text-muted);font-family:var(--font-display);font-weight:600}
.wiz-help p{margin-top:6px;color:var(--text-muted)}
.wiz-template-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:14px}
.wiz-template-card{display:block;background:var(--bg);border:2px solid var(--divider);border-radius:var(--r-card);padding:18px;cursor:pointer;transition:border-color .12s,box-shadow .12s}
.wiz-template-card:hover{border-color:var(--text-muted)}
.wiz-template-card input[type=radio]{display:none}
.wiz-template-card input[type=radio]:checked + .wiz-template-body{outline:3px solid var(--accent-deep);outline-offset:-2px;border-radius:var(--r-card)}
.wiz-template-body h3{font-family:var(--font-display);font-weight:700;font-size:1rem;margin-bottom:6px}
.wiz-template-when{font-size:.86rem;color:var(--text);margin-bottom:8px}
.wiz-template-tabs{display:flex;flex-wrap:wrap;gap:4px;margin-top:10px}
.wiz-tab-pill{display:inline-block;padding:2px 8px;background:var(--p-lightgray);border-radius:10px;font-size:.7rem;font-family:var(--font-display);color:var(--text-muted)}
.wiz-sources{display:flex;flex-direction:column;gap:14px}
.wiz-source-card{background:var(--bg);border-radius:var(--r-card);border:1px solid var(--divider);padding:18px}
.wiz-source-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.wiz-source-head h3{font-family:var(--font-display);font-weight:700;font-size:1rem;display:flex;align-items:center;gap:8px}
.wiz-pill{display:inline-block;padding:2px 7px;border-radius:10px;font-size:.65rem;font-family:var(--font-display);font-weight:600;letter-spacing:.04em;text-transform:uppercase}
.wiz-pill-required{background:#fde4df;color:var(--p-red)}
.wiz-pill-optional{background:var(--p-lightgray);color:var(--text-muted)}
.wiz-source-status{font-family:var(--font-display);font-weight:600;font-size:.78rem;padding:4px 10px;border-radius:10px}
.wiz-source-status-untested{background:var(--p-lightgray);color:var(--text-muted)}
.wiz-source-status-ok{background:#cfe8cf;color:#2a7d2a}
.wiz-source-status-failed{background:#fde4df;color:var(--p-red)}
.wiz-source-status-skipped{background:var(--p-lightgray);color:var(--text-muted)}
/* Save-only source: config written, no verifier exists to turn it green. */
.wiz-source-status-connected{background:#fff1cc;color:#7a5a00}
.wiz-source-actions{display:flex;gap:10px;margin-top:8px}
.wiz-error-inline{margin-top:8px;padding:8px 10px;background:#fde4df;color:var(--p-red);font-size:.86rem;border-radius:var(--r)}
.wiz-review-grid{display:flex;flex-direction:column;gap:10px;background:var(--bg);border-radius:var(--r-card);padding:18px}
.wiz-review-row{display:flex;justify-content:space-between;align-items:center;padding:8px 0;border-bottom:1px solid var(--divider)}
.wiz-review-row:last-child{border-bottom:none}
.wiz-launch-confirm{margin-top:14px}
.wiz-actions{display:flex;justify-content:space-between;gap:10px;margin-top:24px}
.btn-primary{padding:10px 22px;background:var(--accent-deep);color:var(--p-offwhite);border-radius:var(--r);font-family:var(--font-display);font-weight:700}
.btn-primary:disabled{opacity:.45;cursor:not-allowed}
.btn-secondary{padding:10px 16px;background:var(--surface);color:var(--text);border:1px solid var(--divider);border-radius:var(--r);font-family:var(--font-display);font-weight:600}
.btn-danger{padding:10px 16px;background:var(--p-red);color:var(--p-offwhite);border-radius:var(--r);font-family:var(--font-display);font-weight:700}
.wiz-danger{margin-top:24px;padding:14px;background:var(--surface);border:1px solid var(--divider);border-radius:var(--r-card)}
.wiz-danger summary{cursor:pointer;color:var(--text-muted);font-size:.86rem}
.wiz-danger form{margin-top:10px;display:flex;flex-direction:column;gap:10px}
.wiz-chat-thread{display:flex;flex-direction:column;gap:10px;min-height:200px;max-height:400px;overflow-y:auto;padding:14px;background:var(--bg);border-radius:var(--r-card);margin-bottom:14px}
.wiz-chat-msg{padding:10px 14px;border-radius:var(--r-card);max-width:80%}
.wiz-chat-user{align-self:flex-end;background:var(--accent-deep);color:var(--p-offwhite)}
.wiz-chat-assistant{align-self:flex-start;background:var(--surface);border:1px solid var(--divider)}
.wiz-chat-form{display:flex;gap:8px}
.wiz-chat-form textarea{flex:1;padding:10px;border-radius:var(--r);border:1px solid var(--divider);background:var(--bg);font-family:inherit;font-size:.92rem;resize:vertical}

/* Design ↔ Traffic dimensions page tabs — shared by admin_design.html and
   admin_dimensions.html, so they live here rather than in either template. */
.dim-tabs{display:flex;gap:2px;margin-bottom:14px}
.dim-tabs a{padding:7px 16px;border:1px solid var(--divider);border-bottom:none;border-radius:8px 8px 0 0;text-decoration:none;color:var(--text-muted);font-weight:600;font-size:.85rem;background:transparent;font-family:var(--font-display)}
.dim-tabs a.is-active{background:var(--surface);color:var(--text);border-color:var(--text)}

/* Body-context button for admin pages. `.btn-link` is styled for the DARK
   topbar — its colour is var(--text-on-dark), the SAME cream as the page
   background, so on the body it renders at ~1:1 contrast and is invisible.
   That shipped twice (#150); guarded now by test_admin_templates.py. Use
   .admin-btn anywhere below </header>. `.seo-btn` is the original name, kept
   so the tracked-pages template keeps working — same rules, one definition. */
.admin-btn,.seo-btn{padding:6px 12px;border:1px solid var(--divider);border-radius:8px;
  background:var(--surface);color:var(--text);font-family:inherit;font-size:.82rem;
  font-weight:600;cursor:pointer;text-decoration:none;display:inline-block;
  transition:border-color .15s,background .15s}
.admin-btn:hover:not(:disabled),.seo-btn:hover:not(:disabled){border-color:var(--text-muted);background:var(--bg)}
.admin-btn:disabled,.seo-btn:disabled{opacity:.5;cursor:default}

/* "+ Add new client" card on /admin */
.client-card-wrap{position:relative}
/* Per-client actions, revealed on hover. A flex row rather than three
   absolutely-positioned links with hand-tuned left offsets — those had to be
   re-tuned whenever a label changed length. */
/* The strip spans the card so the buttons can right-align, but it must never
   capture pointer events itself — that would swallow clicks on the top band of
   the card link behind it. Only the buttons become clickable, and only on
   hover (they are opacity:0 otherwise, which alone does NOT stop clicks). */
.client-card-actions{position:absolute;top:8px;left:8px;right:8px;display:flex;gap:6px;
  justify-content:flex-end;opacity:0;transition:opacity .12s;pointer-events:none}
.client-card-wrap:hover .client-card-actions{opacity:1}
.client-card-wrap:hover .client-card-actions a{pointer-events:auto}
.client-card-edit{padding:4px 10px;background:var(--surface);border:1px solid var(--divider);border-radius:var(--r);font-size:.74rem;font-family:var(--font-display);color:var(--text-muted);text-decoration:none;white-space:nowrap}
.client-card-edit:hover{border-color:var(--text-muted);color:var(--text)}
.client-card-new{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;border:2px dashed var(--divider);background:transparent;color:var(--text-muted);padding:36px 18px}
.client-card-new:hover{border-color:var(--accent-deep);color:var(--accent-deep)}
.ccard-new-plus{font-size:2.6rem;font-family:var(--font-display);font-weight:300;line-height:1;margin-bottom:8px}
.ccard-new-label{font-family:var(--font-display);font-weight:600;font-size:.96rem}
.ccard-new-hint{font-size:.78rem;margin-top:4px}

/* Drafts list */
.drafts-list{display:flex;flex-direction:column;gap:6px;background:var(--surface);border-radius:var(--r-card);border:1px solid var(--divider);padding:8px}
.draft-row{display:flex;justify-content:space-between;align-items:center;padding:10px 14px;border-radius:var(--r);text-decoration:none;color:var(--text)}
.draft-row:hover{background:var(--bg)}

/* ── Wizard split layout: form/chat on the left, preview on the right.
   Preview gets the larger column so the WYSIWYG actually wysiwygs;
   chat is slightly narrower but still ≥420px (comfortable for prose). */
.wiz-split{display:grid;grid-template-columns:minmax(420px, 0.85fr) minmax(580px, 1.15fr);gap:24px;align-items:start}
.wiz-split-main{min-width:0}
.wiz-split-preview{position:sticky;top:24px;min-width:0}
.wiz-preview-label{font-size:.74rem;font-family:var(--font-display);text-transform:uppercase;letter-spacing:.08em;color:var(--text-muted);margin-bottom:8px}
.wiz-preview-frame{
  background:var(--bg);
  border:1px solid var(--divider);
  border-radius:var(--r-card);
  overflow:hidden;
  --preview-accent:#253519;
}
.wiz-preview-topbar{display:flex;align-items:center;gap:10px;padding:12px 14px;background:var(--preview-accent);color:#fff;font-size:.86rem;font-family:var(--font-display);font-weight:700}
.wiz-preview-dot{display:inline-block;width:10px;height:10px;background:var(--p-yellow);border-radius:50%}
.wiz-preview-subtitle{font-weight:400;font-size:.7rem;opacity:.75;margin-left:auto}
.wiz-preview-tabs{display:flex;flex-wrap:wrap;gap:4px;padding:8px 14px;background:var(--surface);border-bottom:1px solid var(--divider)}
.wiz-preview-tab{padding:4px 8px;font-size:.7rem;font-family:var(--font-display);font-weight:600;color:var(--text-muted);border-radius:4px}
.wiz-preview-tab.active{background:var(--preview-accent);color:#fff}
.wiz-preview-hero{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:14px}
.wiz-preview-kpi{padding:10px;background:var(--surface);border-radius:var(--r);border:1px solid var(--divider)}
.wiz-preview-kpi-label{font-size:.6rem;font-family:var(--font-display);font-weight:600;letter-spacing:.04em;color:var(--text-muted);margin-bottom:4px}
.wiz-preview-kpi-value{font-size:1.1rem;font-family:var(--font-display);font-weight:700;color:var(--text)}
.wiz-preview-empty{grid-column:1/-1;padding:18px;text-align:center;font-size:.78rem;color:var(--text-muted)}
.wiz-preview-foot{display:flex;justify-content:space-between;padding:8px 14px;background:var(--surface);border-top:1px solid var(--divider);font-size:.68rem;font-family:var(--font-display);color:var(--text-muted)}
.wiz-preview-foot-mut{opacity:.7}
@media (max-width: 1100px){
  .wiz-split{grid-template-columns:1fr}
  .wiz-split-preview{position:static}
}

/* ── Wizard preview iframe (replaces the old mini-mockup) ── */
.wiz-preview-label{display:flex;justify-content:space-between;align-items:baseline}
.wiz-preview-fullscreen{font-size:.72rem;color:var(--text-muted);font-family:var(--font-display);text-decoration:none}
.wiz-preview-fullscreen:hover{color:var(--accent-deep);text-decoration:underline}
.wiz-preview-iframe-wrap{
  position:relative;width:100%;height:760px;
  border:1px solid var(--divider);border-radius:var(--r-card);overflow:hidden;
  background:var(--bg);
}
.wiz-preview-iframe-wrap iframe{
  /* Render the iframe at the dashboard's natural 1280px width and
     shrink-to-fit via transform so the preview reads as a real
     dashboard, not a thumbnail. The scale is calibrated against the
     wider preview column (~600-700px effective render width). */
  width:1280px;height:1620px;
  border:none;display:block;
  transform:scale(0.50);transform-origin:top left;
  pointer-events:none;  /* preview is non-interactive */
}
.wiz-preview-caption{font-size:.72rem;color:var(--text-muted);margin-top:8px;line-height:1.4}

.wiz-ai-suggest{
  display:flex;align-items:center;gap:12px;flex-wrap:wrap;
  margin:14px 0 22px;padding:14px;
  background:linear-gradient(135deg, var(--surface) 0%, rgba(228,251,0,0.08) 100%);
  border:1px solid var(--divider);border-radius:var(--r-card);
  font-size:.86rem;
}
.wiz-ai-suggest strong{font-family:var(--font-display);font-weight:700}
.wiz-ai-suggest .muted{flex:1;min-width:200px}

/* ── Provisioning / "setting up" landing view ─────────────────────────────── */
.prov-shell{display:flex;justify-content:center}
.prov-card{
  position:relative;width:100%;max-width:660px;margin:32px auto;
  background:var(--surface);border:1px solid var(--divider);
  border-radius:var(--r-card);padding:32px 30px 26px;overflow:hidden;
}
.prov-card::before{
  content:"";position:absolute;left:0;top:0;bottom:0;width:4px;
  background:var(--client-accent);border-radius:var(--r-card) 0 0 var(--r-card);
}
.prov-head{margin-bottom:22px}
.prov-spinner{
  display:inline-block;width:26px;height:26px;margin-bottom:14px;
  border:3px solid var(--p-lightgray);border-top-color:var(--client-accent);
  border-radius:50%;animation:prov-spin .9s linear infinite;
}
@keyframes prov-spin{to{transform:rotate(360deg)}}
.prov-head h2{
  font-family:var(--font-display);font-size:1.5rem;font-weight:700;
  letter-spacing:-.015em;color:var(--text);margin:0 0 8px;
}
.prov-lede{color:var(--text-muted);font-size:.92rem;line-height:1.55;max-width:52ch;margin:0}

.prov-bar{height:8px;background:var(--p-lightgray);border-radius:999px;overflow:hidden;margin:4px 0 8px}
.prov-bar-fill{height:100%;background:var(--client-accent);border-radius:999px;transition:width .6s ease;min-width:2%}
.prov-bar-meta{display:flex;justify-content:flex-end;margin-bottom:20px}
.prov-elapsed{color:var(--text-muted);font-size:.72rem;font-family:var(--font-display);letter-spacing:.02em}

.prov-steps{list-style:none;margin:0 0 24px;padding:0;position:relative}
.prov-step{position:relative;display:flex;align-items:center;gap:12px;padding:9px 0 9px 2px;min-height:34px}
.prov-step::before{content:"";position:absolute;left:10px;top:26px;bottom:-8px;width:2px;background:var(--divider)}
.prov-step:last-child::before{display:none}
.prov-step-dot{
  position:relative;z-index:1;flex:0 0 18px;width:18px;height:18px;border-radius:50%;
  background:var(--p-white);border:2px solid var(--divider);box-sizing:border-box;
}
.prov-step-label{font-size:.92rem;color:var(--text-muted)}
.prov-step-done .prov-step-dot{background:var(--accent-deep);border-color:var(--accent-deep)}
.prov-step-done .prov-step-dot::after{
  content:"";position:absolute;left:5px;top:2px;width:4px;height:8px;
  border:solid var(--p-white);border-width:0 2px 2px 0;transform:rotate(45deg);
}
.prov-step-done .prov-step-label{color:var(--text)}
.prov-step-active .prov-step-dot{
  background:var(--client-accent);border-color:var(--client-accent);
  animation:prov-pulse 1.6s ease-in-out infinite;
}
.prov-step-active .prov-step-label{color:var(--text);font-weight:600;font-family:var(--font-display)}
@keyframes prov-pulse{0%,100%{box-shadow:0 0 0 0 rgba(108,122,99,0)}50%{box-shadow:0 0 0 5px rgba(108,122,99,.18)}}

.prov-sources{border-top:1px solid var(--divider);padding-top:18px;margin-bottom:18px}
.prov-sources-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:10px}
.prov-sources-head h3{font-family:var(--font-display);font-size:1rem;font-weight:700;color:var(--text);margin:0}
.prov-sources-count{font-size:.74rem;color:var(--text-muted);font-family:var(--font-display);letter-spacing:.02em;white-space:nowrap}
.prov-source-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}
.prov-source{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:8px 2px}
.prov-source-icon{flex:0 0 10px;width:10px;height:10px;border-radius:50%;background:var(--divider)}
.prov-source-label{font-size:.9rem;color:var(--text);flex:1;min-width:0}
.prov-source-state{font-size:.74rem;color:var(--text-muted);font-family:var(--font-display);letter-spacing:.02em;white-space:nowrap}
.prov-source-detail{flex-basis:100%;font-size:.74rem;color:var(--error);margin-left:20px}
.prov-source-importing .prov-source-icon,
.prov-source-connecting .prov-source-icon{background:var(--p-sage);animation:prov-blink 1.4s ease-in-out infinite}
.prov-source-live .prov-source-icon{background:var(--accent-deep)}
.prov-source-attention .prov-source-icon{background:var(--error)}
.prov-source-attention .prov-source-state{color:var(--error)}
.prov-source-skipped{opacity:.55}
@keyframes prov-blink{0%,100%{opacity:1}50%{opacity:.35}}

.prov-admin-note{
  background:var(--error-bg);border:1px solid rgba(216,47,21,.25);border-radius:var(--r);
  padding:10px 12px;font-size:.82rem;color:var(--text);line-height:1.5;margin-bottom:16px;
}
.prov-admin-note strong{font-family:var(--font-display)}
/* Reader-SA readiness card. Default (warn) reuses the error styling above; the
   two non-actionable levels tone it down so a normal mid-setup state doesn't
   read as a fault. */
.prov-admin-note.prov-reader-ok{
  background:transparent;border-color:rgba(47,125,58,.35);color:var(--text-muted);
}
.prov-admin-note.prov-reader-info{
  background:transparent;border-color:var(--border);color:var(--text-muted);
}
.prov-reader-ids{
  display:block;margin-top:6px;font-family:monospace;
  font-size:.72rem;color:var(--text-muted);word-break:break-all;
}
.prov-foot-note{color:var(--text-muted);font-size:.78rem;text-align:center;margin:0}

@media (max-width:520px){
  .prov-card{padding:24px 18px 20px;margin:16px auto}
}

/* ── Kuvio card (view_kuvio.html) ──────────────────────────────────────────
   A native stub view, not an embed: a short explainer plus an optional button
   out to a legacy per-client workspace. Only the two things .empty-state does
   not already give it — breathing room between paragraphs, and an outlined
   call-to-action. */
.kuvio-body p + p{margin-top:10px}
.kuvio-cta-row{margin-top:20px}
.kuvio-cta{
  display:inline-block;font-family:var(--font-display);font-weight:600;
  font-size:.82rem;color:var(--accent-deep);padding:9px 16px;
  border:1px solid var(--accent-deep);border-radius:var(--r);background:transparent;
}
.kuvio-cta:hover{background:var(--accent-deep);color:var(--p-offwhite);text-decoration:none}
