/* Ads Desk — frosted-glass theme in navy, amber, orange and soft lime. Follows the device's light or dark mode. */
:root {
  color-scheme: light dark;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Avenir Next", "Poppins", "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-num: "Avenir Next", ui-rounded, "SF Pro Rounded", -apple-system, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Palette */
  --navy: #13213f; --navy-2: #22386b; --amber: #f0b656; --orange: #f08a4b; --lime: #dfe8a4; --grey: #c9c9c9;

  --bg: #f3f2ee;
  --wall:
    radial-gradient(900px 700px at -5% -5%, rgba(240, 182, 86, .24), transparent 60%),
    radial-gradient(800px 640px at 105% -5%, rgba(214, 228, 140, .38), transparent 60%),
    radial-gradient(1000px 800px at 100% 105%, rgba(19, 33, 63, .10), transparent 60%),
    radial-gradient(800px 640px at -5% 105%, rgba(240, 138, 75, .12), transparent 60%),
    linear-gradient(180deg, #f7f6f2 0%, #f0efea 100%);
  --ink: #172036; --ink-2: #3d4658; --muted: #7a8092; --faint: #9aa0ad;
  --line: rgba(19, 33, 63, .09);
  --glass: rgba(255, 255, 255, .70);
  --glass-strong: rgba(255, 255, 255, .86);
  --glass-solid: #fff;
  --glass-rim: rgba(255, 255, 255, .8);
  --rim-top: rgba(255, 255, 255, 1); --rim-bottom: rgba(255, 255, 255, .3);
  --fill: rgba(19, 33, 63, .06); --fill-2: rgba(19, 33, 63, .12);
  --field: rgba(19, 33, 63, .05); --field-focus: #fff;
  --hover: rgba(19, 33, 63, .04);
  --bubble: #fff;
  --primary: linear-gradient(180deg, #2a3e6e 0%, #13213f 60%, #0f1a33 100%); --primary-fg: #fff; --primary-glow: rgba(19, 33, 63, .55);
  --accent: #13213f; --accent-soft: rgba(19, 33, 63, .08); --accent-text: #24418f;
  --amber-soft: rgba(240, 182, 86, .24); --amber-text: #8a5a00;
  --orange-soft: rgba(240, 138, 75, .18); --orange-text: #a84a12;
  --lime-soft: rgba(196, 214, 104, .32); --lime-text: #52661a;
  --good: #16834a; --good-solid: #3cc477; --good-soft: rgba(60, 196, 119, .16);
  --bad: #c9353a; --bad-solid: #f05a5a; --bad-soft: rgba(240, 90, 90, .14);
  --warn: #b4580f; --warn-solid: #f08a4b; --warn-soft: rgba(240, 138, 75, .18);
  --chart-bar: #f0b656; --chart-best: #13213f; --chart-line: #13213f; --chart-area: rgba(240, 182, 86, .28);
  --meter-alt: linear-gradient(90deg, #2a3e6e, #13213f);
  --c0: #13213f; --c1: #f0b656; --c2: #f08a4b; --c3: #d6e28f; --c4: #c9c9c9; --c5: #4a6fb5; --c6: #f6d38f; --c7: #9fb85a; --c8: #8a6d3b;
  --shadow: 0 1px 2px rgba(19, 33, 63, .04), 0 14px 34px -16px rgba(19, 33, 63, .22);
  --shadow-sm: 0 1px 2px rgba(19, 33, 63, .06), 0 4px 12px -6px rgba(19, 33, 63, .16);
  --radius: 20px;
  --brand: var(--accent); --brand-soft: var(--accent-soft);
  font-family: var(--font);
}
@media (prefers-color-scheme: dark) {
  :root:not(.light) {
    --bg: #0a1020;
    --wall:
      radial-gradient(900px 700px at -5% -5%, rgba(240, 182, 86, .16), transparent 60%),
      radial-gradient(800px 640px at 105% -5%, rgba(214, 228, 140, .08), transparent 60%),
      radial-gradient(1000px 800px at 100% 105%, rgba(60, 90, 170, .30), transparent 60%),
      radial-gradient(800px 640px at -5% 105%, rgba(240, 138, 75, .12), transparent 60%),
      linear-gradient(180deg, #0c1326 0%, #070b16 100%);
    --ink: #eef1f7; --ink-2: #c5cad6; --muted: #8d94a6; --faint: #7d8597;
    --line: rgba(255, 255, 255, .09);
    --glass: rgba(24, 35, 64, .58);
    --glass-strong: rgba(30, 43, 76, .80);
    --glass-solid: #1d2a4a;
    --glass-rim: rgba(255, 255, 255, .12);
    --rim-top: rgba(255, 255, 255, .22); --rim-bottom: rgba(255, 255, 255, .03);
    --fill: rgba(255, 255, 255, .07); --fill-2: rgba(255, 255, 255, .13);
    --field: rgba(255, 255, 255, .07); --field-focus: rgba(255, 255, 255, .11);
    --hover: rgba(255, 255, 255, .04);
    --bubble: rgba(40, 55, 94, .92);
    --primary: linear-gradient(180deg, #ffd58a 0%, #f0b656 60%, #e3a23d 100%); --primary-fg: #13213f; --primary-glow: rgba(240, 182, 86, .45);
    --accent: #f0b656; --accent-soft: rgba(240, 182, 86, .14); --accent-text: #f3c574;
    --amber-soft: rgba(240, 182, 86, .18); --amber-text: #f3c574;
    --orange-soft: rgba(240, 138, 75, .18); --orange-text: #ffab78;
    --lime-soft: rgba(214, 228, 140, .14); --lime-text: #d4e38f;
    --good: #5bd38a; --good-solid: #3cc477; --good-soft: rgba(60, 196, 119, .18);
    --bad: #ff7a7a; --bad-solid: #f05a5a; --bad-soft: rgba(240, 90, 90, .18);
    --warn: #ffa66b; --warn-solid: #f08a4b; --warn-soft: rgba(240, 138, 75, .18);
    --chart-bar: #3d4f7e; --chart-best: #f0b656; --chart-line: #f0b656; --chart-area: rgba(240, 182, 86, .14);
    --meter-alt: linear-gradient(90deg, #8ea6e8, #5d7cc9);
    --c0: #e8ecf5;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 36px -16px rgba(0, 0, 0, .8);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 12px -6px rgba(0, 0, 0, .6);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); }
body { margin: 0; color: var(--ink); background: var(--wall); background-attachment: fixed; font-size: 14px; line-height: 1.47; -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: var(--fill); color: var(--ink-2); padding: 1px 6px; border-radius: 6px; font: 12.5px var(--mono); }
h1, h2, h3, .brand { font-family: var(--font-display); }
h1 { font-size: 29px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; margin: 0 0 4px; }
h2 { font-size: 16.5px; font-weight: 650; letter-spacing: -.01em; margin: 0 0 12px; }
h3 { font-size: 14px; font-weight: 650; margin: 0 0 8px; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.num, td.num { font-variant-numeric: tabular-nums; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; }
::selection { background: rgba(240, 182, 86, .45); color: inherit; }

/* Frosted glass with a soft light rim */
.card, .sidebar, .flash, .demo-banner, .ask-bar input {
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
}
.card, .sidebar { position: relative; }
.card::before, .sidebar::before, .btn::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(165deg, var(--rim-top), var(--rim-bottom) 35%, transparent 60%, var(--rim-bottom) 85%, var(--rim-top));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}

/* Layout */
body.app { display: grid; grid-template-columns: 264px 1fr; }
.sidebar {
  margin: 12px 0 12px 12px; height: calc(100vh - 24px); position: sticky; top: 12px; overflow-y: auto; overscroll-behavior: contain;
  background:
    radial-gradient(260px 200px at 0% 0%, rgba(240, 182, 86, .22), transparent 70%),
    radial-gradient(240px 260px at 100% 100%, rgba(214, 228, 140, .10), transparent 70%),
    linear-gradient(180deg, rgba(27, 44, 84, .97) 0%, rgba(14, 24, 47, .98) 100%);
  border-radius: 24px; box-shadow: 0 24px 48px -24px rgba(10, 18, 38, .7); padding: 16px 10px; display: flex; flex-direction: column;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .18) transparent; color: #fff; --rim-top: rgba(255, 255, 255, .28); --rim-bottom: rgba(255, 255, 255, .04);
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 17.5px; letter-spacing: -.015em; padding: 4px 8px 14px; }
.brand img { width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .16), 0 6px 14px -6px rgba(0, 0, 0, .6); }
.brand small { font-size: 10px; font-weight: 800; color: var(--navy); background: var(--amber); border-radius: 6px; padding: 1px 5px; letter-spacing: .03em; font-family: var(--font); }
.brand:hover { text-decoration: none; }
.client-name { color: rgba(255, 255, 255, .85); font-size: 12.5px; font-weight: 600; padding: 9px 11px; margin: 0 2px 6px; background: rgba(255, 255, 255, .07); border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.client-switch select { margin: 0 0 8px; background-color: rgba(255, 255, 255, .07); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.client-switch select option { color: #172036; }
.sidebar nav { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.nav-group { font-size: 10.5px; font-weight: 700; color: rgba(255, 255, 255, .38); padding: 14px 12px 5px; letter-spacing: .12em; text-transform: uppercase; }
.sidebar nav a { color: rgba(255, 255, 255, .74); padding: 8px 12px; border-radius: 12px; font-size: 13.5px; font-weight: 500; display: flex; align-items: center; gap: 11px; position: relative; }
.sidebar nav a .ico { width: 18px; height: 18px; flex: none; color: rgba(255, 255, 255, .5); }
.sidebar nav a .lbl { flex: 1; min-width: 0; }
.sidebar nav a:hover { background: rgba(255, 255, 255, .06); text-decoration: none; color: #fff; }
.sidebar nav a:hover .ico { color: #fff; }
.sidebar nav a.active { background: linear-gradient(90deg, rgba(240, 182, 86, .24), rgba(240, 182, 86, .05)); color: #fff; font-weight: 650; box-shadow: inset 0 0 0 1px rgba(240, 182, 86, .22); }
.sidebar nav a.active::before { content: ""; position: absolute; left: -10px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--amber); box-shadow: 0 0 12px rgba(240, 182, 86, .8); }
.sidebar nav a.active .ico { color: var(--amber); }
.pill { background: var(--amber); color: var(--navy); border-radius: 999px; padding: 0 7px; font-size: 11px; font-weight: 800; min-width: 20px; text-align: center; }
.pill.hot { background: var(--bad-solid); color: #fff; }
.sidebar nav a.active .pill { background: var(--amber); color: var(--navy); }
.sidebar-foot { border-top: 1px solid rgba(255, 255, 255, .1); padding: 12px 8px 2px; margin-top: 8px; display: flex; justify-content: space-between; font-size: 12.5px; color: rgba(255, 255, 255, .6); }
.sidebar-foot a { color: var(--amber); }
.main { padding: 26px 30px 70px; max-width: 1340px; width: 100%; min-width: 0; }
body.app > * { min-width: 0; }
.grid > * { min-width: 0; }
body.bare { display: flow-root; }
body.bare .main { max-width: 440px; margin: 9vh auto; }
body.bare .card { padding: 26px; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 6px 0 20px; flex-wrap: wrap; }
.page-head p { margin: 6px 0 0; color: var(--muted); max-width: 780px; font-size: 14.5px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.card { background: var(--glass); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.card + .card, .grid + .card, .card + .grid, .grid + .grid { margin-top: 16px; }
.grid > .card + .card { margin-top: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 10px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.card.hl { background: linear-gradient(140deg, var(--amber-soft), transparent 55%), var(--glass); }
.card.alert-card { background: linear-gradient(140deg, var(--bad-soft), var(--orange-soft) 40%, transparent 70%), var(--glass); }

/* KPIs */
.kpi { padding: 16px 18px; }
.kpi .label { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.kpi .value { font-family: var(--font-num); font-size: 29px; font-weight: 700; margin-top: 4px; letter-spacing: -.015em; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kpi .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.kpi-ico { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--amber-soft); color: #c98a1d; flex: none; }
.kpi-ico svg { width: 18px; height: 18px; }
.kpi-ico.o { background: var(--orange-soft); color: #d9692a; }
.kpi-ico.l { background: var(--lime-soft); color: #6e8a1f; }
.kpi-ico.r { background: var(--bad-soft); color: var(--bad-solid); }
.kpi.accent { background: linear-gradient(135deg, #22386b 0%, #13213f 70%); color: #fff; }
.kpi.accent::before { background: linear-gradient(165deg, rgba(255, 255, 255, .35), transparent 40%, transparent 70%, rgba(240, 182, 86, .45)); }
.kpi.accent .label, .kpi.accent .sub { color: rgba(255, 255, 255, .72); }
.kpi.accent .kpi-ico { background: rgba(240, 182, 86, .2); color: var(--amber); }
.kpi.accent .delta.good { background: rgba(60, 196, 119, .22); color: #7ee2a8; }
.kpi.accent .delta.bad { background: rgba(240, 90, 90, .25); color: #ff9c9c; }
.delta { display: inline-flex; align-items: center; font-family: var(--font); font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 7px; letter-spacing: 0; }
.delta.good { color: var(--good); background: var(--good-soft); }
.delta.bad { color: var(--bad); background: var(--bad-soft); }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; }
td.num, th.num { text-align: right; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--hover); }
tr.row-good td:first-child { box-shadow: inset 3px 0 0 var(--good-solid); }
tr.row-bad td:first-child { box-shadow: inset 3px 0 0 var(--bad-solid); }

/* Badges and tags */
.badge { display: inline-block; font-size: 11.5px; font-weight: 650; padding: 2px 9px; border-radius: 999px; background: var(--fill); color: var(--ink-2); white-space: nowrap; }
.badge-good, .badge-low, .badge-pass, .badge-applied, .badge-sent, .badge-active, .badge-measured, .badge-high-confidence, .badge-ready, .badge-winner, .badge-ok, .badge-live, .badge-added, .badge-bid { background: var(--good-soft); color: var(--good); }
.badge-bad, .badge-high, .badge-failed, .badge-fix, .badge-error, .badge-disconnected, .badge-over, .badge-negative, .badge-blocked, .badge-navigational { background: var(--bad-soft); color: var(--bad); }
.badge-warn, .badge-medium, .badge-measuring, .badge-pending, .badge-retry, .badge-beta, .badge-staged, .badge-under, .badge-collecting, .badge-preview, .badge-caution { background: var(--orange-soft); color: var(--orange-text); }
.badge-brand, .badge-csv, .badge-auto, .badge-tinted { background: var(--accent-soft); color: var(--accent-text); }
.badge-transactional, .badge-decision { background: var(--amber-soft); color: var(--amber-text); }
.badge-commercial { background: var(--orange-soft); color: var(--orange-text); }
.badge-informational, .badge-content, .badge-awareness, .badge-seo { background: var(--lime-soft); color: var(--lime-text); }
.badge-in_account, .badge-neutral { background: var(--fill); color: var(--ink-2); }
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--fill); color: var(--ink-2); margin: 2px 3px 1px 0; white-space: nowrap; }
.tag-local { background: var(--good-soft); color: var(--good); }
.tag-price { background: var(--amber-soft); color: var(--amber-text); }
.tag-urgent, .tag-government { background: var(--bad-soft); color: var(--bad); }
.tag-competitor, .tag-compare { background: var(--orange-soft); color: var(--orange-text); }
.tag-question { background: var(--lime-soft); color: var(--lime-text); }

/* Buttons */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; color: var(--ink); padding: 7px 15px; border-radius: 999px; font: 600 13px var(--font); cursor: pointer; text-decoration: none; line-height: 1.3;
  background: var(--glass-strong); box-shadow: var(--shadow-sm); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: transform .12s ease, box-shadow .12s ease, background .12s ease; }
.btn:hover { text-decoration: none; background: var(--glass-solid); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--primary); color: var(--primary-fg); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 8px 18px -10px var(--primary-glow); }
.btn-primary:hover { background: var(--primary); filter: brightness(1.12); }
.btn-tinted, .btn-yellow { background: var(--amber); color: var(--navy); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 6px 14px -8px rgba(240, 182, 86, .9); }
.btn-tinted:hover, .btn-yellow:hover { background: #f4c46f; }
.btn-tinted::before, .btn-yellow::before { display: none; }
.btn-danger { color: var(--bad); }
.btn-sm { padding: 4px 11px; font-size: 12px; }
.btn:disabled { opacity: .55; cursor: wait; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
form.inline { display: inline; }

/* Fields */
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin: 10px 0 5px; }
input[type=text], input[type=tel], input[type=email], input[type=password], input[type=number], input[type=url], input[type=date], input[type=search], select, textarea {
  width: 100%; padding: 8px 12px; border: 0; border-radius: 12px; font: inherit; background: var(--field); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .15s, background .15s; }
select { -webkit-appearance: none; appearance: none; padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='14' viewBox='0 0 10 14'%3E%3Cpath d='M1.5 5L5 1.5 8.5 5M1.5 9L5 12.5 8.5 9' fill='none' stroke='%239aa0ad' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; background-color: var(--field-focus); box-shadow: 0 0 0 4px rgba(240, 182, 86, .35), inset 0 0 0 1px #d99a2e; }
input:disabled, select:disabled { opacity: .55; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; margin: 6px 0; }
.check input { width: 16px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.help { color: var(--muted); font-size: 12px; margin-top: 4px; font-weight: 400; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.toolbar > * { flex: 0 1 auto; }
.toolbar select, .toolbar input { width: auto; min-width: 150px; }
.toolbar input[type=checkbox], .toolbar input[type=radio] { min-width: 0; width: 16px; }
.sticky-actions { position: sticky; bottom: 12px; background: var(--glass-strong); -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%);
  border-radius: 18px; padding: 10px 14px; margin-top: 12px; z-index: 2; box-shadow: var(--shadow); }

.flash { padding: 11px 16px; border-radius: 14px; margin-bottom: 14px; font-weight: 600; box-shadow: var(--shadow-sm); }
.flash-success { background: linear-gradient(90deg, var(--good-soft), transparent), var(--glass-strong); color: var(--good); }
.flash-error { background: linear-gradient(90deg, var(--bad-soft), transparent), var(--glass-strong); color: var(--bad); }
.demo-banner { background: var(--glass); color: var(--ink-2); padding: 10px 16px 10px 34px; border-radius: 14px; margin-bottom: 16px; font-size: 13px; position: relative; box-shadow: var(--shadow-sm); }
.demo-banner::before { content: ""; position: absolute; left: 14px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px var(--amber-soft); }

/* Recommendation cards */
.rec { border-radius: 16px; padding: 14px 16px; background: var(--glass-strong); box-shadow: inset 0 0 0 1px var(--line); }
.rec + .rec { margin-top: 10px; }
.rec-top { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.rec h3 { font-size: 15px; margin: 0 0 4px; letter-spacing: -.01em; }
.rec .why { color: var(--ink-2); margin: 0 0 8px; }
.rec .impact { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.rec .impact strong { color: var(--good); }
.rec details { margin: 6px 0 10px; font-size: 12.5px; }
.rec details summary { cursor: pointer; color: var(--accent-text); font-weight: 600; }
.rec details pre { white-space: pre-wrap; background: var(--fill); padding: 8px; border-radius: 8px; font-size: 12px; max-height: 220px; overflow: auto; }

/* Segmented control */
.tabs { display: inline-flex; gap: 2px; padding: 3px; margin-bottom: 14px; flex-wrap: wrap; background: var(--fill); border-radius: 14px; }
.tabs a { padding: 5px 14px; border-radius: 11px; color: var(--ink-2); font-size: 13px; font-weight: 600; }
.tabs a:hover { text-decoration: none; background: var(--hover); color: var(--ink); }
.tabs a.active { background: var(--primary); color: var(--primary-fg); box-shadow: 0 4px 10px -6px var(--primary-glow); }

/* Charts */
.chart { width: 100%; height: auto; display: block; }
.chart .bar { fill: var(--chart-bar); }
.chart .bar-best { fill: var(--chart-best); }
.chart-label { font-size: 12.5px; fill: var(--ink); }
.chart-value { font-size: 12.5px; font-weight: 650; fill: var(--ink); }
.chart-muted { font-size: 11.5px; fill: var(--muted); font-weight: 400; }
.chart .ref-line { stroke: var(--orange); stroke-dasharray: 4 3; stroke-width: 1.5; }
.chart .line { fill: none; stroke: var(--chart-line); stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--chart-area); }
.donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.donut { width: 168px; height: 168px; flex: none; }
.donut circle.slice { fill: none; stroke-width: 26; }
.donut .center { fill: #13213f; }
.donut .cv { fill: #fff; font: 700 18px var(--font-num); }
.donut .cs { fill: rgba(255, 255, 255, .7); font: 500 10.5px var(--font); }
.legend { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; font-size: 12.5px; min-width: 120px; flex: 1; }
.legend li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.legend li span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.legend li b { font-variant-numeric: tabular-nums; }
.dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.s0 { stroke: var(--c0); background: var(--c0); } .s1 { stroke: var(--c1); background: var(--c1); } .s2 { stroke: var(--c2); background: var(--c2); }
.s3 { stroke: var(--c3); background: var(--c3); } .s4 { stroke: var(--c4); background: var(--c4); } .s5 { stroke: var(--c5); background: var(--c5); }
.s6 { stroke: var(--c6); background: var(--c6); } .s7 { stroke: var(--c7); background: var(--c7); } .s8 { stroke: var(--c8); background: var(--c8); }

.funnel-row { display: grid; grid-template-columns: 200px 1fr 90px; gap: 10px; align-items: center; margin: 6px 0; }
.funnel-bar { height: 22px; background: linear-gradient(90deg, var(--amber), var(--orange)); border-radius: 6px; min-width: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border-radius: 999px; padding: 4px 11px; font-size: 12.5px; background: var(--fill); color: var(--ink); }
.chip.empty { background: var(--amber-soft); color: var(--amber-text); box-shadow: inset 0 0 0 1px rgba(240, 182, 86, .6); }
.chip.ours { background: var(--good-soft); color: var(--good); }
.chip.claim { color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); background: transparent; }
.concept { border-radius: 16px; padding: 12px; background: var(--glass-strong); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 6px; }
.concept textarea { min-height: 70px; font-size: 13px; }
.empty-state { text-align: center; padding: 30px; color: var(--muted); }
.steps { counter-reset: s; padding-left: 0; list-style: none; }
.steps li { counter-increment: s; padding-left: 32px; position: relative; margin-bottom: 10px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--amber); color: var(--navy); font: 800 12px/22px var(--font); text-align: center; }

/* Meters */
.meter { position: relative; height: 10px; background: var(--fill); border-radius: 999px; overflow: hidden; min-width: 120px; }
.meter > span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: linear-gradient(90deg, #f6cf86, var(--amber)); }
.meter > span.y { background: var(--meter-alt); }
.meter > span.g { background: linear-gradient(90deg, #7fdca5, var(--good-solid)); }
.meter > span.r { background: linear-gradient(90deg, var(--orange), var(--bad-solid)); }
.meter.muted > span { background: var(--fill-2); }
.meter.ours > span { background: var(--meter-alt); }
.meter > i { position: absolute; top: -2px; bottom: -2px; width: 2px; border-radius: 1px; background: var(--ink); opacity: .5; }
.split { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--fill); }
.split > span { display: block; height: 100%; }

/* Platform tiles */
.platforms { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.platform { border-radius: 16px; padding: 14px; background: var(--glass-strong); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 6px; }
.platform h3 { margin: 0; display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 13.5px; }
.platform .count { font-family: var(--font-num); font-size: 24px; font-weight: 700; }
.platform .links { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }

/* Competitor feed */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 92px 1fr auto; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); align-items: start; }
.feed li:last-child { border-bottom: 0; }
.feed .when { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.feed .what { min-width: 0; }
.feed .what p { margin: 2px 0 0; color: var(--ink-2); overflow-wrap: anywhere; }
.feed .kind { font-size: 11px; font-weight: 700; letter-spacing: .02em; padding: 1px 8px; border-radius: 999px; }
.feed .kind.new_ad { color: var(--good); background: var(--good-soft); }
.feed .kind.stopped { color: var(--muted); background: var(--fill); }
.feed .kind.brand_bidding { color: var(--bad); background: var(--bad-soft); }

/* Search ad preview */
.serp-ad { border-radius: 14px; padding: 10px 13px; background: var(--glass-strong); box-shadow: inset 0 0 0 1px var(--line); }
.serp-ad .sponsored { font-size: 11.5px; font-weight: 700; color: var(--ink); }
.serp-ad .dom { font-size: 12px; color: var(--ink-2); }
.serp-ad .t { color: #1a0dab; font-size: 15px; margin: 2px 0; }
.serp-ad .d { font-size: 13px; color: var(--ink-2); }
.serp-ad.ours { background: linear-gradient(140deg, var(--amber-soft), transparent), var(--glass-strong); box-shadow: inset 0 0 0 1px rgba(240, 182, 86, .6); }

/* Chat */
.chat { display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 76%; padding: 10px 15px; border-radius: 20px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; line-height: 1.42; }
.msg.user { align-self: flex-end; background: var(--primary); color: var(--primary-fg); border-radius: 18px 6px 18px 18px; }
.msg.assistant { align-self: flex-start; background: var(--bubble); color: var(--ink); border-radius: 6px 18px 18px 18px; box-shadow: var(--shadow-sm), inset 3px 0 0 var(--amber); padding-left: 18px; }
.msg .meta { display: block; font-size: 11px; opacity: .6; margin-top: 3px; }
.chat-recs { align-self: flex-start; width: 76%; }
.chat .msg, .chat-recs { scroll-margin: 24px 0 96px; }
.ask-bar { display: flex; gap: 8px; position: sticky; bottom: 12px; padding: 12px 0 4px; z-index: 3; }
.ask-bar input { flex: 1; font-size: 15px; padding: 12px 18px; border-radius: 999px; background: var(--glass-strong); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.ask-bar .btn { padding: 0 20px; }
.ask-bar::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; bottom: -12px; z-index: -1; pointer-events: none; background: color-mix(in srgb, var(--bg) 70%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); -webkit-mask-image: linear-gradient(to bottom, transparent, #000 35%); mask-image: linear-gradient(to bottom, transparent, #000 35%); }
.suggest { display: flex; flex-wrap: wrap; gap: 6px; }
.suggest button { border: 0; background: var(--glass-strong); color: var(--ink-2); border-radius: 999px; padding: 6px 13px; font: 600 12.5px var(--font); cursor: pointer; box-shadow: var(--shadow-sm); }
.suggest button:hover { background: var(--amber-soft); color: var(--amber-text); }

/* Rule builder */
.cond { display: grid; grid-template-columns: 1.4fr .6fr 1fr; gap: 8px; margin-bottom: 6px; }
.rule-line { font-size: 12.5px; color: var(--ink-2); }
.rule-line b { color: var(--ink); font-weight: 650; }

/* Heat table */
.heat { text-align: center !important; font-weight: 650; font-variant-numeric: tabular-nums; }
.heat-0 { color: var(--muted); }
.heat-1 { background: rgba(240, 182, 86, .12); }
.heat-2 { background: rgba(240, 182, 86, .26); }
.heat-3 { background: rgba(240, 182, 86, .45); }
.heat-4 { background: rgba(240, 182, 86, .7); color: #13213f; }

/* Top bar: search + quick icons (desktop), with an instant results dropdown */
.mtop, .scrim, .tabbar, .sidebar .side-close { display: none; }
.side-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side-top .brand { flex: 1; }
.side-close { color: #fff; background: rgba(255, 255, 255, .08); box-shadow: none; }
.topline { display: flex; align-items: center; gap: 10px; margin: -6px 0 16px; position: relative; z-index: 20; }
.gsearch { position: relative; flex: 1; display: flex; align-items: center; }
.gsearch > .ico { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.gsearch input[type=search] { padding: 11px 16px 11px 42px; border-radius: 14px; background: var(--glass-strong); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); font-size: 14px; }
.gs-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; max-height: 70vh; overflow-y: auto; background: var(--glass-solid); border-radius: 16px; box-shadow: var(--shadow), 0 0 0 1px var(--line); padding: 6px; z-index: 60; }
.gs-results .grp { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); padding: 8px 10px 4px; }
.gs-results a { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.gs-results a:hover, .gs-results a.on { background: var(--amber-soft); }
.gs-results a span { font-size: 12px; color: var(--muted); }
.gs-results .none { padding: 12px; color: var(--muted); font-size: 13px; }
.iconbtn { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; background: var(--glass-strong); color: var(--ink-2); box-shadow: var(--shadow-sm); cursor: pointer; }
.iconbtn .ico { width: 19px; height: 19px; }
.iconbtn:hover { color: var(--ink); background: var(--glass-solid); text-decoration: none; }
.dotbadge { position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--bad-solid); color: #fff; font-size: 10.5px; line-height: 18px; text-align: center; }
.avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; display: inline-grid; place-items: center; background: linear-gradient(135deg, var(--amber), var(--orange)); color: #13213f; font: 800 15px var(--font-display); box-shadow: var(--shadow-sm); }
.results { list-style: none; margin: 0; padding: 0; }
.results li a { display: flex; flex-direction: column; gap: 1px; padding: 9px 4px; border-bottom: 1px solid var(--line); color: var(--ink); }
.results li:last-child a { border-bottom: 0; }
.results li a:hover { text-decoration: none; background: var(--hover); }

/* Background job panel */
.jobs { position: fixed; right: 18px; bottom: 18px; z-index: 45; width: min(380px, calc(100vw - 24px)); display: flex; flex-direction: column; gap: 8px; }
.job { display: flex; align-items: center; gap: 10px; padding: 11px 12px 11px 14px; border-radius: 16px; background: var(--glass-solid); box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.job-ico { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 2.5px solid var(--amber-soft); border-top-color: var(--amber); animation: spin .9s linear infinite; }
.job.done .job-ico { animation: none; border: 0; background: var(--good-solid); box-shadow: inset 0 0 0 5px var(--good-soft); }
.job.failed .job-ico { animation: none; border: 0; background: var(--orange); }
.job-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; }
.job-txt span { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.job-x { border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 2px 4px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .job-ico { animation-duration: 3s; } }
.jobs.raised { bottom: 96px; }
.job-more { align-self: flex-end; font-size: 12px; color: var(--muted); padding: 4px 12px; border-radius: 999px; background: var(--glass-solid); box-shadow: 0 0 0 1px var(--line); }
@media (max-width: 900px) {
  .jobs { right: 12px; left: 12px; width: auto; bottom: calc(92px + env(safe-area-inset-bottom)); }
  .jobs.raised { bottom: calc(158px + env(safe-area-inset-bottom)); }
}
@media print { .jobs { display: none !important; } }

/* Table quick filter (added by app.js to long tables) */
.tfilter { margin: 0 0 10px; }
.barrow { display: grid; grid-template-columns: minmax(0, 1.3fr) 2fr auto; gap: 12px; align-items: center; margin: 9px 0; }
.barrow .num { text-align: right; }
@media (max-width: 700px) {
  .barrow { grid-template-columns: 1fr auto; row-gap: 5px; }
  .barrow .meter { grid-column: 1 / -1; grid-row: 2; }
}
.tfilter input { max-width: 320px; padding: 7px 12px; font-size: 13px; }

/* Chat typing indicator */
.msg.typing { color: var(--muted); font-style: italic; }
.msg.typing i { display: inline-block; width: 6px; height: 6px; margin-right: 3px; border-radius: 50%; background: var(--amber); animation: blink 1.2s infinite ease-in-out; font-style: normal; }
.msg.typing i:nth-child(2) { animation-delay: .2s; }
.msg.typing i:nth-child(3) { animation-delay: .4s; margin-right: 8px; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .msg.typing i { animation: none; } .sidebar { transition: none; } }

/* Tables become cards on phones (labels come from the header, set by app.js) */
@media (max-width: 700px) {
  .table-wrap { overflow: visible; }
  table.rtable, .rtable tbody, .rtable tr, .rtable td { display: block; width: 100%; }
  .rtable thead { display: none; }
  .rtable tr { position: relative; padding: 10px 12px; margin: 0 0 10px; border-radius: 14px; background: var(--glass-strong); box-shadow: inset 0 0 0 1px var(--line); }
  .rtable tbody tr:hover td { background: none; }
  .rtable td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; text-align: right; min-width: 0; overflow-wrap: anywhere; }
  .rtable td::before { content: attr(data-label); flex: none; max-width: 48%; text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); }
  .rtable td.rt-title { display: block; text-align: left; font-size: 14.5px; padding: 0 34px 6px 0; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
  .rtable td.rt-title::before, .rtable td.rt-full::before, .rtable td[data-label=""]::before { display: none; }
  .rtable td.rt-full { display: block; text-align: center; }
  .rtable td.rt-check { position: absolute; top: 10px; right: 10px; width: auto; padding: 0; }
  .rtable td.num { text-align: right; }
  .rtable td.rt-block { display: block; text-align: left; }
  .rtable td.rt-block::before { display: block; max-width: none; margin-bottom: 4px; }
  .rtable td.rt-block .meter { margin: 3px 0; }
  .rtable td.rt-block label { display: inline; margin: 0 8px 0 0; }
  .rtable td.rt-block input:not([type=checkbox]), .rtable td.rt-block select { width: 100%; max-width: none; }
  .showall { width: 100%; margin-top: 4px; }
  .rtable td > div, .rtable td > .meter { flex: 1; min-width: 0; }
  .rtable td .meter { min-width: 80px; }
  .rtable tr.row-good, .rtable tr.row-bad { box-shadow: inset 0 0 0 1px var(--line), inset 4px 0 0 var(--good-solid); }
  .rtable tr.row-bad { box-shadow: inset 0 0 0 1px var(--line), inset 4px 0 0 var(--bad-solid); }
  .rtable tr td:first-child { box-shadow: none; }
  .rtable td input[type=number] { max-width: 130px; }
}

@media (prefers-color-scheme: dark) {
  :root:not(.light) .serp-ad .t { color: #8ab4f8; }
  :root:not(.light) .heat-4 { color: #13213f; }
  :root:not(.light) .steps li::before { color: #13213f; }
  :root:not(.light) .kpi.accent { background: linear-gradient(135deg, rgba(240, 182, 86, .30), rgba(240, 138, 75, .14) 55%, rgba(24, 35, 64, .6)); }
}

@media (max-width: 1100px) {
  .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Phones and tablets: top bar + slide-out menu + bottom tab bar. Tables become cards (see .rtable below). */
@media (max-width: 900px) {
  body.app { display: block; padding: 64px 0 88px; }
  .mtop { display: flex; position: fixed; top: 0; left: 0; right: 0; z-index: 30; height: 58px; align-items: center; justify-content: space-between; gap: 8px; padding: 0 10px;
    background: linear-gradient(180deg, rgba(27, 44, 84, .97), rgba(14, 24, 47, .97)); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: 0 8px 24px -14px rgba(10, 18, 38, .8); }
  .mtop .brand { padding: 0; font-size: 16.5px; color: #fff; }
  .mtop .brand img { width: 30px; height: 30px; }
  .mtop .iconbtn { color: #fff; background: rgba(255, 255, 255, .08); box-shadow: none; }
  .sidebar { position: fixed; z-index: 50; top: 0; bottom: 0; left: 0; margin: 0; height: auto; width: min(86vw, 320px); border-radius: 0 24px 24px 0;
    transform: translateX(-105%); transition: transform .25s ease; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  body.menu-open .sidebar { transform: none; }
  .sidebar .side-close { display: inline-grid; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(8, 14, 30, .45); opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.menu-open .scrim { opacity: 1; pointer-events: auto; }
  body.menu-open { overflow: hidden; }
  .tabbar { display: flex; position: fixed; z-index: 30; left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); padding: 6px; gap: 4px; border-radius: 22px;
    background: linear-gradient(180deg, rgba(27, 44, 84, .96), rgba(14, 24, 47, .98)); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
    box-shadow: 0 16px 36px -14px rgba(10, 18, 38, .85), inset 0 0 0 1px rgba(255, 255, 255, .08); }
  .tabbar a, .tabbar button { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 2px 6px; border: 0; border-radius: 16px; background: none;
    color: rgba(255, 255, 255, .7); font: 600 10.5px var(--font); cursor: pointer; position: relative; text-decoration: none; }
  .tabbar .ico { width: 22px; height: 22px; color: rgba(255, 255, 255, .6); }
  .tabbar .active { background: var(--amber); color: #13213f; }
  .tabbar .active .ico { color: #13213f; }
  .tabbar .pill { position: absolute; top: 2px; left: 54%; font-size: 9.5px; padding: 0 5px; min-width: 16px; }
  .main { padding: 14px 12px; }
  .topline { gap: 6px; margin-bottom: 12px; }
  .topline .iconbtn, .topline .avatar { display: none; }
  .gs-results { position: fixed; left: 8px; right: 8px; top: 120px; max-height: 60vh; }
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .page-head { margin: 4px 0 14px; align-items: flex-start; }
  .page-head > div:first-child { flex: 1 1 100%; }
  .page-head p { font-size: 13.5px; }
  .page-head .btn-row, .page-head > form, .page-head > .btn, .page-head > .tabs { flex: 0 1 auto; }
  .card { padding: 14px; border-radius: 18px; }
  .card-head { align-items: flex-start; }
  .card-head .tabs, .card-head .toolbar { width: 100%; }
  .tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { white-space: nowrap; }
  .funnel-row { grid-template-columns: 110px 1fr 56px; }
  .msg, .chat-recs { max-width: 92%; width: auto; }
  .feed li { grid-template-columns: 1fr; gap: 4px; }
  .cond { grid-template-columns: 1fr 1fr; }
  .cond input { grid-column: 1 / -1; }
  .ask-bar { bottom: 84px; }
  .ask-bar::before { bottom: -34px; }
  .chat .msg, .chat-recs { scroll-margin: 76px 0 176px; }
  .sticky-actions { bottom: 84px; position: sticky; }
  .platforms { grid-template-columns: 1fr; }
  .donut-wrap { justify-content: center; }
  h1 { font-size: 24px; }
  .demo-banner { font-size: 12.5px; }
  .form-row { grid-template-columns: 1fr; }
  .toolbar select, .toolbar input:not([type=checkbox]) { min-width: 0; width: 100%; }
  .toolbar > * { flex: 1 1 100%; }
  .toolbar > button, .toolbar > .btn { flex: 0 0 auto; }
}
@media (max-width: 560px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4, .grid-5 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 13px 14px; }
  .kpi .value { font-size: 21px; gap: 6px; }
  .kpi-ico { width: 28px; height: 28px; }
  .kpi-ico svg { width: 15px; height: 15px; }
  .toolbar select, .toolbar input { min-width: 0; width: 100%; }
  .toolbar > * { flex: 1 1 100%; }
}
@media (prefers-reduced-transparency: reduce) {
  .card, .sidebar, .btn, .ask-bar input, .sticky-actions, .flash, .demo-banner { -webkit-backdrop-filter: none; backdrop-filter: none; background-color: var(--glass-solid); }
}
@media print {
  :root, :root:not(.light) { color-scheme: light; --ink: #172036; --ink-2: #3d4658; --muted: #7a8092; --line: rgba(19, 33, 63, .12); --fill: rgba(19, 33, 63, .06); --fill-2: rgba(19, 33, 63, .12);
    --glass: #fff; --glass-strong: #fff; --good: #16834a; --bad: #c9353a; --accent: #13213f; --accent-text: #24418f; --chart-bar: #f0b656; --chart-best: #13213f; --c0: #13213f; }
  body { background: #fff !important; }
  .sidebar, .demo-banner, .btn, .no-print { display: none !important; }
  body.app { display: block; }
  .card { break-inside: avoid; box-shadow: none; background: #fff; border: 1px solid #ddd; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .card::before { display: none; }
  .kpi.accent { background: #13213f; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Account and two-step login */
a.avatar { text-decoration: none; }
.codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; margin-top: 10px; }
.codes code { font-size: 14px; padding: 6px 8px; text-align: center; background: var(--glass-strong); border-radius: 8px; }
.qr-wrap { display: inline-block; padding: 10px; background: #fff; border-radius: 14px; box-shadow: var(--shadow-sm); margin: 6px 0 4px; line-height: 0; }
.qr-wrap svg { width: 200px; height: 200px; }
.code-input { font-size: 20px; letter-spacing: .25em; font-variant-numeric: tabular-nums; max-width: 220px; }
.secret { word-break: break-all; }
.steps-list { margin: 4px 0 8px; padding-left: 20px; }
.steps-list li { margin: 2px 0; }

/* Bids & targeting forms */
.target-form { scroll-margin-top: 80px; }
.target-form > summary { cursor: pointer; list-style: none; display: flex; gap: 10px; align-items: baseline; }
.target-form > summary::-webkit-details-marker { display: none; }
.target-form > summary::before { content: "›"; display: inline-block; transition: transform .15s; font-weight: 700; color: var(--muted); }
.target-form[open] > summary::before { transform: rotate(90deg); }
.target-form h3 { font-size: 14px; margin: 16px 0 6px; }
.target-form form { margin-top: 6px; }
pre.code { background: var(--fill); color: var(--ink-2); padding: 10px 12px; border-radius: 10px; font: 12.5px/1.5 var(--mono); overflow-x: auto; white-space: pre; }

/* Customer Pulse */
.prow { margin: 12px 0; }
.prow .meter { margin: 5px 0 4px; }
.meter > span.lime { background: linear-gradient(90deg, #e9efc0, #b9c96a); }
.quote { font-size: 12.5px; color: var(--ink-2); margin: 3px 0 0; font-style: italic; }
.quote .muted { font-style: normal; }
.kpi .value.value-sm { font-size: 19px; line-height: 1.25; }
.angles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.angle { border-radius: 16px; padding: 14px; background: var(--glass-strong); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 6px; }
.angle h3 { font-size: 15px; margin: 4px 0 0; }
.angle p { margin: 0; }
.angle form { margin-top: auto; padding-top: 6px; }
.chip.phrase { cursor: default; font-size: 12.5px; }
.chip.phrase b { color: var(--muted); font-weight: 600; margin-left: 4px; }
table.heatmap td.heat { min-width: 44px; font-size: 12px; }
