/* Content Hub. One stylesheet, no build step.

   Always light. Modelled on the admin screens people already use every day
   (WordPress admin, Shopify admin, Stripe, HubSpot): white panels on a soft
   grey page, thin borders, small corners, one sober blue for actions and
   links, colour only where it carries a meaning (good, needs attention,
   problem). The system font, a 15px base and dark text, so it reads easily
   for an older reader on any screen. */

:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-2: #f8f9fa;
  --surface-3: #eef0f3;
  --border: #dcdfe4;
  --border-strong: #c3c8cf;
  --text: #1d2327;
  --text-2: #3c434a;
  --muted: #586069;
  --faint: #8c939b;
  --accent: #2160b0;
  --accent-2: #1a4d8f;
  --accent-soft: #edf3fb;
  --accent-line: #b8cfec;
  --ok: #0f6b3a;
  --ok-soft: #edf7f0;
  --ok-line: #b5dcc2;
  --ok-dot: #1f8a4c;
  --warn: #8a4b00;
  --warn-soft: #fdf6e7;
  --warn-line: #ecd29a;
  --warn-dot: #d98a00;
  --bad: #a4251c;
  --bad-soft: #fcefee;
  --bad-line: #efc2be;
  --bad-dot: #cc3a2f;
  --info: #1d5698;
  --info-soft: #eef4fb;
  --info-line: #bcd3ee;
  --info-dot: #2f6fc2;
  --shadow-sm: 0 1px 1px rgba(0, 0, 0, 0.03);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.14), 0 2px 6px rgba(0, 0, 0, 0.06);
  --radius: 6px;
  --radius-sm: 4px;
  --serif: Charter, 'Bitstream Charter', 'Sitka Text', Cambria, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  font: 400 15px/1.55 var(--sans);
  color: var(--text);
  background: var(--bg);
}
h1, h2, h3, h4 { margin: 0; line-height: 1.3; color: var(--text); }
h1 { font-size: 24px; font-weight: 600; }
h2 { font-size: 17px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
h4 { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; margin: 18px 0 8px; }
p { margin: 0 0 10px; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); text-decoration: underline; }
code { font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--surface-3); padding: 1px 5px; border-radius: 3px; }
ul, ol { padding-left: 20px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 14px; }
.xsmall { font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.up { color: var(--ok); }
.down { color: var(--bad); }
.error { color: var(--bad); min-height: 1.4em; margin: 10px 0 0; font-size: 14px; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
svg.i.sm { width: 15px; height: 15px; vertical-align: -2px; }
svg.i.lg { width: 22px; height: 22px; }

/* ---- Logo ---------------------------------------------------------------- */
.logo {
  display: inline-block; width: 26px; height: 26px; flex: none; border-radius: 5px;
  background: url('/favicon.svg') center / cover no-repeat;
}
.logo.lg { width: 40px; height: 40px; border-radius: 7px; margin-bottom: 16px; }

/* ---- Buttons and form controls --------------------------------------------- */
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font: 500 14px/1 var(--sans); color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 9px 14px; min-height: 38px; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background 0.1s, border-color 0.1s, color 0.1s;
}
button:hover, .button:hover { background: var(--surface-2); border-color: var(--faint); color: var(--text); text-decoration: none; }
button:focus-visible, .button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
button:disabled { opacity: 0.55; cursor: default; }
button.primary, .button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:hover, .button.primary:hover { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
button.big, .button.big { min-height: 44px; padding: 11px 18px; font-size: 15px; }
button.small, .button.small { min-height: 32px; padding: 6px 11px; font-size: 13.5px; }
button.danger-solid { background: var(--bad-dot); border-color: var(--bad-dot); color: #fff; }
button.danger-solid:hover { background: var(--bad); border-color: var(--bad); color: #fff; }
button.quiet-danger { color: var(--bad); border-color: transparent; background: transparent; }
button.quiet-danger:hover { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
button.ghost, .button.ghost { background: transparent; border-color: transparent; }
button.ghost:hover, .button.ghost:hover { background: var(--surface-3); border-color: transparent; }
button.link { background: none; border: 0; color: var(--accent); padding: 0; min-height: 0; }
button.link:hover { text-decoration: underline; background: none; }
.block-btn { width: 100%; }
.icon-btn { padding: 0; width: 36px; min-height: 36px; border-color: transparent; background: transparent; color: var(--muted); }
.icon-btn:hover { background: var(--surface-3); border-color: transparent; color: var(--text); }

label { display: block; font-size: 14px; font-weight: 600; color: var(--text-2); margin: 0 0 14px; }
input, textarea, select {
  display: block; width: 100%; margin-top: 6px; font: 400 15px/1.45 var(--sans); color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 9px 11px;
}
input:hover, textarea:hover, select:hover { border-color: var(--faint); }
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
textarea { resize: vertical; }
.select {
  display: inline-block; width: auto; margin: 0; min-height: 38px; padding: 8px 34px 8px 11px; font-size: 14px; font-weight: 500;
  appearance: none; cursor: pointer; max-width: 280px; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23586069' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
}
.search { position: relative; }
.search input { margin: 0; padding-left: 34px; min-height: 38px; font-size: 14px; width: 240px; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); }

/* ---- Login ---------------------------------------------------------------- */
.login { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 16px; background: var(--bg); }
.login-side { display: none; }
.login-card {
  width: min(400px, 100%); padding: 32px 32px 24px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.login-card .logo.lg { display: block; }
.login-card h1 { font-size: 22px; margin-bottom: 4px; }
.login-card .muted { margin-bottom: 22px; }
.login-foot { margin-top: 18px; font-size: 13.5px; color: var(--muted); text-align: center; }

/* ---- Shell ---------------------------------------------------------------- */
.shell { display: flex; min-height: 100vh; background: linear-gradient(90deg, var(--surface) 247px, var(--border) 247px, var(--border) 248px, var(--bg) 248px); }
.nav {
  width: 248px; flex: none; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: var(--surface); border-right: 1px solid var(--border); padding: 16px 12px;
}
.brand-mark { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; padding: 2px 8px 18px; color: var(--text); }
.brand-mark.sm { padding: 0; font-size: 15px; }
.brand-mark.sm .logo { width: 24px; height: 24px; }
.nav nav { display: flex; flex-direction: column; gap: 1px; flex: 1; overflow-y: auto; }
.nav nav a {
  position: relative; display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: var(--radius-sm);
  color: var(--text-2); font-weight: 500; font-size: 14.5px; text-decoration: none;
}
.nav nav a svg { color: var(--muted); }
.nav nav a:hover { background: var(--surface-3); color: var(--text); }
.nav nav a.active { background: var(--accent-soft); color: var(--accent-2); font-weight: 600; }
.nav nav a.active::before { content: ''; position: absolute; left: -12px; top: 6px; bottom: 6px; width: 3px; border-radius: 0 2px 2px 0; background: var(--accent); }
.nav nav a.active svg { color: var(--accent); }
.nav nav a span:first-of-type { flex: 1; }
.nav-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); padding: 20px 10px 6px; }
.badge { background: var(--bad-dot); color: #fff; font-size: 12px; font-weight: 600; line-height: 1; padding: 4px 7px; border-radius: 10px; min-width: 22px; text-align: center; }
.nav-foot { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--border); padding: 12px 4px 0; margin-top: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-size: 13px; font-weight: 600; color: var(--text-2); background: var(--surface-3); border: 1px solid var(--border);
}
.who-box { flex: 1; min-width: 0; }
.who-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.main-col { flex: 1; min-width: 0; background: var(--bg); }
.mobile-bar { display: none; }
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.35); z-index: 40; }
.view { padding: 28px 36px 64px; max-width: 1280px; margin: 0 auto; }
.view:focus, .view:focus-visible { outline: none; }

/* ---- Page header ---------------------------------------------------------- */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.head .sub { color: var(--muted); margin: 4px 0 0; font-size: 15px; max-width: 720px; }
.head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.crumb { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; font-weight: 500; margin-bottom: 12px; }
.crumb:hover { color: var(--text); text-decoration: none; }

/* ---- Layout helpers ------------------------------------------------------- */
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.spread { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.stack > * + * { margin-top: 20px; }
.cols { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.cols.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.block { margin-top: 28px; }
.block > h2 { margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }

/* ---- Panels --------------------------------------------------------------- */
.panel, .card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.card { padding: 20px; }
.panel { overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.panel-head h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.panel-head .muted { font-size: 14px; }
.panel-head a { font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.panel-body { padding: 20px; }
.panel-foot { padding: 12px 20px; border-top: 1px solid var(--border); background: var(--surface-2); font-size: 14px; color: var(--muted); }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--surface-3); color: var(--text-2); font-size: 12.5px; font-weight: 600; }
.count.hot { background: var(--bad-dot); color: #fff; }
.card.calm { color: var(--muted); background: var(--surface-2); box-shadow: none; }

/* ---- KPI tiles ------------------------------------------------------------ */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0; text-decoration: none; color: inherit; }
a.kpi:hover { border-color: var(--accent-line); background: #fcfdff; text-decoration: none; color: inherit; }
.kpi-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 500; }
.kpi-icon { display: none; }
.kpi-value { font-size: 28px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; margin-top: 2px; color: var(--text); }
.kpi-value small { font-size: 15px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.kpi-foot { font-size: 13.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; font-size: 13px; color: var(--muted); }
.delta.up { color: var(--ok); }
.delta.down { color: var(--bad); }
.kpi-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* ---- Status labels and tags ------------------------------------------------- */
.tag {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 3px; white-space: nowrap;
  font-size: 12.5px; font-weight: 600; line-height: 1.5; background: var(--surface-3); color: var(--text-2); border: 1px solid var(--border);
}
.tag::before { display: none; }
.tag.ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.tag.warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.tag.bad { background: var(--bad-soft); color: var(--bad); border-color: var(--bad-line); }
.tag.info { background: var(--info-soft); color: var(--info); border-color: var(--info-line); }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 500; color: var(--text-2); background: var(--surface-3); border-radius: 3px; padding: 1px 7px; white-space: nowrap; }

.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok-dot); flex: none; margin-right: 2px; }
.live-dot.paused { background: var(--warn-dot); }
.status-chip { display: inline-flex; align-items: center; gap: 9px; padding: 8px 13px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); font-size: 14px; font-weight: 500; }

/* ---- Notices: white box, coloured bar on the left (as in WordPress) --------- */
.notice {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text-2); border: 1px solid var(--border); border-left: 4px solid var(--info-dot);
  margin: 0 0 16px; font-size: 14.5px; box-shadow: var(--shadow-sm);
}
.notice > svg { color: var(--info); margin-top: 2px; }
.notice.warn { border-left-color: var(--warn-dot); }
.notice.warn > svg { color: var(--warn-dot); }
.notice.bad { border-left-color: var(--bad-dot); }
.notice.bad > svg { color: var(--bad-dot); }
.notice.ok { border-left-color: var(--ok-dot); }
.notice.ok > svg { color: var(--ok-dot); }
.notice b { color: var(--text); }
.banner {
  display: flex; align-items: center; gap: 16px; justify-content: space-between; padding: 14px 18px; border-radius: var(--radius-sm);
  margin-bottom: 20px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--warn-dot); box-shadow: var(--shadow-sm);
}
.banner .b-ic { color: var(--warn-dot); flex: none; display: grid; place-items: center; }
.banner .b-tx { flex: 1; min-width: 0; }
.banner b { display: block; font-size: 15px; }
.banner .small { color: var(--text-2); }

/* ---- Lists ---------------------------------------------------------------- */
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li + li { border-top: 1px solid var(--border); }
.rows a.r, .rows .r { display: flex; align-items: center; gap: 14px; padding: 13px 20px; color: inherit; text-decoration: none; }
.rows a.r:hover { background: var(--surface-2); text-decoration: none; color: inherit; }
.r-ic { width: 32px; height: 32px; border-radius: var(--radius-sm); display: grid; place-items: center; flex: none; background: var(--surface-3); color: var(--muted); }
.r-ic.warn { background: var(--warn-soft); color: var(--warn); }
.r-ic.ok { background: var(--ok-soft); color: var(--ok); }
.r-ic.info { background: var(--info-soft); color: var(--info); }
.r-ic.gray { background: var(--surface-3); color: var(--muted); }
.r-tx { flex: 1; min-width: 0; }
.r-tx b, .r-title { display: block; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-tx .muted { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-go { color: var(--faint); }
.date-box { width: 46px; flex: none; text-align: center; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.date-box .m { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--bad); background: var(--surface-2); border-bottom: 1px solid var(--border); padding: 2px 0; }
.date-box .d { display: block; font-size: 16px; font-weight: 600; padding: 3px 0 4px; font-variant-numeric: tabular-nums; }

.empty { text-align: center; padding: 32px 24px; color: var(--muted); }
.empty .e-ic { display: none; }
.empty b { display: block; color: var(--text); font-size: 15.5px; font-weight: 600; margin-bottom: 4px; }
.empty p { max-width: 420px; margin: 0 auto; font-size: 14.5px; }

/* ---- Sites --------------------------------------------------------------- */
.mono { width: 38px; height: 38px; border-radius: var(--radius); flex: none; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; }
.site-row { padding: 16px 20px; }
.site-row + .site-row { border-top: 1px solid var(--border); }
.site-top { display: flex; align-items: center; gap: 12px; }
.site-top .r-tx a { font-size: 13.5px; color: var(--muted); }
.meter { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.meter.ok > span { background: var(--ok-dot); }
.meter.warn > span { background: var(--warn-dot); }
.meter.bad > span { background: var(--bad-dot); }
.meter.thin { height: 6px; }
.meter-line { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); margin: 14px 0 6px; }
.meter-line b { color: var(--text); font-weight: 600; }
.setup { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.setup li { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--muted); }
.setup li .tick { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 1.5px solid var(--border-strong); background: var(--surface); }
.setup li.done { color: var(--text-2); }
.setup li.done .tick { background: var(--ok-dot); border-color: var(--ok-dot); color: #fff; }
.setup li.now .tick { border: 2px solid var(--accent); }
.setup li.now { color: var(--text); font-weight: 600; }
.setup .tick svg { width: 11px; height: 11px; stroke-width: 3; }

/* ---- Progress segments ---------------------------------------------------- */
.segs { display: flex; gap: 3px; width: 120px; }
.segs i { flex: 1; height: 6px; border-radius: 2px; background: var(--surface-3); }
.segs i.on { background: var(--accent); }
.segs.ok i.on { background: var(--ok-dot); }
.segs.warn i.on { background: var(--warn-dot); }
.segs.bad i.on { background: var(--bad-dot); }

/* ---- Tabs ----------------------------------------------------------------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs button { background: none; border: 0; border-radius: 0; color: var(--muted); padding: 10px 14px; min-height: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; font-size: 14.5px; font-weight: 500; }
.tabs button:hover { color: var(--text); background: none; }
.tabs button.on { color: var(--text); font-weight: 600; border-bottom-color: var(--accent); }
.tabs .n { font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--text-2); border-radius: 10px; padding: 1px 7px; }
.tabs button.on .n { background: var(--accent-soft); color: var(--accent-2); }
.pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.pill { min-height: 34px; padding: 6px 13px; font-size: 14px; }
.pill.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-2); font-weight: 600; }

/* ---- Tables --------------------------------------------------------------- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel .table-wrap { border: 0; border-radius: 0; box-shadow: none; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th { text-align: left; font-weight: 600; font-size: 13.5px; color: var(--text-2); background: var(--surface-2); padding: 10px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafbfc; }
th.r, td.r { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr.link { cursor: pointer; }
tbody tr.link:hover td { background: var(--accent-soft); }
td .t-title { font-weight: 600; color: var(--text); display: block; }
td .t-sub { font-size: 13.5px; color: var(--muted); display: block; }
.bar-cell { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.bar-cell .meter { width: 80px; }

/* ---- Score ring and charts ------------------------------------------------ */
.ring { position: relative; flex: none; }
.ring svg { display: block; transform: rotate(-90deg); }
.ring .track { stroke: var(--surface-3); }
.ring .val { stroke: var(--accent); transition: stroke-dashoffset 0.6s ease; }
.ring.ok .val { stroke: var(--ok-dot); }
.ring.warn .val { stroke: var(--warn-dot); }
.ring.bad .val { stroke: var(--bad-dot); }
.ring .lbl { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; line-height: 1.1; }
.ring .lbl b { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ring .lbl small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.score-top { display: flex; align-items: center; gap: 22px; margin-bottom: 20px; }
.spark { display: block; overflow: visible; }
.spark path.line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark path.area { fill: var(--accent-soft); stroke: none; }
.spark circle { fill: var(--accent); }
.layers { display: grid; gap: 14px; }
.layer .row { margin-bottom: 6px; font-size: 14.5px; }
.layer .help { font-size: 13px; color: var(--muted); margin-top: 4px; }
.engines { display: grid; gap: 16px; }
.big-pct { font-size: 38px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }

/* ---- Page detail ---------------------------------------------------------- */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.detail aside { position: sticky; top: 20px; display: grid; gap: 16px; }
.detail-title { font-size: 26px; font-weight: 600; line-height: 1.25; margin-bottom: 8px; }
.meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.meta-line .dotsep::before { content: '·'; margin-right: 8px; color: var(--faint); }
.vsteps { list-style: none; padding: 0; margin: 4px 0 0; }
.vsteps li { position: relative; display: flex; gap: 12px; padding-bottom: 16px; font-size: 14.5px; color: var(--muted); }
.vsteps li:last-child { padding-bottom: 0; }
.vsteps li::before { content: ''; position: absolute; left: 10px; top: 24px; bottom: 2px; width: 2px; background: var(--border); }
.vsteps li:last-child::before { display: none; }
.vsteps .dot { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 11px; font-weight: 600; background: var(--surface); border: 2px solid var(--border-strong); color: var(--muted); position: relative; z-index: 1; }
.vsteps .dot svg { width: 12px; height: 12px; stroke-width: 3; }
.vsteps li.done { color: var(--text-2); }
.vsteps li.done .dot { background: var(--ok-dot); border-color: var(--ok-dot); color: #fff; }
.vsteps li.done::before { background: var(--ok-dot); }
.vsteps li.now { color: var(--text); font-weight: 600; }
.vsteps li.now .dot { border-color: var(--accent); background: var(--accent); color: #fff; }
.side-actions { display: grid; gap: 8px; }
.side-actions .button, .side-actions button { width: 100%; }
.say { font-size: 15px; color: var(--text-2); margin: 12px 0 16px; }

.serp { padding: 18px 20px; margin-bottom: 20px; }
.serp-label { font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.serp-url { font-size: 13.5px; color: var(--text-2); font-family: arial, sans-serif; }
.serp-title { font-size: 20px; color: #1a0dab; margin: 3px 0 4px; font-family: arial, sans-serif; line-height: 1.3; }
.serp-desc { font-size: 14px; color: var(--muted); font-family: arial, sans-serif; line-height: 1.55; }

.article { font-family: var(--serif); font-size: 18px; line-height: 1.75; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 44px 56px; }
.article > :first-child { margin-top: 0; }
.article h1, .article h2, .article h3 { font-family: var(--sans); }
.article h2 { font-size: 23px; margin: 1.6em 0 0.5em; }
.article h3 { font-size: 19px; margin: 1.4em 0 0.4em; }
.article p { margin: 0 0 1.05em; }
.article li { margin: 0.3em 0; }
.article a { text-decoration: underline; text-underline-offset: 3px; }
.article table { font-family: var(--sans); font-size: 14.5px; margin: 1em 0; }
.article blockquote { margin: 1.2em 0; padding: 4px 20px; border-left: 3px solid var(--border-strong); color: var(--text-2); }
.article.editable { outline: none; min-height: 420px; border-top-left-radius: 0; border-top-right-radius: 0; }
.article.editable:focus { border-color: var(--accent-line); }

.checks { display: grid; gap: 12px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; }
.check .mark { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface-3); color: var(--muted); }
.check .mark svg { width: 12px; height: 12px; stroke-width: 3; }
.check.ok .mark { background: var(--ok-soft); color: var(--ok); }
.check.bad .mark { background: var(--bad-soft); color: var(--bad); }
.check ul { margin: 6px 0 0; }

details.more { border-top: 1px solid var(--border); }
details.more:first-of-type { border-top: 0; }
details.more > summary { list-style: none; cursor: pointer; padding: 14px 20px; font-weight: 600; font-size: 14.5px; display: flex; align-items: center; justify-content: space-between; }
details.more > summary:hover { background: var(--surface-2); }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin-right: 4px; transition: transform 0.15s; }
details.more[open] > summary::after { transform: rotate(-135deg); }
details.more > :not(summary) { margin-left: 20px; margin-right: 20px; }
details.more[open] { padding-bottom: 14px; }
details.more ul, details.more ol { font-size: 14.5px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; font-size: 14.5px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.history { list-style: none; padding: 0; margin: 0; font-size: 14.5px; }
.history li { display: grid; grid-template-columns: 120px 1fr; gap: 10px; padding: 7px 0; }
.history li + li { border-top: 1px solid var(--border); }

/* ---- Editor --------------------------------------------------------------- */
.edit-card { margin-bottom: 16px; }
.toolbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 8px; background: var(--surface-2); border: 1px solid var(--border); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; }
.toolbar button { min-height: 34px; padding: 6px 10px; font-size: 14px; background: transparent; border-color: transparent; }
.toolbar button:hover { background: var(--surface-3); border-color: transparent; }
.toolbar button.on { background: var(--accent-soft); color: var(--accent-2); }
.toolbar .sep { width: 1px; height: 20px; background: var(--border-strong); margin: 0 6px; }
.toolbar .save-top { margin-left: auto; background: var(--accent); color: #fff; border-color: var(--accent); }
.toolbar .save-top:hover { background: var(--accent-2); color: #fff; }
#ed-html { font: 13px/1.5 ui-monospace, monospace; border-radius: 0 0 var(--radius) var(--radius); margin: 0; min-height: 420px; }
.savebar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 16px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }

/* ---- Plan ----------------------------------------------------------------- */
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.plan-head.attn { border-left: 4px solid var(--accent); }
.timeline { display: grid; gap: 0; }
.wk { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 20px; }
.wk-label { position: relative; padding: 18px 0; }
.wk-label b { display: block; font-size: 15px; }
.wk-label span { font-size: 13.5px; color: var(--muted); }
.wk-label.now b { color: var(--accent-2); }
.wk-label.now::after { content: 'This week'; display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--accent-2); background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 3px; padding: 0 7px; }
.wk-items { border-left: 2px solid var(--border); padding: 10px 0 10px 20px; display: grid; gap: 10px; }
.wk-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; position: relative; }
.wk-item::before { content: ''; position: absolute; left: -27px; top: 18px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border-strong); }
.wk-item b { display: block; font-weight: 600; }
.wk-item .row { margin-top: 6px; gap: 6px; }

/* ---- Review --------------------------------------------------------------- */
.post-body { white-space: pre-wrap; font-size: 15px; margin: 10px 0; }
.addr { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.review-card + .review-card { margin-top: 12px; }

/* ---- Skeleton ------------------------------------------------------------- */
.sk { background: var(--surface-3); border-radius: var(--radius-sm); animation: sk 1.4s ease-in-out infinite; }
@keyframes sk { 50% { opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }
.sk-title { height: 28px; width: 280px; margin-bottom: 12px; }
.sk-line { height: 16px; width: 440px; max-width: 100%; margin-bottom: 28px; }
.sk-tile { height: 110px; border-radius: var(--radius); }
.sk-panel { height: 300px; border-radius: var(--radius); margin-top: 20px; }

/* ---- Toast and dialog ------------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 100; max-width: min(560px, calc(100% - 32px));
  display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: var(--radius);
  background: #1d2327; color: #fff; font-size: 14.5px; font-weight: 500; box-shadow: var(--shadow-lg);
}
.toast::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #3fbf6f; flex: none; }
.toast.bad::before { background: #f0645a; }
dialog { border: 1px solid var(--border); border-radius: var(--radius); padding: 0; width: min(520px, calc(100% - 32px)); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(0, 0, 0, 0.4); }
dialog form { padding: 24px; }
dialog h2 { font-size: 18px; margin-bottom: 8px; }
dialog p.muted { font-size: 14.5px; margin-bottom: 18px; }
dialog .row.end { margin-top: 22px; }
pre.json { max-height: 60vh; overflow: auto; font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--border); padding: 14px; border-radius: var(--radius-sm); }

/* ---- Transparency screens: live activity, topics, site health --------------- */
.tag.test { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); font-weight: 700; letter-spacing: 0.03em; vertical-align: 2px; margin-left: 6px; }
.notice.test-banner { border-left-color: var(--warn-dot); background: var(--warn-soft); border-color: var(--warn-line); border-left-color: var(--warn-dot); }
.notice.test-banner > svg { color: var(--warn-dot); }
.live-dot { animation: live-pulse 1.8s infinite; }
@keyframes live-pulse { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.rows .r.live-row { align-items: flex-start; }
.counters { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--text-2); }
.rows .r-tx > span { display: block; font-size: 14px; color: var(--text-2); margin-top: 2px; }
.steps .r { align-items: flex-start; }
.step-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.rows .r-tx .step-err { color: var(--bad); white-space: normal; }
.step.run .r { background: var(--info-soft); }
.kw-list { margin: 8px 0 4px; padding-left: 18px; font-size: 14px; color: var(--text-2); }
.kw-list li { margin: 2px 0; }
td details summary { cursor: pointer; }
td details summary b { display: inline; }
.issues { display: grid; gap: 10px; }
.issues > li + li { border-top: 0; }
.issues summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 13px 16px; }
.issues summary:hover { background: var(--surface-2); }
.issues summary::-webkit-details-marker { display: none; }
.issues .r-tx .muted { white-space: normal; }
.issues .kw-list { padding: 0 16px 12px 34px; margin: 0; }
@media (max-width: 820px) {
  .step-meta { display: none; }
  .counters { flex-direction: column; gap: 2px; }
}

/* ---- One website for the whole dashboard, chosen at the top of the menu ---- */
.site-pick { display: block; margin: -4px 0 14px; font-weight: 400; }
.site-pick .nav-label { display: block; padding: 0 2px 6px; }
.site-pick .select { width: 100%; max-width: none; font-weight: 600; }

/* ---- Step pages ------------------------------------------------------------ */
.back { margin: 0 0 6px; font-size: 14px; }
.back a { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.back a .i { transform: rotate(180deg); }
.filter-box { max-width: 360px; flex: 1; }
.page-facts { display: grid; gap: 6px; padding: 4px 16px 12px 16px; font-size: 14.5px; }
.page-facts > div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; }
.page-facts a { word-break: break-all; }
.page-issues { border-top: 1px solid var(--border); }
.page-issues .r { padding: 10px 16px; }
.rows li[hidden], tr[hidden] { display: none; }
@media (max-width: 820px) { .page-facts > div { grid-template-columns: 1fr; gap: 0; } }

/* ---- Responsive ----------------------------------------------------------- */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail { grid-template-columns: minmax(0, 1fr); }
  .detail aside { position: static; order: -1; }
}
@media (max-width: 960px) {
  .cols, .cols.even, .grid.two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .shell { background: var(--bg); }
  .nav { position: fixed; left: 0; top: 0; z-index: 50; transform: translateX(-100%); transition: transform 0.2s ease; box-shadow: var(--shadow-lg); }
  .nav.open { transform: none; }
  .mobile-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30; }
  .view { padding: 20px 16px 48px; }
  h1 { font-size: 22px; }
  .article { padding: 24px 20px; font-size: 17px; }
  .search input { width: 100%; }
  .head-actions { width: 100%; }
  .head-actions .search { flex: 1; }
  .head-actions .select { max-width: 100%; flex: 1; min-width: 0; }
  .wk { grid-template-columns: 1fr; gap: 0; }
  .wk-label { padding: 14px 0 4px; }
  .hide-sm { display: none !important; }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .kpi-value { font-size: 25px; }
  .rows a.r, .rows .r { padding: 12px 14px; }
  .rows .r .button { display: none; }
  .banner { flex-wrap: wrap; }
  .banner button { width: 100%; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .history li { grid-template-columns: 1fr; gap: 0; }
  .score-top { flex-direction: column; align-items: flex-start; }
}

/* ---- An opened page in Site health / a crawl step ---------------------------
   The opened area is visibly inside the page row: grey tray, two white boxes
   with their own small headings, smaller problem rows, badges of one width
   so the titles line up. */
.issues .tag { min-width: 96px; justify-content: center; }
.issues details[open] { border-left: 3px solid var(--accent); }
.issues details[open] > summary { border-bottom: 1px solid var(--border); background: var(--surface); }
.issues details[open] > summary b { color: var(--accent-2); }
.issues details > :not(summary) { background: var(--surface-2); }
.issues details[open] { background: var(--surface-2); padding-bottom: 16px; }
.page-facts, .page-issues {
  margin: 14px 16px 0 16px; padding: 0; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.page-facts { gap: 0; padding: 4px 0; font-size: 14px; }
.page-facts > div { padding: 5px 14px; }
.page-facts::before, .page-issues::before {
  display: block; padding: 8px 14px; font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--muted); border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.page-facts::before { content: 'About this page'; margin: -4px 0 4px; border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.page-issues { border-top: 1px solid var(--border); overflow: hidden; }
.page-issues::before { content: 'Problems found on this page'; }
.page-issues .r { padding: 9px 14px; gap: 12px; }
.page-issues .tag { min-width: 96px; font-size: 12px; }
.page-issues .r-tx b { font-size: 14px; font-weight: 600; color: var(--text); }
.page-issues .r-tx .muted { font-size: 13.5px; white-space: normal; }
.page-issues code { background: none; padding: 0; color: var(--faint); font-size: 11.5px; }
.issues details > p.muted { margin: 14px 16px 0 !important; padding: 12px 14px !important; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.issues details > .kw-list {
  list-style: none; margin: 14px 16px 0; padding: 0 0 6px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; font-size: 14px;
}
.issues details > .kw-list::before {
  content: 'Pages with this problem'; display: block; padding: 8px 14px; margin-bottom: 4px; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.issues details > .kw-list li { padding: 4px 14px; margin: 0; }
.issues details > div.muted.xsmall { padding: 10px 16px 0 !important; }
.issues details > div.muted.xsmall code { background: none; padding: 0; color: var(--faint); font-size: 11.5px; }
.issues details > .kw-list li.more-row { padding: 6px 14px 4px; border-top: 1px solid var(--border); margin-top: 4px; }
.issues details > .kw-list li.more-row button { font-size: 14px; font-weight: 600; }

/* ---- Automations ---------------------------------------------------------- */
/* On/off switches, as in Zapier and most admin settings screens. */
.switches .r { gap: 14px; padding: 12px 20px; }
.switches .r-tx .muted { white-space: normal; font-size: 13.5px; }
.switch-state { width: 56px; text-align: right; font-size: 13.5px; font-weight: 600; color: var(--warn); flex: none; }
.switch-state.on { color: var(--ok); }
button.switch {
  position: relative; flex: none; width: 44px; min-height: 0; height: 24px; padding: 0; border-radius: 12px;
  background: var(--border-strong); border: 0; transition: background 0.15s;
}
button.switch:hover { background: var(--faint); }
button.switch.on { background: var(--ok-dot); }
button.switch.on:hover { background: var(--ok); }
button.switch > span {
  position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); transition: transform 0.15s;
}
button.switch.on > span { transform: translateX(20px); }

/* System check: one finding per line, separated, readable. */
.checklist { list-style: none; margin: 0 0 6px; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.checklist li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; font-size: 14px; color: var(--text-2); line-height: 1.45; }
.checklist li + li { border-top: 1px solid var(--border); }
.checklist li > svg { color: var(--info-dot); margin-top: 2px; }
.checklist.must { border-color: var(--bad-line); border-left: 4px solid var(--bad-dot); background: var(--bad-soft); }
.checklist.must li { color: var(--text); font-weight: 500; }
.checklist.must li > svg { color: var(--bad-dot); }
.panel-body h4 { display: flex; align-items: center; gap: 8px; }

/* Run now: equal tiles in a grid. */
.run-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.run-grid button { justify-content: space-between; min-height: 46px; padding: 10px 14px; font-weight: 600; color: var(--text); text-align: left; white-space: normal; }
.run-grid button svg { color: var(--accent); }
.run-grid button:hover { border-color: var(--accent); background: var(--accent-soft); }
.grid.two .checklist:not(.must) { max-height: 300px; overflow-y: auto; }
.run-grid button span { line-height: 1.3; }

/* ---- Brand logos and row icons ---- */
svg.blogo { width: 20px; height: 20px; flex: none; vertical-align: -3px; }
svg.blogo.sm { width: 16px; height: 16px; vertical-align: -3px; }
.with-logo { display: inline-flex; align-items: center; gap: 7px; }
.with-logo svg.blogo + svg.blogo { margin-left: -3px; }
.kpi-label svg.i { color: var(--faint); }
.kpi-label svg.blogo { width: 20px; height: 20px; }
.tag svg.blogo, .chip svg.blogo { margin-right: 1px; }
.step-ic { width: 32px; height: 32px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); color: var(--muted); }
.step-ic svg { width: 17px; height: 17px; }
.step.bad .step-ic { border-color: var(--bad-line); color: var(--bad); }
.button svg.blogo { margin-right: 2px; }
.r-tx b.with-logo { display: inline-flex; }
.with-logo svg.i { color: var(--faint); }
.run-grid .with-logo svg.i { color: var(--accent); }

/* ===========================================================================
   Polish pass (2026-11-18)
   One anchor of colour: a navy menu, as in WordPress admin and most daily-use
   back offices. The working area stays light. Public Sans (the US Web Design
   System typeface, made for legibility) instead of whatever the computer
   falls back to. Bigger, bolder numbers; KPI boxes joined into one strip;
   table headers as small capitals; empty boxes get an icon. No gradients,
   glows or decoration.
   =========================================================================== */
:root {
  --bg: #f4f6f9;
  --border: #dde2e8;
  --text: #17202b;
  --text-2: #364150;
  --muted: #5a6573;
  --navy: #13294b;
  --navy-2: #1c3864;
  --navy-text: #c8d3e1;
  --navy-muted: #8195b0;
  --radius: 8px;
  --radius-sm: 5px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.03);
  --sans: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
body { font-size: 15px; letter-spacing: -0.005em; -webkit-font-smoothing: antialiased; }
h1 { font-size: 27px; font-weight: 700; letter-spacing: -0.015em; }
h2 { font-weight: 600; }

/* Menu */
.shell { background: linear-gradient(90deg, var(--navy) 248px, var(--bg) 248px); }
.nav { background: var(--navy); border-right: 0; color: var(--navy-text); }
.brand-mark { color: #fff; font-size: 17px; }
.nav .logo { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18); }
.nav .nav-label { color: var(--navy-muted); }
.nav nav a { color: var(--navy-text); }
.nav nav a svg { color: var(--navy-muted); }
.nav nav a:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.nav nav a:hover svg { color: #fff; }
.nav nav a.active { background: var(--navy-2); color: #fff; }
.nav nav a.active svg { color: #8ec0ff; }
.nav nav a.active::before { background: #8ec0ff; left: -12px; }
.nav .select {
  background-color: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.16); color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c8d3e1' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
.nav .select:hover { border-color: rgba(255, 255, 255, 0.32); }
.nav .select option { color: var(--text); background: #fff; }
.nav-foot { border-top-color: rgba(255, 255, 255, 0.1); }
.nav .avatar { background: rgba(255, 255, 255, 0.12); border-color: transparent; color: #fff; }
.nav .who-name { color: #fff; }
.nav #who-role { color: var(--navy-muted); }
.nav .icon-btn { color: var(--navy-muted); }
.nav .icon-btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.nav .badge { background: #e5534b; }
.nav a:focus-visible, .nav select:focus-visible, .nav button:focus-visible { outline-color: #8ec0ff; }

/* Page header: no rule, more weight */
.head { border-bottom: 0; padding-bottom: 0; margin-bottom: 22px; }
.head .sub { font-size: 15.5px; margin-top: 6px; }

/* Test banner: a slim strip, not a block */
.notice.test-banner { padding: 9px 14px; font-size: 14px; margin-bottom: 18px; }

/* KPI strip: one box, divided */
.kpis {
  gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); margin-bottom: 24px;
}
.kpi { border: 0; border-radius: 0; box-shadow: none; padding: 18px 22px 18px; gap: 6px; }
a.kpi:hover { background: #f7faff; }
.kpi-label { font-size: 14.5px; color: var(--text-2); font-weight: 500; }
.kpi-label svg.i { color: var(--accent); }
.kpi-value { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.kpi-foot { font-size: 13.5px; }
.delta { padding: 1px 6px; border-radius: 4px; background: var(--surface-3); }
.delta.up { background: var(--ok-soft); }
.delta.down { background: var(--bad-soft); }

/* Panels */
.panel-head { padding: 15px 20px; }
.panel-head h2 { font-size: 16.5px; font-weight: 600; }
.panel-head h2 > svg.i { color: var(--accent); }
.panel-body { padding: 20px 22px; }

/* Empty boxes: an icon so they do not look broken */
.empty { padding: 30px 24px 32px; }
.empty .e-ic {
  display: grid; place-items: center; width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
}
.empty .e-ic.ok { background: var(--ok-soft); color: var(--ok-dot); }
.empty .e-ic.gray { background: var(--surface-3); color: var(--muted); }
.empty .e-ic svg { width: 20px; height: 20px; }

/* Tables */
th { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); padding: 11px 16px; background: #f8fafc; }
td { padding: 13px 16px; }
tbody tr:hover td { background: #f8fafd; }

/* Tabs */
.tabs button { font-size: 15px; padding: 11px 16px; }
.tabs button.on { color: var(--accent-2); }

/* Tags and chips: a touch rounder */
.tag, .chip { border-radius: 4px; }

/* Buttons */
button, .button { border-radius: 6px; }
button.primary, .button.primary { box-shadow: 0 1px 2px rgba(16, 24, 40, 0.12); }

/* Lists */
.rows a.r:hover { background: #f8fafd; }
.issues > li, .issues details { border-radius: var(--radius); }

/* Login: navy page, white card */
.login { background: var(--navy); }
.login-card { border: 0; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25); padding: 36px 36px 28px; }
.login-foot { color: var(--navy-text); }

@media (max-width: 820px) {
  .shell { background: var(--bg); }
  .mobile-bar { background: var(--navy); border-bottom: 0; color: #fff; }
  .mobile-bar .icon-btn { color: #fff; }
  .mobile-bar .brand-mark { color: #fff; }
}
@media (max-width: 560px) {
  .kpi-value { font-size: 27px; }
}
/* Public Sans' tabular 1 has a foot; big numbers read better proportional. */
.kpi-value, .big-pct, .ring .lbl b { font-variant-numeric: proportional-nums lining-nums; }
.search input, .filter-box input { background: var(--surface); }
.plan-head .r-ic { background: var(--accent-soft); color: var(--accent); }
.wk-item::before { border-color: var(--accent); }

/* ===========================================================================
   Charts (2026-11-18). Modelled on Search Console's performance report and
   agency reporting dashboards: coloured metric tiles that switch the line,
   a daily line with a hover read-out, a ring for visit sources, bars for
   ranking spots.
   =========================================================================== */
.block-b { margin-bottom: 20px; }
.chart { position: relative; width: 100%; }
.chart svg { display: block; overflow: visible; }
.chart .g { stroke: #e8ebef; stroke-width: 1; }
.chart .ax { fill: var(--muted); font-size: 12px; font-family: var(--sans); }
.chart .guide { stroke: #9aa3ad; stroke-width: 1; stroke-dasharray: 3 3; }
.chart .hit { cursor: crosshair; }
.chart .dot { stroke: #fff; stroke-width: 2; }
.chart .tip {
  position: absolute; z-index: 5; pointer-events: none; min-width: 150px; padding: 8px 11px; border-radius: 6px;
  background: #fff; border: 1px solid var(--border); box-shadow: 0 4px 14px rgba(16, 24, 40, 0.12); font-size: 13px; line-height: 1.5;
}
.chart .tip b:first-child { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.chart .tip span { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.chart .tip i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.chart-note { margin: 8px 0 0; font-size: 13px; color: var(--muted); }

/* Metric tiles: the selected one fills with the line's colour, as in Search Console */
.mtiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.mtile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; white-space: normal;
  padding: 12px 14px 13px; min-height: 0; border-radius: 8px; border: 1px solid var(--border); background: var(--surface);
  border-top: 4px solid var(--mc); color: var(--text); font-weight: 400;
}
.mtile:hover { background: #fafbfc; border-color: var(--border); border-top-color: var(--mc); }
.mtile.on { background: var(--mc); border-color: var(--mc); color: #fff; }
.mtile.on:hover { background: var(--mc); color: #fff; }
.mt-l { font-size: 14px; font-weight: 600; }
.mt-v { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; font-variant-numeric: proportional-nums lining-nums; }
.mt-v small { font-size: 14px; font-weight: 500; opacity: 0.8; }
.mt-f { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.mtile.on .mt-f { color: rgba(255, 255, 255, 0.88); }
.mtile.on .delta { background: rgba(255, 255, 255, 0.2); color: #fff; }

/* Search panel: chart with ranking bars beside it */
.sp-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
.sp-main { padding: 20px 22px; min-width: 0; }
.sp-side { padding: 20px 22px; border-left: 1px solid var(--border); background: #fbfcfd; }
.side-h { font-size: 15px; font-weight: 600; }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.hbars li { display: grid; grid-template-columns: 112px minmax(0, 1fr) 34px; align-items: center; gap: 10px; font-size: 13.5px; }
.hb-l { color: var(--text-2); }
.hb-bar { height: 12px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.hb-bar span { display: block; height: 100%; border-radius: 3px; min-width: 2px; }
.hbars b { text-align: right; font-size: 14px; }

/* Ring with legend */
.donut-wrap { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.donut { position: relative; flex: none; }
.donut svg { display: block; }
.donut-c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.15; }
.donut-c b { font-size: 26px; font-weight: 700; }
.donut-c small { font-size: 12.5px; color: var(--muted); }
.legend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 220px; display: grid; gap: 10px; }
.legend li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 40px; align-items: center; gap: 10px; font-size: 14px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; }
.legend .muted { text-align: right; font-size: 13px; }

@media (max-width: 1100px) {
  .sp-body { grid-template-columns: minmax(0, 1fr); }
  .sp-side { border-left: 0; border-top: 1px solid var(--border); }
}
@media (max-width: 560px) {
  .mtiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mt-v { font-size: 22px; }
  .sp-main, .sp-side { padding: 16px; }
}
.chart-bar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin: -6px 0 6px; }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 6px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; min-height: 30px; padding: 5px 12px; font-size: 13px; background: var(--surface); color: var(--text-2); }
.seg button + button { border-left: 1px solid var(--border-strong); }
.seg button.on { background: var(--accent-soft); color: var(--accent-2); font-weight: 600; }
.grid.two.eq { align-items: stretch; }
.grid.two.eq > .panel { display: flex; flex-direction: column; }
.grid.two.eq > .panel > .panel-body { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.grid.two.eq > .panel > .panel-body:has(.mtiles) { justify-content: flex-start; }
@media (max-width: 560px) {
  .panel-head { flex-wrap: wrap; gap: 4px 12px; }
  .panel-head > .muted { width: 100%; font-size: 13px; }
}

/* ---- Scrollbars -------------------------------------------------------------
   Thin, rounded, quiet grey that darkens on hover; light on the navy menu.
   Chrome, Edge and Safari use the ::-webkit rules (rounded thumb with a gap).
   Firefox only understands width and colour, so it gets those, and only
   Firefox: in Chrome, setting scrollbar-color switches the ::-webkit rules off. */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c4cad3; border-radius: 8px; border: 3px solid transparent; background-clip: padding-box; min-height: 40px; }
::-webkit-scrollbar-thumb:hover { background-color: #9aa3ae; }
::-webkit-scrollbar-thumb:active { background-color: #7d8793; }
::-webkit-scrollbar-corner { background: transparent; }
.nav ::-webkit-scrollbar-thumb, .nav::-webkit-scrollbar-thumb { background-color: rgba(255, 255, 255, 0.18); }
.nav ::-webkit-scrollbar-thumb:hover, .nav::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, 0.32); }
.table-wrap::-webkit-scrollbar, .checklist::-webkit-scrollbar, pre.json::-webkit-scrollbar { width: 10px; height: 10px; }
@supports (-moz-appearance: none) {
  html { scrollbar-width: thin; scrollbar-color: #c4cad3 transparent; }
  .nav, .nav * { scrollbar-color: rgba(255, 255, 255, 0.22) transparent; }
}

/* ===========================================================================
   One look everywhere (2026-11-18): every summary box is a tile like the
   Results metric tiles, with a coloured top edge by meaning.
   =========================================================================== */
.kpis { gap: 14px; background: none; border: 0; border-radius: 0; overflow: visible; box-shadow: none; }
.kpi {
  --kc: #5f6b7a; border: 1px solid var(--border); border-top: 4px solid var(--kc); border-radius: 8px;
  box-shadow: var(--shadow); padding: 14px 16px 15px; background: var(--surface);
}
.kpi.info { --kc: #1a73e8; }
.kpi.ok { --kc: #188038; }
.kpi.warn { --kc: #e8710a; }
.kpi.bad { --kc: #d93025; }
a.kpi:hover { border-color: var(--border); border-top-color: var(--kc); background: #fafbfc; }
.kpi-label { font-size: 14px; font-weight: 600; color: var(--text); }
.kpi-label svg.i { color: var(--kc); }
.kpi-value { font-size: 30px; }

.hbars li { grid-template-columns: var(--hb-l, 112px) minmax(0, 1fr) 46px; }
.hb-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.setup-top { display: flex; align-items: center; gap: 16px; margin: 4px 0 6px; }
.setup-top { gap: 12px; }
.setup-top .ring .lbl b { font-size: 14px; font-weight: 700; }
.weeks { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; }
.wkc { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.wkc-bar { width: 100%; height: 72px; background: var(--surface-3); border-radius: 5px; display: flex; align-items: flex-end; overflow: hidden; }
.wkc-bar span { display: block; width: 100%; background: var(--accent); border-radius: 5px 5px 0 0; }
.wkc b { font-size: 14px; min-height: 20px; }
.wkc small { font-size: 12px; color: var(--muted); }
.wkc.now .wkc-bar { outline: 2px solid var(--accent); outline-offset: 2px; }
.wkc.now small { color: var(--accent-2); font-weight: 700; }
@media (max-width: 560px) {
  .weeks { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .hbars li { grid-template-columns: 120px minmax(0, 1fr) 40px; }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 12px 12px 13px; }
  .kpi-value { font-size: 24px; }
  .kpi-foot { font-size: 12.5px; }
  .hbars { gap: 10px; }
  .hbars li { grid-template-columns: minmax(0, 1fr) 40px; row-gap: 4px; }
  .hbars .hb-l { grid-column: 1 / -1; white-space: normal; }
}

/* ---- Automations, in the chart style (2026-11-18) ------------------------- */
.sw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.sw-card {
  --sc: #188038; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 13px; border: 1px solid var(--border);
  border-top: 4px solid var(--sc); border-radius: 8px; background: var(--surface);
}
.sw-card.off { --sc: #e8710a; background: #fffaf3; }
.sw-card.master { box-shadow: inset 0 0 0 1px var(--sc); }
.sw-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sw-top b { font-size: 15px; }
.sw-state { font-size: 13px; font-weight: 700; color: var(--sc); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 2px; }
.sw-why { font-size: 13px; color: var(--muted); line-height: 1.4; }
.sw-card.off button.switch { background: #e9b98a; }
.sw-card.off button.switch:hover { background: #e8710a; }

.all-clear { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 6px; background: var(--ok-soft); color: var(--ok); font-weight: 600; font-size: 14px; }
.grid.two.eq .checklist:not(.must) { max-height: 330px; overflow-y: auto; }

.run-list { display: grid; gap: 8px; }
.run-item {
  display: flex; align-items: center; gap: 12px; justify-content: flex-start; text-align: left; white-space: normal;
  width: 100%; padding: 10px 12px; min-height: 0; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font-weight: 400;
}
.run-item:hover { border-color: var(--accent-line); background: #f7faff; }
.run-ic {
  width: 38px; height: 38px; flex: none; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; gap: 1px;
  background: var(--rc); color: #fff;
}
.run-ic[style*="#ffffff"] { border: 1px solid var(--border); }
.run-ic svg.i { width: 19px; height: 19px; color: #fff; }
.run-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.run-tx b { font-size: 14.5px; color: var(--text); font-weight: 600; }
.run-tx span { font-size: 13px; color: var(--muted); line-height: 1.35; }
.run-go {
  width: 30px; height: 30px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent);
}
.run-item:hover .run-go { background: var(--accent); color: #fff; }
.run-item:disabled .run-go { background: var(--surface-3); color: var(--muted); }

.n8n-off { display: flex; gap: 16px; align-items: flex-start; padding: 20px 22px; }
.n8n-off .n8n-ic { width: 48px; height: 48px; flex: none; border-radius: 10px; background: #fdecf1; display: inline-flex; align-items: center; justify-content: center; }
.n8n-off .n8n-ic svg.blogo { width: 28px; height: 28px; }
.n8n-off b { font-size: 15.5px; }
.n8n-off p { margin: 4px 0 0; }
@media (max-width: 560px) { .n8n-off { padding: 16px; } }
.grid.two.eq > .panel > .panel-body:has(.checklist, .run-list, .all-clear) { justify-content: flex-start; }

/* ---- Settings: keyword research, Claude prompts, AI questions ---- */
.tabs a { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); padding: 10px 14px; border-bottom: 3px solid transparent; margin-bottom: -1px; font-size: 14.5px; font-weight: 500; white-space: nowrap; text-decoration: none; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.on { color: var(--accent-2); font-weight: 600; border-bottom-color: var(--accent); }
textarea.code-edit { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.55; tab-size: 2; white-space: pre-wrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips .chip { font-size: 13px; padding: 3px 9px; }
.num-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px 22px; }
.num-field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.num-field input, .num-field select { font-weight: 400; }
.num-field small { font-weight: 400; line-height: 1.45; }
.pe-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.pe-grid aside { position: sticky; top: 16px; }
.vars { margin: 0; display: grid; gap: 4px 0; }
.vars dt { margin-top: 8px; }
.vars dd { margin: 2px 0 0; line-height: 1.45; }
.vars button.chip { border: 0; min-height: 0; cursor: pointer; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.vars button.chip:hover { background: var(--accent-soft); color: var(--accent-2); }
.hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hist li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.hist li > div { flex-basis: 100%; }
.block-t { margin-top: 14px; }
details summary { cursor: pointer; color: var(--accent-2); }
@media (max-width: 900px) { .pe-grid { grid-template-columns: 1fr; } .pe-grid aside { position: static; } }
#research-form .panel-body { justify-content: flex-start; }
.prompt-list td:nth-child(3) code { white-space: nowrap; }
.topic-table .why { margin-top: 5px; line-height: 1.4; }
.rs-table td:nth-child(1) { min-width: 240px; }
.rs-table td:nth-child(2) { min-width: 240px; }
.rs-table td:nth-child(3) { min-width: 220px; max-width: 320px; word-break: break-word; }
.rs-table td:nth-child(4) { min-width: 200px; }
.rs-table td:last-child { white-space: nowrap; }

/* Fact markers on the page screen, and the numbered fact file (20 Nov 2026) */
.article sup.fact-ref { font-family: var(--sans); font-size: 11px; font-weight: 600; color: var(--accent, #0b5cad); background: color-mix(in srgb, currentColor 10%, transparent); border-radius: 4px; padding: 0 4px; margin-left: 2px; cursor: help; }
.article sup.fact-ref.missing { color: #b42318; }
.article mark.needs-fact { background: #fff3c4; color: #7a4b00; font-family: var(--sans); font-size: 14px; padding: 1px 6px; border-radius: 4px; }
ol.fact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
ol.fact-list li { display: flex; gap: 10px; align-items: flex-start; }
.fact-n { flex: none; min-width: 22px; text-align: center; font-size: 12px; font-weight: 600; border-radius: 4px; padding: 1px 4px; background: color-mix(in srgb, var(--accent, #0b5cad) 12%, transparent); color: var(--accent, #0b5cad); }
.bad-text { color: #b42318; }
ol.fact-lines { list-style: none; margin: 0; padding: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.55; max-height: 70vh; overflow: auto; }
ol.fact-lines li { display: flex; gap: 12px; padding: 0 6px; border-radius: 4px; }
ol.fact-lines li.on { background: #fff3c4; }
ol.fact-lines .ln { flex: none; width: 3ch; text-align: right; color: var(--muted, #888); user-select: none; }
ol.fact-lines .tx { white-space: pre-wrap; word-break: break-word; }

/* Needs-a-detail answers on the page screen (20 Nov 2026) */
.needs-facts-form { border-color: #f0c36d; }
.needs-facts-form .nf-q { margin-bottom: 14px; }
.needs-facts-form textarea { width: 100%; margin-top: 4px; }
.needs-facts-form .nf-skip { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; margin-top: 4px; }

/* ---- Social post preview (25 Nov 2026): roughly how the post looks in the feed ---- */
.sp-wrap { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.sp-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; color: var(--text); }
.sp-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.sp-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; flex: none; }
.sp-name { font-weight: 600; font-size: 14px; line-height: 1.2; }
.sp-sub { color: var(--muted); font-size: 12px; }
.sp-img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; background: var(--surface-3); }
.sp-img.wide { aspect-ratio: 1.91 / 1; }
.sp-noimg { aspect-ratio: 1.91 / 1; display: grid; place-items: center; color: var(--faint); background: var(--surface-3); font-size: 13px; }
.sp-text { white-space: pre-wrap; font-size: 14px; line-height: 1.45; padding: 4px 12px 12px; overflow-wrap: anywhere; }
.sp-icons { display: flex; gap: 14px; padding: 8px 12px 4px; color: var(--text-2); font-size: 13px; }
.sp-link { background: var(--surface-2); border-top: 1px solid var(--border); padding: 8px 12px 10px; }
.sp-domain { text-transform: uppercase; color: var(--muted); font-size: 11px; letter-spacing: .02em; }
.sp-ltitle { font-weight: 600; font-size: 15px; line-height: 1.3; }
.sp-actions { flex: 1; min-width: 220px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sp-card { border-color: var(--border-strong); } }

/* ---------------------------------------------------------------------------
   The report (#/report): one long page, printed or saved as a PDF
   --------------------------------------------------------------------------- */
.report-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.report { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 40px 44px; max-width: 980px; margin: 0 auto; }
.rp-cover { border-bottom: 3px solid var(--accent); padding-bottom: 22px; margin-bottom: 8px; }
.rp-kicker { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 700; color: var(--accent); }
.rp-cover h1 { font-size: 32px; margin: 6px 0 6px; }
.rp-meta { color: var(--muted); font-size: 14px; }
.rp-sec { padding: 26px 0 6px; border-bottom: 1px solid var(--border); }
.rp-sec:last-of-type { border-bottom: 0; }
.rp-h { display: flex; align-items: center; gap: 10px; font-size: 20px; margin: 0 0 12px; }
.rp-n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; flex: none; }
.rp-sub { margin: -6px 0 14px; }
.rp-h3 { font-size: 15px; margin: 20px 0 8px; }
.rp-summary p { margin: 0 0 10px; line-height: 1.6; font-size: 15.5px; }
.rp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rp-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 2px solid var(--border); }
.rp-table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.rp-table tr:last-child td { border-bottom: 0; }
.rp-table .r { text-align: right; }
.rp-compare td:first-child { font-weight: 600; }
.rp-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.rp-tiles.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rp-tiles > div { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.rp-tiles span { display: block; color: var(--muted); font-size: 12.5px; margin-bottom: 4px; }
.rp-tiles b { font-size: 22px; }
.rp-gap { margin-top: 16px; }
.rp-status { display: flex; flex-direction: column; gap: 3px; border-radius: 10px; padding: 12px 16px; margin-bottom: 14px; background: var(--bg); border-left: 4px solid var(--accent); }
.rp-status.ok { border-left-color: #188038; }
.rp-status.warn { border-left-color: #f9ab00; }
.rp-foot { margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12.5px; }
.report .panel { box-shadow: none; }
@media (max-width: 720px) {
  .report { padding: 24px 18px; }
  .rp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media print {
  @page { size: A4; margin: 14mm 12mm; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  html, body, .shell, .main-col, .view { background: #fff !important; min-height: 0 !important; }
  .rp-foot { break-before: avoid; }
  .nav, .mobile-bar, .scrim, .report-bar, #toast, .test-banner { display: none !important; }
  .shell { display: block; }
  .view { padding: 0; max-width: none; }
  .report { border: 0; border-radius: 0; padding: 0; max-width: none; }
  .rp-sec { break-inside: auto; }
  .rp-h, .rp-h3 { break-after: avoid; }
  .rp-table tr, .rp-tiles, .panel, .rp-status, .chart { break-inside: avoid; }
  .grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  a { color: inherit; text-decoration: none; }
}
