:root {
  --bg: #f7f6f3;
  --panel: #ffffff;
  --field: #ffffff;  /* inputs, buttons, popovers */
  --hover: #f1efe9;
  --text: #1d1d1f;
  --on-text: #ffffff;  /* text on a --text background */
  --muted: #5f6368;
  --line: #e3e1dc;
  --accent: #e4572e;  /* targets on the map */
  --accent-ink: #b8401c;  /* accent as text */
  --primary: #b8401c;  /* primary button (white text) */
  --target-bg: #fdf0eb;
  --target-line: #f6c9b8;
  --own: #2e6fe4;  /* your locations */
  --own-bg: #edf3fd;
  --own-line: #c3d6f7;
  --own-soft: #f6f9fe;
  --own-dash: #9db8ea;
  --skip: #9aa0a6;  /* skipped targets */
  --area-bg: #f4f3ef;
  --tag-bg: #eeeeee;
  --overlay: rgba(255, 255, 255, .94);
  --shadow: rgba(0, 0, 0, .12);
  --error: #b3261e;
  --radius: 10px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

/* Dark: follows the system unless the toggle picked light; the toggle can also force it. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131518;
    --panel: #1b1e22;
    --field: #22262b;
    --hover: #2b3036;
    --text: #e8e6e3;
    --on-text: #131518;
    --muted: #a5a9af;
    --line: #353a41;
    --accent: #f0683f;
    --accent-ink: #ff9470;
    --primary: #c2441d;
    --target-bg: #35241e;
    --target-line: #6e3b2b;
    --own: #6b9df5;
    --own-bg: #1d2738;
    --own-line: #34496f;
    --own-soft: #1c2433;
    --own-dash: #4d6ca6;
    --skip: #858b92;
    --area-bg: #252a30;
    --tag-bg: #33383e;
    --overlay: rgba(27, 30, 34, .94);
    --shadow: rgba(0, 0, 0, .45);
    --error: #f28b82;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #131518;
  --panel: #1b1e22;
  --field: #22262b;
  --hover: #2b3036;
  --text: #e8e6e3;
  --on-text: #131518;
  --muted: #a5a9af;
  --line: #353a41;
  --accent: #f0683f;
  --accent-ink: #ff9470;
  --primary: #c2441d;
  --target-bg: #35241e;
  --target-line: #6e3b2b;
  --own: #6b9df5;
  --own-bg: #1d2738;
  --own-line: #34496f;
  --own-soft: #1c2433;
  --own-dash: #4d6ca6;
  --skip: #858b92;
  --area-bg: #252a30;
  --tag-bg: #33383e;
  --overlay: rgba(27, 30, 34, .94);
  --shadow: rgba(0, 0, 0, .45);
  --error: #f28b82;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body { font: 15px/1.45 var(--font); color: var(--text); background: var(--bg); }
button, input, select { font: inherit; color: inherit; }
a { color: var(--accent-ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--own); outline-offset: 2px; }

.app { display: grid; grid-template-columns: minmax(420px, min(44%, 640px)) 1fr; height: 100%; }
.panel {
  background: var(--panel); border-right: 1px solid var(--line);
  overflow-y: auto; padding: 20px 20px 12px; display: flex; flex-direction: column; gap: 18px;
}
.map-wrap { position: relative; min-height: 0; }
#map { position: absolute; inset: 0; }

.brand h1 { margin: 0; font-size: 24px; display: flex; align-items: center; gap: 10px; letter-spacing: -0.02em; }
.logo { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--accent); position: relative; }
.logo::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--accent); }

h2 { font-size: 14px; margin: 0 0 10px; text-transform: uppercase; letter-spacing: 0.04em; display: flex; align-items: center; gap: 8px; }
h2 em { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--muted); font-weight: 400; }

.field { display: flex; flex-direction: column; gap: 4px; }
.field > span { font-weight: 600; font-size: 14px; display: flex; justify-content: space-between; gap: 8px; }
.field output { font-weight: 700; color: var(--accent-ink); }
.field small { color: var(--muted); font-size: 12.5px; display: block; font-weight: 400; }
input[type="search"], input[type="text"], select {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--field);
}
input[type="range"] { width: 100%; accent-color: var(--accent); }

.combo { position: relative; }
.combo-list {
  position: absolute; z-index: 10; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px;
  list-style: none; background: var(--field); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 8px 24px var(--shadow); max-height: 320px; overflow-y: auto;
}
.combo-list li { padding: 8px 10px; border-radius: 6px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; }
.combo-list li[aria-selected="true"], .combo-list li:hover { background: var(--hover); }
.combo-list .meta { color: var(--muted); font-size: 13px; white-space: nowrap; }
.combo-list .none { color: var(--muted); cursor: default; }

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 2px; padding: 3px 4px 3px 10px; border-radius: 999px;
  background: var(--area-bg); border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; max-width: 100%;
}
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 6px; font-size: 16px; line-height: 1; }

/* Always-visible results and export, pinned to the bottom of the panel. */
.actionbar {
  position: sticky; bottom: -12px; margin: 0 -20px -12px; padding: 14px 20px 16px;
  background: var(--panel); border-top: 1px solid var(--line); box-shadow: 0 -6px 16px var(--shadow);
  display: flex; flex-direction: column; gap: 10px;
}

.error { color: var(--error); margin: 0; font-size: 14px; }

/* --primary, not --accent: white on --accent is under the 4.5:1 contrast minimum. */

.foot { margin-top: auto; order: 0; color: var(--muted); font-size: 12.5px; border-top: 1px solid var(--line); padding-top: 10px; }
.foot p { margin: 2px 0; }

.legend {
  position: absolute; left: 12px; bottom: 28px; background: var(--overlay); border-radius: 8px;
  padding: 4px; display: flex; gap: 2px; font-size: 12.5px; box-shadow: 0 1px 4px var(--shadow);
}
.legend button {
  border: 0; background: none; border-radius: 6px; padding: 4px 8px; cursor: pointer; font-size: 12.5px;
  display: inline-flex; align-items: center;
}
.legend button:hover { background: var(--hover); }
.legend button[aria-pressed="false"] { color: var(--muted); text-decoration: line-through; }
.legend button[aria-pressed="false"] .dot { opacity: .35; }

.loading { z-index: 1; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.dot.target { background: var(--accent); }
.dot.excluded { background: var(--panel); border: 2px solid var(--skip); }
.dot.own { background: var(--own); }
.loading {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--on-text);
  padding: 6px 14px; border-radius: 999px; font-size: 13px;
}

.maplibregl-popup-content { font: 13.5px/1.4 var(--font); padding: 10px 12px; }
.maplibregl-popup-content strong { display: block; }

/* Phones: map on top, panel scrolls underneath. */
@media (max-width: 800px) {
  .app { grid-template-columns: 1fr; grid-template-rows: 45vh 1fr; }
  .map-wrap { grid-row: 1; }
  .panel { grid-row: 2; border-right: 0; border-top: 1px solid var(--line); padding: 16px; }
  .legend { top: 8px; bottom: auto; left: 8px; right: 56px; flex-wrap: wrap; }
  .actionbar { margin: 0 -16px -12px; padding: 12px 16px 14px; }
}

/* Theme toggle in the header. */
.brand { position: relative; }
.theme-toggle {
  position: absolute; top: 0; right: 0; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--field); color: var(--text); cursor: pointer;
  display: grid; place-items: center; padding: 0;
}
.theme-toggle:hover { background: var(--hover); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .sun { display: none; }
.theme-toggle[aria-pressed="true"] .sun { display: block; }
.theme-toggle[aria-pressed="true"] .moon { display: none; }

/* MapLibre's controls and popups, in the theme. */
.maplibregl-popup-content { background: var(--field); color: var(--text); box-shadow: 0 2px 10px var(--shadow); }
.maplibregl-popup-anchor-bottom .maplibregl-popup-tip { border-top-color: var(--field); }
.maplibregl-popup-anchor-top .maplibregl-popup-tip { border-bottom-color: var(--field); }
.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--field); }
.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--field); }
.maplibregl-popup-close-button { color: var(--muted); }
.maplibregl-ctrl-group { background: var(--field); }
.maplibregl-ctrl.maplibregl-ctrl-attrib { background: var(--overlay); color: var(--muted); }
.maplibregl-ctrl-attrib a { color: var(--text); }
:root[data-theme="dark"] .maplibregl-ctrl-group button .maplibregl-ctrl-icon, :root[data-theme="dark"] .maplibregl-ctrl-attrib-button { filter: invert(1); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .maplibregl-ctrl-group button .maplibregl-ctrl-icon, :root:not([data-theme="light"]) .maplibregl-ctrl-attrib-button { filter: invert(1); }
}

/* ---------- Market selection ---------- */

/* Detail panel over the map. */

.bars { list-style: none; padding: 0 !important; display: flex; flex-direction: column; gap: 6px; }
.bars li { display: grid; grid-template-columns: 9.5em 1fr 3em; align-items: center; gap: 8px; }
.bar-label { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { position: relative; height: 8px; border-radius: 4px; background: var(--tag-bg); }
.bar-track::after { content: ""; position: absolute; top: -3px; bottom: -3px; left: var(--typical); width: 1.5px; background: var(--muted); }
.bar-fill { display: block; height: 100%; border-radius: 4px; background: var(--skip); }
.bar-fill.up { background: var(--accent); }
.bar-value { font-size: 12.5px; text-align: right; font-variant-numeric: tabular-nums; }
.brief-headline { font-weight: 700; font-size: 15px; margin: 0 0 4px; }

.muted { color: var(--muted); }

/* ---------- Brand results ---------- */

.file-button {
  align-self: flex-start; border: 1px dashed var(--own-dash); background: var(--own-soft); color: var(--text);
  border-radius: 8px; padding: 6px 10px; cursor: pointer; font-weight: 600; font-size: 13.5px;
}
.file-button:hover { border-style: solid; }

button.link { border: 0; background: none; padding: 0; color: var(--accent-ink); text-decoration: underline; cursor: pointer; font-size: 13px; align-self: flex-start; }

.synthetic-note { margin: 0; font-size: 12.5px; padding: 6px 8px; border-radius: 6px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); }
#brand-body { display: flex; flex-direction: column; gap: 8px; }

.badge { font-size: 12px; padding: 1px 8px; border-radius: 999px; font-weight: 700; background: var(--tag-bg); color: var(--text); }
.badge.strong { background: var(--target-bg); color: var(--accent-ink); }
.badge.moderate { background: var(--area-bg); }
.bars.rho li { grid-template-columns: 9em 1fr 3.2em; }
.bar-track.centered::after { left: 50%; }
.brand-table summary { cursor: pointer; font-weight: 600; font-size: 13.5px; }
.brand-table table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 6px; }
.brand-table th, .brand-table td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.brand-table .num-col { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.brand-table tr.muted td { color: var(--muted); }
.brand-table tr.highlight td { background: var(--own-bg); color: var(--text); font-weight: 600; }
.popup-line { display: block; color: var(--muted); font-size: 12.5px; }
.status-tag { font-size: 11.5px; padding: 1px 7px; border-radius: 999px; background: var(--own-bg); color: var(--text); white-space: nowrap; }

/* ======================= Report app ======================= */
.brand { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.theme-toggle { position: static; }
.demo-button {
  border: 1px solid var(--line); background: var(--field); color: var(--text); border-radius: 999px;
  padding: 5px 12px; font-size: 13px; cursor: pointer;
}
.demo-button:hover { background: var(--hover); }
.panel h2 { text-transform: none; letter-spacing: 0; font-size: 20px; margin: 0; display: block; }
.panel h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; margin: 18px 0 8px; }
.panel h4 { font-size: 13.5px; margin: 12px 0 6px; }
.small { font-size: 13px; }
.lead { color: var(--muted); margin: 6px 0 0; }

button.primary, .about button.primary {
  background: var(--primary); border: 1px solid var(--primary); color: #fff; border-radius: 8px;
  padding: 9px 14px; font-weight: 600; cursor: pointer; font-size: 14px;
}

.sample-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sample-card {
  text-align: left; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--field); cursor: pointer; display: flex; flex-direction: column; gap: 3px;
}
.sample-card:hover { border-color: var(--accent-ink); background: var(--hover); }
.sample-card .name { font-weight: 700; }
.sample-card .desc { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.upload-box { display: flex; flex-direction: column; gap: 6px; }
.upload-box input:focus-visible + .file-button { outline: 2px solid var(--own); outline-offset: 2px; }
.upload-box p { margin: 0; }
.upload-step { margin-top: 12px; padding: 12px; border: 1px solid var(--own-line); background: var(--own-bg); border-radius: var(--radius); display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.upload-step .field { width: 100%; }
.file-summary { margin: 0; font-size: 13.5px; }

.report { display: flex; flex-direction: column; gap: 4px; }
.report-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.eyebrow { margin: 0; color: var(--accent-ink); font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; }
.report-meta { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.r-section { border-top: 1px solid var(--line); padding-top: 4px; }
.r-intro, .r-note { color: var(--muted); font-size: 13px; margin: 0 0 8px; }

.recs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rec { border: 1px solid var(--line); border-radius: 8px; background: var(--field); }
.rec.open { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.rec-head {
  width: 100%; display: flex; align-items: center; gap: 8px; padding: 10px 12px 4px; border: 0; background: none;
  cursor: pointer; text-align: left; color: var(--text);
}
.rec-head .rank {
  flex: none; min-width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff;
  display: inline-grid; place-items: center; font-size: 12px; font-weight: 700;
}
.rec-head .name { font-weight: 700; flex: 1; min-width: 0; }
.status-tag { font-size: 11.5px; padding: 1px 7px; border-radius: 999px; background: var(--own-bg); color: var(--text); white-space: nowrap; }
.rec-summary { padding: 4px 12px 12px 42px; display: flex; flex-direction: column; gap: 8px; }
.rec-stats { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 28px; }
.stat { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; }
.stat-label { flex-basis: 100%; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.stat-value { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.stat.headline .stat-value { font-size: 22px; color: var(--accent-ink); }
.stat-sub { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rec-like { margin: 0; font-size: 13px; color: var(--muted); }
.rec-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 5px; }
.rec-chips li { font-size: 12.5px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--area-bg); white-space: nowrap; }
.rec-chips li.up { background: var(--target-bg); border-color: var(--target-line); }
.rec-chips li.down { color: var(--muted); }

/* Secondary sections and details: collapsed, with a chevron. */
.fold > summary, details.more > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px; }
.fold > summary::-webkit-details-marker, details.more > summary::-webkit-details-marker { display: none; }
.fold > summary::before, details.more > summary::before {
  content: ""; flex: none; width: 6px; height: 6px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg); transition: transform .15s; margin-right: 2px;
}
.fold[open] > summary::before, details.more[open] > summary::before { transform: rotate(45deg); }
.fold > summary h3 { margin: 14px 0; }
.fold > summary:hover h3 { color: var(--accent-ink); }
.fold[open] { padding-bottom: 8px; }
details.more { margin: 0 0 8px; }
details.more > summary { font-size: 13px; font-weight: 600; color: var(--muted); }
details.more[open] > summary { margin-bottom: 6px; }
.rec-body { padding: 0 12px 12px 42px; border-top: 1px dashed var(--line); }
.similar { margin: 0; padding-left: 18px; font-size: 13.5px; }
.brief { margin-top: 4px; }
.brief p { margin: 2px 0; font-size: 13.5px; }
.brief ul { margin: 4px 0 0; padding-left: 18px; font-size: 13.5px; }

.verdict { margin: 0 0 6px; font-size: 14px; }
.badge.weak, .badge.too_few { background: var(--tag-bg); color: var(--text); }
.drivers { margin: 0 0 10px; padding-left: 18px; font-size: 13.5px; }
.drivers li { margin: 3px 0; }
.today-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.today-grid h4 { margin-top: 4px; }
.mini { margin: 0; padding-left: 18px; font-size: 13px; }
.method { margin: 0 0 10px; padding-left: 18px; font-size: 13px; color: var(--muted); }
.method li { margin: 3px 0; }
.adjust summary { cursor: pointer; font-weight: 600; font-size: 13.5px; }
.adjust .chips { margin: 8px 0; }

.actionbar .buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.actionbar .buttons button {
  flex: 1 1 auto; padding: 9px 10px; font-size: 13.5px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--field); cursor: pointer; font-weight: 600; white-space: nowrap;
}
.actionbar .buttons button.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.actionbar .buttons button:disabled { opacity: .6; cursor: progress; }

dialog.about {
  max-width: 560px; width: calc(100% - 32px); border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); color: var(--text); padding: 20px 22px; box-shadow: 0 20px 50px var(--shadow);
}
dialog.about::backdrop { background: rgba(0, 0, 0, .45); }
dialog.about h2 { margin: 0 0 8px; font-size: 20px; }
dialog.about ul { padding-left: 18px; font-size: 14px; }
dialog.about li { margin: 6px 0; }
dialog.about form { display: flex; justify-content: flex-end; }

@media (max-width: 800px) {
  .sample-cards, .today-grid { grid-template-columns: 1fr; }
  .rec-summary, .rec-body { padding-left: 12px; }
}

/* Print: the report alone, every recommendation expanded. */
@media print {
  .app { display: block; height: auto; }
  .map-wrap, .header-actions, .actionbar, #change-brand, .adjust, #more-recs, .start { display: none !important; }
  .panel { overflow: visible; border: 0; padding: 0; }
  .rec-body { display: block !important; }
  .rec { break-inside: avoid; }
  body { background: #fff; }
}

dialog.about h2 { text-transform: none; letter-spacing: 0; display: block; }
#change-brand { white-space: nowrap; font-size: 13.5px; }

/* ---------- Ad-account connector ---------- */
.connect-row { display: flex; gap: 8px; align-items: stretch; }
.connect-row select { flex: 1; min-width: 0; }
.connect-row button { white-space: nowrap; }
.connect-row button:disabled { opacity: .6; cursor: progress; }

.report.awaiting > .r-section, .report.awaiting > .foot { display: none; }
.sync-panel {
  border: 1px solid var(--own-line); background: var(--own-soft); border-radius: var(--radius);
  padding: 10px 12px 8px; display: flex; flex-direction: column; gap: 8px; margin: 6px 0 4px;
}
.sync-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.panel .sync-head h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.sync-tag {
  font-size: 11px; font-weight: 600; text-transform: none; letter-spacing: 0; padding: 1px 7px;
  border-radius: 999px; background: var(--own-bg); border: 1px solid var(--own-line); color: var(--text);
}
.sync-status { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.sync-status.busy::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px;
  background: var(--own); animation: sync-pulse 1s ease-in-out infinite;
}
@keyframes sync-pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .sync-status.busy::before { animation: none; } }
.sync-meta { margin: 0; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sync-progress { height: 4px; border-radius: 2px; background: var(--own-line); overflow: hidden; }
.sync-progress span { display: block; height: 100%; width: 0; background: var(--own); transition: width .25s; }
.sync-changes { margin: 0; padding: 8px 10px 8px 26px; font-size: 13px; background: var(--field); border: 1px solid var(--line); border-radius: 8px; }
.sync-changes li { margin: 2px 0; }
.sync-changes li.up::marker { content: "▲  "; color: var(--accent-ink); font-size: 10px; }
.sync-changes li.down::marker { content: "▼  "; color: var(--muted); font-size: 10px; }
.sync-changes li.kpi { font-weight: 600; }
.sync-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sync-actions button:not(.link) {
  padding: 6px 10px; font-size: 13px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--field); cursor: pointer; font-weight: 600;
}
.sync-actions button:not(.link):hover { background: var(--hover); }
.sync-actions button.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.sync-actions button:disabled { opacity: .55; cursor: progress; }
.sync-actions #disconnect { margin-left: auto; font-size: 12.5px; }
.sync-hint { margin: 0; font-size: 12px; }
.sync-log-wrap { margin: 0; }
.sync-log {
  margin: 0; padding: 6px 8px 6px 30px; max-height: 210px; overflow-y: auto; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--field); border: 1px solid var(--line); border-radius: 8px;
}
.sync-log li { margin: 1px 0; overflow-wrap: anywhere; }
.sync-log li::marker { color: var(--muted); }
.sync-log .retry { color: var(--accent-ink); }
.sync-log .updated { color: var(--own); }
.sync-log .summary { font-weight: 700; }
.sync-log .error { color: var(--error); font-weight: 700; }
.sync-log .platform, .sync-log .auth { color: var(--muted); }
@media print { .sync-panel { display: none !important; } }
