/*
 * IMPACT Hub admin - design system. RTL first (logical properties), light theme only.
 * No inline styles anywhere (CSP).
 */

/* ── Tokens ─────────────────────────────────────────────────────────────────────────────── */
:root {
	color-scheme: light;

	--font: "Google Sans", "Noto Sans Hebrew", system-ui, -apple-system, "Segoe UI", sans-serif;
	--font-mono: "Google Sans Code", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

	--bg: #f5f5f2;
	--surface: #ffffff;
	--surface-2: #fafaf8;
	--surface-3: #f0f0ec;
	--sidebar: #fbfbf9;
	--border: #e5e4de;
	--border-strong: #d3d2ca;
	--text: #18181b;
	--text-2: #45454c;
	--muted: #6b6b73;
	--dot: rgba(24, 24, 27, 0.07);

	--accent: #2f54eb;
	--accent-hover: #2442c9;
	--accent-text: #2442c9;
	--accent-soft: #eef1ff;
	--accent-ring: rgba(47, 84, 235, 0.28);
	--on-accent: #ffffff;

	--good: #0f7a45;
	--good-soft: #e6f5ec;
	--bad: #c3261b;
	--bad-soft: #fdecea;
	--bad-hover: #a51f16;
	--warn: #955a00;
	--warn-soft: #fff3dc;
	--neutral-soft: #efeff0;

	--radius-xs: 6px;
	--radius-sm: 8px;
	--radius: 12px;
	--radius-lg: 14px;

	--shadow-sm: 0 1px 2px rgba(24, 24, 20, 0.05);
	--shadow: 0 1px 2px rgba(24, 24, 20, 0.04), 0 6px 16px -4px rgba(24, 24, 20, 0.08);
	--shadow-lg: 0 2px 6px rgba(24, 24, 20, 0.05), 0 24px 48px -12px rgba(24, 24, 20, 0.22);

	--sidebar-w: 244px;
	--ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ── Base ───────────────────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body.impact-hub {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	font-size: 14px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}
.impact-hub a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 2px; }
.impact-hub h1, .impact-hub h2, .impact-hub h3 { color: var(--text); line-height: 1.25; }
.impact-hub p { margin: 0 0 0.75em; }
.impact-hub p:last-child { margin-bottom: 0; }
.impact-hub code {
	font-family: var(--font-mono);
	font-size: 0.88em;
	background: var(--surface-3);
	border-radius: 5px;
	padding: 1px 5px;
	overflow-wrap: anywhere;
}
.impact-hub strong { font-weight: 600; }
.impact-hub [hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip-link {
	position: absolute; inset-inline-start: 12px; top: -48px; z-index: 100;
	background: var(--text); color: var(--surface) !important; padding: 8px 14px; border-radius: var(--radius-sm);
	text-decoration: none; font-weight: 500; transition: top 0.15s var(--ease);
}
.skip-link:focus { top: 12px; }
.sr-only {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.icon {
	width: 18px; height: 18px; flex-shrink: 0;
	fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.icon--xs { width: 14px; height: 14px; }
.icon--flip { transform: scaleX(-1); }

/* Versions, ids and commands are LTR islands inside RTL text ("1.5.0-beta", "WP 6.0+"). */
.mono { font-family: var(--font-mono); font-size: 0.92em; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
/* A block of left-to-right code (a slug under a name) still lines up with the right-to-left text above it. */
[dir="rtl"] .cell-note.mono, [dir="rtl"] .mono.stack { text-align: right; }
.stack { display: table; }
.impact-hub code { direction: ltr; unicode-bidi: isolate; }
.strong { font-weight: 600; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.wrap-anywhere { overflow-wrap: anywhere; min-width: 140px; }

/* ── App shell ──────────────────────────────────────────────────────────────────────────── */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; position: relative; }

.sidebar {
	position: sticky; top: 0; height: 100vh;
	display: flex; flex-direction: column; gap: 4px;
	padding: 16px 12px 12px;
	background: var(--sidebar);
	border-inline-end: 1px solid var(--border);
}
.brand {
	display: flex; align-items: center; gap: 10px;
	padding: 4px 8px 18px;
	color: var(--text) !important; text-decoration: none;
}
.impact-logo { width: 30px; height: 30px; flex-shrink: 0; display: block; }
.impact-logo__bg { fill: var(--accent); }
.impact-logo__fg { fill: #fff; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; }
.impact-logo__fg circle { stroke: none; }
.impact-logo__fg path { fill: none; }
.wordmark { font-size: 16px; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap; direction: ltr; unicode-bidi: isolate; }
.wordmark span { font-weight: 400; color: var(--muted); letter-spacing: 0; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav__item {
	display: flex; align-items: center; gap: 10px;
	padding: 8px 10px; border-radius: var(--radius-sm);
	color: var(--text-2) !important; text-decoration: none; font-weight: 500;
	transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}
.nav__item .icon { color: var(--muted); transition: color 0.15s var(--ease); }
.nav__item:hover { background: var(--surface-3); color: var(--text) !important; }
.nav__item.is-active {
	background: var(--surface); color: var(--text) !important;
	box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--border);
}
.nav__item.is-active .icon { color: var(--accent); }
.nav__group { display: flex; flex-direction: column; gap: 2px; }
.nav__group + .nav__group { margin-top: 14px; }
.nav__label { padding: 0 10px 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.nav__count { margin-inline-start: auto; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); font-size: 12px; font-weight: 600; line-height: 20px; text-align: center; }
.sidebar__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sidebar .drawer-close, .topbar, .drawer-backdrop { display: none; }

.user-menu { position: relative; margin-top: auto; }
.sidebar__user {
	width: 100%;
	display: flex; align-items: center; gap: 10px;
	padding: 12px 6px 4px;
	border: 0; border-top: 1px solid var(--border);
	background: transparent; color: inherit; font: inherit; text-align: start;
	cursor: pointer; border-radius: var(--radius-sm);
	transition: background-color 0.15s var(--ease);
}
.sidebar__user:hover { background: var(--surface-3); }
.sidebar__user.is-active { background: var(--surface-3); }
.sidebar__user:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.avatar {
	width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%;
	display: grid; place-items: center;
	background: var(--accent-soft); color: var(--accent-text);
	font-weight: 600; font-size: 13px;
}
.user-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.user-meta { align-items: flex-start; text-align: right; }
.user-meta__name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; text-align: right; unicode-bidi: plaintext; }
.user-meta__role { color: var(--muted); font-size: 12px; }
.icon-btn {
	width: 34px; height: 34px; flex-shrink: 0;
	display: inline-grid; place-items: center;
	border: 0; border-radius: var(--radius-sm); background: transparent;
	color: var(--muted); cursor: pointer;
	transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }

/* The popover opened by the sidebar's user block: profile and logout. */
.user-menu__popover {
	position: absolute;
	bottom: calc(100% + 6px);
	inset-inline-start: 6px;
	inset-inline-end: 6px;
	display: flex; flex-direction: column; gap: 2px;
	padding: 6px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow);
	z-index: 40;
	animation: rise 0.12s var(--ease);
}
.user-menu__popover[hidden] { display: none; }
.user-menu__item-form { margin: 0; }
.user-menu__item {
	display: flex; align-items: center; gap: 10px;
	width: 100%;
	padding: 8px 10px;
	border: 0; border-radius: 7px; background: transparent;
	color: var(--text) !important; text-decoration: none !important;
	font: inherit; font-size: 14px; font-weight: 500;
	cursor: pointer; text-align: start;
	transition: background-color 0.15s var(--ease);
}
.user-menu__item .icon { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.user-menu__item:hover { background: var(--surface-3); }
.user-menu__item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.main { min-width: 0; outline: none; }
.main__inner { max-width: 1240px; margin: 0 auto; padding: 28px 32px 72px; }

/* ── Page header ────────────────────────────────────────────────────────────────────────── */
.page-header { margin-bottom: 22px; }
.page-header__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.page-header__text { min-width: 0; }
.page-header h1 { font-size: 24px; font-weight: 600; letter-spacing: -0.01em; margin: 0; overflow-wrap: anywhere; }
.page-header__sub { margin: 6px 0 0 !important; color: var(--muted); }
.page-header__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back-link {
	display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px;
	color: var(--muted) !important; text-decoration: none; font-size: 13px; font-weight: 500;
}
.back-link:hover { color: var(--text) !important; }
.back-link .icon { width: 16px; height: 16px; }

/* ── Buttons ────────────────────────────────────────────────────────────────────────────── */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 7px;
	height: 36px; padding: 0 14px;
	border: 1px solid transparent; border-radius: var(--radius-sm);
	font: inherit; font-size: 14px; font-weight: 500; line-height: 1;
	text-decoration: none !important; white-space: nowrap; cursor: pointer;
	transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease), box-shadow 0.15s var(--ease), transform 0.05s;
}
.btn:active { transform: translateY(1px); }
.btn .icon { width: 16px; height: 16px; }
.btn--primary {
	background: var(--accent); color: var(--on-accent) !important;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 1px 2px rgba(20, 30, 90, 0.25);
}
.btn--primary:hover { background: var(--accent-hover); }
.btn--secondary {
	background: var(--surface); color: var(--text) !important;
	border-color: var(--border-strong); box-shadow: var(--shadow-sm);
}
.btn--secondary:hover { background: var(--surface-2); border-color: var(--muted); }
.btn--ghost { background: transparent; color: var(--text-2) !important; }
.btn--ghost:hover { background: var(--surface-3); color: var(--text) !important; }
.btn--ghost-danger { background: transparent; color: var(--bad) !important; }
.btn--ghost-danger:hover { background: var(--bad-soft); }
.btn--danger { background: var(--bad); color: #fff !important; }
.btn--danger:hover { background: var(--bad-hover); }
.btn--sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 7px; gap: 5px; }
.btn--sm .icon { width: 15px; height: 15px; }
.btn--block { width: 100%; height: 40px; }
.btn--icon { width: 36px; padding: 0; }
.btn--icon.btn--sm { width: 30px; }
.btn--link {
	background: none; border: 0; padding: 0; height: auto;
	color: var(--muted) !important; text-decoration: underline !important; font-weight: 400;
}
.btn--link:hover { color: var(--text) !important; }
.btn__meta { font-family: var(--font-mono); font-size: 12px; font-weight: 400; opacity: 0.72; }
.btn__meta--warn { color: var(--warn); opacity: 1; }
.btn--primary .btn__meta--warn { color: inherit; opacity: 0.85; }

.inline-form { display: inline-flex; margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; }
.actions--nowrap { flex-wrap: nowrap; gap: 2px; }
.actions--nowrap > :first-child { margin-inline-end: 6px; }

/* ── Cards, stats ───────────────────────────────────────────────────────────────────────── */
.card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
	margin-bottom: 20px;
	position: relative;
	overflow: hidden;
	overflow: clip;
}
.card--flush { padding: 0; }
.table-more { display: flex; justify-content: center; padding: 8px 16px; border-top: 1px solid var(--border); }
.btn--more .icon { transition: transform 0.15s var(--ease); }
.btn--more.is-open .icon { transform: rotate(180deg); }
.card__head { display: flex; align-items: flex-start; gap: 14px; padding: 20px 20px 16px; }
.card__head h2 { font-size: 16px; font-weight: 600; margin: 3px 0 2px; }
.card__head p { margin: 0; }
.card__icon {
	width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px;
	display: grid; place-items: center;
	background: var(--surface-3); color: var(--text-2);
}
.card__body { padding: 0 20px 20px; }
.card__body--divided { border-top: 1px solid var(--border); padding-top: 18px; }
.card__body h3 { font-size: 14px; font-weight: 600; margin: 0 0 12px; }
.card > .form { padding: 0 20px 20px; }
.card__head + .table-wrap { border-top: 1px solid var(--border); }

/* ── Accordion (native <details>, no JS) ────────────────────────────────────────────────── */
.accordion > summary { list-style: none; cursor: pointer; }
.accordion > summary::-webkit-details-marker { display: none; }
.accordion__chevron { margin-inline-start: auto; align-self: center; flex-shrink: 0; color: var(--muted); transition: transform 0.15s var(--ease); }
.accordion[open] > summary .accordion__chevron { transform: rotate(180deg); }
.accordion[open] > summary { border-bottom: 1px solid var(--border); }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat {
	display: flex; align-items: center; gap: 14px;
	padding: 16px 18px;
	background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
	color: inherit !important; text-decoration: none;
	transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), transform 0.15s var(--ease);
}
.stat:hover { border-color: var(--border-strong); box-shadow: var(--shadow); transform: translateY(-1px); }
.stat__icon {
	width: 40px; height: 40px; flex-shrink: 0; border-radius: 11px;
	display: grid; place-items: center;
	background: var(--surface-3); color: var(--text-2);
}
.stat__icon .icon { width: 20px; height: 20px; }
.stat__body { display: flex; flex-direction: column; min-width: 0; }
.stat__value { font-size: 26px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.stat__label { font-size: 13px; color: var(--muted); }
.stat--good .stat__icon { background: var(--good-soft); color: var(--good); }
.stat--bad { border-color: color-mix(in srgb, var(--bad) 30%, var(--border)); }
.stat--bad .stat__icon { background: var(--bad-soft); color: var(--bad); }
.stat--bad .stat__value { color: var(--bad); }
.stat--warn .stat__icon { background: var(--warn-soft); color: var(--warn); }
.stat--warn .stat__value { color: var(--warn); }

/* ── Filters: chips and segmented control ───────────────────────────────────────────────── */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
/* The chips sit at the far end of the toolbar, next to its filter menus and buttons, not in the middle. */
.toolbar > .chips { margin-inline-start: auto; }
.chips--secondary { padding-inline-start: 12px; border-inline-start: 1px solid var(--border); }
.pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--border); }
.pagination__pages { display: flex; align-items: center; gap: 4px; }
.pagination__page { min-width: 32px; height: 32px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: var(--radius-sm); color: var(--text-2) !important; text-decoration: none; font-variant-numeric: tabular-nums; }
.pagination__page:hover { background: var(--surface-3); color: var(--text) !important; }
.pagination__page.is-current { background: var(--accent-soft); color: var(--accent-text) !important; font-weight: 600; }
.pagination__gap { padding: 0 4px; color: var(--muted); }
.btn.is-disabled { opacity: 0.45; pointer-events: none; }
.chip {
	display: inline-flex; align-items: center; height: 30px; padding: 0 12px;
	border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
	color: var(--text-2) !important; font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap;
	transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease);
}
.chip:hover { border-color: var(--border-strong); color: var(--text) !important; }
.chip.is-active { background: var(--text); border-color: var(--text); color: var(--surface) !important; }
.segmented {
	display: inline-flex; gap: 2px; padding: 3px; max-width: 100%; overflow-x: auto;
	background: var(--surface-3); border-radius: 10px; scrollbar-width: none;
}
.segmented__item {
	display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 7px;
	color: var(--text-2) !important; font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap;
}
.segmented__item:hover { color: var(--text) !important; }
.segmented__item.is-active { background: var(--surface); color: var(--text) !important; box-shadow: var(--shadow-sm); }

/* ── Tables ─────────────────────────────────────────────────────────────────────────────── */
/* position: relative keeps visually-hidden (absolute) text inside the scroll box, so it cannot widen the page. */
.table-wrap { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.table th, .table td { padding: 12px 16px; text-align: start; vertical-align: middle; }
.table thead th {
	position: sticky; top: 0; z-index: 2;
	background: var(--surface-2);
	border-bottom: 1px solid var(--border);
	color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: 0.01em; white-space: nowrap;
	padding-top: 10px; padding-bottom: 10px;
}
.table td, .table tbody th[scope="row"], .table tbody th[scope="rowgroup"] { border-bottom: 1px solid var(--border); }
.table tbody tr:last-child td, .table tbody tr:last-child th[scope="row"] { border-bottom: 0; }
.table tbody tr { transition: background-color 0.12s var(--ease); }
.table tbody tr:hover > td,
.table tbody tr:hover > th[scope="row"] { background: var(--surface-2); }
.table .group-row th {
	background: var(--surface-2); border-bottom: 1px solid var(--border);
	font-size: 13px; font-weight: 600; padding-top: 9px; padding-bottom: 9px;
}
.table tbody tr:not(:first-child).group-row th { border-top: 1px solid var(--border); }
.table .group-row a { display: inline-flex; align-items: center; gap: 6px; color: var(--text) !important; text-decoration: none; }
.table .group-row a:hover { color: var(--accent-text) !important; }
.table .group-row a .icon { color: var(--muted); }
.row-actions { text-align: end; white-space: nowrap; width: 1%; }
.table--sites td, .table--sites th[scope="row"], .table--sites th[scope="rowgroup"] { padding-block: 8px; }
.table--sites .site-cell { font-weight: 600; text-align: start; white-space: nowrap; }
.site-link { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; color: var(--text) !important; text-decoration: none; }
/* Long addresses (a site in a sub-folder) are cut with an ellipsis; the full address is in the title. */
.site-link__text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-link .icon { flex-shrink: 0; }
.site-link:hover { color: var(--accent-text) !important; }
.site-link .icon { color: var(--muted); }
.table--sites .site-cell .cell-note { font-weight: 400; margin-top: 1px; }
.table--sites .site-cell[rowspan] { vertical-align: top; padding-top: 14px; }
.table--sites .product-cell { color: var(--text-2); white-space: nowrap; }
.actions--row { flex-wrap: nowrap; gap: 6px; }
.actions--row .inline-form { display: inline-flex; margin: 0; }
.actions--row .btn { flex: none; }
.cell-note { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.cell-note--bad { color: var(--bad); }
.table--users .user-cell { text-align: start; }
.user-cell__name { display: block; font-weight: 500; }
.role-help { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); }
.role-help strong { color: var(--text-2); font-weight: 500; }
.cell-note--good { display: flex; align-items: center; gap: 4px; color: var(--good); }
.cell-url { font-weight: 500; overflow-wrap: anywhere; min-width: 160px; }
[dir="rtl"] td.cell-url[dir="ltr"] { text-align: right; }
.tag { font-family: var(--font-mono); font-size: 12px !important; background: var(--surface-3); padding: 2px 7px !important; border-radius: 5px; white-space: nowrap; }
.changelog-cell { max-width: 340px; min-width: 180px; }
.changelog { color: var(--muted); font-size: 13px; line-height: 1.5; }
.changelog summary { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; cursor: pointer; list-style: none; }
.changelog summary::-webkit-details-marker { display: none; }
.changelog__preview { align-self: stretch; contain: inline-size; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.changelog__toggle { flex: none; color: var(--accent); font-size: 12px; font-weight: 500; }
.changelog summary:hover .changelog__toggle { text-decoration: underline; }
.changelog summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.changelog[open] .changelog__preview { display: none; }
.changelog[open] .changelog__toggle::before { content: "הסתר "; }
.changelog[open] .changelog__toggle { font-size: 0; }
.changelog[open] .changelog__toggle::before { font-size: 12px; }
.changelog__full { white-space: pre-line; margin-top: 2px; max-height: 240px; overflow: auto; }
.count { font-weight: 600; font-variant-numeric: tabular-nums; }
.count--zero { color: var(--muted); font-weight: 400; }
.col-check { width: 44px; }
.table--select label { cursor: pointer; font-weight: 500; }
.table--select tr.is-selected > td { background: var(--accent-soft); }

/* Status pills */
.impact-badge {
	display: inline-flex; align-items: center; gap: 6px;
	height: 22px; padding: 0 9px; border-radius: 999px;
	background: var(--neutral-soft); color: var(--text-2);
	font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap; vertical-align: middle;
}
.impact-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.85; flex-shrink: 0; }
.impact-badge--success, .impact-badge--up_to_date, .impact-badge--active, .impact-badge--published, .impact-badge--done { background: var(--good-soft); color: var(--good); }
.impact-badge--failed, .impact-badge--unreachable, .impact-badge--blocked, .impact-badge--timeout, .impact-badge--incompatible { background: var(--bad-soft); color: var(--bad); }
.impact-badge--update_available { background: var(--warn-soft); color: var(--warn); }
.impact-badge--sent, .impact-badge--sending, .impact-badge--running, .impact-badge--ready { background: var(--accent-soft); color: var(--accent-text); }
.impact-badge--running::before, .impact-badge--sending::before, .impact-badge--sent::before { animation: pulse 1.4s ease-in-out infinite; }
.impact-badge--withdrawn { text-decoration: line-through; text-decoration-thickness: 1px; }
.impact-badge--totp_on { background: var(--good-soft); color: var(--good); }
.impact-badge--totp_off { background: var(--warn-soft); color: var(--warn); }
.impact-badge--disabled { background: var(--neutral-soft); color: var(--muted); }
.impact-badge--invited { background: var(--accent-soft); color: var(--accent-text); }
/* Roles: a plain pill without the status dot. */
.impact-badge--role::before { display: none; }
.impact-badge--role-system_admin { background: var(--accent-soft); color: var(--accent-text); }
.impact-badge--role-team_manager { background: var(--good-soft); color: var(--good); }
.impact-badge--role-client_manager, .impact-badge--role-none { background: var(--neutral-soft); color: var(--text-2); }

.tallies { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.tally { display: inline-flex; align-items: center; gap: 6px; }
.tally__n { font-weight: 600; font-variant-numeric: tabular-nums; font-size: 13px; }

/* ── Empty states and callouts ──────────────────────────────────────────────────────────── */
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 52px 24px; text-align: center; }
.empty-state__icon {
	width: 48px; height: 48px; margin-bottom: 8px; border-radius: 14px;
	display: grid; place-items: center;
	background: var(--surface-3); color: var(--muted);
	box-shadow: inset 0 0 0 1px var(--border);
}
.empty-state__icon .icon { width: 22px; height: 22px; }
.empty-state__title { font-size: 16px; font-weight: 600; color: var(--text); margin: 0 !important; max-width: 520px; }
.empty-state__text { color: var(--muted); max-width: 460px; margin: 0 !important; }
.empty-state__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }

.callout {
	display: flex; align-items: flex-start; gap: 10px;
	padding: 12px 14px; margin-bottom: 16px; border-radius: var(--radius-sm);
	background: var(--accent-soft); color: var(--accent-text);
}
.callout .icon { margin-top: 1px; }
.callout p { margin: 0; }
.callout--error { background: var(--bad-soft); color: var(--bad); }

.status-line { display: inline-flex; align-items: center; gap: 8px; margin: 0 !important; }
.status-line--good { color: var(--good); }
.status-line--bad { color: var(--bad); }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.key-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

/* ── Key/value list (profile: 2FA status) ──────────────────────────────────────────────── */
.kv-list { display: flex; flex-direction: column; gap: 10px; margin: 0 0 18px; }
.kv-list > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.kv-list dt { font-size: 13px; font-weight: 500; color: var(--muted); margin: 0; }
.kv-list dd { font-size: 14px; color: var(--text); margin: 0; }

/* ── Copyable values ────────────────────────────────────────────────────────────────────── */
.copyable {
	display: flex; align-items: center; gap: 8px;
	margin: 6px 0;
	padding: 5px; padding-inline-start: 12px;
	background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.copyable code { flex: 1; min-width: 0; background: none; padding: 0; font-size: 13px; color: var(--text); text-align: left; }
.copyable--token code, .copyable--secret code { font-size: 14px; letter-spacing: 0.02em; }
.copy-btn.is-copied { color: var(--good) !important; border-color: var(--good); }

/* ── Forms ──────────────────────────────────────────────────────────────────────────────── */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field__label { font-size: 13px; font-weight: 500; color: var(--text); margin: 0 !important; }
.field__help { font-size: 12.5px; color: var(--muted); margin: 0 !important; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.form-actions--center { justify-content: center; }
.form--inline { flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
.form--inline .field { flex: 1 1 220px; }
.form--inline .form-actions { padding-top: 25px; }
.form--narrow { max-width: 440px; }
/* The install dialog: its fields in one column, the sites in a short scrolling list. */
.install-dialog .modal__body { display: flex; flex-direction: column; gap: 16px; }
.install-dialog .modal__actions { margin-top: 2px; }
.picker__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.picker { max-height: 260px; overflow-y: auto; border: 1px solid var(--border); border-radius: 12px; }
.table--picker th, .table--picker td { padding: 8px 12px; }
.table--picker thead th { position: sticky; top: 0; z-index: 1; background: var(--surface-2, var(--surface)); }
.table--picker tbody tr:last-child td { border-bottom: 0; }
.table--picker label { cursor: pointer; }
/* Two cards side by side, half and half; one column on narrow screens. */
.card-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: stretch; margin-bottom: 16px; }
.card-pair > .card { margin: 0; }
@media (max-width: 900px) { .card-pair { grid-template-columns: minmax(0, 1fr); } }

.impact-hub input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.impact-hub textarea,
.impact-hub select {
	width: 100%; min-height: 38px; padding: 8px 12px;
	font: inherit; font-size: 14px; color: var(--text);
	background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
	box-shadow: var(--shadow-sm);
	transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.impact-hub textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.impact-hub select {
	-webkit-appearance: none; appearance: none; cursor: pointer;
	padding-inline-end: 38px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-size: 16px 16px;
	background-position: left 12px center;
}
[dir="ltr"] .impact-hub select, .impact-hub select[dir="ltr"] { background-position: right 12px center; }
.impact-hub select:hover:not(:focus) { border-color: var(--muted); }
.impact-hub input::placeholder, .impact-hub textarea::placeholder { color: var(--muted); opacity: 0.8; }
.impact-hub input:hover:not(:focus), .impact-hub textarea:hover:not(:focus) { border-color: var(--muted); }
.impact-hub input:focus, .impact-hub textarea:focus, .impact-hub select:focus {
	outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring);
}
.impact-hub input[type="checkbox"], .impact-hub input[type="radio"] { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.impact-hub input[type="file"] {
	width: 100%; font: inherit; font-size: 13px; color: var(--muted);
	padding: 6px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-2);
}
.impact-hub input[type="file"]::file-selector-button {
	font: inherit; font-size: 13px; font-weight: 500; color: var(--text);
	height: 30px; padding: 0 12px; margin-inline-end: 10px;
	border: 1px solid var(--border-strong); border-radius: 7px; background: var(--surface); cursor: pointer;
}
.impact-hub input.mono { font-family: var(--font-mono); font-size: 13px; }
.impact-hub input:read-only { background: var(--surface-2); color: var(--muted); cursor: default; }

.fieldset { margin: 0; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.fieldset legend { display: inline-flex; align-items: center; gap: 8px; padding: 0 6px; font-weight: 600; }
.fieldset legend .icon { color: var(--muted); width: 16px; height: 16px; }
.choice-group { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice {
	display: flex; align-items: flex-start; gap: 10px; padding: 12px;
	border: 1px solid var(--border-strong); border-radius: var(--radius-sm); cursor: pointer;
	transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease);
}
.choice input { margin-top: 2px !important; }
.choice:hover { border-color: var(--muted); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.choice__body { display: flex; flex-direction: column; gap: 2px; }
.choice__title { font-weight: 500; }
.choice__text { font-size: 12.5px; color: var(--muted); }

/* ── Flash messages ─────────────────────────────────────────────────────────────────────── */
.toasts { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.toast {
	--tone: var(--accent);
	display: flex; align-items: flex-start; gap: 12px;
	padding: 12px; padding-inline-start: 14px;
	background: var(--surface); border: 1px solid var(--border); border-inline-start: 3px solid var(--tone);
	border-radius: var(--radius); box-shadow: var(--shadow);
	animation: toast-in 0.28s var(--ease);
}
.toast--success { --tone: var(--good); }
.toast--error { --tone: var(--bad); }
.toast--warning { --tone: var(--warn); }
.toast__icon { color: var(--tone); margin-top: 1px; display: flex; }
.toast__body { flex: 1; min-width: 0; padding-top: 1px; }
.toast__body p { margin: 0 0 6px; }
.toast__body p:last-child { margin: 0; }
.toast__title { font-weight: 600; }
.toast__hint { font-weight: 400; color: var(--muted); font-size: 13px; }
.toast__close {
	width: 28px; height: 28px; margin: -3px 0; flex-shrink: 0;
	display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent;
	color: var(--muted); cursor: pointer;
}
.toast__close:hover { background: var(--surface-3); color: var(--text); }
.toast__close .icon { width: 16px; height: 16px; }
.toast.is-leaving { opacity: 0; transform: translateY(-4px); transition: opacity 0.18s, transform 0.18s; }

/* ── Confirm dialog ─────────────────────────────────────────────────────────────────────── */
dialog.confirm {
	width: min(420px, calc(100vw - 32px)); padding: 0;
	color: var(--text); background: var(--surface);
	border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg);
}
dialog.confirm[open] { animation: dialog-in 0.2s var(--ease); }
dialog.confirm::backdrop { background: rgba(12, 12, 16, 0.45); backdrop-filter: blur(2px); }
.confirm__body { display: flex; gap: 14px; padding: 22px 22px 6px; }
.confirm__icon {
	width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%;
	display: grid; place-items: center;
	background: var(--accent-soft); color: var(--accent-text); font-weight: 700; font-size: 18px;
}
.confirm--danger .confirm__icon { background: var(--bad-soft); color: var(--bad); }
.confirm__title { font-size: 16px; font-weight: 600; margin: 2px 0 4px; }
.confirm__text { color: var(--text-2); margin: 0; }
.confirm__actions { display: flex; justify-content: flex-end; gap: 8px; padding: 18px 22px 20px; }

/* Modal dialog (data-dialog-open / data-dialog-close in admin.js). */
dialog.modal {
	width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; overflow: auto;
	color: var(--text); background: var(--surface);
	border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg);
}
dialog.modal[open] { animation: dialog-in 0.2s var(--ease); }
dialog.modal::backdrop { background: rgba(12, 12, 16, 0.45); backdrop-filter: blur(2px); }
dialog.modal--sm { width: min(440px, calc(100vw - 32px)); }
.site-cell dialog.modal { font-weight: 400; white-space: normal; text-align: start; }
dialog.modal:not(:modal)[open] { position: static; margin: 0 0 20px; width: auto; }
.modal__head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 0; }
.modal__head h2 { margin: 0 0 2px; font-size: 17px; }
.modal__head p { margin: 0; }
.modal__close { margin-inline-start: auto; }
.modal__body { padding: 18px 22px 22px; }
.modal__actions { display: flex; gap: 8px; margin-top: 18px; }

/* ── Live push ──────────────────────────────────────────────────────────────────────────── */
.progress-card { padding: 20px; }
.progress-card__top { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.progress-card__pct { font-size: 32px; font-weight: 600; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.progress-card__state { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.progress-card .tallies { margin-top: 16px; }
progress.progress {
	display: block; width: 100%; height: 10px;
	border: 0; border-radius: 999px; overflow: hidden;
	background: var(--surface-3);
	-webkit-appearance: none; appearance: none;
}
progress.progress::-webkit-progress-bar { background: var(--surface-3); border-radius: 999px; }
progress.progress::-webkit-progress-value { background: var(--accent); border-radius: 999px; transition: width 0.4s var(--ease); }
progress.progress::-moz-progress-bar { background: var(--accent); border-radius: 999px; }
progress.progress.is-running::-webkit-progress-value {
	background-image: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.2) 0 8px, transparent 8px 16px);
	background-size: 23px 23px;
	animation: stripes 0.9s linear infinite;
}

/* Canary selection */
.sticky-actions {
	position: sticky; bottom: 16px; z-index: 5;
	display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
	padding: 12px 16px; margin-top: -4px;
	background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
}

/* Settings */
/* Settings use the full content width, like every other page. */

/* ── Login, 2FA, installer ──────────────────────────────────────────────────────────────── */
body.impact-hub--bare {
	background-color: var(--bg);
	background-image:
		radial-gradient(ellipse 80% 50% at 50% -10%, var(--accent-soft), transparent 70%),
		radial-gradient(var(--dot) 1px, transparent 1px);
	background-size: auto, 22px 22px;
	background-attachment: fixed;
}
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 16px; outline: none; }
.auth__inner { width: 100%; max-width: 560px; }
.auth__brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 24px; }
.auth__brand .impact-logo { width: 36px; height: 36px; }
.auth__brand .wordmark { font-size: 20px; }
.auth .toasts { max-width: 420px; margin-inline: auto; }
.auth-card {
	max-width: 420px; margin: 0 auto; padding: 32px;
	background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
	box-shadow: var(--shadow-lg);
	animation: rise 0.35s var(--ease);
}
.auth-card--wide { max-width: 560px; }
.auth-card--center { text-align: center; }
.auth-card h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 6px; }
.auth-card__sub { color: var(--muted); margin: 0 0 22px !important; }
.auth-card__icon {
	width: 44px; height: 44px; margin-bottom: 16px; border-radius: 12px;
	display: inline-grid; place-items: center;
	background: var(--accent-soft); color: var(--accent-text);
}
.auth-card__icon .icon { width: 22px; height: 22px; }
.auth-card__alt { margin-top: 16px; text-align: center; }
.auth__foot { text-align: center; color: var(--muted); font-size: 12px; margin: 22px 0 0 !important; }
.otp-input { font-family: var(--font-mono) !important; font-size: 22px !important; letter-spacing: 0.4em; text-align: center; min-height: 52px !important; }
.qr-block { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 20px; margin-bottom: 22px; }
.qr {
	width: 226px; height: 226px; padding: 12px; flex-shrink: 0;
	background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
}
.qr img, .qr canvas { display: block; width: 200px; height: 200px; }
.qr-block__manual { flex: 1 1 220px; min-width: 0; }
.qr-block__manual .field__label { margin-bottom: 6px !important; }

/* ── Motion ─────────────────────────────────────────────────────────────────────────────── */
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 100% { opacity: 0.9; } 50% { opacity: 0.25; } }
@keyframes stripes { from { background-position: 0 0; } to { background-position: 23px 0; } }
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ── Responsive ─────────────────────────────────────────────────────────────────────────── */

@media (max-width: 1080px) {
	.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
	.app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
	.sidebar {
		position: sticky; top: 0; z-index: 30; height: auto;
		flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0;
		padding: 8px 12px 0;
		border-inline-end: 0; border-bottom: 1px solid var(--border);
		background: var(--sidebar);
	}
	.brand { padding: 4px; flex: 1; min-width: 0; }
	.impact-logo { width: 28px; height: 28px; }
	.user-menu { margin: 0; }
	.sidebar__user { padding: 0; border: 0; gap: 6px; }
	.user-meta { display: none; }
	.avatar { width: 30px; height: 30px; font-size: 12px; }
	.user-menu__popover {
		bottom: auto; top: calc(100% + 6px);
		inset-inline-start: auto; inset-inline-end: 0;
		min-width: 180px;
	}
	.nav { order: 3; flex-basis: 100%; flex-direction: row; gap: 0; margin-top: 6px; }
	.nav__item {
		flex: 1 1 0; min-width: 0; flex-direction: column; gap: 3px;
		padding: 7px 2px 8px; border-radius: 0;
		font-size: 12px; justify-content: center;
		border-bottom: 2px solid transparent;
	}
	.nav__item:hover { background: transparent; }
	.nav__item.is-active { background: transparent; box-shadow: none; border-bottom-color: var(--accent); color: var(--accent-text) !important; }
	.main__inner { padding: 20px 16px 56px; }
	.page-header h1 { font-size: 21px; }
	.page-header__actions { width: 100%; }
	.page-header__actions > * { flex: 1 1 auto; }
	.page-header__actions .btn { width: 100%; }
	.btn { max-width: 100%; }
	.btn:not(.btn--sm):not(.btn--icon) {
		height: auto; min-height: 38px; padding-top: 8px; padding-bottom: 8px;
		white-space: normal; flex-wrap: wrap; text-align: center; line-height: 1.3;
	}
	.stats { gap: 10px; }
	.stat { padding: 12px; gap: 10px; }
	.stat__icon { width: 34px; height: 34px; border-radius: 9px; }
	.stat__icon .icon { width: 18px; height: 18px; }
	.stat__value { font-size: 22px; }
	.stat__label { font-size: 12px; }
	.form-grid, .choice-group { grid-template-columns: minmax(0, 1fr); }
	.form--inline .form-actions { padding-top: 0; }
	.card__head { padding: 16px 16px 12px; }
	.card__body { padding: 0 16px 16px; }
	.card > .form { padding: 0 16px 16px; }
	.table th, .table td { padding: 10px 12px; }
	.empty-state { padding: 40px 16px; }
	.auth-card { padding: 24px 20px; border-radius: 16px; }
	.progress-card { padding: 16px; }
}

.main__inner.is-loading { opacity: .55; transition: opacity .15s; pointer-events: none; }

/* Row "more" menu (releases): the panel is positioned by admin.js (fixed) so table scrolling never clips it. */
.row-menu { position: relative; display: inline-block; }
.row-menu > summary { list-style: none; }
.row-menu > summary::-webkit-details-marker { display: none; }
.row-menu[open] > summary { background: var(--surface-3); }
.row-menu__panel {
	position: fixed; z-index: 60; min-width: 210px;
	display: flex; flex-direction: column; gap: 2px; padding: 6px;
	background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
	box-shadow: var(--shadow); animation: rise 0.12s var(--ease);
}
.row-menu__panel .inline-form { display: block; margin: 0; }
.row-menu__item {
	display: flex; align-items: center; gap: 10px; width: 100%;
	padding: 8px 10px; border: 0; border-radius: 7px; background: transparent;
	color: var(--text) !important; text-decoration: none !important;
	font: inherit; font-size: 14px; font-weight: 500; white-space: nowrap;
	cursor: pointer; text-align: start; transition: background-color 0.15s var(--ease);
}
.row-menu__item .icon { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.row-menu__item:hover { background: var(--surface-3); }
.row-menu__item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.download-menu > summary { cursor: pointer; }
.product-menu > summary { cursor: pointer; gap: 6px; }
.product-menu__chevron { transition: transform 0.15s var(--ease); }
.product-menu[open] .product-menu__chevron { transform: rotate(180deg); }
.product-menu .row-menu__panel { min-width: 220px; max-height: 60vh; overflow-y: auto; }
.product-menu__mark { width: 16px; display: inline-flex; justify-content: center; color: var(--accent-text); font-weight: 700; }
.product-menu .row-menu__item.is-active { background: var(--accent-soft); }
.download-menu__chevron { transition: transform 0.15s var(--ease); }
.download-menu[open] .download-menu__chevron { transform: rotate(180deg); }
.download-menu .row-menu__item { white-space: nowrap; }
.download-menu .row-menu__item .btn__meta { margin-inline-start: auto; }
.row-menu__item--danger, .row-menu__item--danger .icon { color: var(--bad) !important; }
.row-menu__item--danger:hover { background: var(--bad-soft); }
/* An entry that cannot be used here, with its reason at the end of the line. */
.row-menu__item[disabled] { cursor: not-allowed; color: var(--muted) !important; }
.row-menu__item[disabled]:hover { background: transparent; }
.row-menu__note { margin-inline-start: auto; padding-inline-start: 12px; font-size: 12px; font-weight: 400; color: var(--muted); }
/* An item's own menu sits after its update button, next to the chevron, in the same place with or without a button. */
.table .item-group__row td.row-actions { text-align: end; }
.item-group__row .row-actions .row-menu { margin-inline-start: 4px; vertical-align: middle; }

.sep { display: inline-block; width: 1px; height: 0.9em; margin: 0 10px; background: var(--border); vertical-align: -0.1em; }

/* ── In-place edit (native <details>, no JS): product names, host labels ─────────────────── */
.inline-edit { display: inline-block; }
.inline-edit > summary { list-style: none; cursor: pointer; }
.inline-edit > summary::-webkit-details-marker { display: none; }
.inline-edit[open] > summary { background: var(--surface-3); }
.inline-edit__panel { margin-top: 8px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); text-align: start; min-width: 260px; }
.inline-edit__panel .form { gap: 10px; }

/* ── IMPACT Site Manager: updates, plugins and themes ─────────────────────────────────── */
.group-row__inner { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
.group-row__inner .tag { font-weight: 400; }
.item-cell { display: flex; flex-direction: column; gap: 2px; }
.table--updates td { vertical-align: middle; }
.inline-field { display: inline-flex; align-items: center; gap: 8px; }
.inline-field select { width: auto; min-width: 180px; }
.run-note { margin: -8px 0 16px !important; }
.run-note:empty { display: none; }
.search-form { display: flex; gap: 8px; align-items: center; flex: 1 1 200px; max-width: 360px; }
.search-form input[type="search"] { flex: 1; min-width: 0; }
.site-list summary { flex-direction: row; align-items: center; gap: 10px; }
.site-list__items { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.site-list__items li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.site-meta .inline-edit__panel { position: absolute; z-index: 20; box-shadow: var(--shadow-lg); }
.site-meta .inline-edit { position: relative; }
.kv-list--grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 24px; margin: 0; }
.kv-list--grid > div { flex-direction: column; align-items: flex-start; gap: 2px; }
.impact-badge--queued { background: var(--neutral-soft); color: var(--text-2); }
.impact-badge--rolled_back, .impact-badge--needs_file_access, .impact-badge--abandoned { background: var(--warn-soft); color: var(--warn); }
.impact-badge--skipped, .impact-badge--inactive_item { background: var(--neutral-soft); color: var(--muted); }
.impact-badge--in_progress { background: var(--accent-soft); color: var(--accent-text); }
.impact-badge--in_progress::before { animation: pulse 1.4s ease-in-out infinite; }

/* ── IMPACT Site Manager (stage 2) ──────────────────────────────────────────────────────── */
.impact-badge--up, .impact-badge--healthy, .impact-badge--license-active { background: var(--good-soft); color: var(--good); }
.impact-badge--down, .impact-badge--problem, .impact-badge--license-expired { background: var(--bad-soft); color: var(--bad); }
.impact-badge--flaky, .impact-badge--maintenance, .impact-badge--license-inactive, .impact-badge--license-soon { background: var(--warn-soft); color: var(--warn); }
.impact-badge--license-unknown { background: var(--neutral-soft); color: var(--muted); }
a.impact-badge { text-decoration: none; }
.tag--auto { background: var(--good-soft); color: var(--good); }
.tag--approval { background: var(--warn-soft); color: var(--warn); }
.tag--excluded { background: var(--neutral-soft); color: var(--muted); }
/* Signs of a break-in (SecurityScan): the most severe state, in red. */
.impact-badge--security, .tag--suspicious { background: var(--bad-soft); color: var(--bad); }
.impact-hub a.impact-badge--security { color: var(--bad); }
.tag--suspicious { font-family: inherit; }
.finding-list { list-style: none; margin: 0 0 12px; padding: 0; }
.finding + .finding { margin-top: 10px; }
.finding .muted { margin: 2px 0 0; padding-inline-start: 26px; }
.admin-login { display: flex; align-items: center; gap: 6px; min-width: 0; }
.table .row--warn td { background: var(--warn-soft); }
.table--nested { margin-top: 6px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.table--nested th, .table--nested td { font-size: 13px; }
.run-block { margin-bottom: 20px; }
.run-block__head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 10px; }
.run-block__head h2 { margin: 0; font-size: 18px; }
.notice-line { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; color: var(--text-2); font-size: 13px; }
.notice-line .icon { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.problem-list { list-style: none; margin: 0 0 10px; padding: 0; }
.install-panel { position: relative; }
.install-panel .inline-edit__panel { position: absolute; inset-inline-end: 0; z-index: 25; width: min(420px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); }

/* ── Phones: the top bar and the sidebar as a drawer ────────────────────────────────────── */
@media (max-width: 860px) {
	.topbar {
		display: flex; align-items: center; justify-content: space-between; gap: 8px;
		position: sticky; top: 0; z-index: 30;
		padding: 6px 12px; min-height: 56px;
		background: var(--sidebar); border-bottom: 1px solid var(--border);
	}
	.brand--top { padding: 4px; }
	.topbar__menu {
		display: inline-flex; align-items: center; justify-content: center;
		width: 44px; height: 44px; border: 0; border-radius: var(--radius-sm);
		background: transparent; color: var(--text); cursor: pointer;
	}
	.topbar__menu:hover { background: var(--surface-3); }
	.topbar__menu:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
	.topbar__menu .icon { width: 24px; height: 24px; }
	/* Scripted pages: the sidebar is an off-canvas drawer from the right. */
	.js .sidebar {
		position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 50;
		width: min(300px, 86vw); height: 100%;
		flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 4px;
		padding: 12px; overflow-y: auto;
		border-bottom: 0; border-inline-end: 1px solid var(--border);
		box-shadow: var(--shadow-lg);
		transform: translateX(100%); visibility: hidden;
		transition: transform 0.25s var(--ease), visibility 0s linear 0.25s;
	}
	.js .sidebar.is-open { transform: none; visibility: visible; transition: transform 0.25s var(--ease), visibility 0s; }
	.js .sidebar .brand { flex: 1; }
	.js .sidebar .drawer-close { display: inline-flex; width: 44px; height: 44px; }
	.js .drawer-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(15, 15, 20, 0.45); }
	.js .nav { order: 0; flex-basis: auto; flex-direction: column; margin-top: 8px; }
	.js .nav__item {
		flex: 0 0 auto; flex-direction: row; gap: 10px; min-height: 44px;
		padding: 8px 10px; border-radius: var(--radius-sm); border-bottom: 0;
		font-size: 15px; justify-content: flex-start;
	}
	.js .nav__item.is-active { background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--border); }
	.js .user-menu { margin-top: auto; }
	.js .user-meta { display: flex; }
	.js .user-menu__popover { top: auto; bottom: calc(100% + 6px); inset-inline-end: auto; inset-inline-start: 0; }
	body.drawer-open { overflow: hidden; }
	/* Without JavaScript the menu is the sidebar above the content, every item reachable. */
	html:not(.js) .topbar { display: none; }
	html:not(.js) .sidebar { flex-direction: column; align-items: stretch; height: auto; position: static; }
	html:not(.js) .nav { flex-direction: column; }
	html:not(.js) .nav__item { flex-direction: row; font-size: 14px; }
}
@media (max-width: 860px) and (prefers-reduced-motion: reduce) {
	.js .sidebar, .js .sidebar.is-open { transition: none; }
}

/* ── Tables that always fit ─────────────────────────────────────────────────────────────── */
/*
 * Every table fits its card at every width, the same way on every page:
 * - the browser shares the width between the columns (auto layout), and words never break in the middle, so
 *   versions, numbers, slugs and badges stay whole;
 * - long values (addresses, names, messages) are cut (.trunc, .site-link__text) at a fixed width, or wrap between
 *   words, so no text can push the table wider;
 * - lower-priority columns step aside on narrower screens: data-priority="4" at 1280px, "3" at 1100px, "2" at 960px;
 * - on phones (640px and less) rows become small cards, each value with its column's name (data-label, admin.js).
 * The scroll box of .table-wrap stays only as a last-resort safety net.
 */
.table td, .table tbody th { overflow-wrap: normal; word-break: normal; }
.table .cell-note { overflow-wrap: normal; }
/* An error message may break a long address anywhere, but never gets narrower than a readable line. */
.table .cell-note--bad { overflow-wrap: anywhere; min-width: 180px; }
.table td.col-grow.wrap-anywhere, .table .col-grow .wrap-anywhere { overflow-wrap: anywhere; }
/* The flexible column keeps a readable minimum; cut values inside it never ask for more (contain: inline-size
 * keeps their full text out of the column's size), so it can always give way. */
.table .col-grow { min-width: 180px; }
.table td.version-cell .trunc.mono { max-width: 110px; }
.table .col-grow .trunc, .table .site-col .site-link, .table .col-grow .site-link { contain: inline-size; }
.table .col-grow .site-link, .table .site-col .site-link { display: flex; }
/* The host name under an address sits in a flex line, where a contained box would shrink to nothing. */
.table .site-meta .trunc { contain: none; }
.table .admin-login .trunc { contain: none; }
/* A contained address asks for no width of its own, so the site column keeps a readable minimum. */
.table .site-col .site-link { min-width: 170px; }
/* The address is left-to-right text, but in a Hebrew page it starts at the right edge like the rest of the cell. */
[dir="rtl"] .table .col-grow .site-link, [dir="rtl"] .table .site-col .site-link { justify-content: flex-end; }
/* The same for every left-to-right block in a table (a cut address, a slug, a message): it starts at the right. */
[dir="rtl"] .table [dir="ltr"], [dir="rtl"] .table .mono { text-align: right; }
.trunc { display: block; max-width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Outside the flexible column a cut text needs a fixed limit: a percentage cannot bound a table column. */
.table td:not(.col-grow) .trunc { max-width: 160px; }
.table .tag--wrap { white-space: nowrap; }
.table .site-col .site-link { max-width: 220px; }
.table .site-col .tag { margin-inline-start: 6px; }
.item-name {
	display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
	max-width: 440px; font-weight: 600; overflow-wrap: anywhere;
}
.item-col .item-name { max-width: 240px; }
.has-title { text-decoration: underline dotted; text-decoration-color: var(--border-strong); text-underline-offset: 3px; cursor: help; }
.badge-row { display: inline-flex; flex-wrap: nowrap; gap: 4px; }
.table tbody th[scope="row"] { font-weight: 400; }
/* A badge that is a link keeps its own color. */
.impact-hub a.impact-badge--update_available { color: var(--warn); }
.impact-hub a.impact-badge--problem, .impact-hub a.impact-badge--license-expired { color: var(--bad); }
.impact-badge--more { background: var(--neutral-soft); color: var(--text-2); }
.impact-badge--more::before { display: none; }
a.impact-badge:hover { filter: brightness(0.96); }
.toolbar--end { justify-content: flex-end; }
/* A header button never makes the page wider: its extra line (a version) is cut first. */
.page-header__actions { min-width: 0; max-width: 100%; }
.page-header__actions .btn { max-width: 100%; }
.page-header__actions .btn > span { min-width: 0; }
.btn__meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 1280px) {
	.table th, .table td { padding-inline: 12px; }
}
@media (max-width: 1280px) {
	.table [data-priority="4"] { display: none; }
}
@media (max-width: 1100px) {
	.table [data-priority="3"] { display: none; }
}
@media (max-width: 960px) {
	.table [data-priority="2"] { display: none; }
}

/* ── IMPACT Site Manager: the sites, plugins, themes and WordPress lists ────────────────── */
.table--managed .site-link { max-width: min(100%, 260px); font-weight: 600; }
.site-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; margin-top: 3px; font-size: 12px; font-weight: 400; color: var(--muted); }
.site-meta__host { display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 160px; }
.site-meta__link { display: inline-flex; align-items: center; gap: 3px; flex: none; color: var(--muted) !important; text-decoration: none !important; }
.site-meta__link:hover { color: var(--accent-text) !important; text-decoration: underline !important; }

.table--items .item-group__row { cursor: pointer; }
.table--items tbody > tr:last-child > td, .table--items tbody > tr:last-child > th { border-bottom: 1px solid var(--border); }
.table--items tbody:last-of-type > tr:last-child > td, .table--items tbody:last-of-type > tr:last-child > th { border-bottom: 0; }
.table--items .item-group__row .cell-note { margin-top: 2px; }
.item-site > td, .item-site > th { background: var(--surface-2); padding-block: 8px; font-size: 13px; }
.table tbody tr.item-site:hover > td { background: var(--surface-3); }
.item-site > .col-grow { padding-inline-start: 32px; }
.item-site__site { display: block; min-width: 0; }
html.js .item-group:not(.is-open) .item-site { display: none; }
.col-toggle { width: 1%; padding-inline-start: 0 !important; }
.item-toggle__icon { transition: transform 0.15s var(--ease); }
.item-group.is-open .item-toggle__icon { transform: rotate(180deg); }
.table--select label:not(.site-link) { display: block; }
.cell-min { min-width: 150px; }
/* A long message under a short value keeps a readable width instead of one word per line. */
.table .cell-note--bad { min-width: 170px; }

/* The update bar: shown once something is selected (admin.js), with "קודם באתר אחד". */
.sticky-actions__count { color: var(--text-2); font-weight: 500; }
html.js .sticky-actions--auto:not(.is-visible) { display: none; }
.sticky-actions--auto.is-visible { animation: slide-up 0.22s var(--ease); }
@keyframes slide-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.canary { display: flex; flex-direction: column; gap: 2px; flex: 1 1 300px; min-width: 0; }
.canary__toggle { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.canary__help { margin: 0 !important; padding-inline-start: 24px; font-size: 12px; color: var(--muted); }
.canary__pick { padding-inline-start: 24px; font-size: 12px; }
.canary__pick > summary { display: inline; list-style: none; cursor: pointer; color: var(--accent-text); }
.canary__pick > summary::-webkit-details-marker { display: none; }
.canary__pick > summary:hover { text-decoration: underline; }
.canary__pick[open] > summary { color: var(--muted); }
.canary__pick .inline-field { display: flex; margin-top: 6px; }
.canary__pick select { width: auto; min-width: 0; max-width: 100%; }
.canary:has(.canary__toggle input:not(:checked)) .canary__pick { display: none; }

/* ── Site actions: one form card per tab ────────────────────────────────────────────────── */
.form-card { padding: 22px 24px; display: flex; flex-direction: column; gap: 16px; }
.form-card .notice-line { margin: 0; }
.form-card__fields { display: flex; flex-direction: column; gap: 8px; }
.form-card__fields[hidden] { display: none; }
.form-card__text { margin: 0 !important; color: var(--text-2); }
.form-card__label { margin: 0 0 8px !important; font-size: 13px; font-weight: 600; color: var(--text); }
.form-card__group { display: flex; flex-direction: column; gap: 8px; }
.form-card__group .form-card__label { margin-bottom: 0 !important; }
.plain-list { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
[dir="rtl"] .plain-list[dir="ltr"] { justify-content: flex-end; }
.plain-list li { padding: 3px 10px; border-radius: 999px; background: var(--surface-3); color: var(--muted); font-size: 12.5px; }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; }
.check-line { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.impact-hub .input--narrow { width: 120px !important; max-width: 100%; }
.input-suffix { display: inline-flex; align-items: center; gap: 8px; }
.input-suffix__text { color: var(--muted); font-size: 13px; }
.pill-radios { display: inline-flex; flex-wrap: wrap; align-self: flex-start; gap: 2px; padding: 3px; max-width: 100%; background: var(--surface-3); border-radius: 999px; }
.pill-radio { position: relative; display: inline-flex; }
.pill-radio input { position: absolute; inset: 0; width: 100% !important; height: 100% !important; margin: 0; opacity: 0; cursor: pointer; }
.pill-radio span { display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.pill-radio input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.pill-radio input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ── Phones: every table as stacked cards ───────────────────────────────────────────────── */
@media (max-width: 640px) {
	.table, .table tbody, .table tr, .table td, .table tbody th { display: block; }
	.table thead tr { display: flex; }
	.table thead th { display: none; }
	.table thead th.col-check { display: flex; flex: 1; align-items: center; gap: 10px; width: 100%; padding: 10px 16px; color: var(--text-2); font-size: 13px; }
	.table thead th.col-check::after { content: attr(data-label); }
	.table thead:not(:has(.col-check)) { display: none; }
	.table tbody tr { position: relative; padding: 12px 16px; border-bottom: 1px solid var(--border); }
	.table tbody:last-of-type tr:last-child { border-bottom: 0; }
	.table tbody tr:hover > td, .table tbody tr:hover > th[scope="row"] { background: transparent; }
	.table td, .table tbody th { width: auto; max-width: none; min-width: 0; padding: 3px 0; border: 0 !important; text-align: start; white-space: normal; }
	.table tbody [data-priority] { display: block; }
	.table td[data-label]::before, .table tbody th[data-label]::before {
		content: attr(data-label); display: inline-block; min-width: 92px; margin-inline-end: 10px;
		color: var(--muted); font-size: 12px; font-weight: 400;
	}
	.table .col-grow { width: auto; max-width: none; min-width: 0; padding-inline-end: 44px; font-size: 14px; }
	.table .tag--wrap { white-space: normal; overflow-wrap: anywhere; }
	.table .col-grow::before, .table .row-actions::before, .table .col-toggle::before, .table .col-check::before { display: none !important; }
	.table tr:has(> .col-check) { padding-inline-start: 46px; }
	.table td.col-check { position: absolute; inset-inline-start: 16px; top: 14px; padding: 0; }
	.table td.row-actions, .table td.col-toggle { position: absolute; inset-inline-end: 10px; top: 8px; padding: 0; }
	.table td:empty:not(.col-check) { display: none; }
	.table .item-group__row td.row-actions { position: static; margin-top: 6px; text-align: start; }
	.table .item-group__row td.row-actions:empty { display: none; }
	.item-site > td, .item-site > th, .table tbody tr.item-site:hover > td { background: transparent; }
	.table tbody tr.item-site { background: var(--surface-2); padding-inline-start: 62px; }
	.table tbody tr.item-site > .col-check { inset-inline-start: 32px; }
	.item-site > .col-grow { padding-inline-start: 0; }
	.table .site-col .site-link, .table--managed .site-link, .item-name, .item-col .item-name { max-width: 100%; }
	.table .row-link td { padding: 3px 0; }
	.check-grid { grid-template-columns: minmax(0, 1fr); }
	.table .cell-note--bad, .cell-min, .wrap-anywhere { min-width: 0; }
	.badge-row { flex-wrap: wrap; }
	.form-card { padding: 18px 16px; }
	.sticky-actions { bottom: 8px; }
}

/* ── Overview: the numbers, what needs attention, the latest activity, the products, the Hub ── */
/* Four tiles a row (three when there are six); a last row that is not full shares the width, so the grid ends square. */
.kpis { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi {
	grid-column: span 3; position: relative; min-width: 0;
	display: flex; align-items: flex-start; gap: 14px;
	padding: 16px 18px;
	background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
	transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.kpi:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.kpi:has(.kpi__link:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.kpi__link:focus-visible { outline: 0; }
.kpi__icon {
	width: 40px; height: 40px; flex-shrink: 0; border-radius: 11px;
	display: grid; place-items: center;
	background: var(--surface-3); color: var(--text-2);
}
.kpi__icon .icon { width: 20px; height: 20px; }
.kpi__body { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.kpi__link { display: flex; flex-direction: column; gap: 2px; color: inherit !important; text-decoration: none !important; }
/* The whole tile opens the page; the line under the number may open a page of its own (above it). */
.kpi__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.kpi__value { font-size: 28px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.kpi__label { font-size: 13.5px; font-weight: 500; color: var(--text-2); }
.kpi__sub { font-size: 12px; color: var(--muted); }
.kpi__sub-link { position: relative; z-index: 1; color: inherit !important; text-decoration: underline !important; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent) !important; text-underline-offset: 3px; }
.kpi__sub-link:hover { text-decoration-color: currentColor !important; }
.kpi--bad { border-color: color-mix(in srgb, var(--bad) 30%, var(--border)); }
.kpi--bad .kpi__icon { background: var(--bad-soft); color: var(--bad); }
.kpi--bad .kpi__value, .kpi--bad .kpi__sub-link { color: var(--bad) !important; }
.kpi--warn .kpi__icon { background: var(--warn-soft); color: var(--warn); }
.kpi--warn .kpi__value, .kpi--warn .kpi__sub-link { color: var(--warn) !important; }
.kpi--good .kpi__icon { background: var(--good-soft); color: var(--good); }
@media (min-width: 961px) {
	.kpis--3 .kpi { grid-column: span 4; }
	.kpis:not(.kpis--3) .kpi:nth-child(4n+1):nth-last-child(2), .kpis:not(.kpis--3) .kpi:nth-child(4n+1):nth-last-child(2) ~ .kpi { grid-column: span 6; }
	.kpis:not(.kpis--3) .kpi:nth-child(4n+1):nth-last-child(3), .kpis:not(.kpis--3) .kpi:nth-child(4n+1):nth-last-child(3) ~ .kpi { grid-column: span 4; }
	.kpis:not(.kpis--3) .kpi:nth-child(4n+1):last-child { grid-column: span 12; }
}
@media (max-width: 960px) {
	.kpi { grid-column: span 6; }
	.kpi:nth-child(odd):last-child { grid-column: span 12; }
}
@media (max-width: 480px) {
	.kpis { gap: 10px; }
	.kpi, .kpi:nth-child(odd):last-child { grid-column: span 12; padding: 14px 16px; }
	.kpi__value { font-size: 24px; }
}

/* What needs attention and the activity: side by side, stacked once the halves would get too narrow. */
.overview-pair { margin-bottom: 20px; }
@media (max-width: 1100px) { .overview-pair { grid-template-columns: minmax(0, 1fr); } }
.card__icon--bad { background: var(--bad-soft); color: var(--bad); }
.card__icon--good { background: var(--good-soft); color: var(--good); }
.attn-list, .feed { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.attn + .attn, .feed__item + .feed__item { border-top: 1px solid var(--border); }
.attn__link {
	display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 20px;
	color: var(--text) !important; text-decoration: none !important;
	transition: background-color 0.12s var(--ease);
}
.attn__link:hover { background: var(--surface-2); }
.attn__link:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.attn__link > .impact-badge { flex: none; }
.attn__site { flex: 0 1 auto; min-width: 0; max-width: 48%; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attn__text { flex: 1 1 0; min-width: 0; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The chevron points down; turned a quarter it points to the start of a right-to-left line: "open". */
.attn__go { flex: none; color: var(--muted); transform: rotate(90deg); }
.attn__link:hover .attn__go { color: var(--text); }
.overview-more { margin: 0 !important; padding: 10px 20px; border-top: 1px solid var(--border); font-size: 12.5px; }
.overview-calm { display: flex; align-items: center; gap: 14px; margin: 0 20px 20px; padding: 18px; border-radius: var(--radius); background: var(--good-soft); color: var(--good); }
.overview-calm > .icon { width: 26px; height: 26px; flex: none; }
.overview-calm p { margin: 0 !important; }
.overview-calm .muted { color: var(--text-2); font-size: 13px; }
.overview-calm__title { font-size: 15px; font-weight: 600; }
.overview-calm--muted { background: var(--surface-2); color: var(--muted); }
.feed__item { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 9px 20px; }
.feed__icon { width: 30px; height: 30px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); }
.feed__icon .icon { width: 16px; height: 16px; }
.feed__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.feed__title { display: flex; gap: 4px; min-width: 0; font-weight: 500; color: var(--text) !important; text-decoration: none !important; white-space: nowrap; }
.feed__label { flex: none; }
.feed__label:only-child { flex: 0 1 auto; }
.feed__label:only-child, .feed__value { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* A left-to-right value keeps its beginning and is cut at its end, next to the label in a right-to-left line. */
[dir="rtl"] .feed__value[dir="auto"] { text-align: right; }
.feed__title:hover { color: var(--accent-text) !important; }
.feed__meta { display: flex; align-items: center; min-width: 0; font-size: 12px; color: var(--muted); }
.feed__time { flex: none; white-space: nowrap; }
.feed__meta .sep { flex: none; }
.feed__detail { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed__item > .impact-badge { flex: none; }
@media (max-width: 860px) {
	.attn__link, .feed__item { padding-inline: 16px; }
	.overview-calm { margin: 0 16px 16px; }
}
@media (max-width: 480px) {
	/* Phones: the badge and the site on the first line, what happened under them. */
	.attn__link { flex-wrap: wrap; gap: 4px 8px; }
	.attn__site { flex: 1 1 0; max-width: none; }
	.attn__text { flex: 1 0 100%; order: 3; }
	.attn__go { display: none; }
}

/* The products table and the Hub line under it. */
.table--products .product-link { display: block; font-weight: 600; color: var(--text) !important; text-decoration: none !important; }
.table--products .product-link:hover { color: var(--accent-text) !important; }
[dir="rtl"] .table--products .col-grow .trunc[dir="auto"] { text-align: right; }
.table--products .col-grow { width: 34%; }
.version-line, .push-line { display: inline-flex; align-items: center; gap: 8px; }
.table td:not(.col-grow) .version-line .trunc { max-width: 120px; }
.table .col-meter { width: 24%; }
.meter { display: flex; flex-direction: column; gap: 6px; min-width: 120px; max-width: 280px; }
.meter__text { display: flex; align-items: baseline; gap: 10px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.meter__n { font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.meter__older { color: var(--warn) !important; }
progress.progress--thin { height: 6px; }
progress.progress--done::-webkit-progress-value { background: var(--good); }
progress.progress--done::-moz-progress-bar { background: var(--good); }
.sys-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; padding: 2px 4px 8px; font-size: 12.5px; color: var(--muted); }
.sys-strip > * { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; color: var(--muted) !important; text-decoration: none !important; }
.sys-strip a:hover { color: var(--text) !important; text-decoration: underline !important; }
.sys-strip .sys-strip__warn { color: var(--warn) !important; font-weight: 500; }
/* Narrower: a version and its badge, or a time and its result, go one under the other instead of widening the table. */
@media (max-width: 1280px) {
	.version-line, .push-line { flex-wrap: wrap; gap: 4px 8px; }
}
@media (max-width: 640px) {
	.table .col-meter, .table--products .col-grow { width: auto; }
	.meter { min-width: 0; }
}
