/* XPARO Ads Center (apps/ads/templates/ads), on top of xp-pages.css.

   Only the Ads Center pages load this file (through ads/_layout.html), so the
   rules below that retheme shared xp-* pieces -- cards, buttons, tables, the
   page background -- change these pages only, never the plugin store or the
   devices pages that share layouts/xp_page.html.

   Look: a "serious" enterprise console. Deep slate base, slightly lighter
   panels with 1px hairlines, a faint 32px technical grid and ONE soft glow of
   the XPARO orange. The orange itself means exactly one thing on these
   pages: primary action / current selection / unread. Status colours are
   fixed: emerald = live/approved/online, amber = waiting for you,
   rose = declined/error/blocked, sky = system notes. */

:root {
  color-scheme: dark;
  --ad-bg: #0a0e16;
  --ad-panel: rgba(15, 23, 42, 0.72);
  --ad-panel-solid: #0f1521;
  --ad-sunken: rgba(2, 6, 15, 0.35);
  --ad-raised: rgba(30, 41, 59, 0.55);
  --ad-hover: rgba(148, 163, 184, 0.08);
  --ad-selected: rgba(148, 163, 184, 0.13);
  --ad-line: rgba(148, 163, 184, 0.14);
  --ad-line-strong: rgba(148, 163, 184, 0.26);
  --ad-text: #e2e8f0;
  --ad-strong: #f8fafc;
  --ad-muted: #94a3b8;
  --ad-accent: #ff7722;
  --ad-accent-hover: #ff8a3d;
  --ad-accent-soft: rgba(255, 119, 34, 0.14);
  --ad-on-accent: #0a0e16;
  --ad-ok: #34d399;
  --ad-ok-soft: rgba(16, 185, 129, 0.12);
  --ad-warn: #fbbf24;
  --ad-warn-soft: rgba(245, 158, 11, 0.12);
  --ad-bad: #fb7185;
  --ad-bad-soft: rgba(244, 63, 94, 0.12);
  --ad-info: #38bdf8;
  --ad-info-soft: rgba(14, 165, 233, 0.11);
  --ad-radius: 14px;
  --ad-radius-sm: 10px;
  --ad-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 24px 48px -30px rgba(0, 0, 0, 0.85);
  --ad-font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ad-mono: "JetBrains Mono", "Ubuntu Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

/* ------------------------------------------------------------ background */
/* The site's animated multi-colour gradient (style.css .header--bg) is
   replaced by a calm, fixed backdrop on these pages: <html> carries the base
   colour, <body> goes transparent, and .ad-backdrop (ads/_layout.html, a
   fixed aria-hidden element with z-index -1) paints the grid and the glow
   between them. */
html { background: var(--ad-bg); }
body.header--bg { background: transparent !important; animation: none !important; }
.ad-backdrop {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 560px at 82% -8%, rgba(255, 119, 34, 0.085), transparent 68%),
    linear-gradient(180deg, #0b111b 0%, #0a0e16 55%, #080b11 100%);
}
.ad-backdrop::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.045) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(ellipse 110% 85% at 50% 0%, #000 35%, transparent 90%);
  mask-image: radial-gradient(ellipse 110% 85% at 50% 0%, #000 35%, transparent 90%);
}

/* ------------------------------------------------------------ page base */
.xp-page {
  --xp-text: var(--ad-text);
  --xp-muted: var(--ad-muted);
  --xp-line: var(--ad-line);
  --xp-card: var(--ad-panel);
  --xp-accent: var(--ad-accent);
  --xp-link: var(--ad-strong);
  max-width: 1200px;
  padding-top: 18px;
  font-family: var(--ad-font);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ad-text);
  -webkit-font-smoothing: antialiased;
}
.xp-page a { color: var(--ad-strong); text-decoration: underline; text-decoration-color: rgba(148, 163, 184, 0.45);
  text-underline-offset: 3px; text-decoration-thickness: 1px; }
.xp-page a:hover { color: #fff; text-decoration-color: rgba(226, 232, 240, 0.9); }
.xp-page :focus-visible { outline: 2px solid var(--ad-accent); outline-offset: 2px; }
/* [hidden] must win over the display rules of buttons, cards and panes */
.xp-page [hidden] { display: none !important; }
.xp-page h1, .xp-page h2, .xp-page h3, .xp-page h4 { color: var(--ad-strong); letter-spacing: -0.01em; }
.xp-page h1 { font-size: clamp(24px, 3.2vw, 32px); font-weight: 700; letter-spacing: -0.02em; }
/* the second half of a title is quieter, not orange: orange is kept for actions */
.xp-page h1 span, .xp-page h2 span.xp-accent { color: var(--ad-muted); font-weight: 600; }
.xp-page h2 { font-size: 17px; font-weight: 650; }
.xp-page h3 { font-size: 15px; font-weight: 650; }
.xp-page code, .xp-page kbd { background: rgba(148, 163, 184, 0.12); color: var(--ad-text); }
.xp-page kbd { font-size: 11px; padding: 1px 5px; border: 1px solid var(--ad-line-strong); border-bottom-width: 2px; }
.xp-muted { color: var(--ad-muted); }
.xp-sub { color: var(--ad-muted); font-size: 13.5px; line-height: 1.55; }
.ad-num, .xp-page time, .xp-page td { font-variant-numeric: tabular-nums; }

/* small uppercase section labels */
.ad-label { display: block; margin: 0; font-size: 11px; font-weight: 650; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--ad-muted); line-height: 1.4; }
h2.ad-label, h3.ad-label { font-size: 11px; color: var(--ad-muted); letter-spacing: 0.09em; font-weight: 650; }
.ad-label--live::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%;
  vertical-align: 1px; background: var(--ad-ok); box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.16); }
.ad-tag { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--ad-line-strong);
  font-size: 11px; font-weight: 600; color: var(--ad-text); letter-spacing: 0.01em; white-space: nowrap; }
.ad-i { width: 16px; height: 16px; flex: none; }
.ad-i--sm { width: 14px; height: 14px; }
.ad-i--lg { width: 22px; height: 22px; }

/* ------------------------------------------------------------ cards, layout */
.xp-card { background: var(--ad-panel); border: 1px solid var(--ad-line); border-radius: var(--ad-radius); padding: 22px;
  box-shadow: var(--ad-shadow); }
@media (min-width: 991px) { .xp-card { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); } }
.xp-split { gap: 18px; }
.xp-stack > * + * { margin-top: 14px; }
.ad-section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 14px; }
.ad-section-head > div > .xp-sub { margin-top: 4px; }
.ad-section { margin-top: 30px; }
.ad-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }

/* page header */
.ad-head { margin: 26px 0 22px; }
.ad-head__row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; }
.ad-head__lead { margin-top: 8px !important; max-width: 72ch; color: var(--ad-muted); line-height: 1.6; }
.ad-head__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ad-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; padding: 0; list-style: none;
  font-size: 12.5px; color: var(--ad-muted); }
.ad-crumbs li + li::before { content: "/"; margin-right: 6px; color: rgba(148, 163, 184, 0.5); }
.xp-page .ad-crumbs a { color: var(--ad-muted); text-decoration: none; }
.xp-page .ad-crumbs a:hover { color: var(--ad-strong); text-decoration: underline; }
.ad-crumbs [aria-current] { color: var(--ad-text); }

/* flash messages from xp_page.html */
.xp-alert { border-radius: var(--ad-radius-sm); font-weight: 550; font-size: 14px; padding: 11px 14px; border-left-width: 3px; }
.xp-alert--success { background: var(--ad-ok-soft); border-color: rgba(52, 211, 153, 0.35); color: #a7f3d0; }
.xp-alert--error, .xp-alert--warning { background: var(--ad-bad-soft); border-color: rgba(251, 113, 133, 0.4); color: #fecdd3; }
.xp-alert--info { background: var(--ad-info-soft); border-color: rgba(56, 189, 248, 0.35); color: #e0f2fe; }
.xp-page .xp-alert a { color: inherit; }

/* ------------------------------------------------------------ buttons */
.xp-btn { min-height: 38px; padding: 8px 15px; gap: 8px; border-radius: var(--ad-radius-sm); border: 1px solid var(--ad-line-strong);
  background: rgba(148, 163, 184, 0.06); color: var(--ad-strong) !important; font-family: inherit; font-size: 13.5px;
  font-weight: 600; letter-spacing: 0.005em; transition: background-color 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s; }
.xp-btn:hover { background: rgba(148, 163, 184, 0.13); border-color: rgba(148, 163, 184, 0.42); }
.xp-btn:focus-visible { outline: 2px solid var(--ad-accent); outline-offset: 2px; }
.xp-btn--primary { background: var(--ad-accent); border-color: var(--ad-accent); color: var(--ad-on-accent) !important;
  box-shadow: 0 8px 24px -12px rgba(255, 119, 34, 0.7); }
.xp-btn--primary:hover { background: var(--ad-accent-hover); border-color: var(--ad-accent-hover); }
.xp-btn--danger { color: #fecdd3 !important; border-color: rgba(251, 113, 133, 0.38); background: rgba(244, 63, 94, 0.06); }
.xp-btn--danger:hover { background: rgba(244, 63, 94, 0.16); border-color: rgba(251, 113, 133, 0.6); }
.ad-btn--danger-solid { background: #e11d48; border-color: #e11d48; color: #fff !important; }
.ad-btn--danger-solid:hover { background: #f43f5e; border-color: #f43f5e; }
.ad-btn--ghost { background: transparent; border-color: transparent; color: var(--ad-text) !important; }
.ad-btn--ghost:hover { background: var(--ad-hover); border-color: var(--ad-line); }
.xp-btn--sm { min-height: 36px; padding: 6px 12px; font-size: 13px; border-radius: 9px; }
.ad-btn--lg { min-height: 44px; padding: 10px 20px; font-size: 14.5px; }
.ad-btn--block { width: 100%; }
.xp-btn[disabled], .xp-btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
button.xp-link-btn { color: var(--ad-muted); text-decoration: underline; text-decoration-color: rgba(148, 163, 184, 0.4); text-underline-offset: 3px; }
button.xp-link-btn:hover { color: var(--ad-strong); }

.ad-iconbtn { display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none; margin: 0; padding: 0;
  border-radius: var(--ad-radius-sm); border: 1px solid transparent; background: transparent; color: var(--ad-muted); cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s; }
.ad-iconbtn:hover { background: var(--ad-hover); border-color: var(--ad-line); color: var(--ad-strong); }
.ad-iconbtn:focus-within { outline: 2px solid var(--ad-accent); outline-offset: 2px; }
.ad-iconbtn:has(input:focus-visible) { outline: 2px solid var(--ad-accent); outline-offset: 2px; }
.ad-iconbtn:focus-visible { outline: 2px solid var(--ad-accent); outline-offset: 2px; }

/* "open in a new tab" marker for links that leave the Ads Center */
.ad-ext::after { content: "\2197"; display: inline-block; margin-left: 4px; font-size: 0.85em; opacity: 0.7; text-decoration: none; }

/* share button: same corner, same look, everywhere */
.ad-share { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 0 13px; margin: 0;
  border-radius: 999px; border: 1px solid rgba(148, 163, 184, 0.32); background: rgba(10, 14, 22, 0.74);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: var(--ad-strong); font: 600 12.5px/1 var(--ad-font);
  cursor: pointer; white-space: nowrap; transition: background-color 0.15s, border-color 0.15s, color 0.15s; }
.ad-share:hover { background: rgba(15, 23, 42, 0.94); border-color: rgba(148, 163, 184, 0.6); }
.ad-share:focus-visible { outline: 2px solid var(--ad-accent); outline-offset: 2px; }
.ad-share.is-done { border-color: rgba(52, 211, 153, 0.6); color: #a7f3d0; }
.ad-share--wide { width: 100%; min-height: 40px; border-radius: var(--ad-radius-sm); background: rgba(148, 163, 184, 0.06); font-size: 13.5px; }

/* ------------------------------------------------------------ forms */
.xp-field label, .ad-field-label { display: block; margin: 0 0 6px; font-size: 12.5px; font-weight: 600; color: var(--ad-text); letter-spacing: 0.01em; }
.xp-field .xp-hint, .ad-field-label .xp-hint { font-weight: 400; color: var(--ad-muted); }
.xp-help { font-size: 12.5px; color: var(--ad-muted); line-height: 1.5; }
.xp-page .xp-input, .xp-page select.xp-input, .xp-page textarea.xp-input, .ad-dialog .xp-input {
  min-height: 40px; padding: 9px 12px; border-radius: var(--ad-radius-sm); background-color: rgba(2, 6, 15, 0.45) !important;
  color: var(--ad-strong) !important; border: 1px solid var(--ad-line-strong); font-family: inherit; font-size: 14px; line-height: 1.4;
  transition: border-color 0.15s, box-shadow 0.15s; display: block; width: 100%; margin: 0; }
.xp-page .xp-input:hover { border-color: rgba(148, 163, 184, 0.4); }
.xp-page .xp-input:focus, .ad-dialog .xp-input:focus { outline: none; border-color: var(--ad-accent); box-shadow: 0 0 0 3px rgba(255, 119, 34, 0.2); }
.xp-page .xp-input::placeholder, .ad-dialog .xp-input::placeholder { color: rgba(148, 163, 184, 0.7); }
.xp-page select.xp-input option { color: var(--ad-strong); background: var(--ad-panel-solid); }
.xp-page .xp-check { font-size: 13.5px; font-weight: 500; color: var(--ad-text); margin: 0; }
.xp-page input[type="checkbox"], .xp-page input[type="radio"] { accent-color: var(--ad-accent); width: 16px; height: 16px; }
.xp-error, .xp-page .errorlist { color: #fda4af; font-size: 12.5px; }
.ad-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.ad-fieldset > legend { padding: 0; margin-bottom: 10px; }
.ad-form-section { padding-top: 18px; margin-top: 4px; border-top: 1px solid var(--ad-line); }
.ad-form-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 18px; border-top: 1px solid var(--ad-line); }
.ad-photo-pick { display: flex; flex-direction: column; gap: 6px; padding: 6px; border-radius: var(--ad-radius-sm); border: 1px solid var(--ad-line); }
.ad-photo-pick img { width: 112px; height: 80px; object-fit: cover; border-radius: 7px; display: block; }
.xp-page .xp-field label.ad-photo-pick, .xp-page label.ad-photo-pick { font-weight: 500; }

/* ------------------------------------------------------------ badges, KPIs, tables */
.xp-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 8px; border-radius: 999px; font-size: 11.5px;
  font-weight: 650; letter-spacing: 0.01em; border: 1px solid transparent; line-height: 1.35; }
.xp-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.xp-badge--ok { background: var(--ad-ok-soft); border-color: rgba(52, 211, 153, 0.28); color: #6ee7b7; }
.xp-badge--warn { background: var(--ad-warn-soft); border-color: rgba(251, 191, 36, 0.3); color: #fcd34d; }
.xp-badge--bad { background: var(--ad-bad-soft); border-color: rgba(251, 113, 133, 0.3); color: #fda4af; }
.xp-badge--info { background: var(--ad-info-soft); border-color: rgba(56, 189, 248, 0.28); color: #7dd3fc; }
.xp-badge--muted { background: rgba(148, 163, 184, 0.08); border-color: var(--ad-line); color: var(--ad-muted); }
.ad-badge--live::before { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); animation: ad-pulse 1.8s ease-out infinite; }
@keyframes ad-pulse { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); } 70%, 100% { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); } }
.xp-dot { width: 8px; height: 8px; background: #64748b; }
.xp-dot--on { background: var(--ad-ok); box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.18); }

.xp-stats { gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
/* KPI tile: the label reads first visually (small caps label above), the
   number second; DOM order stays "value, label" so it reads naturally aloud. */
.xp-stat { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px; padding: 16px 18px;
  border-radius: var(--ad-radius); background: var(--ad-panel); border: 1px solid var(--ad-line); box-shadow: var(--ad-shadow); }
.xp-stat strong { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; color: var(--ad-strong); line-height: 1.1;
  font-variant-numeric: tabular-nums; }
.xp-stat span { font-size: 11px; font-weight: 650; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ad-muted); }

.xp-table-wrap { overflow-x: auto; }
.xp-table { font-size: 13.5px; }
.xp-table th { font-size: 11px; font-weight: 650; letter-spacing: 0.09em; color: var(--ad-muted); padding: 10px 12px;
  border-bottom: 1px solid var(--ad-line); white-space: nowrap; }
.xp-table td { padding: 12px; border-bottom: 1px solid rgba(148, 163, 184, 0.08); font-variant-numeric: tabular-nums; }
.xp-table tbody tr { transition: background-color 0.12s; }
.xp-table tbody tr:hover { background: rgba(148, 163, 184, 0.04); }
.xp-table .ad-cell-main { font-weight: 600; color: var(--ad-strong); }
.xp-table .ad-cell-actions { text-align: right; white-space: nowrap; }
.xp-card.ad-table-card { padding: 6px 8px; }

.xp-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; padding: 28px; color: var(--ad-muted); }
.xp-empty .xp-btn { margin-top: 10px; }
.xp-empty h2, .xp-empty h3 { color: var(--ad-strong); }
.ad-empty-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 6px; border-radius: 12px;
  border: 1px solid var(--ad-line); background: rgba(148, 163, 184, 0.06); color: var(--ad-muted); }

/* ------------------------------------------------------------ Ads Center nav */
/* One persistent bar in the same place on every page (context retention);
   the current page is the only highlighted tab. */
.ad-nav { position: sticky; top: 10px; z-index: 40; display: flex; align-items: center; gap: 4px; padding: 4px;
  border: 1px solid var(--ad-line); border-radius: 14px; background: rgba(10, 14, 22, 0.82);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 16px 40px -24px rgba(0, 0, 0, 0.9); }
.xp-page .ad-nav a { text-decoration: none; }
.ad-nav__brand { display: inline-flex; align-items: center; gap: 10px; flex: none; min-height: 38px; padding: 0 14px 0 6px;
  margin-right: 2px; border-right: 1px solid var(--ad-line); color: var(--ad-strong) !important; font-size: 13.5px;
  font-weight: 700; letter-spacing: 0.01em; white-space: nowrap; }
.ad-nav__mark { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px;
  background: linear-gradient(140deg, #ff7722, #ff9f5a); color: var(--ad-on-accent); }
.ad-nav__brand[aria-current="page"] .ad-nav__name { text-decoration: underline; text-decoration-color: var(--ad-accent);
  text-decoration-thickness: 2px; text-underline-offset: 6px; }
.ad-nav__tabs { display: flex; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.ad-nav__tabs::-webkit-scrollbar { display: none; }
.ad-nav__tab { position: relative; display: inline-flex; align-items: center; gap: 8px; flex: none; min-height: 38px; padding: 0 12px;
  border-radius: 10px; color: var(--ad-muted) !important; font-size: 13px; font-weight: 600; white-space: nowrap;
  scroll-snap-align: start; transition: background-color 0.15s, color 0.15s; }
.ad-nav__tab:hover { color: var(--ad-strong) !important; background: var(--ad-hover); }
.ad-nav__tab .ad-i { opacity: 0.85; }
.ad-nav__tab[aria-current="page"] { color: var(--ad-strong) !important; background: var(--ad-selected); box-shadow: inset 0 0 0 1px var(--ad-line); }
.ad-nav__tab[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px;
  border-radius: 2px; background: var(--ad-accent); }
.ad-nav__end { display: flex; align-items: center; gap: 4px; flex: none; padding-left: 4px; }
.ad-count { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 6px; border-radius: 999px;
  background: var(--ad-accent); color: var(--ad-on-accent); font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
@media (max-width: 720px) {
  .ad-nav { top: 6px; }
  .ad-nav__name { display: none; }
  .ad-nav__brand { padding-right: 8px; }
  .ad-nav__tab { padding: 0 10px; }
}

/* ------------------------------------------------------------ notices */
.ad-notice { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border-radius: var(--ad-radius-sm);
  border: 1px solid rgba(251, 191, 36, 0.24); border-left: 3px solid var(--ad-warn); background: rgba(245, 158, 11, 0.07);
  color: #e7e5e4; font-size: 13.5px; line-height: 1.55; }
.ad-notice strong { color: #fde68a; font-weight: 650; }
.ad-notice svg { flex: none; margin-top: 2px; color: var(--ad-warn); }
.ad-notice--compact { padding: 8px 12px; font-size: 12.5px; }
.ad-zero { display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--ad-ok-soft);
  border: 1px solid rgba(52, 211, 153, 0.25); color: #a7f3d0; font-weight: 650; font-size: 12.5px; width: fit-content; }
.ad-zero b { font-size: 15px; color: #6ee7b7; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ home */
.ad-hero { display: grid; gap: 22px; grid-template-columns: 1fr; margin: 30px 0 34px; }
@media (min-width: 940px) { .ad-hero { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); align-items: stretch; } }
.ad-hero__copy { display: flex; flex-direction: column; justify-content: center; padding: 8px 0; }
.xp-page .ad-hero h1 { margin-top: 14px; font-size: clamp(30px, 5vw, 48px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 750; }
.xp-page .ad-hero h1 span { background: linear-gradient(92deg, #e2e8f0 0%, #94a3b8 100%); -webkit-background-clip: text; background-clip: text;
  color: transparent; }
@media (forced-colors: active) { .xp-page .ad-hero h1 span { background: none; color: CanvasText; } }
.ad-hero__lead { margin-top: 16px !important; max-width: 58ch; font-size: 16px; line-height: 1.65; color: var(--ad-muted); }
.ad-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.ad-trust { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 22px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--ad-muted); }
.ad-trust li { display: inline-flex; align-items: center; gap: 7px; }
.ad-trust svg { color: var(--ad-ok); }
.ad-hero__panel { display: flex; flex-direction: column; gap: 14px; }
.ad-kpi { display: flex; align-items: baseline; gap: 10px; }
.ad-kpi strong { font-size: 44px; line-height: 1; font-weight: 750; letter-spacing: -0.03em; color: var(--ad-strong); font-variant-numeric: tabular-nums; }
.ad-kpi span { color: var(--ad-muted); font-size: 14px; }
.ad-facts-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--ad-line);
  border-radius: var(--ad-radius-sm); overflow: hidden; background: var(--ad-line); }
.ad-facts-row > div { padding: 10px 12px; background: var(--ad-panel-solid); }
.ad-facts-row strong { display: block; font-size: 15px; color: var(--ad-strong); font-variant-numeric: tabular-nums; }
.ad-facts-row span { font-size: 11.5px; color: var(--ad-muted); }

.ad-steps { display: grid; gap: 0; grid-template-columns: 1fr; margin: 0; padding: 0; list-style: none; border: 1px solid var(--ad-line);
  border-radius: var(--ad-radius); overflow: hidden; background: var(--ad-panel); }
@media (min-width: 860px) { .ad-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ad-step { position: relative; padding: 20px 20px 22px; }
.ad-step + .ad-step { border-top: 1px solid var(--ad-line); }
@media (min-width: 860px) { .ad-step + .ad-step { border-top: 0; border-left: 1px solid var(--ad-line); } }
.ad-step__n { display: block; margin-bottom: 12px; font-family: var(--ad-mono); font-size: 12px; color: var(--ad-muted); letter-spacing: 0.06em; }
.ad-step p { margin-top: 6px !important; font-size: 13.5px; line-height: 1.55; color: var(--ad-muted); }
.ad-owner { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; margin-top: 26px; }
.ad-owner .xp-sub { margin-top: 6px; max-width: 70ch; }

/* ------------------------------------------------------------ listing cards */
.ad-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.ad-card { position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--ad-radius);
  border: 1px solid var(--ad-line); background: var(--ad-panel); box-shadow: var(--ad-shadow); color: var(--ad-text);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease; }
.ad-card:hover { transform: translateY(-2px); border-color: rgba(148, 163, 184, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 26px 50px -28px rgba(0, 0, 0, 0.95); }
.ad-card:has(.ad-card__link:focus-visible) { outline: 2px solid var(--ad-accent); outline-offset: 2px; }
.ad-card__img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background-color: #0d1320;
  background-image: linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
  background-size: 16px 16px; }
.ad-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.ad-card:hover .ad-card__img img { transform: scale(1.03); }
.ad-card__img::after { content: ""; position: absolute; inset: auto 0 0 0; height: 40%; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(10, 14, 22, 0.55)); }
.ad-card__ph { display: grid; place-items: center; height: 100%; color: rgba(148, 163, 184, 0.45); }
.ad-card__count { position: absolute; left: 10px; bottom: 10px; z-index: 1; display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: 6px; background: rgba(10, 14, 22, 0.78); border: 1px solid var(--ad-line); color: var(--ad-text);
  font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ad-card__body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1; }
.ad-card__price { font-size: 15.5px; font-weight: 700; color: var(--ad-strong); font-variant-numeric: tabular-nums; }
.xp-page .ad-card__title { margin: 0; font-size: 14.5px; font-weight: 600; line-height: 1.35; letter-spacing: 0; }
.xp-page .ad-card__link { color: var(--ad-text); text-decoration: none; }
.xp-page .ad-card__link:hover { color: var(--ad-strong); }
.ad-card__link:focus-visible { outline: none; }
/* stretched link: the whole card is one big target, while the Share button
   (a sibling, not a child) keeps working on its own */
.ad-card__link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.ad-card__meta { font-size: 12.5px; color: var(--ad-muted); }
.ad-card__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; margin-top: auto; padding-top: 8px; }
/* share sits in the top-right corner of the photo on every card */
.ad-card__share { position: absolute; top: 10px; right: 10px; z-index: 2; }
.ad-card .xp-badge { position: relative; z-index: 2; }

.ad-stars { display: inline-flex; align-items: center; gap: 1px; color: var(--ad-warn); letter-spacing: 1px; white-space: nowrap; font-size: 13px; }
.ad-stars .ad-stars__off { color: rgba(148, 163, 184, 0.28); }
.ad-stars small { color: var(--ad-muted); letter-spacing: 0; margin-left: 6px; font-size: 12px; font-variant-numeric: tabular-nums; }

/* filters toolbar */
.ad-filters { display: grid; gap: 12px; grid-template-columns: 1fr; margin-bottom: 18px; padding: 14px; }
@media (min-width: 760px) { .ad-filters { grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)) auto; align-items: end; } }
.ad-search-field { position: relative; }
.ad-search-field .ad-i { position: absolute; left: 12px; bottom: 12px; color: var(--ad-muted); pointer-events: none; }
.xp-page .ad-search-field .xp-input { padding-left: 36px; }
.ad-results { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 12px; }
.ad-pager { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 24px; }

/* ------------------------------------------------------------ listing page */
.ad-summary { display: grid; gap: 18px; grid-template-columns: 1fr; margin-bottom: 18px; }
@media (min-width: 900px) { .ad-summary { grid-template-columns: minmax(0, 1fr) auto; align-items: end; } }
.ad-summary__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 10px; color: var(--ad-muted); font-size: 13.5px; }
.ad-summary__meta > * { display: inline-flex; align-items: center; gap: 6px; }
.ad-summary__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ad-price { font-size: 26px; font-weight: 750; letter-spacing: -0.02em; color: var(--ad-strong); font-variant-numeric: tabular-nums; line-height: 1.15; }
.ad-cta { display: flex; flex-direction: column; gap: 10px; }
.ad-cta form { margin: 0; }
.ad-cta__note { font-size: 12px; color: var(--ad-muted); }
.ad-divider { height: 1px; background: var(--ad-line); border: 0; margin: 4px 0; }

.ad-gallery { padding: 10px; }
.ad-gallery__main { position: relative; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: #05070c; }
.ad-gallery__main button { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.ad-gallery__main img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ad-gallery__thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding: 2px 2px 4px; }
.ad-gallery__thumbs button { flex: none; width: 76px; height: 56px; padding: 0; border-radius: 8px; overflow: hidden;
  border: 2px solid transparent; background: none; cursor: pointer; opacity: 0.7; transition: opacity 0.15s, border-color 0.15s; }
.ad-gallery__thumbs button:hover { opacity: 1; }
.ad-gallery__thumbs button[aria-current="true"] { border-color: var(--ad-accent); opacity: 1; }
.ad-gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ad-gallery__empty { display: flex; align-items: center; gap: 10px; padding: 26px; color: var(--ad-muted); }

.ad-facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; margin: 0; font-size: 14px; }
.ad-facts dt { color: var(--ad-muted); font-size: 12.5px; padding-top: 1px; }
.ad-facts dd { margin: 0; color: var(--ad-text); }
.ad-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ad-chip { padding: 3px 9px; border-radius: 6px; background: rgba(148, 163, 184, 0.08); border: 1px solid var(--ad-line); font-size: 12.5px; color: var(--ad-text); }
.ad-desc { white-space: pre-line; line-height: 1.65; color: var(--ad-text); }

.ad-screens { display: flex; flex-wrap: wrap; gap: 12px; }
.ad-screen { width: 92px; font-size: 12px; color: var(--ad-muted); }
.ad-screen__box { position: relative; height: 54px; border-radius: 7px; border: 1px solid var(--ad-line-strong);
  background: rgba(2, 6, 15, 0.5); margin-bottom: 6px; overflow: hidden; }
.ad-screen__ad { position: absolute; background: rgba(148, 163, 184, 0.55); border-radius: 2px; }
.ad-screen--fullscreen .ad-screen__ad { inset: 3px; }
.ad-screen--left .ad-screen__ad { left: 3px; top: 3px; bottom: 3px; width: 30%; }
.ad-screen--right .ad-screen__ad { right: 3px; top: 3px; bottom: 3px; width: 30%; }
.ad-screen--top .ad-screen__ad { left: 3px; right: 3px; top: 3px; height: 24%; }
.ad-screen--bottom .ad-screen__ad { left: 3px; right: 3px; bottom: 3px; height: 24%; }
.ad-screen--center .ad-screen__ad { left: 22%; right: 22%; top: 22%; bottom: 22%; }

.ad-project { display: flex; gap: 14px; align-items: center; }
.ad-project img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; flex: none; background: var(--ad-raised); border: 1px solid var(--ad-line); }

.ad-review { padding: 14px 0; border-bottom: 1px solid var(--ad-line); }
.ad-review:first-of-type { padding-top: 4px; }
.ad-review:last-of-type { border-bottom: 0; }
.ad-review__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.ad-review__head strong { color: var(--ad-strong); }
.ad-review__reply { margin-top: 10px; padding: 10px 12px; border-radius: 8px; border-left: 2px solid var(--ad-line-strong);
  background: rgba(148, 163, 184, 0.05); font-size: 13.5px; }
.ad-review details summary { cursor: pointer; color: var(--ad-muted); font-size: 12.5px; }
.ad-review details summary:hover { color: var(--ad-strong); }
.ad-review-form { margin-top: 6px; padding-top: 18px; border-top: 1px solid var(--ad-line); }
.ad-rate { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.ad-rate input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.xp-page .ad-rate label { font-size: 26px; line-height: 1; padding: 4px 3px; color: rgba(148, 163, 184, 0.3); cursor: pointer; margin: 0 !important; }
.xp-page .ad-rate input:checked ~ label, .xp-page .ad-rate label:hover, .xp-page .ad-rate label:hover ~ label { color: var(--ad-warn); }
.ad-rate input:focus-visible + label { outline: 2px solid var(--ad-accent); border-radius: 4px; }
.ad-inline-form { display: inline; margin: 0; }

/* ------------------------------------------------------------ campaign + dashboard */
.ad-creative { display: block; max-width: 100%; border-radius: 10px; background: #000; border: 1px solid var(--ad-line); }
.ad-creative--text { padding: 22px; border-radius: 10px; background: #000; border: 1px solid var(--ad-line); color: #fff;
  font-size: 20px; font-weight: 700; text-align: center; }
.ad-bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding-bottom: 22px; border-bottom: 1px solid var(--ad-line); }
.ad-bar { flex: 1 1 0; min-width: 4px; position: relative; height: 100%; display: flex; align-items: flex-end; }
.ad-bar span { display: block; width: 100%; border-radius: 3px 3px 0 0; background: linear-gradient(180deg, #7dd3fc, #38bdf8); min-height: 2px; }
.ad-bar span.is-zero { background: rgba(148, 163, 184, 0.16); }
.ad-bar em { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 10.5px;
  color: var(--ad-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ad-bars-empty { display: flex; align-items: center; justify-content: center; min-height: 110px; padding: 12px; border: 1px dashed var(--ad-line-strong);
  border-radius: var(--ad-radius-sm); color: var(--ad-muted); font-size: 13px; }
.ad-actions-card .ad-help-row { font-size: 12.5px; color: var(--ad-muted); line-height: 1.5; }
.ad-actions-card form { margin: 0; }
/* with JS on, the reason box moves into the confirmation dialog */
.ad-js .ad-inline-reason { display: none; }

.ad-dash-list { display: grid; gap: 14px; }
.ad-dash { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .ad-dash { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; } }
.xp-page .ad-dash h3 { font-size: 16px; }
.xp-page .ad-dash h3 a { color: var(--ad-strong); text-decoration: none; }
.xp-page .ad-dash h3 a:hover { text-decoration: underline; }
.ad-dash__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-top: 6px !important; font-size: 12.5px; color: var(--ad-muted); }
.ad-dash__nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-top: 14px; border: 1px solid var(--ad-line);
  border-radius: var(--ad-radius-sm); overflow: hidden; background: var(--ad-line); }
.ad-dash__nums div { display: flex; flex-direction: column-reverse; gap: 4px; padding: 10px 12px; background: var(--ad-panel-solid); }
.ad-dash__nums strong { font-size: 18px; font-weight: 700; color: var(--ad-strong); font-variant-numeric: tabular-nums; }
.ad-dash__nums span { font-size: 10.5px; color: var(--ad-muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 650; }
@media (max-width: 480px) { .ad-dash__nums { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ad-updated { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ad-muted); }

/* requests waiting for the owner */
.ad-requests { border-color: rgba(251, 191, 36, 0.28); }
.ad-requests .ad-label { color: #fcd34d; }

/* my listings */
.ad-mine { position: relative; display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.ad-mine .ad-card__img { aspect-ratio: 16 / 9; }
.ad-mine__body { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 18px; flex: 1; }
.ad-mine__nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--ad-line);
  border-radius: var(--ad-radius-sm); overflow: hidden; background: var(--ad-line); }
.ad-mine__nums span { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; background: var(--ad-panel-solid);
  font-size: 10.5px; color: var(--ad-muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 650; }
.ad-mine__nums strong { font-size: 17px; color: var(--ad-strong); font-variant-numeric: tabular-nums; letter-spacing: 0; text-transform: none; }
.ad-mine__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.ad-warn-text { color: #fcd34d; font-size: 12.5px; }

.ad-checklist { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.ad-checklist li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.5; }
.ad-checklist li > svg { flex: none; margin-top: 2px; color: var(--ad-muted); }
.ad-checklist li.is-done > svg { color: var(--ad-ok); }

/* storage meter */
.ad-meter { height: 6px; border-radius: 999px; background: rgba(148, 163, 184, 0.14); overflow: hidden; }
.ad-meter span { display: block; height: 100%; background: linear-gradient(90deg, #38bdf8, #7dd3fc); border-radius: inherit; transition: width 0.3s ease; }
.ad-storage { display: grid; gap: 16px 28px; grid-template-columns: 1fr; margin-top: 18px; }
@media (min-width: 900px) { .ad-storage { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.ad-storage form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin: 0; }
.ad-storage form .xp-field { flex: 1 1 220px; }

/* ------------------------------------------------------------ messages: split pane */
/* Left: every chat. Right: the open one, loaded in place (static/js/ads.js)
   so picking a chat never reloads the page. Under 900px the conversation
   slides over the list with a back button, like the robot fleet chat. */
/* Height = the viewport minus the sticky Ads Center bar above (64px incl. the
   scroll margin) and the site's fixed bottom pill below (style.css
   .search-form: 14px + 40px, plus 26px air = 80px). ads.js scrolls the pane
   to its scroll margin when a chat opens, so the composer is never under the
   pill. 100vh first for browsers without dvh. */
.ad-chat { position: relative; display: grid; grid-template-columns: 1fr;
  height: clamp(440px, calc(100vh - 144px), 880px);
  height: clamp(440px, calc(100dvh - 144px - env(safe-area-inset-bottom, 0px)), 880px);
  border: 1px solid var(--ad-line); border-radius: 16px; background: rgba(13, 19, 31, 0.86); overflow: hidden; box-shadow: var(--ad-shadow);
  scroll-margin-top: 64px; }
@media (min-width: 900px) { .ad-chat { grid-template-columns: 320px minmax(0, 1fr); } }
@media (min-width: 1200px) { .ad-chat { grid-template-columns: 350px minmax(0, 1fr); } }
.ad-chat__side { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--ad-sunken); }
@media (min-width: 900px) { .ad-chat__side { border-right: 1px solid var(--ad-line); } }
.ad-chat__sidehead { padding: 14px 14px 12px; border-bottom: 1px solid var(--ad-line); }
.ad-chat__sidehead .ad-card-head { gap: 6px; }
.ad-search { position: relative; margin-top: 10px; }
.ad-search .ad-i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ad-muted); pointer-events: none; }
.xp-page .ad-search input { width: 100%; height: 38px; margin: 0; padding: 0 12px 0 34px; border-radius: var(--ad-radius-sm);
  border: 1px solid var(--ad-line); background: rgba(148, 163, 184, 0.06); color: var(--ad-strong); font: 14px/1 var(--ad-font); }
.xp-page .ad-search input::placeholder { color: rgba(148, 163, 184, 0.75); }
.xp-page .ad-search input:focus { outline: none; border-color: var(--ad-accent); box-shadow: 0 0 0 3px rgba(255, 119, 34, 0.18); }
.ad-convs { flex: 1; min-height: 0; margin: 0; padding: 6px; list-style: none; overflow-y: auto; overscroll-behavior: contain; }
.ad-convs[hidden], .ad-chat__sidehead .ad-num[hidden], .ad-chat__none[hidden] { display: none; }
.ad-convs li + li { margin-top: 2px; }
.xp-page .ad-conv { position: relative; display: flex; gap: 11px; align-items: center; padding: 10px 10px 10px 12px; border-radius: var(--ad-radius-sm);
  color: var(--ad-text); text-decoration: none; transition: background-color 0.12s; }
.ad-conv:hover { background: var(--ad-hover); }
.ad-conv[aria-current="page"] { background: var(--ad-selected); }
.ad-conv[aria-current="page"]::before { content: ""; position: absolute; left: 2px; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--ad-accent); }
.ad-conv:focus-visible { outline-offset: -2px; }
.ad-avatar { position: relative; display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 10px; overflow: hidden;
  background: linear-gradient(140deg, #1e293b, #0f172a); border: 1px solid var(--ad-line); color: #cbd5e1; font-weight: 700; font-size: 15px; }
.ad-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ad-avatar--lg { width: 44px; height: 44px; }
.ad-conv__main { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.ad-conv__top { display: flex; align-items: baseline; gap: 8px; }
.ad-conv__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 14px; color: var(--ad-strong); }
.ad-conv__time { flex: none; font-size: 11.5px; color: var(--ad-muted); font-variant-numeric: tabular-nums; }
.ad-conv__sub, .ad-conv__preview { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--ad-muted); }
.ad-conv__sub .ad-tag { margin-right: 4px; padding: 0 5px; font-size: 10.5px; }
.ad-conv__preview { color: #a5b4c8; }
.ad-conv.is-unread .ad-conv__name { font-weight: 750; }
.ad-conv.is-unread .ad-conv__time { color: var(--ad-accent); font-weight: 650; }
.ad-conv.is-unread .ad-conv__preview { color: var(--ad-text); }
.ad-conv__dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--ad-accent); box-shadow: 0 0 0 3px rgba(255, 119, 34, 0.18); }
.ad-conv__dot[hidden] { display: none; }
.ad-chat__nomatch, .ad-chat__none { padding: 18px 16px; font-size: 13px; color: var(--ad-muted); }
.ad-chat__none { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }

.ad-chat__pane { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: rgba(10, 14, 22, 0.4); }
.ad-chat__placeholder { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  gap: 8px; max-width: 420px; margin: 0 auto; padding: 32px; color: var(--ad-muted); }
.ad-chat__placeholder[hidden] { display: none; }
.ad-thread { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.ad-thread[hidden] { display: none; }
.ad-thread__head { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--ad-line); background: var(--ad-sunken); }
.ad-thread__back { display: none; }
.ad-thread__who { flex: 1; min-width: 0; }
.ad-thread__name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 650; color: var(--ad-strong); }
.ad-thread__name:focus { outline: none; }
.ad-thread__about { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12.5px; color: var(--ad-muted); }
.ad-thread__about a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ad-thread__about .ad-tag[hidden] { display: none; }
.ad-thread__price { flex: none; white-space: nowrap; }
.ad-thread__actions { display: flex; align-items: center; gap: 4px; flex: none; }
.ad-thread__actions form { margin: 0; }
.ad-thread__notice { padding: 10px 14px 0; }
.ad-thread__scroll { position: relative; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px 18px 18px; }
.ad-thread__scroll:focus-visible { outline-offset: -2px; }
.ad-thread__older { display: flex; justify-content: center; padding: 8px 0 2px; }
.ad-thread__older[hidden] { display: none; }
.ad-thread__msgs { display: flex; flex-direction: column; gap: 6px; }
.ad-thread__msgs[aria-busy="true"] { opacity: 0.999; }
.ad-thread__first { margin: 26px 0 10px; font-size: 13px; color: var(--ad-muted); }
.ad-day { display: flex; align-items: center; gap: 12px; margin: 16px 0 6px; font-size: 11px; font-weight: 650; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--ad-muted); }
.ad-day::before, .ad-day::after { content: ""; flex: 1; height: 1px; background: var(--ad-line); }

.ad-msg { display: flex; flex-direction: column; gap: 4px; max-width: min(78%, 560px); padding: 8px 12px 6px; border-radius: 14px 14px 14px 4px;
  border: 1px solid var(--ad-line); background: #151e2e; color: var(--ad-text); font-size: 14px; line-height: 1.5; }
.ad-msg--theirs { align-self: flex-start; }
.ad-msg--mine { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: #24324a; border-color: rgba(148, 163, 184, 0.22); color: var(--ad-strong); }
.ad-msg--cont { margin-top: -2px; }
.ad-msg--theirs.ad-msg--cont { border-top-left-radius: 4px; }
.ad-msg--mine.ad-msg--cont { border-top-right-radius: 4px; }
.ad-msg__text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ad-msg__img { display: block; padding: 0; margin: 2px 0; border: 0; border-radius: 9px; overflow: hidden; background: #05070c; cursor: zoom-in; max-width: 100%; }
.ad-msg__img img { display: block; max-width: 100%; max-height: 260px; min-width: 60px; min-height: 40px; object-fit: cover; }
.xp-page .ad-msg__link { font-size: 12.5px; font-weight: 600; color: #bae6fd; text-decoration-color: rgba(125, 211, 252, 0.5); }
.ad-msg__meta { align-self: flex-end; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ad-muted); font-variant-numeric: tabular-nums; }
.ad-msg--mine .ad-msg__meta { color: #a9b6c9; }
.ad-msg--system { align-self: center; flex-direction: row; align-items: flex-start; gap: 10px; max-width: min(94%, 640px); padding: 10px 14px;
  border-radius: 10px; border-color: rgba(56, 189, 248, 0.26); background: var(--ad-info-soft); color: #e0f2fe; font-size: 13px; }
.ad-msg--system > svg { flex: none; margin-top: 2px; color: var(--ad-info); }
.ad-msg--system .ad-msg__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ad-msg--system .ad-msg__meta { align-self: flex-start; color: #7dd3fc; }
.ad-msg--pending { opacity: 0.72; }
.ad-msg--pending .ad-msg__state::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%;
  border: 1.5px solid currentColor; border-right-color: transparent; vertical-align: -1px; animation: ad-spin 0.8s linear infinite; }
@keyframes ad-spin { to { transform: rotate(360deg); } }
.ad-skel { height: 40px; width: 46%; border-radius: 14px; background: linear-gradient(90deg, rgba(148, 163, 184, 0.06), rgba(148, 163, 184, 0.14), rgba(148, 163, 184, 0.06));
  background-size: 200% 100%; animation: ad-shimmer 1.2s linear infinite; }
.ad-skel--mine { align-self: flex-end; width: 38%; }
.ad-skel--wide { width: 62%; height: 58px; }
@keyframes ad-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.ad-thread__error { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin: 30px auto; max-width: 420px; color: var(--ad-muted); }
.ad-newpill { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 3; display: inline-flex; align-items: center; gap: 6px;
  min-height: 34px; padding: 0 14px; border-radius: 999px; border: 0; background: var(--ad-accent); color: var(--ad-on-accent);
  font: 700 12.5px/1 var(--ad-font); cursor: pointer; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.8); }
.ad-newpill[hidden] { display: none; }
.ad-thread__stage { position: relative; display: flex; flex-direction: column; flex: 1; min-height: 0; }

.ad-blocked { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px;
  border-top: 1px solid rgba(251, 113, 133, 0.3); background: var(--ad-bad-soft); color: #fecdd3; font-size: 13.5px; }
.ad-blocked[hidden] { display: none; }
.ad-blocked p { display: flex; align-items: center; gap: 8px; margin: 0; }
.ad-compose-wrap { padding: 10px 14px 12px; border-top: 1px solid var(--ad-line); background: var(--ad-sunken); }
.ad-compose-wrap[hidden] { display: none; }
.ad-compose { display: flex; align-items: flex-end; gap: 6px; margin: 0; padding: 5px; border: 1px solid var(--ad-line-strong); border-radius: 12px;
  background: rgba(148, 163, 184, 0.05); transition: border-color 0.15s, box-shadow 0.15s; }
.ad-compose:focus-within { border-color: rgba(255, 119, 34, 0.55); box-shadow: 0 0 0 3px rgba(255, 119, 34, 0.14); }
.xp-page .ad-compose__input { flex: 1; min-width: 0; min-height: 38px; max-height: 160px; margin: 0; padding: 9px 6px; border: 0; background: transparent;
  color: var(--ad-strong); font: 14.5px/1.4 var(--ad-font); resize: none; box-shadow: none; }
.xp-page .ad-compose__input:focus, .xp-page .ad-compose__input:focus-visible { outline: none; }
.xp-page .ad-compose__input::placeholder { color: rgba(148, 163, 184, 0.75); }
.ad-compose__send { min-height: 38px; }
.ad-compose__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; margin-top: 6px; font-size: 11.5px; color: var(--ad-muted); }
.ad-compose__error { margin: 6px 0 0; color: #fda4af; font-size: 13px; }
.ad-compose__error:empty { display: none; }
.ad-compose__preview { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; padding: 6px; border-radius: var(--ad-radius-sm);
  border: 1px solid var(--ad-line); background: rgba(148, 163, 184, 0.05); font-size: 12.5px; color: var(--ad-muted); }
.ad-compose__preview[hidden] { display: none; }
.ad-compose__preview img { width: 52px; height: 52px; object-fit: cover; border-radius: 7px; }
.ad-compose__preview span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 899.98px) {
  /* sticky Ads Center bar above, the site's bottom pill below: the composer stays clear of both */
  .ad-chat { height: calc(100vh - 144px); height: calc(100dvh - 144px - env(safe-area-inset-bottom, 0px)); min-height: 400px; }
  .ad-chat__side, .ad-chat__pane { grid-area: 1 / 1; transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.28s, visibility 0.28s; }
  .ad-chat[data-view="list"] .ad-chat__pane { transform: translateX(100%); visibility: hidden; }
  .ad-chat[data-view="thread"] .ad-chat__side { transform: translateX(-22%); opacity: 0; visibility: hidden; }
  .ad-chat__pane { background: #0c111b; }
  .ad-thread__back { display: inline-grid; margin-left: -6px; }
  .ad-thread__notice { display: none; }
  .ad-compose__foot .ad-compose__keys { display: none; }
  .ad-head--chat .ad-head__lead { display: none; }
  .ad-msg { max-width: 86%; }
}

/* ------------------------------------------------------------ dialogs, viewer, toast */
/* margin: auto re-centres the modal: style.css resets every element's margin to 0. */
.ad-dialog { width: min(460px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); margin: auto; padding: 0; border: 1px solid var(--ad-line-strong);
  border-radius: 16px; background: var(--ad-panel-solid); color: var(--ad-text); box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9); }
.ad-dialog::backdrop { background: rgba(3, 6, 12, 0.6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.ad-dialog[open] { animation: ad-pop 0.16s ease-out; }
@keyframes ad-pop { from { opacity: 0; transform: translateY(6px) scale(0.98); } to { opacity: 1; transform: none; } }
.ad-dialog__inner { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 22px; }
.xp-page .ad-dialog__title, .ad-dialog__title { margin: 0; font-size: 17px; font-weight: 700; color: var(--ad-strong); }
.ad-dialog__body { margin: 0; color: var(--ad-muted); line-height: 1.6; font-size: 14px; }
.ad-dialog__field[hidden] { display: none; }
.ad-dialog__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.ad-lightbox { width: auto; max-width: min(94vw, 1200px); padding: 0; background: #05070c; overflow: hidden; }
.ad-lightbox img { display: block; max-width: min(94vw, 1200px); max-height: calc(100dvh - 120px); object-fit: contain; margin: 0 auto; }
.ad-lightbox__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--ad-line); }

/* An ad request over the page it was opened from (ads/_campaign_panel.html):
   summary on top, the request scrolls, the way back to the full page below. */
.ad-dialog--panel { width: min(980px, calc(100vw - 24px)); height: min(860px, calc(100dvh - 32px)); overflow: hidden; }
.ad-dialog--panel[open] { display: flex; flex-direction: column; }
.ad-panel__close { position: absolute; top: 12px; right: 12px; z-index: 2; }
.ad-panel__host { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.ad-panel { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.ad-panel__head { flex: none; padding: 20px 64px 14px 22px; border-bottom: 1px solid var(--ad-line); background: var(--ad-sunken); }
.ad-panel__head .ad-dialog__title { margin-top: 6px; font-size: 19px; }
.ad-panel__head .ad-dialog__title:focus { outline: none; }
.ad-panel__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 0; font-size: 13.5px; color: var(--ad-muted); }
.ad-panel__scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px 22px; }
.ad-panel__foot { flex: none; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; padding: 10px 16px;
  border-top: 1px solid var(--ad-line); background: var(--ad-sunken); }
.ad-panel--state { gap: 14px; padding: 24px 64px 24px 22px; }
@media (max-width: 640px) {
  .ad-dialog--panel { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .ad-panel__scroll { padding: 14px; }
}

/* above the site's fixed bottom pill (style.css .search-form: 14px + 40px) */
.ad-toast { position: fixed; left: 50%; bottom: calc(72px + env(safe-area-inset-bottom, 0px)); z-index: 6000; transform: translate(-50%, 10px);
  opacity: 0; pointer-events: none; transition: opacity 0.18s ease, transform 0.18s ease; }
.ad-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.ad-toast__item { display: inline-flex; align-items: center; gap: 9px; max-width: calc(100vw - 32px); padding: 10px 15px; border-radius: 10px;
  border: 1px solid var(--ad-line-strong); background: #111827; color: var(--ad-strong); font-size: 13.5px; font-weight: 600;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.9); overflow-wrap: anywhere; }
.ad-toast__item svg { flex: none; color: var(--ad-ok); }
.ad-toast__item--bad { border-color: rgba(251, 113, 133, 0.5); }
.ad-toast__item--bad svg { color: var(--ad-bad); }

.ad-visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

@media (max-width: 480px) {
  .xp-card { padding: 18px; }
  .ad-head { margin-top: 20px; }
}

/* Motion is decoration only here: honour "reduce motion" everywhere. */
@media (prefers-reduced-motion: reduce) {
  .xp-page *, .xp-page *::before, .xp-page *::after, .ad-dialog, .ad-toast {
    animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important; scroll-behavior: auto !important;
  }
  .ad-card:hover, .ad-card:hover .ad-card__img img { transform: none; }
}

/* ============================================================ 2026-10 rework
   Advertiser-facing pages: landing, spec-sheet listing, guided booking,
   campaigns and the proof-of-play report. Same tokens as above; the accent
   still only means "act here / selected / unread". Delivery colours:
   good >= 95% (emerald), fair 80-94% (amber), poor < 80% (rose). */
.ad-ok-text { color: var(--ad-ok); }
.ad-r { text-align: right; }
.ad-block { display: block; }
.xp-page .ad-card-title { margin: 0; font-size: 15px; font-weight: 650; color: var(--ad-strong); letter-spacing: 0; text-align: left; }
.ad-head--tight { margin-bottom: 12px; }
.ad-head__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* filters: search wider, the rest share the row */
@media (min-width: 760px) {
  .ad-filters { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
  .ad-filters .ad-search-field { grid-column: span 2; }
}

/* landing */
.ad-intro { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); margin: 28px 0 22px; align-items: center; }
@media (min-width: 980px) { .ad-intro { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }
.xp-page .ad-intro h1 { margin: 10px 0 0; font-size: clamp(28px, 4.2vw, 44px); line-height: 1.12; letter-spacing: -0.025em; color: var(--ad-strong); text-align: left; max-width: 20ch; }
.ad-intro__lead { margin-top: 16px !important; max-width: 62ch; font-size: 16px; line-height: 1.65; color: var(--ad-muted); }
.ad-intro__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.ad-intro__sample { margin: 0; }
.ad-sample { border: 1px solid var(--ad-line-strong); border-radius: var(--ad-radius); background: var(--ad-panel-solid); box-shadow: var(--ad-shadow); overflow: hidden; }
.ad-sample__head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--ad-line);
  font-size: 13px; font-weight: 600; color: var(--ad-strong); }
.ad-sample__tag { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ad-muted);
  border: 1px solid var(--ad-line-strong); border-radius: 5px; padding: 1px 6px; }
.ad-sample__kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border-bottom: 1px solid var(--ad-line); }
.ad-sample__kpis > div { padding: 12px 16px; }
.ad-sample__kpis > div + div { border-left: 1px solid var(--ad-line); }
.ad-sample__kpis dt { font-size: 11.5px; color: var(--ad-muted); font-weight: 500; }
.ad-sample__kpis dd { margin: 4px 0 0; font-size: 20px; font-weight: 700; color: var(--ad-strong); font-variant-numeric: tabular-nums; }
.ad-sample__kpis small { display: block; font-size: 11px; font-weight: 400; color: var(--ad-muted); }
.ad-sample__rows { list-style: none; margin: 0; padding: 6px 0; }
.ad-sample__rows li { display: grid; grid-template-columns: 1fr auto 1.2fr; gap: 12px; padding: 7px 16px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.ad-sample__rows li span:last-child { text-align: right; }
.ad-intro__sample figcaption { margin-top: 8px; }
@media (max-width: 480px) { .ad-sample__kpis dd { font-size: 16px; } .ad-sample__kpis > div { padding: 10px; } }

.ad-network { display: flex; flex-wrap: wrap; gap: 0; margin: 6px 0 10px; border: 1px solid var(--ad-line); border-radius: var(--ad-radius-sm); overflow: hidden; }
.ad-network > div { flex: 1 1 160px; padding: 14px 18px; background: var(--ad-panel); }
.ad-network > div + div { border-left: 1px solid var(--ad-line); }
.ad-network strong { display: block; font-size: 22px; color: var(--ad-strong); }
.ad-network span { font-size: 12.5px; color: var(--ad-muted); }

.ad-proof-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.ad-proof-grid article { padding: 18px; border: 1px solid var(--ad-line); border-radius: var(--ad-radius); background: var(--ad-panel); }
.ad-proof-grid__i { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--ad-line-strong); color: var(--ad-info); margin-bottom: 10px; }
.xp-page .ad-proof-grid h3 { margin: 0; font-size: 15px; color: var(--ad-strong); text-align: left; }
.ad-proof-grid p { margin-top: 6px !important; font-size: 13.5px; line-height: 1.55; color: var(--ad-muted); }

.ad-city-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.xp-page .ad-city-list a { display: inline-flex; gap: 8px; align-items: center; padding: 7px 12px; border: 1px solid var(--ad-line); border-radius: 8px;
  color: var(--ad-text); text-decoration: none; background: var(--ad-panel); font-size: 13.5px; }
.xp-page .ad-city-list a:hover { border-color: var(--ad-line-strong); color: var(--ad-strong); }
.ad-city-list .ad-num { color: var(--ad-muted); font-size: 12px; }
.ad-terms { max-width: 80ch; }
.ad-terms p { color: var(--ad-muted); line-height: 1.65; margin-top: 6px !important; }

/* cards */
.ad-card__kicker { margin: 0 !important; font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ad-muted); }
.ad-card__live { position: absolute; left: 10px; bottom: 10px; z-index: 1; display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px;
  border-radius: 6px; background: rgba(10, 14, 22, 0.8); border: 1px solid var(--ad-line); font-size: 11.5px; color: var(--ad-text); }
.ad-card__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 6px 0 0; border: 1px solid var(--ad-line);
  border-radius: 8px; overflow: hidden; background: var(--ad-line); }
.ad-card__facts > div { background: var(--ad-panel-solid); padding: 6px 8px; }
.ad-card__facts dt { font-size: 10.5px; color: var(--ad-muted); font-weight: 500; }
.ad-card__facts dd { margin: 1px 0 0; font-size: 12.5px; color: var(--ad-strong); white-space: nowrap; }

/* live pill */
.ad-live { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--ad-line-strong); color: var(--ad-muted); white-space: nowrap; }
.ad-live--on { color: var(--ad-ok); border-color: rgba(52, 211, 153, 0.35); background: var(--ad-ok-soft); }
.ad-live--sm { padding: 1px 7px; font-size: 11px; }

/* listing */
.ad-listing-head { display: grid; gap: 18px; grid-template-columns: 1fr; margin-bottom: 18px; }
@media (min-width: 900px) { .ad-listing-head { grid-template-columns: minmax(0, 1fr) minmax(260px, auto); align-items: end; } }
.xp-page .ad-listing-head h1 { margin: 6px 0 0; font-size: clamp(24px, 3vw, 32px); color: var(--ad-strong); text-align: left; }
.ad-listing-head__buy { display: flex; flex-direction: column; gap: 8px; }
.ad-listing-head__buy form { margin: 0; }
.ad-listing { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 992px) { .ad-listing { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; } }
.ad-spec { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1px; margin: 12px 0 0; border: 1px solid var(--ad-line);
  border-radius: var(--ad-radius-sm); overflow: hidden; background: var(--ad-line); }
.ad-spec > div { background: var(--ad-panel-solid); padding: 10px 12px; }
.ad-spec dt { font-size: 11.5px; color: var(--ad-muted); font-weight: 500; }
.ad-spec dd { margin: 3px 0 0; font-size: 14px; color: var(--ad-text); line-height: 1.45; }
.ad-record { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0 0; }
.ad-record > div { padding: 10px 12px; border: 1px solid var(--ad-line); border-radius: 9px; }
.ad-record > div:first-child { grid-column: span 2; }
.ad-record dt { font-size: 11.5px; color: var(--ad-muted); font-weight: 500; }
.ad-record dd { margin: 2px 0 0; font-size: 20px; font-weight: 700; color: var(--ad-strong); }
.ad-proof-thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.ad-proof-thumbs button { padding: 0; border: 1px solid var(--ad-line); border-radius: 6px; overflow: hidden; background: #000; cursor: zoom-in; aspect-ratio: 16 / 10; }
.ad-proof-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }

.ad-avail { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 4px; list-style: none; margin: 12px 0 0; padding: 0; }
.ad-avail__day { display: flex; flex-direction: column; align-items: center; padding: 5px 0; border-radius: 7px; border: 1px solid rgba(52, 211, 153, 0.3);
  background: var(--ad-ok-soft); font-size: 11px; color: var(--ad-text); }
.ad-avail__day.is-few { border-color: rgba(251, 191, 36, 0.4); background: var(--ad-warn-soft); }
.ad-avail__day.is-full { border-color: rgba(251, 113, 133, 0.4); background: var(--ad-bad-soft); color: var(--ad-muted); text-decoration: line-through; }
.ad-avail__day.is-closed { border-color: var(--ad-line); background: transparent; color: rgba(148, 163, 184, 0.5); }
.ad-avail__dow { font-size: 10px; color: var(--ad-muted); }
.ad-avail__d { font-weight: 650; font-size: 13px; }
.ad-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px !important; font-size: 12px; color: var(--ad-muted); }
.ad-avail__key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid rgba(52, 211, 153, 0.4); background: var(--ad-ok-soft); margin-left: 8px; }
.ad-avail__key:first-child { margin-left: 0; }
.ad-avail__key.is-few { border-color: rgba(251, 191, 36, 0.5); background: var(--ad-warn-soft); }
.ad-avail__key.is-full { border-color: rgba(251, 113, 133, 0.5); background: var(--ad-bad-soft); }
.ad-avail__key.is-closed { border-color: var(--ad-line-strong); background: transparent; }

/* booking form */
.ad-book { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 992px) { .ad-book { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); align-items: start; } }
.ad-book__steps { display: grid; gap: 16px; }
.ad-book__step { margin: 0; min-width: 0; }
.xp-page .ad-book__step legend { display: flex; align-items: center; gap: 10px; float: left; width: 100%; margin: 0 0 14px; padding: 0;
  font-size: 16px; font-weight: 650; color: var(--ad-strong); }
.ad-book__step legend + * { clear: both; }
.ad-book__n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--ad-line-strong);
  font-size: 13px; font-family: var(--ad-mono); color: var(--ad-strong); }
.ad-book__summary { position: sticky; top: 16px; }
.ad-specs-box { margin-top: 14px; padding: 12px 14px; border-radius: 9px; border: 1px solid var(--ad-line); background: var(--ad-sunken); font-size: 13px; }
.ad-specs-box ul { margin: 6px 0 0; padding-left: 18px; color: var(--ad-muted); line-height: 1.6; }
.ad-sum { display: grid; gap: 8px; margin: 12px 0; }
.ad-sum > div { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.ad-sum dt { color: var(--ad-muted); font-weight: 400; }
.ad-sum dd { margin: 0; color: var(--ad-strong); font-weight: 600; text-align: right; }
.ad-sum__big { padding-top: 8px; border-top: 1px solid var(--ad-line); }
.ad-sum__big dd { font-size: 18px; }
.ad-book__summary .xp-btn { margin: 6px 0 8px; }
[hidden] { display: none !important; }

/* campaign: timeline + next step */
.ad-timeline { display: flex; flex-wrap: wrap; gap: 0; list-style: none; margin: 0 0 10px; padding: 0; }
.ad-timeline__step { display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 0; font-size: 13px; color: var(--ad-muted); }
.ad-timeline__step + .ad-timeline__step::before { content: ""; width: 26px; height: 1px; background: var(--ad-line-strong); margin-right: 6px; }
.ad-timeline__dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ad-line-strong); flex: none; }
.ad-timeline__step.is-done { color: var(--ad-text); }
.ad-timeline__step.is-done .ad-timeline__dot { background: var(--ad-ok); border-color: var(--ad-ok); }
.ad-timeline__step.is-current { color: var(--ad-strong); font-weight: 650; }
.ad-timeline__step.is-current .ad-timeline__dot { border-color: var(--ad-accent); background: var(--ad-accent-soft); box-shadow: 0 0 0 3px var(--ad-accent-soft); }
.ad-timeline__step.is-stopped { color: var(--ad-bad); font-weight: 600; }
.ad-timeline__step.is-stopped .ad-timeline__dot { background: var(--ad-bad); border-color: var(--ad-bad); }
.ad-next { margin: 0 0 18px !important; padding: 10px 14px; border-radius: 9px; border: 1px solid var(--ad-line); background: var(--ad-panel); color: var(--ad-text); font-size: 14px; }
.ad-campaign { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 992px) { .ad-campaign { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; } }

/* KPI tiles */
.ad-tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 14px 0; }
.ad-tiles--page { margin: 0 0 18px; }
.ad-tile { padding: 12px 14px; border: 1px solid var(--ad-line); border-radius: 10px; background: var(--ad-panel); border-top-width: 3px; }
.ad-tile > span { display: block; font-size: 12px; color: var(--ad-muted); }
.ad-tile strong { display: block; margin-top: 4px; font-size: 26px; line-height: 1.1; color: var(--ad-strong); }
.ad-tile small { display: block; margin-top: 4px; font-size: 12px; color: var(--ad-muted); }
.ad-tile b { color: var(--ad-text); }
.ad-tile--good { border-top-color: var(--ad-ok); }
.ad-tile--fair { border-top-color: var(--ad-warn); }
.ad-tile--poor { border-top-color: var(--ad-bad); }
.ad-pct--good { color: var(--ad-ok); }
.ad-pct--fair { color: var(--ad-warn); }
.ad-pct--poor { color: var(--ad-bad); }
.ad-day-table td, .ad-day-table th { white-space: nowrap; }
.ad-day-table td:last-child { white-space: normal; }

/* heatmap */
.ad-heat-wrap { overflow-x: auto; margin-top: 10px; }
.ad-heat { border-collapse: separate; border-spacing: 3px; font-size: 10.5px; color: var(--ad-muted); font-variant-numeric: tabular-nums; }
.ad-heat th { font-weight: 500; padding: 0 4px; text-align: right; white-space: nowrap; }
.ad-heat thead th { text-align: center; padding: 0; }
.ad-heat__c { width: 22px; height: 16px; border-radius: 3px; display: inline-block; }
td.ad-heat__c { display: table-cell; }
.ad-heat__c--0 { background: rgba(148, 163, 184, 0.08); }
.ad-heat__c--1 { background: rgba(56, 189, 248, 0.3); }
.ad-heat__c--2 { background: rgba(56, 189, 248, 0.5); }
.ad-heat__c--3 { background: rgba(56, 189, 248, 0.72); }
.ad-heat__c--4 { background: #38bdf8; }
.ad-legend .ad-heat__c { width: 14px; height: 12px; }

/* screenshots */
.ad-proofs { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); margin-top: 12px; }
.ad-proof { margin: 0; }
.ad-proof button { display: block; width: 100%; padding: 0; border: 1px solid var(--ad-line); border-radius: 8px; overflow: hidden; background: #000; cursor: zoom-in; aspect-ratio: 16 / 10; }
.ad-proof img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ad-proof figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px; margin-top: 5px; font-size: 11.5px; color: var(--ad-muted); }

/* integrity */
.ad-checks { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.ad-checks li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--ad-line); font-size: 13.5px; }
.ad-checks li.is-ok { border-color: rgba(52, 211, 153, 0.3); background: var(--ad-ok-soft); }
.ad-checks li.is-ok .ad-i { color: var(--ad-ok); }
.ad-checks li.is-bad { border-color: rgba(251, 113, 133, 0.35); background: var(--ad-bad-soft); }
.ad-checks li.is-warn { border-color: rgba(251, 191, 36, 0.35); background: var(--ad-warn-soft); }
.ad-checks .ad-i { flex: none; margin-top: 2px; }

.ad-copy { display: flex; gap: 6px; }
.ad-copy .xp-input { min-width: 0; font-size: 12px; }

/* campaigns list */
.ad-camp-table td { vertical-align: middle; }
.ad-empty-guide { max-width: 640px; }
.ad-mini-steps { margin: 12px 0 18px; padding-left: 20px; color: var(--ad-muted); line-height: 1.8; }
.ad-mini-steps b { color: var(--ad-text); }

/* guide */
.ad-guide { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 992px) { .ad-guide { grid-template-columns: 220px minmax(0, 1fr); align-items: start; } .ad-guide__toc { position: sticky; top: 16px; } }
.ad-guide__toc ol { margin: 8px 0 0; padding-left: 18px; line-height: 2; font-size: 14px; }
.xp-page .ad-guide__toc a { color: var(--ad-text); }
.ad-guide__body { max-width: 78ch; }
.ad-guide__body section { padding: 4px 0 26px; border-bottom: 1px solid var(--ad-line); margin-bottom: 24px; scroll-margin-top: 16px; }
.xp-page .ad-guide__body h2 { font-size: 22px; margin: 0 0 10px; color: var(--ad-strong); text-align: left; }
.ad-guide__body p, .ad-guide__body li { line-height: 1.7; color: var(--ad-text); }
.ad-guide__body ul, .ad-guide__body ol { padding-left: 20px; }
.ad-guide__body b { color: var(--ad-strong); }
.ad-defs { display: grid; gap: 4px 0; margin: 10px 0; }
.ad-defs dt { margin-top: 12px; font-weight: 650; color: var(--ad-strong); }
.ad-defs dd { margin: 2px 0 0; line-height: 1.65; color: var(--ad-text); }
.ad-faq { border: 1px solid var(--ad-line); border-radius: 9px; padding: 10px 14px; margin-bottom: 8px; background: var(--ad-panel); }
.ad-faq summary { cursor: pointer; font-weight: 600; color: var(--ad-strong); }
.ad-faq p { margin: 8px 0 0 !important; color: var(--ad-muted); }

/* report page + print */
.ad-report-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px; margin: 26px 0 16px; }
.xp-page .ad-report-head h1 { margin: 6px 0 0; font-size: 28px; color: var(--ad-strong); text-align: left; }
@media print {
  html, body.header--bg { background: #fff !important; }
  .ad-backdrop, .ad-noprint, .ad-nav, .ad-toast, .search-form, .pop-up { display: none !important; }
  .xp-page { --ad-text: #111; --ad-strong: #000; --ad-muted: #555; --ad-line: #ccc; --ad-line-strong: #999;
    --ad-panel: #fff; --ad-panel-solid: #fff; color: #111; max-width: none; padding: 0; }
  .xp-card, .ad-kpi, .ad-spec > div { background: #fff !important; box-shadow: none !important; backdrop-filter: none !important; break-inside: avoid; }
  .ad-campaign { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
  a { color: #000 !important; }
}

.ad-more { margin-top: 10px; }
.ad-more summary { cursor: pointer; color: var(--ad-muted); font-size: 13px; }
.ad-more summary:hover { color: var(--ad-strong); }
