/* IroPeak dashboard: Apple-style restraint. Cool ground, white unified panels with hairlines, one orange accent,
   glass only on the sticky top bar. Light and dark themes share every rule through the tokens below. */
:root {
  color-scheme: light;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #f9f9fb;
  --hover: #f7f7f9;
  --text: #1d1d1f;
  --text-2: #5f5f64;
  --text-3: #65656b;
  --text-4: #a1a1a6;
  --faint: #d2d2d7;
  --hairline: rgba(0, 0, 0, .08);
  --fill: rgba(0, 0, 0, .05);
  --fill-strong: rgba(0, 0, 0, .09);
  --track: #e8e8ed;
  --field: #ffffff;
  --field-line: rgba(0, 0, 0, .46);
  --accent: #f2773c;
  --accent-ink: #a5471a;
  --accent-strong: #c4531c;
  --accent-tint: rgba(242, 119, 60, .13);
  --accent-button: #c4531c;
  --accent-button-hover: #a94716;
  --accent-button-text: #ffffff;
  --selected: rgba(0, 0, 0, .018);
  --brand: #f2773b;
  --brand-ink: #25282d;
  --tag-red: #e5484d; --tag-orange: #f08c2e; --tag-yellow: #d8b400; --tag-green: #30a46c; --tag-teal: #12a594; --tag-blue: #3e7bfa; --tag-purple: #8e5cf5; --tag-pink: #e24c9a;
  --good: #1d7a36;
  --good-dot: #1d7a36;
  --good-tint: rgba(48, 209, 88, .12);
  --bad: #c0271b;
  --bad-dot: #c0271b;
  --bad-tint: rgba(255, 59, 48, .09);
  --ink-button: #1d1d1f;
  --ink-button-text: #ffffff;
  --danger-hover-text: #ffffff;
  --glass: rgba(245, 245, 247, .72);
  --scrim: rgba(0, 0, 0, .28);
  --sh-card: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .05);
  --sh-panel: 0 0 0 1px var(--hairline), 0 4px 16px rgba(0, 0, 0, .035);
  --sh-control: 0 1px 3px rgba(0, 0, 0, .1);
  --sh-overlay: 0 2px 8px rgba(0, 0, 0, .1), 0 30px 80px rgba(0, 0, 0, .22);
  --r-pill: 999px;
  --r-control: 10px;
  --r-thumb: 12px;
  --r-card: 18px;
  --r-panel: 22px;
  --ease: cubic-bezier(.25, 1, .5, 1);
  --ease-drawer: cubic-bezier(.32, .72, 0, 1);
  --sidebar-w: 252px;
  --topbar-h: 56px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c0c0e;
  --surface: #18181b;
  --surface-2: #1d1d21;
  --hover: #1f1f23;
  --text: #f5f5f7;
  --text-2: #b4b4ba;
  --text-3: #9a9aa1;
  --text-4: #6a6a72;
  --faint: #4a4a50;
  --hairline: rgba(255, 255, 255, .08);
  --fill: rgba(255, 255, 255, .06);
  --fill-strong: rgba(255, 255, 255, .11);
  --track: #2a2a2f;
  --field: #141417;
  --field-line: rgba(255, 255, 255, .38);
  --accent: #f2773c;
  --accent-ink: #f58a55;
  --accent-strong: #f2773c;
  --accent-tint: rgba(242, 119, 60, .14);
  --selected: rgba(255, 255, 255, .035);
  --brand-ink: #f5f5f7;
  --good: #4cd964;
  --good-dot: #30d158;
  --good-tint: rgba(48, 209, 88, .12);
  --bad: #ff6961;
  --bad-dot: #ff453a;
  --bad-tint: rgba(255, 69, 58, .12);
  --ink-button: #f5f5f7;
  --ink-button-text: #0c0c0e;
  --danger-hover-text: #0c0c0e;
  --glass: rgba(12, 12, 14, .72);
  --scrim: rgba(0, 0, 0, .55);
  --sh-card: inset 0 1px 0 rgba(255, 255, 255, .05), 0 0 0 1px rgba(255, 255, 255, .05), 0 8px 24px rgba(0, 0, 0, .4);
  --sh-panel: 0 0 0 1px var(--hairline), 0 4px 16px rgba(0, 0, 0, .18);
  --sh-control: 0 1px 3px rgba(0, 0, 0, .3);
  --sh-overlay: inset 0 1px 0 rgba(255, 255, 255, .07), 0 0 0 1px rgba(255, 255, 255, .08), 0 30px 80px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-padding-top: calc(var(--topbar-h) + 20px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 14px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
}

h1, h2, h3, h4, p, figure, ul, ol, dl, dd { margin: 0; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 12px 20px; border-radius: var(--r-pill); background: var(--surface); color: var(--text); transform: translateY(-150%); }
.skip-link:focus { transform: none; box-shadow: var(--sh-card); }
:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; border-radius: 6px; }
button { font: inherit; color: inherit; cursor: pointer; }
button, a, summary, input, select { -webkit-tap-highlight-color: transparent; }
input, select, button { max-width: 100%; }
.shell-main, .connect, .action-body, .page-head > div { min-width: 0; }
.page-welcome, .subtitle, .component-note, .connect-copy, dd, .history-event p { overflow-wrap: anywhere; }
.mono { font: 500 12px/1.5 var(--font); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.num, .score, td.num { font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Links that carry an action inside text use the accent ink. */
.component-note a, .page-welcome a, .empty-panel a, .score-missing a, .issue-next a, .action-pages a, .connect-copy a,
.message-link a, .auth-footer a, .connect-back a, .form-actions a, .trend-alert a, .brand-line a, .table-note a,
.choice-note a, .pagespeed-head .mono a, .confidence-badge a { color: var(--accent-ink); font-weight: 600; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 3px; }

/* Brand */
.brand { display: flex; width: fit-content; }
.brand-logo { display: block; flex: none; width: auto; height: 30px; }
.brand-logo-mark { fill: var(--brand); }
.brand-logo-word { fill: var(--brand-ink); }
/* margin-top centres the tag on the wordmark, which sits low in the lockup. */
.admin-tag { display: inline-flex; align-items: center; height: 22px; margin-top: 8px; padding: 0 9px; border-radius: var(--r-pill); background: var(--fill); color: var(--text-2); font-size: 11px; font-weight: 600; }

/* Headings */
h1, .page-title { font-size: clamp(28px, 3.6vw, 40px); font-weight: 700; line-height: 1.1; letter-spacing: -.03em; overflow-wrap: anywhere; }
.subtitle { margin-top: 10px; color: var(--text-2); font-size: 15px; }
.folio { color: var(--text-3); font-size: 13px; font-weight: 600; }

/* Forms */
label { display: block; margin-bottom: 7px; color: var(--text); font-size: 13px; font-weight: 600; }
input, select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  background: var(--field);
  border: 1px solid var(--field-line);
  border-radius: var(--r-thumb);
  color: var(--text);
  font: 400 15px/1.4 var(--font);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
input::placeholder { color: var(--text-3); }
input:hover, select:hover { border-color: var(--text-3); }
input:focus, select:focus { outline: 2px solid var(--accent-strong); outline-offset: 1px; border-color: var(--accent-strong); box-shadow: none; }
/* Dropdowns: where the browser lets the page draw the open list (customizable select), it looks like the site menu, in
   the theme's colors; other browsers keep their own list in the page's color scheme. */
@supports (appearance: base-select) {
  select, ::picker(select) { appearance: base-select; }
  select { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
  select::picker-icon { content: ""; display: block; width: 6px; height: 6px; margin: -3px 3px 0 auto; border: solid var(--text-3); border-width: 0 1.5px 1.5px 0; rotate: 45deg; transition: rotate .2s var(--ease), margin .2s var(--ease); }
  select:open::picker-icon { rotate: 225deg; margin-top: 3px; }
  ::picker(select) { position-try-order: normal; margin-block: 6px; padding: 6px; border: 0; border-radius: var(--r-thumb); background: var(--surface); box-shadow: var(--sh-overlay); color: var(--text); max-block-size: min(360px, 60vh); overflow-y: auto; }
  select option { min-height: 40px; padding: 8px 12px; border-radius: 8px; color: var(--text); font: 500 14px/1.35 var(--font); }
  select option:hover, select option:focus-visible { background: var(--fill); outline: none; }
  select option:checked { background: var(--accent-tint); font-weight: 600; }
  select option::checkmark { color: var(--accent-ink); }
  @media (pointer: coarse) { select option { min-height: 44px; } }
}
input[aria-invalid="true"] { border-color: var(--bad); }
input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px var(--bad-tint); }
input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px var(--field) inset; -webkit-text-fill-color: var(--text); }
.field-group + .field-group { margin-top: 16px; }
.field-error { margin-top: 7px; color: var(--bad); font-size: 13px; }

/* One orange primary action; neutral secondary and red destructive actions. */
.primary-button, .danger-button, .secondary-button, .compact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--r-pill);
  font-weight: 600;
  white-space: normal;
  text-align: center;
  line-height: 1.4;
  text-decoration: none;
  transition: background-color .15s var(--ease), transform .1s var(--ease), opacity .15s;
}
.primary-button { width: 100%; min-height: 44px; margin-top: 24px; padding: 11px 22px; background: var(--accent-button); color: var(--accent-button-text); font-size: 14px; }
.primary-button:hover { background: var(--accent-button-hover); text-decoration: none; }
.primary-button:active, .secondary-button:active, .compact-button:active, .danger-button:active { transform: scale(.98); }
.secondary-button { min-height: 44px; padding: 11px 18px; background: var(--fill); color: var(--text); font-size: 14px; }
.compact-button { min-height: 44px; padding: 6px 16px; background: var(--fill); color: var(--text); font-size: 13px; }
.secondary-button:hover, .compact-button:hover { background: var(--fill-strong); text-decoration: none; }
.danger-button { min-height: 44px; padding: 11px 22px; background: var(--bad-tint); color: var(--bad); font-size: 14px; }
.danger-button:hover { background: var(--bad); color: var(--danger-hover-text); }
.row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px 14px; }
.inline-form { display: inline; margin: 0; }
.row-action { display: inline-flex; align-items: center; min-height: 32px; appearance: none; background: none; border: 0; padding: 0; color: var(--accent-ink); font: 600 13px/1.6 var(--font); white-space: nowrap; }
.row-action:hover { text-decoration: underline; }
.row-action--danger { color: var(--bad); }

/* Notices */
.notice, .error-banner {
  position: relative;
  margin: 0 0 20px;
  padding: 12px 16px 12px 33px;
  border-radius: var(--r-thumb);
  background: var(--fill);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}
.notice::before, .error-banner::before { content: ""; position: absolute; left: 16px; top: 19px; width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); }
.notice--measuring { background: var(--accent-tint); }
.notice--measuring::before { background: var(--accent-strong); animation: pulse-dot 1.8s ease-out infinite; }
.error-banner { background: var(--bad-tint); }
.error-banner::before { background: var(--bad-dot); }
.error-banner a, .notice a { color: inherit; font-weight: 600; text-decoration: underline; }
.report-note.error-banner { padding: 12px 16px 12px 33px; }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }

/* Auth pages */
.auth-page { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; place-items: center; padding: 16px 20px 48px; }
.auth-column { width: min(100%, 448px); min-width: 0; padding-block: 24px; }
.auth-theme { justify-self: end; align-self: start; }
.brand-row { display: flex; align-items: center; justify-content: center; gap: 12px; }
.auth-column .brand-logo { height: 36px; }
.card { width: 100%; margin-top: 28px; padding: 36px 40px 40px; background: var(--surface); border-radius: var(--r-panel); box-shadow: var(--sh-panel); }
.card h1 { font-size: 30px; }
.card .folio + h1 { margin-top: 12px; }
.auth-column .card .subtitle { font-size: 14px; }
.auth-column input { height: 48px; }
.auth-column .primary-button { min-height: 48px; }
.auth-form { margin-top: 28px; }
.auth-footer { margin-top: 22px; text-align: center; color: var(--text-2); font-size: 14px; }

/* Shell */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.nav-toggle, .menu-button, .backdrop { display: none; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 14px 18px;
  scrollbar-width: thin;
}
.sidebar-brand { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 8px 16px; }

/* Site switcher */
.site-switcher { position: relative; }
.site-switcher summary { list-style: none; cursor: pointer; }
.site-switcher summary::-webkit-details-marker { display: none; }
.site-card { display: block; position: relative; padding: 11px 36px 11px 12px; background: var(--surface); border-radius: var(--r-thumb); box-shadow: var(--sh-card); color: var(--text); transition: box-shadow .15s var(--ease); }
.site-card:hover { background: var(--hover); text-decoration: none; }
.site-card:focus-visible { outline-offset: 2px; border-radius: var(--r-thumb); }
.site-card:focus:not(:focus-visible) { outline: none; }
.site-card-label { display: block; margin-bottom: 7px; color: var(--text-3); font-size: 11px; font-weight: 500; }
.site-card-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.site-card-name { display: block; min-width: 0; font-size: 14px; font-weight: 600; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-card-name--empty { color: var(--text-3); font-weight: 500; }
.site-card-url { display: block; margin: 2px 0 0 38px; color: var(--text-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-card-platform { display: block; margin: 1px 0 0 38px; color: var(--text-3); font-size: 12px; }
.site-card-chevron { position: absolute; top: 50%; right: 13px; width: 13px; height: 13px; margin-top: -6px; color: var(--text-3); }
.site-icon { flex: none; width: 28px; height: 28px; padding: 4px; border-radius: 8px; background: var(--fill); object-fit: contain; }
.site-icon--letter { display: inline-flex; align-items: center; justify-content: center; padding: 0; color: var(--text-2); font: 650 13px/1 var(--font); }
.site-switcher[open] .site-card { box-shadow: 0 0 0 1px var(--field-line); }
.site-menu { position: absolute; left: 0; right: 0; z-index: 60; margin-top: 8px; padding: 6px; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-overlay); max-height: min(70vh, 520px); overflow-y: auto; }
.site-menu-form { margin: 0; }
.site-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 7px 10px; border: 0; border-radius: 10px; background: none; color: var(--text); font: 500 14px/1.35 var(--font); text-align: left; }
.site-menu-item:hover { background: var(--fill); text-decoration: none; }
.site-menu-item.is-current { background: var(--fill); font-weight: 600; }
.site-menu-item.is-current .site-menu-name::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; border-radius: 50%; background: var(--accent); vertical-align: middle; }
.site-menu-text { min-width: 0; }
.site-menu-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-menu-url { display: block; margin-top: 1px; color: var(--text-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-menu-link { color: var(--text-2); font-weight: 500; }
.site-menu-link svg { flex: none; width: 14px; height: 14px; margin: 0 7px; }
.site-menu-form + .site-menu-link { margin-top: 6px; border-top: 1px solid var(--hairline); border-radius: 0 0 10px 10px; }

/* Sidebar navigation */
.sidebar-nav { margin-top: 10px; padding-bottom: 24px; }
.nav-label { display: block; padding: 14px 10px 5px; color: var(--text-3); font-size: 12px; font-weight: 600; }
/* Each group opens and closes with its heading; a closed group holding the current page shows an orange dot. */
.nav-group > summary { display: flex; align-items: center; gap: 6px; list-style: none; cursor: pointer; transition: color .15s var(--ease); }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary:hover { color: var(--text-2); }
.nav-chevron { order: 2; flex: none; margin-left: auto; transition: rotate .2s var(--ease); }
.nav-group:not([open]) > summary .nav-chevron { rotate: -90deg; }
.nav-group:not([open]):has([aria-current="page"]) > summary::after { content: ""; order: 1; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
@media (pointer: coarse) { .nav-group > summary { min-height: 44px; } }
.nav-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.nav-item { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 10px; border-radius: 10px; color: var(--text); font-size: 14px; font-weight: 500; transition: background-color .15s var(--ease); }
.nav-item:hover { background: var(--fill); text-decoration: none; }
.nav-item[aria-current="page"] { background: var(--accent-tint); color: var(--text); font-weight: 600; box-shadow: var(--sh-card); }
.nav-item[aria-current="page"] .nav-icon { color: var(--accent-strong); }
.nav-icon { flex: none; width: 17px; height: 17px; color: var(--text-3); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.35; }
.nav-icon--brand { display: inline-flex; }
.nav-icon--brand svg { width: 17px; height: 17px; }
/* The Ads mark has more empty space below it in its shared 24px viewBox. */
.nav-icon--ads svg { transform: translateY(1px); }
.nav-item--planned { color: var(--text-3); }
.nav-item--planned .nav-icon { color: var(--text-4); }
.sidebar-account { margin-top: auto; padding: 18px 8px 0; border-top: 1px solid var(--hairline); }
.account-label { color: var(--text-3); font-size: 12px; }
.account-email { margin-top: 2px; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-account form { margin: 12px 0 0; }
.account-logout { width: 100%; justify-content: space-between; }
.account-logout svg { width: 16px; height: 16px; }

/* Top bar: the one glass layer, content scrolls under it. */
.shell-body { min-width: 0; }
.top-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--topbar-h);
  padding: 0 clamp(16px, 3vw, 40px);
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease);
}
.top-bar.is-scrolled { border-bottom-color: var(--hairline); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .top-bar { background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
}
@media (prefers-reduced-transparency: reduce) { .top-bar { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; } }
.top-bar-start { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; }
.top-bar-end { display: flex; align-items: center; gap: 14px; min-width: 0; }
.top-bar-meta { min-width: 0; max-width: 260px; color: var(--text-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.theme-toggle { flex: none; margin: 0; display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--r-pill); background: var(--fill); }
.theme-toggle button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 11px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--text-2); font-size: 13px; font-weight: 500; transition: background-color .2s var(--ease), color .2s var(--ease); }
.theme-toggle svg { width: 15px; height: 15px; }
.theme-toggle button:hover { color: var(--text); }
.theme-toggle button[aria-pressed="true"] { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--sh-control); }

/* Page frame */
.shell-main { max-width: 1440px; margin: 0 auto; padding: clamp(24px, 4vw, 44px) clamp(16px, 3vw, 40px) 72px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: clamp(20px, 3vw, 28px); }
.page-head form { margin: 0; }
.audit-head-text { min-width: 0; }
.page-welcome { margin-top: 10px; max-width: 80ch; color: var(--text-2); font-size: 15px; line-height: 1.6; }
.page-head .secondary-button { flex: none; }
.report-data-note { margin-top: 6px; color: var(--text-3); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.page-site { flex: none; max-width: 40%; text-align: right; overflow-wrap: anywhere; }
.page-site .mono { color: var(--text-3); }
.page-site strong { display: block; margin-top: 2px; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.page-site-platform { display: block; color: var(--text-3); }

.section-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; margin: 0 4px 12px; }
.section-head h2 { font-size: clamp(19px, 2.4vw, 22px); font-weight: 700; letter-spacing: -.02em; }
.section-head .mono, .table-note { color: var(--text-3); font-size: 13px; font-weight: 400; }
.section-head .confidence-badge { margin-left: 8px; }
.table-note { margin-top: 10px; }
.audit-section, .sites-section, .trends { margin-top: clamp(30px, 5vw, 48px); }
.audit-section:first-child, .page-head + .audit-section, .report-tabs + .audit-section, .report-tabs ~ .audit-section:first-of-type { margin-top: 0; }
.section-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 4px 12px; }
.component-note { margin-top: 10px; color: var(--text-2); font-size: 13.5px; line-height: 1.55; }
.audit-section > .component-note { max-width: 80ch; margin-left: 4px; }

/* The unified panel: every boxed block shares one surface. */
.empty-panel, .score-hero, .pagespeed-grid:not(:empty), .add-site, .connect-section, .connect > .connect-panel, .service-hero, .issue-summary, .issue-group,
.action-progress, .action-list, .history-summary, .live-strip, .trend-grid-cards, .report-figures, .status-row, .report-panel,
.score-section, .crawl-facts, .history-fixes, .history-events, .issues, .channel-bars, .component-grid, .report-charts {
  background: var(--surface);
  border-radius: var(--r-panel);
  box-shadow: var(--sh-panel);
}
.empty-panel { padding: clamp(24px, 4vw, 44px); overflow-wrap: anywhere; }
.empty-panel .mono { color: var(--text-3); }
.empty-panel h2 { margin-top: 6px; font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.empty-panel p { margin-top: 8px; color: var(--text-2); font-size: 14px; max-width: 70ch; }
.empty-panel[role="status"] .mono { display: inline-flex; align-items: center; gap: 8px; color: var(--accent-ink); }
.empty-panel[role="status"] .mono::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-strong); animation: pulse-dot 1.8s ease-out infinite; }

/* Badges and chips */
.badge, .marker, .selected-mark, .platform-badge, .service-state, .confidence-badge, .issue-badge, .action-effect, .history-status, .action-verify, .issue-card-pages {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  padding: 0 9px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--fill);
  color: var(--text-2);
  font: 500 12px/1.4 var(--font);
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  vertical-align: middle;
}
.badge::before, .platform-badge::before, .service-state::before, .issue-badge::before, .action-effect::before, .history-status::before, .action-verify::before, .confidence-badge i {
  content: "";
  display: inline-block;
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-4);
}
.marker { margin-left: 8px; background: var(--accent-tint); color: var(--accent-ink); font-weight: 600; }
.selected-mark { background: var(--accent-tint); color: var(--accent-ink); font-weight: 600; }
.badge--active::before, .service-state.is-on::before, .confidence-badge--fresh i, .history-status--verified::before, .action-verify--verified::before { background: var(--good-dot); }
.badge--suspended { color: var(--text-3); }
.badge--suspended::before { background: transparent; box-shadow: inset 0 0 0 1px var(--text-4); }
.platform-badge::before { background: var(--text-3); }
.platform-badge--unknown::before { background: transparent; box-shadow: inset 0 0 0 1px var(--text-4); }
.service-state { margin-top: 12px; }
.service-state, .action-verify { max-width: 100%; padding-top: 3px; padding-bottom: 3px; white-space: normal; overflow-wrap: anywhere; }
.service-state.is-on { color: var(--text); }
.confidence-badge--partial i { background: var(--text-4); }
.confidence-badge--stale { background: var(--accent-tint); color: var(--accent-ink); }
.confidence-badge--stale i { background: var(--accent); }
.confidence-badge--broken { background: var(--bad-tint); color: var(--bad); }
.confidence-badge--broken i { background: var(--bad-dot); }
.confidence-badge--none i { background: transparent; box-shadow: inset 0 0 0 1px var(--text-4); }
.confidence-badge { max-width: 100%; padding-block: 4px; white-space: normal; flex-wrap: wrap; }
.confidence-badge a { color: inherit; text-decoration: underline; }
.confidence { margin-top: 0; }
.confidence--fresh::before { background: var(--good-dot); }
.confidence--stale, .confidence--limited { background: var(--accent-tint); color: var(--accent-ink); }
.confidence--stale::before, .confidence--limited::before { background: var(--accent); }
.issue-badge, .action-effect { text-transform: capitalize; }
.issue-badge--high, .action-effect--high { background: var(--bad-tint); color: var(--bad); }
.issue-badge--high::before, .action-effect--high::before { background: var(--bad-dot); }
.issue-badge--medium, .action-effect--medium { background: var(--accent-tint); color: var(--accent-ink); }
.issue-badge--medium::before, .action-effect--medium::before { background: var(--accent); }
.history-status--still, .action-verify--still { background: var(--accent-tint); color: var(--accent-ink); }
.history-status--still::before, .action-verify--still::before { background: var(--accent); }
.data-dots { display: inline-flex; gap: 4px; margin-left: 8px; vertical-align: middle; }
.data-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--text-3); }
.data-dot--fresh { background: var(--good-dot); }
.data-dot--partial { background: var(--text-3); }
.data-dot--stale { background: var(--accent-strong); }
.data-dot--broken { background: var(--bad-dot); }

/* Tables: one panel, hairline rows. */
.table-wrap, table.sites-table, table.users-table, table.crawl-table { background: var(--surface); border-radius: var(--r-panel); box-shadow: var(--sh-panel); }
.table-wrap { position: relative; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
.table-wrap:focus-visible { outline-offset: 4px; border-radius: var(--r-panel); }
.table-wrap > table { background: none; border-radius: 0; box-shadow: none; }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th { padding: 15px 16px; background: var(--surface-2); color: var(--text-3); text-align: left; font-size: 12px; font-weight: 600; white-space: nowrap; border-bottom: 1px solid var(--hairline); }
td { padding: 14px 16px; border-top: 1px solid var(--hairline); vertical-align: middle; font-size: 14px; }
tbody tr:first-child td { border-top: 0; }
th:first-child, td:first-child { padding-left: clamp(16px, 2vw, 24px); }
th:last-child, td:last-child { padding-right: clamp(16px, 2vw, 24px); }
tbody tr { transition: background-color .12s var(--ease); }
tbody tr:not(.empty-row):not(.drill-row):hover { background: var(--hover); }
.empty-row td { padding: 56px 16px; text-align: center; }
.empty-title { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.empty-description { margin-top: 6px; color: var(--text-2); font-size: 14px; }
.user-count { color: var(--text-3); font-size: 13px; }
.name-cell { overflow-wrap: anywhere; }
.site-name { display: inline-block; max-width: 100%; overflow-wrap: anywhere; font-size: 14px; font-weight: 600; letter-spacing: -.01em; vertical-align: middle; }
.site-url { display: block; overflow-wrap: anywhere; margin-top: 2px; color: var(--text-3); font: 400 12px/1.5 var(--font); }
.site-platform { display: inline-block; margin-left: 8px; vertical-align: middle; }
.platform-note { display: block; margin-top: 4px; color: var(--text-3); font-size: 12px; }
.platform-note a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; }
.platform-note a:hover { color: var(--accent-ink); }
.score-cell { width: 84px; text-align: right; }
.score-cell--badge { text-align: center; }
.score { font: 600 19px/1.2 var(--font); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.score-badge { display: inline-grid; place-items: center; width: 48px; height: 48px; border: 3px solid color-mix(in srgb, var(--score-tone) 45%, var(--surface)); border-radius: var(--r-pill); background: color-mix(in srgb, var(--score-tone) 9%, var(--surface)); color: var(--text); font-size: 17px; vertical-align: middle; }
.score-badge--green { --score-tone: var(--tag-green); }
.score-badge--yellow { --score-tone: var(--tag-yellow); }
.score-badge--orange { --score-tone: var(--tag-orange); }
.score-badge--red { --score-tone: var(--tag-red); }
:root[data-theme="dark"] .score-badge { border-color: color-mix(in srgb, var(--score-tone) 70%, var(--text)); }
.score--none { color: var(--text-3); font-weight: 500; }
.score--measuring { color: var(--accent-ink); font-size: 12px; font-weight: 600; letter-spacing: 0; }
.score--link { color: var(--text); }
.score--link:hover { color: var(--accent-ink); text-decoration: none; }
.score--none.score--link { color: var(--text-3); }
.score.is-good { color: var(--good); }
.score.is-mid { color: var(--accent-ink); }
.score.is-poor { color: var(--bad); }
.score-sub { display: block; color: var(--text-3); font-size: 12px; white-space: nowrap; }
.is-selected td, .is-selected:hover td { background: var(--selected); }
.actions-cell { text-align: right; }
.date-cell { color: var(--text-3); font-size: 13px; white-space: nowrap; }
.sites-table .date-cell { width: 110px; }
.sites-table .actions-cell { width: 220px; }
.sites-table .name-cell { min-width: 290px; max-width: 340px; overflow-wrap: normal; }
.sites-table .site-url { overflow-wrap: anywhere; }
.sites-table .score-cell { width: 76px; }
.delta { display: block; margin-top: 1px; color: var(--text-3); font: 600 12px/1.4 var(--font); white-space: nowrap; font-variant-numeric: tabular-nums; }
td.num .delta, dd + .delta { display: inline-block; }
.delta.is-up { color: var(--good); }
.delta.is-down, .report-table .is-bad { color: var(--bad); }
.sparkline { display: block; margin: 6px 0 0 auto; }
.sparkline polyline { fill: none; stroke: var(--text-3); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.sparkline line { stroke: var(--accent-strong); stroke-width: 2; stroke-linecap: round; }
.site-services { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.service-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 10px; border-radius: var(--r-pill); background: var(--fill); color: var(--text-3); font-size: 13px; font-weight: 500; text-decoration: none; transition: background-color .15s var(--ease), color .15s; }
.service-chip svg { flex: none; width: 14px; height: 14px; }
.service-chip:hover { background: var(--fill-strong); color: var(--text); text-decoration: none; }
.service-chip.is-on { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--hairline); }

/* Users table (admin) */
.users-table .email-cell { font-weight: 600; overflow-wrap: anywhere; }
.users-table .date-cell { width: 170px; }
.status-cell { width: 120px; }
.credit-cell { width: 96px; text-align: right; }
td.credit-cell { font-size: 17px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.is-suspended .email-cell { color: var(--text-3); font-weight: 500; }
.credit-form { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 6px 0 0; }
.credit-form .field-error { flex-basis: 100%; margin: 0; text-align: left; }
.credit-input { width: 84px; height: 44px; padding: 0 14px; border-radius: var(--r-pill); text-align: right; font-size: 14px; -moz-appearance: textfield; }
.credit-input::-webkit-inner-spin-button, .credit-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* Sites: the add form sits in one panel row. */
.add-site { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 16px; align-items: end; margin: 0 0 20px; padding: 18px clamp(16px, 2vw, 24px); }
.add-site .field-group { margin: 0; min-width: 0; }
.add-site input { padding: 0 18px; border-radius: var(--r-pill); }
.add-site .primary-button { width: auto; margin-top: 0; }
.add-site.has-errors { align-items: start; }
.add-site.has-errors .primary-button { margin-top: 27px; }

/* Sites share the page frame: identity and controls above one compact metric strip. */
.sites-list { container: sites / inline-size; background: var(--surface); border-radius: var(--r-panel); box-shadow: var(--sh-panel); }
.site-entry { padding: 14px 22px; }
.site-entry + dialog + .site-entry { border-top: 1px solid var(--hairline); }
.site-entry:first-child { border-radius: var(--r-panel) var(--r-panel) 0 0; }
.site-entry:nth-last-child(2) { border-radius: 0 0 var(--r-panel) var(--r-panel); }
.site-entry:only-of-type { border-radius: var(--r-panel); }
.site-entry.is-selected { background: var(--selected); }
.site-entry-head { display: flex; align-items: center; gap: 20px; }
.site-identity { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.site-identity-text { min-width: 0; font-size: 14px; line-height: 1.4; }
.site-identity h2 { display: inline; font-size: 14px; }
.site-identity .platform-badge { margin-left: 6px; }
.site-audit-date { margin-top: 3px; color: var(--text-3); font-size: 11px; }
.site-entry .site-services { flex: none; flex-wrap: nowrap; max-width: 100%; margin: 0; }
.site-entry .service-chip { white-space: nowrap; }
.site-entry-actions { display: flex; align-items: center; gap: 12px; flex: none; }
.site-entry-actions .row-action { white-space: nowrap; }
.site-entry-actions .compact-button, .site-entry-actions .selected-mark { min-height: 32px; padding: 0 14px; font-size: 13px; }
.site-metrics { display: grid; grid-template-columns: repeat(3, 52px) repeat(9, minmax(0, 1fr)); gap: 10px; margin: 12px 0 0; }
.site-metric { min-width: 0; text-align: center; }
.site-metric dt { color: var(--text-3); font: 500 11px/1.4 var(--font); margin-bottom: 7px; }
.site-metric dd { margin: 0; font-size: 14px; line-height: 1.3; }
.site-metric .score { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; font-size: 18px; overflow-wrap: anywhere; }
.site-metric .score--measuring { font-size: 10px; }
.site-metric .score-badge { width: 40px; height: 40px; font-size: 15px; border-width: 2px; }
.site-metric .score-sub { font-size: 11px; white-space: normal; }
.site-metric .sparkline { max-width: 100%; margin: 3px auto 0; height: 16px; }
.site-metric .delta { font-size: 11px; }
.site-options { position: relative; }
.site-options > summary { display: grid; place-items: center; width: 32px; min-height: 32px; padding: 0; list-style: none; cursor: pointer; letter-spacing: 1px; }
.site-options > summary::-webkit-details-marker { display: none; }
.site-options-panel { width: 300px; max-width: calc(100vw - 24px); }
.site-options .kw-popover[popover] { width: min(300px, calc(100vw - 24px)); }
.site-options-panel:not([popover]) { position: absolute; top: 100%; right: 0; z-index: 5; box-shadow: var(--sh-overlay); }
.site-options-title { font-size: 13px; font-weight: 600; }
.site-options-report { display: flex; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid var(--hairline); }
.site-data-states { display: grid; gap: 4px; margin: 12px 0; font-size: 12px; color: var(--text-2); }
.site-options-action { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--hairline); }
.site-options-action p { color: var(--text-3); font-size: 12px; }
.site-options-delete { display: inline-flex; margin-top: 10px; }
.site-delete-note { padding: 20px 24px; font-size: 14px; color: var(--text-2); }
.kw-dialog[data-local-dialog] h2 { overflow-wrap: anywhere; min-width: 0; }
.sites-empty { padding: 44px 24px; text-align: center; }
@container sites (max-width: 860px) {
  .site-entry-head { flex-wrap: wrap; gap: 12px; }
  .site-identity { flex-basis: calc(100% - 250px); }
  .site-entry .site-services { order: 3; }
  .site-metrics { grid-template-columns: repeat(6, minmax(0, 1fr)); row-gap: 18px; }
}
@container sites (max-width: 540px) {
  .site-entry { padding: 16px; }
  .site-identity { flex-basis: 100%; }
  .site-entry .site-services { flex-wrap: wrap; }
  .site-entry-actions { width: 100%; }
  .site-options { margin-left: auto; }
  .site-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* Phones: the three scores always show; a metric without a figure yet is left out to keep entries short. */
  .site-metric:not(.site-metric--badge):has(> dd > .score--none) { display: none; }
}

/* Delete / confirm cards inside the shell */
.panel-card { width: 560px; max-width: 100%; }
.subject { font-weight: 600; overflow-wrap: anywhere; }
.warning { margin-top: 10px; color: var(--text-2); font-size: 15px; overflow-wrap: anywhere; }
.form-actions { display: flex; align-items: center; gap: 20px; margin-top: 24px; }
.form-actions button { width: auto; min-width: 160px; margin-top: 0; }

/* Site identity remains visible while a wide Sites table scrolls. */
td.name-cell:has(> .site-icon) { position: relative; padding-left: calc(clamp(16px, 2vw, 24px) + 40px); }
td.name-cell > .site-icon { position: absolute; top: 17px; left: clamp(16px, 2vw, 24px); }
.table-wrap .sites-table th:first-child, .table-wrap .sites-table td.name-cell { position: sticky; left: 0; z-index: 1; background: var(--surface); border-right: 1px solid var(--hairline); }
.table-wrap .sites-table th:first-child { background: var(--surface-2); }
.table-wrap .sites-table .is-selected td.name-cell { background: color-mix(in srgb, var(--fill) 40%, var(--surface)); }

/* Overview */
.score-section { padding: clamp(20px, 3vw, 28px); }
.score-intro { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px 24px; }
.score-intro .mono { display: none; }
.score-intro h2 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.score-copy { color: var(--text-2); font-size: 14px; }
.dials { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 18px; }
.dial { display: grid; justify-items: center; gap: 8px; padding: 6px 12px; min-width: 0; }
.dial + .dial { border-left: 1px solid var(--hairline); }
.dial svg { display: block; width: min(100%, 188px); height: auto; }
.dial-track { fill: none; stroke: var(--track); stroke-width: 10; }
.dial-value { fill: none; stroke: var(--accent-strong); stroke-width: 10; stroke-linecap: round; }
.dial-number { fill: var(--text); font: 700 46px var(--font); letter-spacing: -.04em; }
.dial-number--none { fill: var(--text-3); }
.dial-unit { fill: var(--text-3); font: 500 12px var(--font); }
.dial-caption { display: flex; flex-direction: column; align-items: center; gap: 1px; text-align: center; }
.dial-caption span:first-child { color: var(--text); font-size: 15px; font-weight: 600; }
.dial-caption span:last-child { color: var(--text-3); font-size: 12px; font-weight: 400; }
.reading-foot { display: flex; justify-content: space-between; gap: 16px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--hairline); color: var(--text-3); font-size: 12px; font-weight: 400; }

/* Audit / PageSpeed */
.site-url-inline { overflow-wrap: anywhere; }
.pagespeed-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pagespeed-grid > .pagespeed-card + .pagespeed-card { border-left: 1px solid var(--hairline); }
.pagespeed-card { padding: 22px clamp(18px, 2vw, 24px) 24px; min-width: 0; }
.pagespeed-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.pagespeed-head h3 { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.pagespeed-head .mono { color: var(--text-3); font-weight: 400; }
.score-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--hairline); }
/* Shared rows keep values aligned when one label wraps. */
.score-item { display: grid; grid-template-rows: subgrid; grid-row: span 2; row-gap: 4px; padding: 0 12px; min-width: 0; }
.score-item:first-child { padding-left: 0; }
.score-item + .score-item { border-left: 1px solid var(--hairline); }
.score-item dt { color: var(--text-3); font-size: 12px; }
.score-item dd { margin: 0; }
.score-row .score { font-size: 30px; font-weight: 700; letter-spacing: -.035em; }
.vitals-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--hairline); }
.vital-item dt { color: var(--text-3); font-size: 12px; }
.vital-item dd { margin: 3px 0 0; font-size: 14px; font-weight: 600; }
.vital--fast { color: var(--good); }
.vital--average { color: var(--accent-ink); }
.vital--slow { color: var(--bad); }
.vital--none { color: var(--text-3); font-weight: 500; }
.issues-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin: 26px 4px 10px; font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.issues-title .mono { color: var(--text-3); font-weight: 400; }
.issues { list-style: none; margin: 0; padding: 0 clamp(16px, 2vw, 22px); }
.pagespeed-card .issues, .component .issues { padding: 0; background: none; box-shadow: none; border-radius: 0; border-top: 1px solid var(--hairline); }
.pagespeed-card .issues-title { margin-left: 0; }
.issue { padding: 12px 0; }
.issue + .issue { border-top: 1px solid var(--hairline); }
.issue-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 14px; align-items: baseline; }
.issue-title { font-size: 14px; font-weight: 600; }
.issue-value { color: var(--text-3); font-size: 13px; font-weight: 500; white-space: nowrap; }
.issue-description { margin-top: 3px; color: var(--text-2); font-size: 13px; line-height: 1.5; }
.issues-none { margin-top: 14px; color: var(--text-2); font-size: 14px; }
.issues--unchecked .issue-title { color: var(--text-3); font-weight: 500; }

/* Crawl */
.crawl-section { scroll-margin-top: calc(var(--topbar-h) + 16px); }
.crawl-head { align-items: center; }
.crawl-head > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.crawl-head form { margin: 0; }
.crawl-head .primary-button, .audit-head .primary-button, .connect-button { width: auto; margin-top: 0; }
.crawl-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.5fr); margin: 0 0 16px; padding: 18px 0; }
.crawl-facts > div { padding: 0 clamp(14px, 2vw, 22px); }
.crawl-facts > div + div { border-left: 1px solid var(--hairline); }
.crawl-facts dt { color: var(--text-3); font-size: 12px; }
.crawl-facts dd { margin: 4px 0 0; font-size: 22px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.crawl-facts:has(> div:nth-child(5)) { grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.5fr); }
.crawl-finished dd { font-size: 14px; line-height: 1.6; letter-spacing: 0; }
.crawl-url { font: 400 13px/1.5 var(--mono); overflow-wrap: anywhere; }
a.crawl-url { color: var(--text); }
a.crawl-url:hover { color: var(--accent-ink); }
.crawl-table .site-url { font: 400 12px/1.5 var(--font); }

/* Site issues: one panel per priority, separated by hairlines. */
.issue-summary { display: grid; grid-template-columns: repeat(3, minmax(90px, 140px)) 1fr; align-items: center; margin: 0 0 8px; padding: 20px 0; }
.issue-count { display: flex; flex-direction: column; gap: 2px; padding: 0 clamp(16px, 2vw, 24px); }
.issue-count + .issue-count { border-left: 1px solid var(--hairline); }
.issue-count-number { font-size: 32px; font-weight: 700; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.issue-count--high .issue-count-number { color: var(--bad); }
.issue-count--medium .issue-count-number { color: var(--accent-ink); }
.issue-count .mono { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); }
.issue-next { padding: 0 clamp(16px, 2vw, 24px); border-left: 1px solid var(--hairline); font-size: 14px; color: var(--text-2); }
.issue-next strong { color: var(--text); }
.issue-card { padding: 24px clamp(18px, 2vw, 28px); scroll-margin-top: calc(var(--topbar-h) + 16px); }
.issue-card + .issue-card { border-top: 1px solid var(--hairline); }
.issue-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.issue-card-head h4 { margin-right: 4px; font-size: 16px; font-weight: 700; letter-spacing: -.015em; }
.issue-card-pages { margin-left: auto; }
.issue-site-wide { margin-top: 12px; padding: 10px 14px; border-radius: var(--r-thumb); background: var(--accent-tint); font-size: 13.5px; }
.issue-explain { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 14px; }
.issue-explain dt { margin-bottom: 4px; color: var(--text-3); }
.issue-explain dd { font-size: 14px; line-height: 1.7; }
.issue-pages { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--hairline); }
.issue-pages summary, .action-more summary { min-height: 36px; padding-block: 7px; cursor: pointer; width: fit-content; color: var(--accent-ink); font-size: 13.5px; font-weight: 600; }
.issue-pages ul, .action-more ul { margin-top: 6px; padding: 0; list-style: none; }
.issue-pages li { display: flex; flex-wrap: wrap; gap: 2px 16px; padding: 7px 0; font-size: 13px; }
.issue-pages li + li, .action-more li + li { border-top: 1px solid var(--hairline); }
.issue-page-title { color: var(--text-3); }

/* SEO score */
.score-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(20px, 4vw, 40px); align-items: center; margin: 0; padding: clamp(22px, 3vw, 30px); }
.score-hero-number { position: relative; display: grid; place-content: center; justify-items: center; gap: 2px; width: 140px; height: 140px; }
.score-ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.score-ring-track { fill: none; stroke: var(--track); stroke-width: 9; }
.score-ring-value { fill: none; stroke: var(--accent-strong); stroke-width: 9; stroke-linecap: round; }
.score-hero-number > .score, .score-hero-number > .mono { position: relative; }
.score-hero-number .mono { color: var(--text-3); font-weight: 400; }
.score--hero { font-size: 50px; font-weight: 700; line-height: 1; letter-spacing: -.045em; }
.score.score--hero.is-good, .score.score--hero.is-mid, .score.score--hero.is-poor { color: var(--text); }
.score-hero-text p { margin-top: 10px; color: var(--text-2); font-size: 15px; max-width: 62ch; }
.score-missing { margin: 12px 0 0; padding: 0; list-style: none; font-size: 14px; }
.score-missing li + li { margin-top: 6px; }
.score-missing .mono { color: var(--text-3); }
.component-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 18px; }
.component-grid > .pagespeed-card { background: none; box-shadow: none; border-radius: 0; display: flex; flex-direction: column; }
.component-grid > .pagespeed-card + .pagespeed-card { border-left: 1px solid var(--hairline); }
.component-grid > .pagespeed-card > .confidence-badge { align-self: flex-start; margin-top: 10px; }
.component-score { margin-top: 20px; font-size: 44px; font-weight: 700; line-height: 1; letter-spacing: -.04em; }
.component-score.is-good { color: var(--text); }
.component .issues { margin-top: 18px; }
.score-row--search { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
.score-row--search .score-item:nth-child(3) { padding-left: 0; border-left: 0; }
.score-row--search dd { font-size: 19px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.component-form { margin-top: auto; padding-top: 16px; }
.component-grid + .component-note { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin-top: 18px; padding: 20px 4px 0; border-top: 1px solid var(--hairline); font-size: 14px; }

/* Trends (SEO score page) */
.trend-grid-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.trend-card { margin: 0; padding: 20px clamp(18px, 2vw, 24px) 18px; min-width: 0; }
.trend-card--wide { grid-column: 1 / -1; border-bottom: 1px solid var(--hairline); }
.trend-card:not(.trend-card--wide) + .trend-card:not(.trend-card--wide) { border-left: 1px solid var(--hairline); }
.trend-card figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-bottom: 10px; }
.trend-card figcaption .confidence-badge { margin-left: auto; align-self: center; }
.trend-title { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.trend-now { font-size: 26px; font-weight: 700; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.trend-now small { margin-left: 3px; color: var(--text-3); font-size: 12px; font-weight: 400; letter-spacing: 0; }
.trend-card { container-type: inline-size; }
.trend-grid line { stroke: var(--hairline); stroke-width: 1; }
.trend-line { fill: none; stroke: var(--text); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.trend-drop { fill: none; stroke: var(--accent-strong); stroke-width: 3; stroke-linecap: round; }
.trend-dot { fill: none; stroke: var(--text); stroke-width: 6; stroke-linecap: round; }
.trend-dot--drop { stroke: var(--accent-strong); }
.trend-alert { margin-top: 12px; padding: 11px 14px; border-radius: var(--r-thumb); background: var(--accent-tint); font-size: 13.5px; line-height: 1.55; }
.trend-alert strong { color: var(--accent-ink); }

/* Google connection */
.connect { max-width: 760px; }
.connect h1 { margin-top: 8px; }
.connect .subtitle { margin-top: 10px; }
.connect .notice, .connect .error-banner { margin-top: 22px; }
.connect-section { margin-top: 24px; scroll-margin-top: calc(var(--topbar-h) + 16px); }
.connect-panel { margin-top: 18px; padding: 22px clamp(18px, 2vw, 24px); }
.connect-panel .mono { color: var(--text-3); }
.connect-copy { margin-top: 10px; color: var(--text-2); font-size: 14px; }
.connect-panel form { margin-top: 18px; }
.connect-panel--account { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.connect-panel--account > div { min-width: 0; }
.connect-panel--account form { margin: 0; }
.connect-panel--attention .mono { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-ink); }
.connect-panel--attention .mono::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.connect-email { margin-top: 4px; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.connect-email a:hover { color: var(--accent-ink); }
.connect-form { margin: 0; padding: 24px clamp(18px, 2vw, 28px); }
.connect-section > .connect-panel { margin: 0; padding: 24px clamp(18px, 2vw, 28px); }
.connect-section > * + .connect-panel, .connect-section > * + .connect-form { border-top: 1px solid var(--hairline); }
.connect-form .form-actions { margin-top: 24px; }
.connect-form .primary-button { width: auto; }
.connect-hint { display: block; margin-top: 6px; color: var(--text-3); font-size: 12.5px; }
.connect-choice { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.connect-back { margin-top: 26px; }
.service-hero { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 18px; margin-top: 24px; padding: 24px clamp(18px, 2vw, 26px); }
.service-hero > svg { width: 44px; height: 44px; }
.service-hero h2 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.service-hero p { margin-top: 6px; color: var(--text-2); font-size: 14px; }
.service-hero ul { margin: 12px 0 0; padding-left: 18px; color: var(--text-2); font-size: 14px; }
.service-hero li + li { margin-top: 4px; }
.choice-group { margin: 0; padding: 0; border: 0; min-width: 0; }
.choice-group legend { float: left; width: 100%; padding: 0; margin-bottom: 14px; }
.choice-group legend .mono { display: block; color: var(--text-3); }
.choice-group legend + * { clear: both; }
.choice-title { display: block; margin-top: 3px; font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.choice-empty { padding: 14px 16px; border-radius: var(--r-thumb); background: var(--surface-2); color: var(--text-2); font-size: 14px; }
.choice { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 48px; margin: 0; padding: 10px 14px; border-radius: var(--r-thumb); cursor: pointer; transition: background-color .15s var(--ease); }
.choice + .choice { margin-top: 2px; }
.choice:hover { background: var(--fill); }
.choice:has(input:checked) { background: var(--accent-tint); }
.choice input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent-strong); }
.choice-label { margin: 0; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.choice-meta { color: var(--text-3); }
.choice-note { margin-top: 10px; color: var(--text-2); font-size: 13.5px; }
.connect-section .form-actions { margin-top: 16px; }
.ads-field { display: grid; gap: 0; max-width: 560px; margin-top: 16px; }
.ads-field label { color: var(--text); }

/* Google data pages (Search Console, Analytics, Ads) */
.report-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 0 0 22px; }
.report-filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; width: 100%; }
.report-controls > *, .report-select select { box-sizing: border-box; margin: 0; }
.segmented { display: inline-flex; max-width: 100%; padding: 3px; gap: 2px; border-radius: var(--r-pill); background: var(--fill); }
.segmented a { display: inline-flex; align-items: center; min-height: 38px; padding: 7px 12px; white-space: nowrap; border-radius: var(--r-pill); color: var(--text-2); font-size: 13px; font-weight: 500; text-decoration: none; transition: background-color .2s var(--ease), color .2s var(--ease); }
.segmented a:hover { color: var(--text); text-decoration: none; }
.segmented a[aria-current] { background: var(--accent-tint); color: var(--accent-ink); font-weight: 600; }
.segmented a span { margin-left: 6px; color: var(--text-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.segmented a[aria-current] span { color: inherit; }
.report-chip { display: inline-flex; align-items: center; height: 36px; padding: 0 4px; color: var(--text-3); font-size: 13px; }
.report-select { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.report-select select { width: auto; height: 44px; padding: 0 16px; white-space: nowrap; border-radius: var(--r-pill); background: var(--field); border: 1px solid var(--field-line); font-size: 13px; cursor: pointer; }
.report-tabs { display: flex; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; gap: 4px 24px; margin: 22px 4px; border-bottom: 1px solid var(--hairline); }
.report-tabs a { flex: none; white-space: nowrap; display: inline-flex; align-items: center; min-height: 44px; border-bottom: 2px solid transparent; color: var(--text-2); font-size: 14px; font-weight: 500; text-decoration: none; transition: color .15s var(--ease), border-color .15s var(--ease); }
.report-tabs a:hover { color: var(--text); text-decoration: none; }
.report-tabs a:focus-visible { outline-offset: -3px; }
.report-tabs a[aria-current] { border-bottom-color: var(--accent-strong); color: var(--accent-ink); font-weight: 600; }
.report-subtabs { display: inline-flex; gap: 2px; padding: 3px; margin: 0 4px 12px; border-radius: var(--r-pill); background: var(--fill); }
.report-subtabs a { display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: var(--r-pill); color: var(--text-2); font-size: 13px; font-weight: 500; text-decoration: none; }
.report-subtabs a:hover { color: var(--text); text-decoration: none; }
.report-subtabs a[aria-current] { background: var(--accent-tint); color: var(--accent-ink); font-weight: 600; }
.report-figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 18px; padding: 20px 0; }
.report-figures > div { display: grid; grid-template-rows: subgrid; grid-row: span 3; row-gap: 4px; padding: 0 clamp(16px, 2vw, 24px); min-width: 0; }
.report-figures > div + div { border-left: 1px solid var(--hairline); }
.report-figures dt { color: var(--text-2); font-size: 13px; font-weight: 500; }
.report-figures dd { margin: 0; font-size: clamp(28px, 3vw, 36px); font-weight: 700; letter-spacing: -.035em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.report-figures dd small { color: var(--text-3); font-size: 13px; font-weight: 400; letter-spacing: 0; }
.report-figures--small { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.report-figures--small dd { font-size: 26px; }
.report-figures--five:has(> div:nth-child(5)) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.report-figures--five:has(> div:nth-child(6)) { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.report-panel { container-type: inline-size; }
.report-panel > .report-figures, .report-panel > .report-charts { margin: 0; background: none; border-radius: 0; box-shadow: none; }
.report-panel > .report-charts { border-top: 1px solid var(--hairline); }
.report-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.report-charts > .line-chart { padding: 24px clamp(16px, 2vw, 24px); }
.report-charts > .line-chart + .line-chart { border-left: 1px solid var(--hairline); }
.line-chart { margin: 0; min-width: 0; container-type: inline-size; }
.line-chart figcaption { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 8px; }
.line-chart figcaption .mono { color: var(--text); font-size: 15px; font-weight: 600; }
.chart-legend { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--text-3); font-size: 12px; }
.chart-key { display: inline-block; width: 14px; margin-left: 8px; border-top: 2px solid var(--text); border-radius: 2px; }
.chart-key--previous { border-top: 2px dashed var(--text-3); }
.chart-plot { margin-top: 14px; }
.chart-scale { display: block; color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.chart-plot > svg:not(.chart-axis) { display: block; width: 100%; height: 160px; overflow: visible; }
.trend-card--wide .chart-plot > svg:not(.chart-axis) { height: 200px; }
.chart-axis { display: block; width: calc(100% - 12px); height: 20px; margin: 8px 6px 0; overflow: visible; }
.chart-axis text { fill: var(--text-3); font: 400 12px var(--font); font-variant-numeric: tabular-nums; }
.trend-line, .trend-drop, .trend-dot, .trend-grid line, .chart-line, .chart-grid line { vector-effect: non-scaling-stroke; }
.chart-grid line { stroke: var(--hairline); stroke-width: 1; }
.chart-line { fill: none; stroke: var(--text); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.chart-line--previous { stroke: var(--text-3); stroke-width: 1.5; stroke-dasharray: 4 4; }
.chart-point { stroke-width: 5; stroke-dasharray: none; }
.brand-line { margin-top: 16px; padding: 0 4px; color: var(--text-2); font-size: 14px; }
.brand-line strong { color: var(--text); }
.brand-line .site-url { margin-top: 4px; }
.report-table td:not(.num) { min-width: 160px; max-width: 420px; overflow-wrap: anywhere; }
.report-table .num { text-align: right; white-space: nowrap; }
.report-table td a { color: var(--accent-ink); font-weight: 500; }
.report-table td a:hover { color: var(--accent-ink); }
.report-table tr.is-open td { background: var(--surface-2); font-weight: 600; }
.drill-row td { background: var(--surface-2); }
.drill { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 28px; padding: 8px 0 6px; }
.drill .mono { color: var(--text-3); }
.drill-table { width: 100%; margin-top: 8px; font-size: 13px; font-weight: 400; }
.drill-table td { padding: 6px 0; border-top: 1px solid var(--hairline); font-size: 13px; }
.drill-table tr:first-child td { border-top: 0; }
.drill-table td:first-child { padding-left: 0; }
.drill-table td:last-child { padding-right: 0; }
.report-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 24px; }
.report-two > .audit-section { margin-top: 0; }
.report-note { margin-top: 16px; padding: 0 4px; color: var(--text-2); font-size: 14px; }
.report-explain { max-width: 75ch; margin: 0 4px 12px; color: var(--text-2); font-size: 14px; }

/* Analytics: the live strip and the channel bars */
.live-strip { display: flex; flex-wrap: wrap; gap: 12px 40px; align-items: baseline; margin: 0 0 18px; padding: 16px clamp(16px, 2vw, 24px); }
.live-strip div { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.live-strip dt { display: inline-flex; gap: 8px; align-items: center; color: var(--text-2); font-size: 13px; }
.live-strip dd { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.live-strip small { color: var(--text-3); font-size: 13px; font-weight: 400; letter-spacing: 0; }
.live-pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--good-dot); }
.live-pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--good-dot); animation: live-pulse 1.8s ease-out infinite; }
@keyframes live-pulse { from { transform: scale(1); opacity: .6; } to { transform: scale(3); opacity: 0; } }
.channel-bars { margin: 0; padding: 6px clamp(16px, 2vw, 24px); list-style: none; }
.channel-bars li { display: grid; grid-template-columns: 150px minmax(0, 1fr) 80px 90px 80px; gap: 14px; align-items: center; padding: 11px 0; font-size: 14px; }
.channel-bars li + li { border-top: 1px solid var(--hairline); }
.channel-bars li.channel-head { color: var(--text-3); font-size: 12px; font-weight: 600; }
.channel-bars .num { text-align: right; white-space: nowrap; }
.channel-bar { height: 8px; border-radius: var(--r-pill); background: var(--track); overflow: hidden; }
.channel-bar i { display: block; height: 100%; border-radius: inherit; background: var(--text-3); }
.channel-bars .is-organic { font-weight: 600; }
.channel-bars .is-organic .channel-bar i { background: var(--accent-strong); }

/* Ads: the connection status row */
.status-row { display: flex; flex-wrap: wrap; gap: 14px 40px; align-items: flex-end; margin: 0 0 18px; padding: 16px clamp(16px, 2vw, 24px); }
.status-row > div { min-width: 0; }
.status-row a { color: var(--accent-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.status-row dt { color: var(--text-3); }
.status-row dd { overflow-wrap: anywhere; margin: 3px 0 0; font-size: 14px; font-weight: 500; }

/* Zombie pages: search, index check, pager */
.list-search { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 0 10px; }
.list-search input { flex: 1 1 200px; min-width: 0; max-width: 440px; height: 44px; border-radius: var(--r-pill); padding: 0 16px; font-size: 13px; }
.index-check { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 4px 0 12px; }
.index-check .table-note { flex: 1 1 260px; margin: 0; }
.table-note + .table-wrap, .component-note + .issues { margin-top: 14px; }
.index-pending { color: var(--text-3); }
.index-error { display: block; color: var(--bad); font-size: 13px; }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; margin-top: 20px; }
.pager .mono { color: var(--text-3); font-weight: 400; }
.pager .is-disabled { opacity: .4; pointer-events: none; }

/* Weekly action list */
.action-progress { display: grid; grid-template-columns: auto minmax(140px, 280px) 1fr; gap: 24px; align-items: center; margin: 0; padding: 20px clamp(18px, 2vw, 24px); }
.action-progress > div:first-child { display: flex; align-items: baseline; gap: 8px; }
.action-progress-number { font-size: 34px; font-weight: 700; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.action-progress .mono { color: var(--text-3); font-weight: 400; font-size: 13px; }
.action-progress p { color: var(--text-2); font-size: 13.5px; }
.action-bar { height: 6px; border-radius: var(--r-pill); background: var(--track); overflow: hidden; }
.action-bar span { display: block; height: 100%; border-radius: inherit; background: var(--accent-strong); }
.action-list { margin: 24px 0 0; padding: 0; list-style: none; }
.action-item { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; padding: 26px clamp(18px, 2vw, 28px); scroll-margin-top: calc(var(--topbar-h) + 16px); }
.action-item + .action-item { border-top: 1px solid var(--hairline); }
.action-item:first-child { border-radius: var(--r-panel) var(--r-panel) 0 0; }
.action-item:last-child { border-radius: 0 0 var(--r-panel) var(--r-panel); }
.action-check { margin: 0; }
.action-check button { display: grid; place-items: center; width: 24px; height: 24px; margin-top: 1px; padding: 0; border: 1.5px solid var(--text-3); border-radius: 50%; background: transparent; color: var(--ink-button-text); font-size: 13px; line-height: 1; position: relative; transition: background-color .15s var(--ease), border-color .15s var(--ease); }
.action-check button::after { content: ""; position: absolute; inset: -10px; }
.action-check button:hover { border-color: var(--accent-strong); background: var(--accent-tint); }
.action-check button[aria-pressed="true"] { border-color: var(--ink-button); background: var(--ink-button); color: var(--ink-button-text); }
.action-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.action-head h3 { flex: 1 1 320px; font-size: 16px; font-weight: 700; letter-spacing: -.015em; line-height: 1.35; }
.action-confidence { color: var(--text-3); font-size: 12.5px; }
.action-pages { margin-top: 6px; color: var(--text-2); font-size: 13.5px; }
.action-pages .crawl-url { margin-right: 6px; color: var(--text); }
.action-reopened { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--bad); font-size: 13.5px; font-weight: 500; }
.action-reopened::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--bad-dot); }
.action-explain { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--hairline); }
.action-explain dt { margin-bottom: 4px; color: var(--text-3); }
.action-explain dd { font-size: 14px; line-height: 1.7; }
.action-more { margin-top: 12px; }
.action-more li { padding: 5px 0; font-size: 13px; }
.action-source { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 12px; }
.action-source .mono { color: var(--text-3); font-weight: 400; }
.action-verify { margin-top: 8px; }
.action-item.is-done { background: var(--surface-2); box-shadow: none; }
.action-item.is-done h3 { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--text-4); }

/* History */
.history-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 20px 0; }
.history-count { display: flex; flex-direction: column; gap: 4px; padding: 0 clamp(16px, 2vw, 24px); }
.history-count + .history-count { border-left: 1px solid var(--hairline); }
.history-number { font-size: 32px; font-weight: 700; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.history-count .mono { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-weight: 500; }
.history-count .mono::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--text-4); }
.history-count--verified .mono::before { background: var(--good-dot); }
.history-count--still .mono::before { background: var(--accent); }
.history-count--back .mono::before { background: var(--bad-dot); }
.history-fixes, .history-events { margin: 0; padding: 0 clamp(16px, 2vw, 24px); list-style: none; }
.history-fix { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; align-items: baseline; padding: 14px 0; }
.history-fix + .history-fix, .history-event + .history-event { border-top: 1px solid var(--hairline); }
.history-fix h3 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.history-fix p { margin-top: 3px; color: var(--text-2); font-size: 13.5px; }
.history-status { justify-self: start; }
.history-week { margin: 26px 4px 10px; color: var(--text-2); font-size: 14px; font-weight: 600; }
.history-week:first-of-type { margin-top: 0; }
.history-event { display: grid; grid-template-columns: 70px 110px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 18px 0; font-size: 14px; }
.history-date { color: var(--text-3); font-weight: 400; }
.history-kind { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); }
.history-kind::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--text-4); }
.history-event--good .history-kind::before { background: var(--good-dot); }
.history-event--bad .history-kind::before { background: var(--accent); }
.history-event--back .history-kind { color: var(--bad); }
.history-event--back .history-kind::before { background: var(--bad-dot); }

/* Responsive: panel layout follows available content width. */
@container (min-width: 651px) and (max-width: 900px) {
  .report-figures--five:has(> div:nth-child(5)) { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 20px; }
  .report-figures--five > div:nth-child(4) { border-left: 0; }
}
@container (max-width: 650px) {
  .report-figures, .report-figures--small, .report-figures--five:has(> div:nth-child(5)) { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 24px; }
  .report-figures > div:nth-child(odd) { border-left: 0; }
  .report-figures > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .report-charts { grid-template-columns: minmax(0, 1fr); }
  .report-charts > .line-chart + .line-chart { border-left: 0; border-top: 1px solid var(--hairline); }
}
@container (max-width: 420px) {
  .chart-axis text:nth-child(even):not(:last-child) { display: none; }
}
@media (max-width: 1180px) {
  .pagespeed-grid, .component-grid { grid-template-columns: minmax(0, 1fr); }
  .pagespeed-grid > .pagespeed-card + .pagespeed-card, .component-grid > .pagespeed-card + .pagespeed-card { border-left: 0; border-top: 1px solid var(--hairline); }
  .action-explain, .issue-explain { grid-template-columns: 1fr; gap: 14px; }
}
@media (max-width: 1023px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .top-bar { z-index: 50; }
  .menu-button { display: grid; place-items: center; flex: none; width: 44px; height: 44px; margin-left: -8px; border-radius: var(--r-pill); color: var(--text); cursor: pointer; }
  .menu-button:hover { background: var(--fill); }
  .nav-toggle { display: block; position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .nav-toggle:focus-visible ~ .shell .menu-button { outline: 2px solid var(--accent-strong); outline-offset: -2px; }
  .sidebar { position: fixed; top: var(--topbar-h); left: 0; bottom: 0; z-index: 40; width: 300px; max-width: calc(100vw - 44px); height: auto; background: var(--bg); box-shadow: var(--sh-overlay); transform: translateX(-100%); visibility: hidden; transition: transform .32s var(--ease-drawer), visibility 0s linear .32s; }
  .nav-toggle:checked ~ .shell .sidebar { transform: none; visibility: visible; transition-delay: 0s; }
  .backdrop { display: block; position: fixed; top: var(--topbar-h); right: 0; bottom: 0; left: 0; z-index: 30; margin: 0; background: var(--scrim); opacity: 0; visibility: hidden; cursor: pointer; transition: opacity .25s var(--ease), visibility 0s linear .25s; }
  .nav-toggle:checked ~ .shell .backdrop { opacity: 1; visibility: visible; transition-delay: 0s; }
  html:has(.nav-toggle:checked) { overflow: hidden; }
  .menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 18px; height: 1.5px; background: currentColor; transition: transform .2s var(--ease), background-color .2s; }
  .menu-icon { position: relative; }
  .menu-icon::before, .menu-icon::after { content: ''; position: absolute; left: 0; }
  .menu-icon::before { top: -5px; }
  .menu-icon::after { top: 5px; }
  .nav-toggle:checked ~ .shell .menu-icon { background: transparent; }
  .nav-toggle:checked ~ .shell .menu-icon::before { transform: translateY(5px) rotate(45deg); }
  .nav-toggle:checked ~ .shell .menu-icon::after { transform: translateY(-5px) rotate(-45deg); }
  .site-menu { position: static; max-height: none; overflow: visible; }
  .nav-item { min-height: 44px; }
  .top-bar-meta { max-width: 30vw; }
}
@media (max-width: 900px) {
  /* Sites and users keep every field in one panel, without horizontal scrolling. */
  .users-table, .users-table tbody, .users-table td, .sites-table, .sites-table tbody, .sites-table td { display: block; }
  .users-table thead, .sites-table thead { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .users-table tr, .sites-table tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 12px; padding: 22px; }
  .users-table tr + tr, .sites-table tr + tr { border-top: 1px solid var(--hairline); }
  .users-table td, .sites-table td { padding: 0; border: 0; text-align: left; width: auto; min-width: 0; max-width: none; overflow-wrap: anywhere; }
  .sites-table :is(.name-cell, .score-cell, .actions-cell, .date-cell), .users-table :is(.status-cell, .date-cell, .credit-cell) { width: auto; min-width: 0; max-width: none; }
  .users-table tbody tr:not(.empty-row):hover, .sites-table tbody tr:not(.empty-row):hover { background: transparent; }
  .is-selected td, .is-selected:hover td { background: none; }
  .sites-table tr.is-selected { background: var(--selected); }
  .sites-table .name-cell, .sites-table .actions-cell { grid-column: 1 / -1; }
  .table-wrap .sites-table td.name-cell, .table-wrap .sites-table .is-selected td.name-cell { position: relative; background: none; border: 0; }
  .sites-table td.name-cell:has(> .site-icon) { padding-left: 40px; }
  td.name-cell > .site-icon { top: 0; left: 0; }
  :is(.users-table, .sites-table) td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 5px; color: var(--text-3); font: 500 12px/1.4 var(--font); }
  .sparkline { max-width: 100%; margin-left: 0; }
  .sites-table .actions-cell, .users-table .actions-cell { padding-top: 14px; border-top: 1px solid var(--hairline); }
  .row-actions { justify-content: flex-start; gap: 8px 16px; }
  .users-table .email-cell, .users-table .credit-cell, .users-table .actions-cell { grid-column: 1 / -1; }
  .users-table .date-cell { grid-column: 1 / 3; white-space: normal; }
  .users-table .status-cell { grid-column: 3; justify-self: end; }
  .credit-form { flex-basis: 100%; margin: 0; }
  .credit-input { flex: 1; max-width: 140px; height: 44px; }
  .users-table .empty-row, .sites-table .empty-row { display: block; padding: 0; }
  .users-table .empty-row td, .sites-table .empty-row td { padding: 44px 20px; text-align: center; }
}
@media (max-width: 760px) {
  input, select, .report-select select, .list-search input, .credit-input { font-size: 16px; }
  .page-head { flex-direction: column; align-items: stretch; gap: 18px; }
  .page-site { text-align: left; max-width: none; }
  .theme-toggle button span { display: none; }
  .theme-toggle button { width: 44px; height: 44px; padding: 0; }
  .dials { grid-template-columns: minmax(0, 1fr); }
  .dial { grid-template-columns: 108px 1fr; align-items: center; gap: 20px; padding: 16px 0; }
  .dial-caption { align-items: flex-start; justify-self: start; }
  .dial + .dial { border-left: 0; border-top: 1px solid var(--hairline); }
  .reading-foot { flex-direction: column; gap: 4px; }
  .add-site { grid-template-columns: 1fr; }
  .add-site .primary-button { width: 100%; }
  .add-site.has-errors .primary-button { margin-top: 0; }
  .form-actions { flex-direction: column; align-items: stretch; gap: 14px; }
  .form-actions button, .connect-form .primary-button { width: 100%; min-width: 0; }
  .form-actions a { text-align: center; padding-block: 10px; }
  .connect-panel--account { flex-direction: column; align-items: flex-start; }
  .score-row { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; }
  .score-row .score-item:nth-child(3) { padding-left: 0; border-left: 0; }
  .crawl-head { flex-direction: column; align-items: stretch; }
  .crawl-head form, .crawl-head .connect-button, .crawl-head .secondary-button, .audit-head form, .audit-head .connect-button, .audit-head form .secondary-button { width: 100%; }
  .crawl-facts, .crawl-facts:has(> div:nth-child(5)) { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 24px; }
  .crawl-facts > div:nth-child(odd) { border-left: 0; }
  .crawl-facts .crawl-finished { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--hairline); padding-top: 14px; }
  .trend-grid-cards { grid-template-columns: 1fr; }
  .trend-card:not(.trend-card--wide) + .trend-card:not(.trend-card--wide) { border-left: 0; border-top: 1px solid var(--hairline); }
  .trend-card figcaption .confidence-badge { margin-left: 0; flex-basis: auto; }
  .trend-card--wide .chart-plot > svg:not(.chart-axis) { height: 160px; }
  .issue-summary { grid-template-columns: repeat(3, 1fr); row-gap: 20px; }
  .issue-next { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--hairline); padding-top: 16px; }
  .issue-card-pages { margin-left: 0; }
  .action-progress { grid-template-columns: 1fr; gap: 14px; }
  .history-summary { grid-template-columns: repeat(2, 1fr); row-gap: 24px; }
  .history-count:nth-child(3) { border-left: 0; }
  .history-fix { grid-template-columns: 1fr; gap: 10px; padding-block: 20px; }
  .history-event { grid-template-columns: auto 1fr; gap: 6px 18px; }
  .history-event p { grid-column: 1 / -1; }
  .drill { grid-template-columns: 1fr; }
  .channel-bars li { grid-template-columns: minmax(0, 1fr) 72px 82px 70px; gap: 6px; }
  .channel-bars li > :first-child { grid-column: 1 / -1; }
  .channel-bars li > .channel-bar { grid-column: 1; }
  .channel-head > :nth-child(2) { visibility: hidden; }
  .choice { grid-template-columns: auto minmax(0, 1fr); padding-inline: 8px; }
  .choice-meta { grid-column: 2; }
  .report-controls { gap: 12px; }
  .report-figures--small { grid-template-columns: 1fr; gap: 18px; }
  .report-figures--small > div + div { border-left: 0; }
  .report-panel .report-figures--small { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .top-bar-meta { display: none; }
  .top-bar, .top-bar-end { gap: 8px; }
  .score-hero { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .score-hero-number { justify-self: center; }
  .score-hero-text { text-align: center; }
  .score-missing { text-align: left; }
  .score-hero-text .confidence { justify-content: center; }
  .segmented { display: flex; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .segmented a { flex: 1 0 auto; justify-content: center; padding-inline: 10px; font-size: 12px; }
  .report-select { flex: 1 1 120px; min-width: 0; }
  .report-filter-row .report-select { flex-basis: 40%; }
  .report-filter-row .compact-button { flex: 1 1 100%; }
  .report-select select { width: 100%; }
  .service-hero { grid-template-columns: 1fr; gap: 14px; }
  .service-hero > svg { width: 32px; height: 32px; }
  .sites-table tr, .users-table tr { padding: 18px; }
  .site-platform { margin: 5px 0 0; display: block; }
  .action-item { grid-template-columns: 24px minmax(0, 1fr); gap: 12px; padding: 22px 16px; }
  .action-head h3 { font-size: 16px; }
  .issue-value { white-space: normal; }
  .channel-bars li { grid-template-columns: minmax(0, 1fr) repeat(2, auto); column-gap: 14px; }
  .channel-bars li > .channel-bar { display: none; }
  .channel-head > :nth-child(2) { display: none; }
  .auth-page { padding: 12px 16px 32px; }
  .auth-column { padding-block: 24px; }
  .card { padding: 28px 22px; }
  .card h1 { font-size: 27px; }
}
@media (pointer: coarse), (max-width: 760px) {
  .secondary-button, .compact-button, .row-action, .service-chip, .report-subtabs a, .report-select select { min-height: 44px; }
  .site-entry-actions .compact-button, .site-entry-actions .selected-mark { min-height: 44px; }
  .site-options > summary { width: 44px; min-height: 44px; }
  .segmented a { position: relative; }
  .segmented a::before { content: ""; position: absolute; inset: -3px -1px; }
  .service-chip { padding-inline: 10px; }
  .issue-pages summary, .action-more summary { min-height: 44px; padding-block: 11px; }
}
@media (prefers-contrast: more) {
  .top-bar { background: var(--bg); border-bottom-color: var(--field-line); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .table-wrap, .empty-panel, .report-panel, .action-list, .issue-group { outline: 1px solid var(--field-line); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .primary-button:active, .secondary-button:active, .compact-button:active, .danger-button:active { transform: none; }
}
.empty-panel .action-bar { max-width: 420px; margin-top: 12px; }

/* Sites: one labelled dot per data source. */
.data-dots { gap: 10px; }
.data-dot-item { display: inline-flex; align-items: center; gap: 4px; color: var(--text-3); font-size: 11px; font-weight: 500; }

/* Keywords: add and find, the suggestions dialog, the list with a ranking-pages popover. */
textarea { width: 100%; min-height: 96px; padding: 12px 14px; background: var(--field); border: 1px solid var(--field-line); border-radius: var(--r-thumb); color: var(--text); font: 400 15px/1.5 var(--font); resize: vertical; }
textarea:focus { outline: 2px solid var(--accent-strong); outline-offset: 1px; border-color: var(--accent-strong); }
.kw-location { display: flex; align-items: center; gap: 8px; }
.kw-add { margin-bottom: 20px; }
.kw-add > summary { width: fit-content; cursor: pointer; list-style: none; }
.kw-add > summary::-webkit-details-marker { display: none; }
.kw-add > summary::after { content: '+'; margin-left: 10px; font-size: 18px; line-height: 1; }
.kw-add[open] > summary::after { content: '−'; }
.kw-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 14px; background: var(--surface); border-radius: var(--r-panel); box-shadow: var(--sh-panel); overflow: hidden; }
.kw-tool { display: flex; flex-direction: column; padding: 20px clamp(18px, 2vw, 24px); }
.kw-tool + .kw-tool { border-left: 1px solid var(--hairline); }
.kw-tool textarea, .kw-tool .kw-hint { margin-bottom: 14px; }
.kw-tool .primary-button, .kw-tool .secondary-button { align-self: flex-start; width: auto; margin-top: auto; padding-inline: 22px; }
.kw-hint { margin-top: 8px; color: var(--text-3); font-size: 13px; }
.kw-dialog { position: fixed; inset: 0; z-index: 70; width: min(760px, calc(100vw - 32px)); max-height: min(80vh, 760px); margin: auto; padding: 0; border: 0; border-radius: var(--r-panel); background: var(--surface); color: var(--text); box-shadow: var(--sh-overlay); overflow: hidden; }
.kw-dialog > form { display: flex; flex-direction: column; max-height: inherit; }
.kw-dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 20px 24px 12px; border-bottom: 1px solid var(--hairline); }
.kw-dialog-head h2 { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.kw-dialog-head .mono { color: var(--text-3); font-weight: 400; }
.kw-close { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; background: var(--fill); color: var(--text-2); font-size: 20px; line-height: 1; }
.kw-close:hover { background: var(--fill-strong); text-decoration: none; }
.kw-dialog-body { overflow-y: auto; }
.kw-dialog .error-banner, .kw-dialog .issues-none { margin: 16px 24px; }
.kw-dialog-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px 24px; border-top: 1px solid var(--hairline); }
.kw-dialog-foot .primary-button { width: auto; margin-top: 0; }
.kw-scrim { position: fixed; inset: 0; z-index: 65; background: var(--scrim); }
.kw-dialog::backdrop { background: var(--scrim); }
body:has(.kw-dialog:modal) { overflow: hidden; }
body:has(.kw-dialog:modal) .kw-scrim { display: none; }
.kw-table input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.kw-table tr.is-listed td { color: var(--text-3); }
.kw-listed { color: var(--good); font-weight: 700; }
.kw-table th .kw-sort { color: inherit; text-decoration: none; }
.kw-table th .kw-sort:hover, .kw-table th .kw-sort.is-sorted { color: var(--text); }
.kw-table th .kw-sort.is-sorted::after { content: " ↓"; }
.kw-table th[aria-sort="ascending"] .kw-sort.is-sorted::after { content: " ↑"; }
.kw-keyword { font-weight: 600; }
.kw-kd { font-size: 15px; }
.kw-pages { position: relative; display: inline-block; }
.kw-pages summary { list-style: none; cursor: pointer; color: var(--accent-ink); font-weight: 600; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 3px; }
.kw-pages summary::-webkit-details-marker { display: none; }
.kw-popover { position: static; width: 260px; margin-top: 8px; padding: 14px 16px; background: var(--surface); color: var(--text); border: 1px solid var(--hairline); border-radius: var(--r-card); text-align: left; white-space: normal; }
.kw-popover[popover] { position: fixed; inset: auto; width: min(420px, calc(100vw - 24px)); max-height: min(440px, calc(100dvh - 24px)); margin: 0; overflow: auto; box-shadow: var(--sh-overlay); }
.kw-popover .mono { color: var(--text-3); font-weight: 400; }
.kw-popover ul { margin: 8px 0 0; padding: 0; list-style: none; }
.kw-popover li { display: grid; gap: 2px; padding: 7px 0; font-size: 13px; }
.kw-popover li + li { border-top: 1px solid var(--hairline); }
.kw-popover li span { color: var(--text-3); font-size: 12px; }
.kw-remove { width: 1%; white-space: nowrap; }
@media (max-width: 760px) {
  .kw-tools { grid-template-columns: 1fr; }
  .kw-tool + .kw-tool { border-left: 0; border-top: 1px solid var(--hairline); }
}
/* The table scrolls inside its panel; enhanced popovers use the browser's top layer. */
.kw-wrap { max-width: 100%; }
.kw-table th.kw-tick, .kw-table td.kw-tick { width: 1%; min-width: 0; padding-right: 4px; }
.kw-table .kw-tick + th, .kw-table .kw-tick + td { padding-left: 12px; }
.kw-table tr[data-pick] { cursor: pointer; }
.kw-dialog .kw-table tr[data-pick] { user-select: none; }
.kw-table tbody tr[data-pick]:hover { background: var(--hover); }
.kw-table tbody tr[data-pick]:has(input:checked) { background: var(--accent-tint); }
.kw-table tbody tr[data-pick]:has(input:checked) td { color: var(--text); }
/* Keyword groups: the search and group chips above the list, group tags on rows, the assignment bar below */
.kw-search { display: flex; align-items: center; gap: 6px; }
.kw-search input { width: 240px; height: 44px; padding: 0 16px; border-radius: var(--r-pill); font-size: 13px; }
.kw-toolbar { margin: 10px 0; }
@media (max-width: 760px) { .kw-search { flex-basis: 100%; } .kw-search input { flex: 1 1 auto; width: auto; font-size: 16px; } }
.kw-groups { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.kw-group-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: var(--r-pill); background: var(--fill); color: var(--text-2); font-size: 13px; font-weight: 500; text-decoration: none; }
.kw-group-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--tag); }
.kw-group-chip span { color: var(--text-3); font-variant-numeric: tabular-nums; }
.kw-group-chip:hover { background: var(--fill-strong); color: var(--text); text-decoration: none; }
.kw-group-chip.is-active { background: var(--accent-tint); color: var(--accent-ink); }
.kw-group-chip.is-active span { color: inherit; }
/* An element with a menu: no text selection or system callout on the long press that opens it. */
[data-menu] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.context-menu { position: fixed; z-index: 80; min-width: 180px; padding: 6px; border-radius: 12px; background: var(--surface); box-shadow: var(--sh-overlay); }
.context-menu-item { display: block; padding: 8px 12px; border-radius: 8px; color: var(--text); font-size: 13px; font-weight: 500; text-decoration: none; }
.context-menu-item:hover, .context-menu-item:focus-visible { background: var(--hover); outline: none; }
.context-menu-item.is-danger { color: var(--bad); }
.context-menu-colors { display: flex; align-items: center; gap: 2px; margin: 0; padding: 6px 12px; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.context-menu-label { margin-right: 8px; color: var(--text-3); font-size: 12px; font-weight: 600; }
.kw-swatch-button { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.kw-swatch-button i { width: 14px; height: 14px; border-radius: 50%; background: var(--tag); }
.kw-swatch-button.is-current i { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }
.kw-swatch-button:focus-visible { outline: none; }
.kw-swatch-button:focus-visible i { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent-strong); }
.kw-rename { border-top: 0; padding-top: 4px; }
.kw-tag { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; padding: 1px 8px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--tag) 16%, transparent); color: var(--text-2); font-size: 11px; font-weight: 600; vertical-align: 2px; white-space: nowrap; }
.kw-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--tag); }
/* The selection bar floats above the page so it stays reachable without moving the table. */
.kw-assign { position: fixed; z-index: 40; bottom: 20px; left: calc(var(--sidebar-w) + 32px); right: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0; padding: 10px 16px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--sh-overlay); font-size: 13px; color: var(--text-2); visibility: hidden; opacity: 0; transition: opacity .15s var(--ease), visibility 0s .15s; }
.audit-section:has(.kw-table tbody input[type="checkbox"]:checked) .kw-assign { visibility: visible; opacity: 1; transition: opacity .15s var(--ease); }
.shell-main:has(.audit-section .kw-table tbody input[type="checkbox"]:checked) { padding-bottom: 180px; }
.kw-assign button { min-height: 44px; }
@media (max-width: 1023px) { .kw-assign { left: 16px; right: 16px; bottom: 16px; } }
@media (prefers-reduced-motion: reduce) { .kw-assign { transition: none; } }
.kw-assign-count { color: var(--text); font-weight: 600; }
.kw-assign-remove { margin-left: auto; }
.kw-assign .danger-button { min-height: 44px; padding: 6px 16px; font-size: 13px; }
.kw-confirm { width: min(460px, calc(100vw - 32px)); }
.kw-confirm-list { margin: 0; padding: 6px 24px 14px; list-style: none; max-height: 40vh; overflow-y: auto; font-size: 14px; }
.kw-confirm-list li { padding: 7px 0; border-top: 1px solid var(--hairline); }
.kw-confirm-list li:first-child { border-top: 0; }
.kw-dialog-foot .danger-button { width: auto; margin-top: 0; }
.kw-assign-groups { display: grid; gap: 2px; padding: 4px 16px 10px; max-height: 40vh; overflow-y: auto; }
.kw-assign-group { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 8px; border-radius: var(--r-control); font-size: 14px; cursor: pointer; }
.kw-assign-group:hover { background: var(--hover); }
.kw-assign-group input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.kw-assign-group i { width: 10px; height: 10px; border-radius: 50%; background: var(--tag); }
.kw-assign-group .mono { margin-left: auto; color: var(--text-3); font-weight: 400; }
.kw-assign-none { margin: 6px 8px 8px; color: var(--text-3); font-size: 13px; }
.kw-assign-new { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 24px 6px; border-top: 1px solid var(--hairline); }
.kw-assign-new label { flex-basis: 100%; color: var(--text-3); font-size: 12px; font-weight: 600; }
.kw-assign-new input[type="text"] { flex: 1 1 200px; height: 38px; padding: 0 12px; border-radius: var(--r-control); }
.kw-swatches { display: inline-flex; gap: 4px; }
.kw-swatch { position: relative; display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; cursor: pointer; }
.kw-swatch input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.kw-swatch i { width: 16px; height: 16px; border-radius: 50%; background: var(--tag); }
.kw-swatch input:checked + i { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }
.kw-swatch input:focus-visible + i { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent-strong); }
.kw-dialog .kw-table thead th { position: sticky; top: 0; z-index: 1; background: var(--surface); }
/* Keyword tables: short figures sit centred under their column titles. */
.kw-table th.num, .kw-table td.num { text-align: center; }
.kw-table th[title] { cursor: help; }
.kw-list-head { align-items: center; }
.kw-list-head .mono { margin-left: auto; }
.kw-list-head { flex-wrap: wrap; gap: 8px 12px; }
.kw-location-label { color: var(--text-3); font-size: 13px; font-weight: 500; }
@media (max-width: 760px) { .kw-list-head .mono { margin-left: 0; flex-basis: 100%; } }
.kw-location label { margin: 0; }
.kw-data-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 14px; }
/* Keyword Strategy: one panel of page plans */
.ks-hero { margin: 4px 0 20px; }
.ks-figures { display: flex; flex-wrap: wrap; gap: 12px 40px; }
.ks-figure { display: grid; gap: 2px; margin: 0; }
.ks-figure strong { font-size: clamp(36px, 5vw, 48px); font-weight: 600; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--text); }
.ks-figure span { color: var(--text-3); font-size: 13px; font-weight: 500; }
.ks-lede { margin: 10px 0 0; color: var(--text-2); font-size: 14px; }
.ks-panel { background: var(--surface); border-radius: var(--r-panel); box-shadow: var(--sh-panel); overflow: hidden; }
.ks-group { margin: 0; padding: 9px 20px; font-size: 12px; font-weight: 600; color: var(--text-2); background: var(--surface-2); border-bottom: 1px solid var(--hairline); }
.ks-group span { color: var(--text-3); font-weight: 500; }
.ks-plan { padding: 12px 20px 10px; border-bottom: 1px solid var(--hairline); }
.ks-plan:last-child { border-bottom: 0; }
.ks-plan-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.ks-plan-head h3 { margin: 0 4px 0 0; font-size: 17px; font-weight: 600; letter-spacing: -0.015em; color: var(--text); }
.ks-plan-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.ks-pill { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: var(--r-pill); background: var(--fill); color: var(--text-2); font-size: 11px; font-weight: 600; white-space: nowrap; }
.ks-pill--new { background: var(--accent-tint); color: var(--accent-ink); }
.ks-pill--existing { background: var(--good-tint); color: var(--good); }
.ks-volume { display: grid; grid-template-columns: auto auto; align-items: baseline; column-gap: 6px; row-gap: 5px; margin: 0 0 0 auto; min-width: 150px; white-space: nowrap; }
.ks-volume strong { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text); }
.ks-volume span { color: var(--text-3); font-size: 12px; }
.ks-demand { grid-column: 1 / -1; display: block; height: 4px; border-radius: 2px; background: var(--track); overflow: hidden; }
.ks-demand i { display: block; height: 100%; border-radius: 2px; background: var(--accent); }
.ks-group--new::before, .ks-group--existing::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; vertical-align: 1px; }
.ks-group--new::before { background: var(--accent); }
.ks-group--existing::before { background: var(--good-dot); }
.ks-body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 8px 32px; margin-top: 6px; }
.ks-label { display: inline-block; margin: 0 8px 0 0; color: var(--text-3); font-size: 11px; font-weight: 600; letter-spacing: 0.02em; }
.ks-where, .ks-next { margin: 0; color: var(--text); font-size: 13px; line-height: 1.5; }
.ks-where + .ks-next { margin-top: 3px; }
.ks-path { font-family: var(--mono); font-size: 14px; color: var(--accent-ink); overflow-wrap: anywhere; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
.ks-path--new { display: inline-block; padding: 1px 8px; border: 1px dashed var(--accent-strong); border-radius: 8px; color: var(--accent-ink); text-decoration: none; user-select: all; }
.ks-evidence { margin: 0; color: var(--text-3); font-size: 12px; }
.ks-where .ks-evidence { margin-left: 8px; }
.ks-keywords .ks-label { display: block; margin: 0 0 5px; }
.ks-keywords .ks-evidence { margin-top: 5px; }
.ks-chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; padding: 0; list-style: none; }
.ks-chips li { display: inline-flex; align-items: baseline; gap: 5px; padding: 3px 9px; border-radius: var(--r-pill); background: var(--fill); color: var(--text); font-size: 12px; overflow-wrap: anywhere; }
.ks-chips li span { color: var(--text-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.ks-chips li.is-grouped { background: color-mix(in srgb, var(--tag) 14%, transparent); }
.ks-chips li.is-grouped::before { content: ""; align-self: center; width: 6px; height: 6px; border-radius: 50%; background: var(--tag); }
.ks-disclosures { display: flex; flex-wrap: wrap; gap: 0 24px; margin-top: 2px; }
.ks-more[open] { flex-basis: 100%; }
.ks-more summary { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text); list-style: none; }
.ks-more summary::-webkit-details-marker { display: none; }
.ks-more summary::before { content: "›"; display: inline-block; width: 10px; color: var(--text-3); transition: transform .2s var(--ease); }
.ks-more[open] summary::before { transform: rotate(90deg); }
.ks-more summary span { color: var(--text-3); font-weight: 500; font-size: 12px; }
.ks-more summary:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; border-radius: 6px; }
.ks-links { margin: 2px 0 8px; padding: 0; list-style: none; }
.ks-links li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 6px 0; border-top: 1px solid var(--hairline); font-size: 13px; }
.ks-links li:first-child { border-top: 0; }
.ks-state { flex-shrink: 0; color: var(--text-3); font-size: 12px; font-weight: 500; }
.ks-state.is-todo { color: var(--accent-ink); font-weight: 600; }
@media (max-width: 900px) { .ks-body { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .ks-plan, .ks-group { padding-left: 16px; padding-right: 16px; } .ks-volume { margin-left: 0; } }
@media (prefers-reduced-motion: reduce) { .ks-more summary::before { transition: none; } }
/* Rank Tracking: the daily position chart in a table cell */
.rank-chart { display: block; overflow: visible; }
.rank-chart polyline { fill: none; stroke: var(--accent-strong); stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; }
.rank-chart circle { fill: var(--accent-strong); }
.kw-table th.rank-chart-cell, .kw-table td.rank-chart-cell { width: 176px; min-width: 176px; }

/* Phones: rows of the keyword, page and rank tables become stacked entries (the name on top, figures as small
   label/value pairs beneath) and the column titles turn into a row of sort links, so nothing needs a sideways swipe. */
@media (max-width: 760px) {
  .kw-table, .kw-table thead, .kw-table tbody { display: block; }
  .kw-table thead tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 16px; border-bottom: 1px solid var(--hairline); }
  .kw-table thead tr::before { content: "Sort by"; order: 1; color: var(--text-3); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
  .kw-table thead tr:not(:has(.kw-sort))::before { display: none; }
  .kw-table thead:not(:has(.kw-sort, .kw-tick)) { display: none; }
  .kw-table thead th { display: block; order: 2; width: auto; min-width: 0; padding: 0; border: 0; background: none; font-size: 13px; text-align: left; white-space: nowrap; }
  .kw-table thead th:not(:has(.kw-sort)):not(.kw-tick) { display: none; }
  .kw-table thead th.kw-tick { order: 0; display: flex; align-items: center; gap: 8px; flex-basis: 100%; }
  .kw-table thead th.kw-tick::after { content: "Select All"; font-weight: 500; }
  .kw-dialog .kw-table thead th { position: static; }
  .kw-table tbody tr { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 16px; }
  .kw-table tbody tr + tr { border-top: 1px solid var(--hairline); }
  .report-table.kw-table tbody td { display: block; width: auto; min-width: 0; max-width: none; padding: 0; border: 0; white-space: normal; text-align: left; }
  .report-table.kw-table tbody td.kw-keyword { flex: 1 1 100%; }
  .report-table.kw-table tbody td.kw-tick + td.kw-keyword { flex-basis: calc(100% - 34px); }
  .report-table.kw-table tbody td[data-label] { display: flex; flex-direction: column; gap: 2px; }
  .report-table.kw-table tbody td[data-label]::before { content: attr(data-label); color: var(--text-3); font-size: 11px; line-height: 1.4; }
  .report-table.kw-table tbody td.kw-fixes { flex-basis: 100%; }
  .kw-table tbody .score-sub { white-space: normal; }
  .report-table.kw-table tbody td.kw-remove { margin-left: auto; }
  .kw-table th.rank-chart-cell, .kw-table td.rank-chart-cell { width: auto; min-width: 0; }
}

/* Backlinks: in the backlink table the linking site, with its quality, stands above the title of its linking page. */
.backlink-site { display: block; font-weight: 600; }
/* Backlink tables carry up to ten columns: short text columns take only the room they need, on wide screens the
   linking site keeps room for its quality badge. */
@media (min-width: 761px) {
  .backlink-table td[data-label]:not(.num) { min-width: 120px; }
  .backlink-table td.kw-fit[data-label] { min-width: 0; white-space: nowrap; }
}
@media (min-width: 1360px) { .kw-keyword:has(> .backlink-site > :is(.badge, .issue-badge)) { min-width: 264px; } }
.backlink-site .badge, .backlink-site .issue-badge { margin-left: 4px; }
.prospect-type, .prospect-anchor { display: block; margin-top: 2px; color: var(--text-3); font-size: 12px; font-weight: 400; }
.prospect-page { display: block; font: 500 13px/1.45 var(--font); overflow-wrap: anywhere; }
.report-table .backlink-site + .crawl-url { display: block; margin-top: 2px; color: var(--text-2); font: 400 12px/1.5 var(--font); }
.backlink-list-head { justify-content: flex-start; }
.backlink-list-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-left: auto; }
@media (max-width: 760px) {
  .backlink-list-meta { width: 100%; margin-left: 0; justify-content: space-between; }
  .backlink-list-meta .mono { flex-basis: auto; }
  .backlink-filters { flex-wrap: wrap; }
  .backlink-filters .report-select { flex: 1 1 100%; }
  .backlink-filters .report-select select { width: 100%; }
}
.disavow-panel { margin-bottom: 22px; padding: 22px clamp(18px, 2vw, 24px); }
.disavow-steps { margin: 12px 0 0; padding-left: 20px; color: var(--text-2); font-size: 14px; max-width: 70ch; }
.disavow-steps li + li { margin-top: 4px; }
.disavow-panel .primary-button { width: auto; margin-top: 18px; color: var(--accent-button-text); text-decoration: none; }

/* Loading. Work running in the background: its notice or status panel carries a running bar along the bottom edge, and
   a page with nothing to show yet holds a shimmering placeholder of what will appear. A link or form that takes a
   moment to answer: the same bar runs along the top of the window until the next page arrives. */
.notice--measuring, .empty-panel[role="status"] { position: relative; overflow: hidden; }
.notice--measuring::after, .empty-panel[role="status"]::after, .page-loading.is-active::after { content: ""; position: absolute; left: 0; bottom: 0; width: 35%; height: 2px; background: var(--accent); animation: loading-bar 1.4s var(--ease) infinite; }
.page-loading { position: fixed; inset: 0 0 auto; z-index: 200; height: 3px; overflow: hidden; pointer-events: none; }
.page-loading.is-active::after { height: 3px; }
@keyframes loading-bar { from { translate: -100% 0; } to { translate: 300% 0; } }
.loading { display: grid; gap: 22px; }
.loading table { table-layout: fixed; width: 100%; }
.skeleton { display: block; width: 70%; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--fill) 30%, var(--fill-strong) 50%, var(--fill) 70%) 0 0 / 300% 100%; animation: skeleton 1.6s ease-in-out infinite; }
.skeleton--figure { width: 55%; height: 30px; margin-top: 8px; border-radius: 8px; }
.skeleton--cell { display: inline-block; width: 48px; vertical-align: middle; }
.loading td:nth-child(2n) .skeleton { width: 45%; }
.loading tr:nth-child(3n + 1) td:first-child .skeleton { width: 85%; }
@keyframes skeleton { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (max-width: 760px) { .loading th:nth-child(n + 3), .loading td:nth-child(n + 3) { display: none; } }
