/* stillorigin portal theme: matches stillorigin.net (design A, "dark instrument").
 * Source of truth for the palette and fonts: src/Stillorigin.Website/wwwroot/assets/css/site.css
 * (the :root block near the end) and css/public.css, which the public pages already use.
 *
 * The portal is dark only. App.razor puts class="dark" on <html> in the server HTML and the
 * theme-init script runs with storage off and dark as the default, so there is no light frame
 * and no saved light preference can come back. Both :root and .dark carry the same values so
 * nothing changes if the class is ever missing.
 *
 * BlazorBlueprint components read the shadcn variables below (--background, --primary, …).
 * Its own defaults sit in @layer base, so these unlayered values win.
 *
 * Fonts: Schibsted Grotesk + Martian Mono, self-hosted like the website, SIL OFL 1.1,
 * see ../fonts/LICENSES.txt. */
@font-face{font-family:"Schibsted Grotesk";src:url(../fonts/schibsted-grotesk-latin-wght-normal.woff2) format("woff2");font-weight:400 900;font-display:swap}
@font-face{font-family:"Martian Mono";src:url(../fonts/martian-mono-latin-300-normal.woff2) format("woff2");font-weight:300;font-display:swap}
@font-face{font-family:"Martian Mono";src:url(../fonts/martian-mono-latin-400-normal.woff2) format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:"Martian Mono";src:url(../fonts/martian-mono-latin-500-normal.woff2) format("woff2");font-weight:500;font-display:swap}

:root,
.dark {
	color-scheme: dark;

	/* Website palette (site.css). */
	--so-bg: #0e100f;
	--so-mod: #131614;
	--so-raise: #1a1d1b;
	--so-ink: #ebe8df;
	--so-ink-2: #a9aba3;
	--so-ink-3: #6e726c;
	--so-line: #242825;
	--so-line-2: #3a3f3b;
	--so-grid: #1f2320;
	--so-accent: #ff6b1a;
	--so-accent-text: #ff8a47;
	--so-accent-ink: #120a05;
	--so-accent-hover: #ff8a47;

	--background: var(--so-bg);
	--foreground: var(--so-ink);
	--card: var(--so-mod);
	--card-foreground: var(--so-ink);
	--popover: var(--so-mod);
	--popover-foreground: var(--so-ink);
	--primary: var(--so-accent);
	--primary-foreground: var(--so-accent-ink);
	--secondary: var(--so-raise);
	--secondary-foreground: var(--so-ink);
	--muted: var(--so-raise);
	/* ink-2, not ink-3: ink-3 is only 3.9:1 on the background, below WCAG AA for body text. */
	--muted-foreground: var(--so-ink-2);
	--accent: var(--so-grid);
	--accent-foreground: var(--so-ink);

	/* Status colours stay semantic (green / amber / red), tuned for the near-black surfaces. */
	--status-ok: #6ee7b7;
	--status-ok-bg: #0b2a20;
	--status-ok-chart: #6ee7b7;
	--status-warn: #fcd34d;
	--status-warn-bg: #2e2208;
	--status-warn-chart: #fcd34d;
	--status-danger: #fca5a5;
	--status-danger-bg: #331010;
	--status-danger-chart: #fca5a5;
	--status-info: #93c5fd;
	--status-info-bg: #0f1d33;
	--status-info-chart: #93c5fd;

	/* Charts: orange is the primary series (blocked traffic), a muted green the secondary
	   (allowed traffic, load, counts) instead of the washed-out grey. --chart-secondary is
	   8.2:1 on the cards (#131614) and --chart-secondary-2 5.4:1, both above WCAG AA. */
	--chart-secondary: #45c47c;
	--chart-secondary-2: #2f9e62;
	--chart-allowed: var(--chart-secondary);
	--chart-blocked: var(--so-accent);
	--chart-neutral: var(--chart-secondary);
	--firewall-rate-chart: var(--so-accent);
	--firewall-temp-chart: #ffb27a;
	--firewall-deny-chart: var(--so-ink);
	--firewall-conn-chart: var(--chart-secondary);
	--firewall-crawl-chart: var(--chart-secondary-2);

	/* A solid red with dark text, like the orange button: 6.9:1 as text on the background and
	   7:1 for its own label. Lighter than a classic #dc2626 so error text stays readable. */
	--destructive: #f87171;
	--destructive-foreground: #1a0606;
	/* BlazorBlueprint reuses --destructive-foreground for alert text; keep that light. */
	--alert-danger-foreground: #fecaca;

	--border: var(--so-line);
	--input: var(--so-line-2);
	--ring: var(--so-accent-text);
	--chart-1: var(--so-accent);
	--chart-2: var(--chart-secondary);
	--chart-3: #ffb27a;
	--chart-4: var(--chart-secondary-2);
	--chart-5: var(--so-ink);

	--font-sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
	--font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
	--font-mono: "Martian Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--bb-default-font-family: var(--font-sans);
	--bb-default-mono-font-family: var(--font-mono);

	--sidebar: var(--so-bg);
	--sidebar-foreground: var(--so-ink-2);
	--sidebar-primary: var(--so-accent);
	--sidebar-primary-foreground: var(--so-accent-ink);
	--sidebar-accent: var(--so-mod);
	--sidebar-accent-foreground: var(--so-ink);
	--sidebar-border: var(--so-line);
	--sidebar-ring: var(--so-accent-text);

	/* The website uses 2px corners on controls and square modules. */
	--radius: 0.125rem;

	/* Flat surfaces, like the website: no drop shadows on cards. */
	--shadow-x: 0;
	--shadow-y: 1px;
	--shadow-blur: 3px;
	--shadow-spread: 0px;
	--shadow-opacity: 0.4;
	--shadow-color: oklch(0 0 0);
	--shadow-2xs: none;
	--shadow-xs: none;
	--shadow-sm: none;
	--shadow: none;
	--shadow-md: 0 4px 12px rgb(0 0 0 / 0.45);
	--shadow-lg: 0 8px 24px rgb(0 0 0 / 0.5);
	--shadow-xl: 0 12px 32px rgb(0 0 0 / 0.55);
	--shadow-2xl: 0 16px 40px rgb(0 0 0 / 0.6);
	--bb-card-shadow: none;
	--bb-menu-shadow: 0 8px 24px rgb(0 0 0 / 0.5);
	--tracking-normal: 0em;
	--spacing: 0.25rem;

	--color-blue-accent: var(--status-info);
	--color-purple-accent: #c4b5fd;
	--color-orange-accent: var(--so-accent-text);
	--color-green-accent: var(--status-ok);
	--color-blue-accent-bg: var(--status-info-bg);
	--color-purple-accent-bg: #1d1733;
	--color-orange-accent-bg: #2a1407;
	--color-green-accent-bg: var(--status-ok-bg);
	--gradient-hero: none;
	--gradient-feature: none;
}

/* Global Element Styles */
* {
	border-color: var(--border);
}

html {
	background-color: var(--background);
}

body {
	background-color: var(--background);
	color: var(--foreground);
	font-family: var(--font-sans);
	-webkit-font-smoothing: antialiased;
}

code,
kbd,
samp,
pre {
	font-family: var(--font-mono);
}

::selection {
	background: color-mix(in oklab, var(--so-accent) 35%, transparent);
	color: var(--so-ink);
}
/* Tailwind v4 Theme Integration */
@theme inline {
	--color-background: var(--background);
	--color-foreground: var(--foreground);
	--color-card: var(--card);
	--color-card-foreground: var(--card-foreground);
	--color-popover: var(--popover);
	--color-popover-foreground: var(--popover-foreground);
	--color-primary: var(--primary);
	--color-primary-foreground: var(--primary-foreground);
	--color-secondary: var(--secondary);
	--color-secondary-foreground: var(--secondary-foreground);
	--color-muted: var(--muted);
	--color-muted-foreground: var(--muted-foreground);
	--color-accent: var(--accent);
	--color-accent-foreground: var(--accent-foreground);
	--color-destructive: var(--destructive);
	--color-destructive-foreground: var(--destructive-foreground);
	--color-border: var(--border);
	--color-input: var(--input);
	--color-ring: var(--ring);
	--color-chart-1: var(--chart-1);
	--color-chart-2: var(--chart-2);
	--color-chart-3: var(--chart-3);
	--color-chart-4: var(--chart-4);
	--color-chart-5: var(--chart-5);
	--color-status-ok: var(--status-ok);
	--color-status-ok-bg: var(--status-ok-bg);
	--color-status-ok-chart: var(--status-ok-chart);
	--color-status-warn: var(--status-warn);
	--color-status-warn-bg: var(--status-warn-bg);
	--color-status-warn-chart: var(--status-warn-chart);
	--color-status-danger: var(--status-danger);
	--color-status-danger-bg: var(--status-danger-bg);
	--color-status-danger-chart: var(--status-danger-chart);
	--color-status-info: var(--status-info);
	--color-status-info-bg: var(--status-info-bg);
	--color-status-info-chart: var(--status-info-chart);
	--color-sidebar: var(--sidebar);
	--color-sidebar-foreground: var(--sidebar-foreground);
	--color-sidebar-primary: var(--sidebar-primary);
	--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
	--color-sidebar-accent: var(--sidebar-accent);
	--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
	--color-sidebar-border: var(--sidebar-border);
	--color-sidebar-ring: var(--sidebar-ring);
	--font-sans: var(--font-sans);
	--font-mono: var(--font-mono);
	--font-serif: var(--font-serif);
	--radius-sm: calc(var(--radius) - 4px);
	--radius-md: calc(var(--radius) - 2px);
	--radius-lg: var(--radius);
	--radius-xl: calc(var(--radius) + 4px);
	--shadow-2xs: var(--shadow-2xs);
	--shadow-xs: var(--shadow-xs);
	--shadow-sm: var(--shadow-sm);
	--shadow: var(--shadow);
	--shadow-md: var(--shadow-md);
	--shadow-lg: var(--shadow-lg);
	--shadow-xl: var(--shadow-xl);
	--shadow-2xl: var(--shadow-2xl);
}

/* Portal layout and shared UI. Kept here so pages look right without a Tailwind rebuild. */

.so-brand {
	display: flex;
	align-items: center;
	height: 2.5rem;
	padding: 0 0.5rem;
}

.so-sidebar-footer {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.so-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.875rem 1.5rem 0;
}

.so-page {
	flex: 1 1 auto;
	padding: 1.25rem 1.5rem 2rem;
	min-width: 0;
	overflow-x: hidden;
}

/* BbSidebarInset is the sidebar's flex sibling and has no public class hook.
   Without min-width: 0 it grows with a wide table and the whole page scrolls. */
aside.so-sidebar ~ * {
	min-width: 0;
	max-width: 100%;
	overflow-x: hidden;
}

.so-page-header {
	margin-bottom: 1.5rem;
}

.so-page-header h1 {
	font-size: 1.5rem;
	font-weight: 600;
	letter-spacing: -0.015em;
	margin: 0 0 0.25rem;
	line-height: 1.3;
}

.so-page-header p {
	font-size: 0.875rem;
	color: var(--muted-foreground);
	margin: 0;
	max-width: 42rem;
}

.so-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: flex-end;
	margin-bottom: 1.5rem;
}

.so-card {
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--card);
	color: var(--card-foreground);
	padding: 1rem 1.125rem;
}

.so-edit {
	margin-bottom: 1.5rem;
}

.so-edit .so-toolbar {
	margin-bottom: 0;
}

.so-section {
	margin-bottom: 2rem;
}

.so-section h2 {
	font-size: 1.125rem;
	font-weight: 600;
	margin: 0 0 0.25rem;
}

.so-section > p {
	font-size: 0.875rem;
	color: var(--muted-foreground);
	margin: 0 0 0.75rem;
}

.so-stats {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
	margin-bottom: 1.5rem;
}

.so-stat-label {
	font-size: 0.875rem;
	color: var(--muted-foreground);
}

.so-stat-value {
	font-size: 1.5rem;
	font-weight: 600;
	letter-spacing: -0.02em;
	margin-top: 0.25rem;
}

.so-stat-blocked {
	color: var(--status-danger);
}

/* Small explanatory line under a stat value (dashboard Passthrough HTTPS). */
.so-stat-sub {
	font-size: 0.75rem;
	line-height: 1.35;
	color: var(--muted-foreground);
	margin-top: 0.25rem;
}

.so-chart {
	margin-bottom: 2rem;
}

.so-chart h2,
.so-health h2 {
	font-size: 1.125rem;
	font-weight: 500;
	margin: 0 0 0.75rem;
}

.so-chart-heading {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 0.75rem 1.25rem;
	margin: 0 0 0.75rem;
}

.so-chart-heading h2 {
	margin: 0;
}

.so-health {
	margin-top: 1.5rem;
}

.so-health-grid {
	display: grid;
	gap: 1.5rem;
	align-items: start;
}

@media (min-width: 768px) {
	.so-health-grid {
		grid-template-columns: 1fr 1fr;
	}
}

/* Same fixed height for both sentry-page charts, including the empty state. */
.so-health-chart-body {
	height: 280px;
	min-height: 280px;
}

.so-health-chart-body .so-bb-chart,
.so-health-chart-body > p {
	height: 280px;
	min-height: 280px;
	margin: 0;
}

.so-health-chart-body > p {
	display: flex;
	align-items: center;
}

/* Wide tables scroll inside this frame so the page, header and "Viewing as"
   banner stay put (next-cycle item 18). The wrap needs a bounded width: the
   inset and .so-page must be allowed to shrink (min-width: 0). */
.so-table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	max-width: 100%;
	min-width: 0;
}

.so-table {
	width: 100%;
	font-size: 0.875rem;
	border-collapse: collapse;
}

.so-table th {
	text-align: left;
	color: var(--muted-foreground);
	font-weight: 500;
	padding: 0.5rem 0.75rem;
	border-bottom: 1px solid var(--border);
	white-space: nowrap;
}

.so-table td {
	padding: 0.625rem 0.75rem;
	border-bottom: 1px solid var(--border);
	vertical-align: middle;
}

.so-table tbody tr:last-child td {
	border-bottom: 0;
}

.so-table .so-actions {
	text-align: right;
	white-space: nowrap;
}

.so-table.so-table-compact th,
.so-table.so-table-compact td {
	padding: 0.45rem 0.5rem;
}

.so-num {
	text-align: right;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

/* Headers inherit .so-table th { text-align: left }, so numbers would sit under a left-aligned title. */
.so-table th.so-num {
	text-align: right;
}

.so-domain-cell {
	min-width: 10rem;
}

.so-domain-name {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

.so-domain-meta {
	display: block;
	margin-top: 0.1rem;
	font-size: 0.75rem;
	color: var(--muted-foreground);
	line-height: 1.3;
}

.so-domain-flags {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	flex-wrap: nowrap;
	white-space: nowrap;
}

.so-status-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.35rem;
	height: 1.35rem;
	border-radius: var(--radius);
	flex: 0 0 auto;
	vertical-align: middle;
}

.so-status-icon-svg {
	width: 0.875rem;
	height: 0.875rem;
}

.so-status-icon-ok {
	background: var(--status-ok-bg);
	color: var(--status-ok);
}

.so-status-icon-warn {
	background: var(--status-warn-bg);
	color: var(--status-warn);
}

.so-status-icon-muted {
	background: var(--muted);
	color: var(--muted-foreground);
}

.so-status-icon-danger {
	background: color-mix(in srgb, var(--destructive) 18%, transparent);
	color: var(--destructive);
}

/* Captcha Protection: the Under Attack switch and its on-state banner. */
.so-under-attack {
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
}

.so-under-attack-on {
	border-color: var(--destructive);
	background: color-mix(in srgb, var(--destructive) 10%, transparent);
}

.so-under-attack-title {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 600;
	font-size: 1.05rem;
}

.so-status-icon-pending {
	background: transparent;
	color: var(--muted-foreground);
	border: 1px dashed var(--border);
}

.so-table-key {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.45rem 1.1rem;
	margin-top: 0.75rem;
	font-size: 0.75rem;
	color: var(--muted-foreground);
}

.so-table-key-heading {
	margin: 0;
	font-family: var(--font-mono);
	font-size: 0.6875rem;
	font-weight: 400;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--muted-foreground);
}

.so-table-key-item {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

.so-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	border-radius: 9999px;
	padding: 0.1rem 0.55rem;
	font-size: 0.75rem;
	font-weight: 500;
	line-height: 1.25rem;
	white-space: nowrap;
}

/* Same type size as .so-badge, for the "cPanel origin agent …, last seen …" line beside those badges. */
.so-agent-meta {
	font-size: 0.75rem;
	font-weight: 500;
	line-height: 1.25rem;
}

.so-badge-dot {
	width: 0.4rem;
	height: 0.4rem;
	border-radius: 9999px;
	background: currentColor;
	flex: 0 0 auto;
}

.so-badge-ok {
	background: var(--status-ok-bg);
	color: var(--status-ok);
}

.so-badge-warn {
	background: var(--status-warn-bg);
	color: var(--status-warn);
}

.so-badge-danger {
	background: var(--status-danger-bg);
	color: var(--status-danger);
}

.so-badge-muted {
	background: var(--muted);
	color: var(--muted-foreground);
}

/* Notification count (sentries out of date): solid accent, so it reads as something to act on. */
.so-badge-alert {
	background: var(--so-accent);
	color: var(--so-accent-ink);
	font-weight: 600;
}

/* Row-level marker for the same thing (sentry table, sentry page): quieter than the count. */
.so-badge-old {
	background: color-mix(in oklab, var(--so-accent) 16%, transparent);
	color: var(--so-accent-text);
}

.so-version-note {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.so-version-number {
	font-family: var(--font-mono);
	font-size: 0.8125rem;
	color: var(--so-ink);
}

/* Installed components (dashboard): a security release's note reads as urgent. */
.so-component-security {
	color: var(--status-danger);
	font-weight: 600;
}

.so-component-update td {
	background: color-mix(in oklab, var(--status-danger-bg) 45%, transparent);
}

.so-badge-icon {
	width: 0.8125rem;
	height: 0.8125rem;
	flex: 0 0 auto;
}

/* Saved on the cluster but not yet enforced by sentries. */
.so-badge-pending {
	background: transparent;
	color: var(--muted-foreground);
	border: 1px dashed var(--border);
	padding: calc(0.1rem - 1px) calc(0.55rem - 1px);
}

.so-cluster {
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--card);
	color: var(--card-foreground);
	margin-bottom: 0.75rem;
	overflow: hidden;
}

.so-cluster-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1rem;
	padding: 0.875rem 1rem;
}

.so-cluster-toggle {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	background: none;
	border: 0;
	padding: 0;
	color: inherit;
	cursor: pointer;
	text-align: left;
	flex: 1 1 16rem;
	min-width: 0;
	font: inherit;
}

.so-cluster-toggle:hover .so-cluster-name {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.so-cluster-name {
	font-weight: 600;
}

.so-cluster-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 0.75rem;
}

.so-cluster-counts {
	font-size: 0.875rem;
	color: var(--muted-foreground);
}

/* Cluster list card (Clusters page): heading row, stat tiles and feature row. */
.so-cluster-card .so-cluster-head {
	gap: 0.5rem 0.875rem;
	padding: 0.875rem 1rem 0.75rem;
}

.so-cluster-card .so-cluster-toggle {
	flex: 0 1 auto;
	gap: 0.5rem;
}

.so-cluster-card .so-cluster-name {
	font-size: 1.125rem;
	letter-spacing: -0.01em;
}

/* Monospace chip, e.g. the cluster VIP. */
.so-chip-mono {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--border);
	border-radius: calc(var(--radius) - 4px);
	background: var(--muted);
	color: var(--foreground);
	font-family: var(--font-mono);
	font-size: 0.75rem;
	line-height: 1.25rem;
	padding: 0 0.45rem;
	white-space: nowrap;
}

.so-cluster-health {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem 0.875rem;
	font-size: 0.875rem;
	color: var(--muted-foreground);
}

.so-health-item {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	white-space: nowrap;
}

.so-health-icon {
	width: 0.875rem;
	height: 0.875rem;
}

.so-dot {
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 9999px;
	flex: 0 0 auto;
	background: var(--muted-foreground);
}

.so-dot-ok {
	background: var(--status-ok);
	box-shadow: 0 0 0 3px var(--status-ok-bg);
}

.so-dot-danger {
	background: var(--status-danger);
	box-shadow: 0 0 0 3px var(--status-danger-bg);
}

.so-dot-muted {
	background: var(--muted-foreground);
}

.so-cluster-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem;
	margin-left: auto;
}

.so-danger-text {
	color: var(--status-danger);
}

/* Stat tiles under the cluster heading. */
.so-cluster-tiles {
	display: grid;
	gap: 0.625rem;
	grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
	padding: 0 1rem 0.875rem;
}

.so-tile {
	border: 1px solid var(--border);
	border-radius: calc(var(--radius) - 2px);
	background: color-mix(in oklab, var(--muted) 45%, var(--card));
	padding: 0.625rem 0.75rem;
	min-width: 0;
}

.so-tile-wide {
	grid-column: span 2;
}

.so-tile-label {
	display: flex;
	align-items: center;
	gap: 0.375rem;
	font-size: 0.75rem;
	font-weight: 500;
	color: var(--muted-foreground);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.so-tile-icon {
	width: 0.875rem;
	height: 0.875rem;
	flex: 0 0 auto;
}

.so-tile-value {
	margin-top: 0.25rem;
	font-size: 0.9375rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	overflow-wrap: anywhere;
}

.so-tile-sub {
	margin-top: 0.125rem;
	font-size: 0.75rem;
	color: var(--muted-foreground);
	overflow-wrap: anywhere;
}

@media (max-width: 600px) {
	.so-cluster-tiles {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 480px) {
	.so-tile-wide {
		grid-column: 1 / -1;
	}

	.so-cluster-actions {
		margin-left: 0;
		width: 100%;
	}
}

.so-cluster-features {
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem 0.5rem;
	border-top: 1px dashed var(--border);
	padding: 0.625rem 1rem 0.75rem;
}

.so-cluster-body {
	border-top: 1px solid var(--border);
	padding: 0.75rem 1rem 1rem;
	background: color-mix(in oklab, var(--muted) 50%, var(--card));
}

.so-alert-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.so-alert {
	border: 1px solid var(--border);
	border-left: 3px solid var(--status-warn);
	border-radius: var(--radius);
	padding: 0.625rem 0.875rem;
	font-size: 0.875rem;
	background: var(--status-warn-bg);
	color: var(--status-warn);
}

/* Stronger alert (L7 capacity full). */
.so-alert-danger {
	border-left-color: var(--status-danger);
	background: var(--status-danger-bg);
	color: var(--status-danger);
}

/* Alert action link (Go to Billing, Add more L7 domains). */
.so-alert-action {
	margin-left: 0.5rem;
	font-weight: 600;
}

.so-status-icon-warn {
	color: var(--status-warn);
}

.so-link {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.so-link:hover {
	color: var(--foreground);
}

/* Dashboard stat card that links somewhere (e.g. Open tickets → /tickets). */
a.so-card-link {
	display: block;
	text-decoration: none;
	transition: border-color 0.15s, background-color 0.15s;
}

a.so-card-link:hover,
a.so-card-link:focus-visible {
	border-color: var(--foreground);
	background: var(--accent);
}

/* Admin settings hub: grouped grid of links to staff pages. */
.so-admin-hub {
	display: grid;
	gap: 2rem;
}

.so-admin-hub-group h2 {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--muted-foreground);
	margin: 0 0 0.75rem;
}

.so-admin-hub-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
	gap: 0.75rem;
}

.so-admin-hub-card h3 {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 1rem;
	font-weight: 600;
	margin: 0 0 0.35rem;
	line-height: 1.3;
}

.so-admin-hub-card p {
	margin: 0;
	font-size: 0.875rem;
	color: var(--muted-foreground);
	line-height: 1.45;
}

/* Server-side pager under the Logs tables. */
.so-pager {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
	justify-content: space-between;
	margin-top: 0.75rem;
}

.so-pager-nav,
.so-pager-tools {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
}

.so-button-link {
	display: inline-flex;
	align-items: center;
	height: 2.25rem;
	padding: 0 0.75rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	font-size: 0.875rem;
	font-weight: 500;
	text-decoration: none;
	color: inherit;
}

.so-button-link:hover {
	background: var(--accent);
}

.so-back {
	display: inline-block;
	font-size: 0.875rem;
	color: var(--muted-foreground);
	text-decoration: none;
}

.so-back:hover {
	color: var(--foreground);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.so-ticket {
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--card);
	padding: 0.875rem 1rem;
}

.so-ticket-meta {
	font-size: 0.75rem;
	color: var(--muted-foreground);
	margin-bottom: 0.35rem;
}

.so-input-note {
	font-size: 0.875rem;
	color: var(--muted-foreground);
}

.so-chart-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.25rem;
	margin-bottom: 0.75rem;
	font-size: 0.875rem;
	color: var(--muted-foreground);
}

.so-chart-legend span {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}

.so-chart-swatch {
	width: 0.65rem;
	height: 0.65rem;
	border-radius: 2px;
	flex: 0 0 auto;
}

.so-chart-bars {
	display: flex;
	align-items: stretch;
	gap: 0.25rem;
	height: 8rem;
}

.so-chart-col {
	flex: 1 1 0;
	min-width: 0;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	overflow: hidden;
	border-radius: 2px;
}

.so-chart-gap {
	flex-shrink: 0;
	min-height: 0;
}

.so-chart-seg {
	width: 100%;
	min-height: 3px;
	flex-shrink: 0;
}

.so-chart-allowed {
	background: var(--status-ok-chart);
}

.so-chart-blocked {
	background: var(--status-danger-chart);
}

.so-chart-load {
	background: var(--color-blue-accent);
}


.so-range-list {
	max-height: 24rem;
	overflow: auto;
}

.so-chart-note {
	margin: 0 0 0.75rem;
	font-size: 0.875rem;
	color: var(--muted-foreground);
}

.so-provider-block {
	margin: 0.75rem 0 1.25rem;
}

.so-provider-bar {
	display: flex;
	align-items: stretch;
	height: 0.5rem;
	min-width: 6rem;
	max-width: 12rem;
	overflow: hidden;
	border-radius: 2px;
	background: var(--muted);
}

.so-provider-bar .so-chart-seg {
	min-height: 0;
	min-width: 3px;
	height: 100%;
	width: auto;
}

.so-count-allowed {
	color: var(--status-ok);
	font-variant-numeric: tabular-nums;
}

.so-count-blocked {
	color: var(--status-danger);
	font-variant-numeric: tabular-nums;
}

.so-bb-chart {
	width: 100%;
	min-width: 0;
}

/* ---------- Dashboard traffic map (Components/TrafficMap.razor) ----------
 * Countries are filled in 5 steps (.so-map-l1 .. .so-map-l5) mixed from the card colour
 * towards green (allowed) or orange (blocked, block rate); .so-map-l0 is no data.
 * Hover text is js/so-map.js. The map draws in like the charts (.so-map-chart). */
.so-map-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 0.75rem;
}

.so-toggle {
	display: inline-flex;
	border: 1px solid var(--input);
	border-radius: var(--radius);
	overflow: hidden;
}

.so-toggle-btn {
	padding: 0.375rem 0.75rem;
	font-size: 0.8125rem;
	line-height: 1.25rem;
	color: var(--muted-foreground);
	background: transparent;
	border: 0;
	cursor: pointer;
}

.so-toggle-btn + .so-toggle-btn {
	border-left: 1px solid var(--input);
}

.so-toggle-btn:hover {
	color: var(--foreground);
	background: var(--so-raise);
}

.so-toggle-btn:focus-visible {
	outline: 2px solid var(--ring);
	outline-offset: -2px;
}

.so-toggle-btn[aria-pressed="true"] {
	color: var(--so-accent-ink);
	background: var(--so-accent);
	font-weight: 500;
}

.so-map-wrap {
	position: relative;
	margin: 0.25rem 0 0.5rem;
}

/* First load: the map's own size (aspect-ratio set inline from the outline data) with the spinner centred. */
.so-map-pending {
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Switching range: the current map and table stay put, dimmed, until the new counts arrive. */
.so-map-card .so-map-wrap,
.so-map-card .so-map-foot,
.so-map-card .so-map-top {
	transition: opacity 0.15s ease;
}

.so-map-card[aria-busy="true"] .so-map-wrap,
.so-map-card[aria-busy="true"] .so-map-foot,
.so-map-card[aria-busy="true"] .so-map-top {
	opacity: 0.5;
}

.so-map {
	display: block;
	width: 100%;
	height: auto;
}

.so-map path,
.so-map circle {
	fill: var(--so-raise);
	stroke: var(--so-bg);
	stroke-width: 0.6px;
	vector-effect: non-scaling-stroke;
	transition: fill 0.35s ease, filter 0.15s ease;
}

.so-map .so-map-dot {
	stroke: var(--so-mod);
	stroke-width: 1px;
}

/* Hover: a touch lighter with a thin muted outline (no bright white edge). */
.so-map [data-cc]:hover {
	stroke: var(--so-line-2);
	stroke-width: 0.9px;
	filter: brightness(1.18);
}

[data-metric="allowed"] .so-map-l1 { fill: color-mix(in srgb, var(--chart-allowed) 22%, var(--so-raise)); }
[data-metric="allowed"] .so-map-l2 { fill: color-mix(in srgb, var(--chart-allowed) 40%, var(--so-raise)); }
[data-metric="allowed"] .so-map-l3 { fill: color-mix(in srgb, var(--chart-allowed) 58%, var(--so-raise)); }
[data-metric="allowed"] .so-map-l4 { fill: color-mix(in srgb, var(--chart-allowed) 78%, var(--so-raise)); }
[data-metric="allowed"] .so-map-l5 { fill: var(--chart-allowed); }
[data-metric="blocked"] .so-map-l1,
[data-metric="rate"] .so-map-l1 { fill: color-mix(in srgb, var(--chart-blocked) 22%, var(--so-raise)); }
[data-metric="blocked"] .so-map-l2,
[data-metric="rate"] .so-map-l2 { fill: color-mix(in srgb, var(--chart-blocked) 40%, var(--so-raise)); }
[data-metric="blocked"] .so-map-l3,
[data-metric="rate"] .so-map-l3 { fill: color-mix(in srgb, var(--chart-blocked) 58%, var(--so-raise)); }
[data-metric="blocked"] .so-map-l4,
[data-metric="rate"] .so-map-l4 { fill: color-mix(in srgb, var(--chart-blocked) 78%, var(--so-raise)); }
[data-metric="blocked"] .so-map-l5,
[data-metric="rate"] .so-map-l5 { fill: var(--chart-blocked); }

.so-map-scale span {
	display: inline-block;
	width: 1.5rem;
	height: 0.5rem;
}

.so-map-scale[data-metric="allowed"] .so-map-l1 { background: color-mix(in srgb, var(--chart-allowed) 22%, var(--so-raise)); }
.so-map-scale[data-metric="allowed"] .so-map-l2 { background: color-mix(in srgb, var(--chart-allowed) 40%, var(--so-raise)); }
.so-map-scale[data-metric="allowed"] .so-map-l3 { background: color-mix(in srgb, var(--chart-allowed) 58%, var(--so-raise)); }
.so-map-scale[data-metric="allowed"] .so-map-l4 { background: color-mix(in srgb, var(--chart-allowed) 78%, var(--so-raise)); }
.so-map-scale[data-metric="allowed"] .so-map-l5 { background: var(--chart-allowed); }
.so-map-scale:not([data-metric="allowed"]) .so-map-l1 { background: color-mix(in srgb, var(--chart-blocked) 22%, var(--so-raise)); }
.so-map-scale:not([data-metric="allowed"]) .so-map-l2 { background: color-mix(in srgb, var(--chart-blocked) 40%, var(--so-raise)); }
.so-map-scale:not([data-metric="allowed"]) .so-map-l3 { background: color-mix(in srgb, var(--chart-blocked) 58%, var(--so-raise)); }
.so-map-scale:not([data-metric="allowed"]) .so-map-l4 { background: color-mix(in srgb, var(--chart-blocked) 78%, var(--so-raise)); }
.so-map-scale:not([data-metric="allowed"]) .so-map-l5 { background: var(--chart-blocked); }

.so-map-tip {
	position: absolute;
	z-index: 5;
	pointer-events: none;
	min-width: 9rem;
	padding: 0.5rem 0.625rem;
	font-size: 0.8125rem;
	line-height: 1.35;
	color: var(--so-ink-2);
	background: var(--so-raise);
	border: 1px solid var(--so-line-2);
	border-radius: var(--radius);
	box-shadow: 0 6px 20px rgb(0 0 0 / 0.45);
	font-variant-numeric: tabular-nums;
}

.so-map-tip[hidden] {
	display: none;
}

.so-map-tip-name {
	color: var(--so-ink);
	font-weight: 600;
	margin-bottom: 0.125rem;
}

.so-map-empty {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.so-map-empty p {
	margin: 0;
	padding: 0.625rem 0.875rem;
	max-width: 26rem;
	text-align: center;
	font-size: 0.875rem;
	color: var(--so-ink-2);
	background: color-mix(in srgb, var(--so-mod) 88%, transparent);
	border: 1px solid var(--so-line);
	border-radius: var(--radius);
}

.so-map-foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem 1rem;
	margin-bottom: 1rem;
}

.so-map-legend {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.75rem;
	color: var(--so-ink-3);
	font-variant-numeric: tabular-nums;
}

.so-map-scale {
	display: inline-flex;
	gap: 2px;
}

.so-map-credit {
	margin: 0 0 0 auto;
	font-size: 0.75rem;
	color: var(--so-ink-3);
}

.so-map-top-heading {
	font-size: 0.9375rem;
	font-weight: 500;
	margin: 0 0 0.5rem;
}

.so-map-rate {
	font-variant-numeric: tabular-nums;
}

.so-map-aside {
	margin-top: 0.5rem;
	margin-bottom: 0;
}

/* Settings page: each area is a card with a heading, short description, and aligned fields. */
.so-settings {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	max-width: 60rem;
}

.so-settings-card {
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--card);
	color: var(--card-foreground);
	padding: 1.25rem 1.375rem 1.375rem;
}

.so-settings-card h2 {
	font-size: 1.0625rem;
	font-weight: 600;
	letter-spacing: -0.01em;
	margin: 0 0 0.25rem;
	line-height: 1.3;
}

.so-settings-lead {
	font-size: 0.875rem;
	color: var(--muted-foreground);
	margin: 0 0 0.85rem;
	max-width: 42rem;
	line-height: 1.5;
}

.so-settings-help {
	font-size: 0.875rem;
	margin: 0 0 0.85rem;
}

.so-settings-help-last {
	margin-bottom: 0;
}

.so-settings-status {
	font-size: 0.875rem;
	color: var(--muted-foreground);
	margin: 0 0 0.85rem;
}

.so-settings-fields {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1rem;
	align-items: flex-end;
}

.so-settings-field {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	min-width: 0;
	flex: 1 1 14rem;
}

.so-settings-field-narrow {
	flex: 0 1 8.5rem;
	min-width: 7rem;
	max-width: 10rem;
}

.so-settings-field > :not(label):not(p) {
	width: 100%;
	min-width: 0;
}

.so-settings-field input {
	width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

.so-settings-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1rem;
	align-items: center;
	margin-top: 1.25rem;
}

.so-settings-actions + .so-settings-actions {
	margin-top: 0.75rem;
}

.so-settings-check {
	display: inline-flex;
	align-items: flex-start;
	gap: 0.5rem;
	font-size: 0.875rem;
	line-height: 1.4;
	cursor: pointer;
	max-width: 42rem;
}

.so-settings-check > :first-child {
	flex: none;
	margin-top: 0.15rem;
}

.so-settings-follow {
	margin-top: 1.15rem;
}

.so-settings-follow-note {
	margin-top: 0.65rem;
}

.so-settings-reveal {
	margin-top: 1rem;
	padding: 0.875rem 1rem;
	border: 1px solid var(--border);
	border-radius: calc(var(--radius) - 2px);
	background: color-mix(in oklab, var(--muted) 45%, var(--card));
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

.so-settings-reveal-title {
	font-size: 0.875rem;
	margin: 0;
}

.so-settings-key {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 0.5rem 0.75rem;
}

.so-settings-key code {
	font-size: 0.8125rem;
	line-height: 1.45;
	word-break: break-all;
	flex: 1 1 16rem;
	min-width: 0;
}

.so-settings-billing {
	font-size: 0.875rem;
	margin: 0 0 0.35rem;
}

.so-settings-close {
	border-color: color-mix(in oklab, var(--status-danger) 28%, var(--border));
}

@media (max-width: 639px) {
	.so-settings-field,
	.so-settings-field-narrow {
		flex: 1 1 100%;
		max-width: none;
	}

	.so-settings-fields > :not(.so-settings-field) {
		width: 100%;
	}
}

.so-page-header p.so-sentry-cluster {
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--foreground);
	margin: 0 0 0.25rem;
	max-width: none;
}

.so-sentry-title {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
}

.so-sentry-facts {
	display: grid;
	gap: 1rem 1.5rem;
	grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
	font-size: 0.875rem;
}

.so-sentry-switch {
	min-width: 18rem;
}

.so-sentry-ip {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 0.75rem;
	margin: 0.35rem 0 0;
	font-size: 0.875rem;
}

.so-sentry-ip code {
	font-size: 0.875rem;
}

.so-sentry-ip-secondary {
	color: var(--muted-foreground);
}

/* ---------- Website look (stillorigin.net, design A) ----------
 * Mono, uppercase micro-labels; flat squared modules on hairline borders; orange only for
 * the main action, focus, the active nav item and small accents. Body text stays off-white. */

/* Sidebar: flat, on the page background, divided by a hairline like the website header. */
[data-sidebar="group-label"] {
	font-family: var(--font-mono);
	font-size: 0.6875rem;
	font-weight: 400;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--muted-foreground);
}

[data-sidebar="menu-button"] {
	color: var(--sidebar-foreground);
}

[data-sidebar="menu-button"]:hover {
	color: var(--sidebar-accent-foreground);
}

[data-sidebar="menu-button"][data-active="true"] {
	color: var(--sidebar-accent-foreground);
	background: var(--sidebar-accent);
	box-shadow: inset 2px 0 0 var(--so-accent);
}

[data-sidebar="menu-button"][data-active="true"] svg {
	color: var(--so-accent-text);
}

.so-topbar {
	min-height: 3.5rem;
	padding: 0 1.5rem;
	border-bottom: 1px solid var(--border);
}

.so-topbar-user {
	font-family: var(--font-mono);
	font-size: 0.75rem;
	letter-spacing: 0.02em;
	color: var(--muted-foreground);
}

/* Headings follow the website: medium weight, tight tracking. */
.so-page-header h1 {
	font-weight: 500;
	font-size: 1.75rem;
	letter-spacing: -0.025em;
}

.so-section h2,
.so-chart h2,
.so-health h2,
.so-settings-card h2 {
	font-weight: 500;
	letter-spacing: -0.015em;
}

/* Micro-labels: the website's mono, uppercase tags (.t-lbl, .pk). */
.so-stat-label,
.so-tile-label,
.so-table th,
.so-page th {
	font-family: var(--font-mono);
	font-size: 0.6875rem;
	font-weight: 400;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--muted-foreground);
}

.so-stat-value,
.so-tile-value {
	font-variant-numeric: tabular-nums;
}

.so-back {
	font-family: var(--font-mono);
	font-size: 0.75rem;
	letter-spacing: 0.02em;
}

.so-back::before {
	content: "← ";
}

/* Links: off-white and underlined, orange on hover, never orange-on-orange. */
.so-link,
.so-table td a:not([class*="bb:"]) {
	color: var(--foreground);
	text-decoration: underline;
	text-decoration-color: var(--so-ink-3);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.so-link:hover,
.so-table td a:not([class*="bb:"]):hover {
	color: var(--so-accent-text);
	text-decoration-color: currentColor;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
	outline: 2px solid var(--ring);
	outline-offset: 2px;
}

code {
	font-size: 0.86em;
}

/* Squared status pills, like the website's tags. */
.so-badge,
.so-chip-mono {
	border-radius: var(--radius);
}

.so-tile,
.so-settings-reveal {
	background: var(--so-raise);
	border-radius: 0;
}

.so-card,
.so-cluster,
.so-settings-card,
.so-ticket {
	border-radius: 0;
}

a.so-card-link:hover,
a.so-card-link:focus-visible {
	border-color: var(--so-line-2);
	background: var(--so-raise);
	box-shadow: inset 2px 0 0 var(--so-accent);
}

/* Charts: allowed in green, blocked in orange. */
.so-chart-allowed {
	background: var(--chart-allowed);
}

.so-chart-blocked {
	background: var(--chart-blocked);
}

.so-chart-load {
	background: var(--chart-neutral);
}

.so-count-blocked,
.so-stat-blocked {
	color: var(--so-accent-text);
}

/* ---------- Buttons and toolbars ----------
 * One rule set for every page: the main action is the orange primary button, secondary
 * actions are outline, deletes are destructive. In a toolbar everything is the default
 * height (2.5rem, the same as inputs and selects) and sits on one baseline; small buttons
 * are only for table rows and inline copy buttons. */
.so-toolbar {
	align-items: flex-end;
	gap: 0.75rem;
}

.so-toolbar-field {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
	min-width: 0;
}

.so-toolbar-group {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.so-toolbar-end {
	margin-left: auto;
}

.so-toolbar-note {
	align-self: center;
	font-size: 0.875rem;
	color: var(--muted-foreground);
}

/* Row actions inside tables and cluster cards. */
.so-row-actions {
	display: inline-flex;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: flex-end;
	gap: 0.375rem;
}

/* Outline button for a delete or remove in a list, where a solid red button on every row
   would shout. Keeps the outline shape, with destructive colours. */
.so-btn-danger {
	color: var(--destructive) !important;
	border-color: color-mix(in oklab, var(--destructive) 45%, var(--border)) !important;
}

.so-btn-danger:hover {
	background: color-mix(in oklab, var(--destructive) 14%, transparent) !important;
	color: var(--destructive) !important;
}

.so-danger-text {
	color: var(--destructive);
}

/* Plain link styled as an outline button (Logs export). Matches BbButton Outline Small. */
.so-button-link {
	height: 2.25rem;
	border-color: var(--input);
	border-radius: var(--radius);
	background: var(--background);
	font-size: 0.75rem;
}

.so-button-link:hover {
	background: var(--accent);
}

/* Native inputs and selects on portal pages: the same height (h-10), surface and focus as
   BlazorBlueprint's inputs, with the website's orange focus outline. */
.so-page input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
.so-page select,
.so-page textarea {
	background-color: var(--background);
	color: var(--foreground);
	border-color: var(--input);
	border-radius: var(--radius);
}

.so-page input::placeholder,
.so-page textarea::placeholder {
	color: var(--so-ink-3);
}

.so-page input:not([type="checkbox"]):not([type="radio"]):focus-visible,
.so-page select:focus-visible,
.so-page textarea:focus-visible {
	outline: 2px solid var(--ring);
	outline-offset: 0;
	border-color: transparent;
}

.so-page select option {
	background-color: var(--so-mod);
	color: var(--foreground);
}

/* Inline links in page copy (help links, "Logs", "/check"): off-white, underlined, orange on hover. */
.so-page p a:not([class*="bb:"]),
.so-page a.underline {
	color: var(--foreground);
	text-decoration: underline;
	text-decoration-color: var(--so-ink-3);
	text-underline-offset: 3px;
}

.so-page p a:not([class*="bb:"]):hover,
.so-page a.underline:hover {
	color: var(--so-accent-text);
	text-decoration-color: currentColor;
}

/* Sidebar logo: the website's inline SVG in ink. */
.so-brand .logo {
	display: block;
	height: 1.5rem;
	width: auto;
	color: var(--so-ink);
}

/* Sign-in code page: the same logo, centred above the heading. */
.so-verify-brand {
	justify-content: center;
	height: auto;
	margin: 0 auto 0.25rem;
}

/* Sign-in code box (Verify.razor): a plain field, so it works with no live connection and the
 * phone can offer the code from the email (autocomplete="one-time-code"). */
.so-otp-input {
	width: 100%;
	height: 3rem;
	padding: 0 0.75rem;
	border: 1px solid var(--input);
	border-radius: var(--radius);
	background: transparent;
	color: var(--foreground);
	font-family: var(--font-mono);
	font-size: 1.375rem;
	letter-spacing: 0.5em;
	text-align: center;
	text-indent: 0.5em;
}
.so-otp-input::placeholder {
	color: var(--so-ink-3);
}
.so-otp-input:focus-visible {
	outline: 2px solid var(--ring);
	outline-offset: 2px;
}
.so-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
/* A sign-in form that has been sent (js/so-signin.js): the button shows it is working. */
form[data-so-sent="1"] button[type="submit"] {
	opacity: 0.6;
	pointer-events: none;
}

.so-resend-code {
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--muted-foreground);
	font: inherit;
	cursor: pointer;
	text-underline-offset: 4px;
}

.so-resend-code:hover {
	text-decoration: underline;
}

/* Sign-in page: looping chart in the website's instrument look (allowed green,
 * blocked orange). Motion is CSS-only; prefers-reduced-motion shows a still frame. */
.so-login-art {
	position: relative;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 2.5rem;
	overflow: hidden;
	/* Same 24px grid as the website homepage graph (.v-a .hero-fig in site.css). */
	background:
		linear-gradient(var(--so-grid) 1px,transparent 1px) 0 0/24px 24px,
		linear-gradient(90deg,var(--so-grid) 1px,transparent 1px) 0 0/24px 24px,
		var(--so-mod);
	border-left: 1px solid var(--border);
}

@media (min-width: 1024px) {
	.so-login-art {
		display: flex;
	}
}

.so-login-art::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: 28%;
	background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--so-accent) 10%, transparent), transparent);
	animation: so-login-wash 12s ease-in-out 1.2s infinite;
	pointer-events: none;
	z-index: 0;
}

.so-login-visual {
	position: relative;
	z-index: 1;
	width: min(100%, 40rem);
	border: 1px solid var(--so-line);
	background: var(--so-mod);
}

.so-login-mod-bar {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.7rem 1.1rem;
	border-bottom: 1px solid var(--so-line);
	font-family: var(--font-mono);
	font-size: 0.6875rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--so-ink-2);
}

.so-login-tag {
	flex: none;
	border: 1px solid var(--so-line-2);
	padding: 0.1rem 0.45rem;
	color: var(--so-accent-text);
}

.so-login-chart {
	display: block;
	width: 100%;
	height: auto;
	padding: 0.5rem 0.25rem 0.75rem;
}

.so-login-grid line {
	stroke: var(--so-line);
	stroke-width: 1;
	stroke-dasharray: 2 4;
}

.so-login-axis {
	stroke: var(--so-ink);
	stroke-width: 1.5;
}

.so-login-label {
	fill: var(--so-ink-2);
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.08em;
}

.so-login-label-blocked {
	fill: var(--so-accent-text);
}

.so-login-area {
	fill: url(#soLoginAllowedFill);
	animation: so-login-area 8s ease-in-out infinite;
}

.so-login-allowed {
	fill: none;
	stroke: var(--chart-allowed);
	stroke-width: 2;
	stroke-linejoin: round;
	stroke-linecap: round;
	stroke-dasharray: 900;
	stroke-dashoffset: 900;
	animation: so-login-draw 2.4s cubic-bezier(.22, 1, .36, 1) forwards;
}

.so-login-allowed-flow {
	fill: none;
	stroke: var(--chart-allowed);
	stroke-width: 2;
	stroke-linejoin: round;
	stroke-linecap: round;
	stroke-dasharray: 10 18;
	opacity: 0.7;
	animation: so-login-flow 3.2s linear infinite;
}

.so-login-bar {
	fill: var(--chart-blocked);
	transform-box: fill-box;
	transform-origin: 50% 0%;
	animation: so-login-bar 3.8s ease-in-out infinite;
}

.so-login-bar:nth-child(2) { animation-delay: 0.15s; }
.so-login-bar:nth-child(3) { animation-delay: 0.35s; }
.so-login-bar:nth-child(4) { animation-delay: 0.05s; }
.so-login-bar:nth-child(5) { animation-delay: 0.45s; }
.so-login-bar:nth-child(6) { animation-delay: 0.2s; }
.so-login-bar:nth-child(7) { animation-delay: 0.55s; }
.so-login-bar:nth-child(8) { animation-delay: 0.3s; }
.so-login-bar:nth-child(9) { animation-delay: 0.1s; }
.so-login-bar:nth-child(10) { animation-delay: 0.4s; }
.so-login-bar:nth-child(11) { animation-delay: 0.25s; }
.so-login-bar:nth-child(12) { animation-delay: 0.5s; }

.so-login-scan {
	stroke: var(--so-accent);
	stroke-width: 1.5;
	animation: so-login-scan 7s ease-in-out infinite;
}

.so-login-dot {
	fill: var(--chart-allowed);
	offset-path: path("M48 168 C 110 150, 150 96, 210 120 S 310 72, 370 100 S 470 64, 540 88 L 608 80");
	offset-rotate: 0deg;
	animation: so-login-dot 5.5s linear infinite;
}

.so-login-dot-2 {
	animation-delay: -2.75s;
}

@keyframes so-login-draw {
	to { stroke-dashoffset: 0; }
}

@keyframes so-login-flow {
	to { stroke-dashoffset: -140; }
}

@keyframes so-login-area {
	0%, 100% { opacity: 0.85; }
	50% { opacity: 1; }
}

@keyframes so-login-bar {
	0%, 100% { transform: scaleY(0.6); }
	50% { transform: scaleY(1); }
}

@keyframes so-login-scan {
	0% { transform: translateX(0); opacity: 0; }
	12% { opacity: 1; }
	88% { opacity: 1; }
	100% { transform: translateX(560px); opacity: 0; }
}

@keyframes so-login-dot {
	to { offset-distance: 100%; }
}

@keyframes so-login-wash {
	0% { transform: translateY(-100%); opacity: 0; }
	12% { opacity: 1; }
	88% { opacity: 1; }
	100% { transform: translateY(360%); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.so-login-art::after,
	.so-login-allowed-flow,
	.so-login-scan,
	.so-login-dot {
		animation: none;
		display: none;
	}

	.so-login-allowed,
	.so-login-area,
	.so-login-bar {
		animation: none;
	}

	.so-login-allowed {
		stroke-dashoffset: 0;
	}

	.so-login-bar {
		transform: none;
	}
}

/* ---------- Live tiles ----------
 * Limit tiles with the latest check-in values: the live number in ink, a thin meter in the
 * orange primary for its share of the limit, red from 90%. */
.so-live-now {
	color: var(--so-ink);
	font-size: 1.0625rem;
}

.so-meter {
	height: 3px;
	margin-top: 0.375rem;
	background: var(--so-line);
	overflow: hidden;
}

.so-meter-fill {
	display: block;
	height: 100%;
	background: var(--so-accent);
	transition: width 0.3s ease;
}

.so-meter-hot {
	background: var(--status-danger);
}

/* The same tiles on the sentry page sit in the page column, not inside a cluster card. */
.so-sentry-tiles {
	padding: 0;
}

/* ---------- Chart draw-in ----------
 * Like the website homepage chart: the plot is revealed left to right over 1.4 s with an ease-out,
 * starting when the chart is 30% in view (js/so-motion.js adds .so-reveal, then .so-revealed).
 * ECharts inserts its SVG once per chart and later updates reuse it, so the reveal plays once.
 * Charts are only held hidden while html.so-motion is set, so without the script (or with
 * reduced motion) they simply show. Tallies count up in the same script. */
@keyframes so-draw-in {
	from { clip-path: inset(0 100% 0 0); }
	to { clip-path: inset(0 0 0 0); }
}

html.so-motion .so-bb-chart.so-reveal:not(.so-revealed) svg,
html.so-motion .so-provider-bar.so-reveal:not(.so-revealed),
html.so-motion .so-map-chart.so-reveal:not(.so-revealed) {
	clip-path: inset(0 100% 0 0);
}

html.so-motion .so-bb-chart.so-revealed:not(.so-reveal-done) svg,
html.so-motion .so-provider-bar.so-revealed:not(.so-reveal-done),
html.so-motion .so-map-chart.so-revealed:not(.so-reveal-done) {
	animation: so-draw-in 1.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (prefers-reduced-motion: reduce) {
	html.so-motion .so-bb-chart svg,
	html.so-motion .so-provider-bar,
	html.so-motion .so-map-chart {
		clip-path: none;
		animation: none;
	}

	.so-meter-fill {
		transition: none;
	}

	.so-map-card .so-map-wrap,
	.so-map-card .so-map-foot,
	.so-map-card .so-map-top {
		transition: none;
	}
}

/* ---------- Reconnect dialog (Components/Layout/ReconnectModal.razor) ----------
 * blazor.web.js puts one state class on #components-reconnect-modal; each .so-rc-* part shows
 * only in its state. */
#components-reconnect-modal.so-reconnect {
	width: min(24rem, calc(100vw - 2rem));
	margin: 22vh auto auto;
	padding: 0;
	border: 1px solid var(--so-line);
	border-radius: 2px;
	background: var(--so-mod);
	color: var(--so-ink);
	font-family: var(--font-sans);
	box-shadow: 0 24px 64px rgb(0 0 0 / 0.55);
}

/* showModal focuses the dialog itself when it has no buttons (reconnecting states). */
#components-reconnect-modal.so-reconnect:focus {
	outline: none;
}

#components-reconnect-modal.so-reconnect[open] {
	animation: so-reconnect-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

#components-reconnect-modal.so-reconnect::backdrop {
	background: rgb(6 7 6 / 0.72);
	backdrop-filter: blur(2px);
}

@keyframes so-reconnect-in {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: none; }
}

.so-reconnect-card {
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
	padding: 1.5rem;
}

.so-reconnect-head {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	margin-bottom: 0.25rem;
}

.so-reconnect-kicker {
	font-family: var(--font-mono);
	font-size: 0.6875rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--so-ink-3);
}

.so-reconnect-spinner {
	width: 1.125rem;
	height: 1.125rem;
	border-radius: 9999px;
	border: 2px solid var(--so-line-2);
	border-top-color: var(--so-accent);
	animation: so-reconnect-spin 0.9s linear infinite;
}

/* Stopped states: a still orange square, like the website's status marks. */
.so-reconnect-mark {
	width: 0.625rem;
	height: 0.625rem;
	margin: 0 0.25rem;
	background: var(--so-accent);
}

@keyframes so-reconnect-spin {
	to { transform: rotate(360deg); }
}

.so-reconnect-title {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 600;
	letter-spacing: -0.01em;
}

.so-reconnect-text {
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--so-ink-2);
}

.so-reconnect-count {
	font-family: var(--font-mono);
	color: var(--so-accent-text);
}

.so-reconnect-actions {
	gap: 0.5rem;
	margin-top: 0.75rem;
}

.so-reconnect-btn {
	height: 2.25rem;
	padding: 0 1rem;
	border: 1px solid var(--so-line-2);
	border-radius: 2px;
	background: transparent;
	color: var(--so-ink);
	font: 500 0.875rem/1 var(--font-sans);
	cursor: pointer;
}

.so-reconnect-btn:hover {
	background: var(--so-raise);
}

.so-reconnect-btn:focus-visible {
	outline: 2px solid var(--so-accent);
	outline-offset: 2px;
}

.so-reconnect-btn-primary {
	border-color: var(--so-accent);
	background: var(--so-accent);
	color: var(--so-accent-ink);
}

.so-reconnect-btn-primary:hover {
	border-color: var(--so-accent-hover);
	background: var(--so-accent-hover);
}

.so-reconnect .so-rc-first,
.so-reconnect .so-rc-retrying,
.so-reconnect .so-rc-failed,
.so-reconnect .so-rc-paused,
.so-reconnect .so-rc-resume-failed,
.so-reconnect .so-rc-busy,
.so-reconnect .so-rc-stopped {
	display: none;
}

.so-reconnect.components-reconnect-show:not(.components-reconnect-retrying) .so-rc-first,
.so-reconnect.components-reconnect-retrying p.so-rc-retrying,
.so-reconnect.components-reconnect-failed p.so-rc-failed,
.so-reconnect.components-reconnect-paused p.so-rc-paused,
.so-reconnect.components-reconnect-resume-failed p.so-rc-resume-failed {
	display: block;
}

.so-reconnect.components-reconnect-show:not(.components-reconnect-retrying) .so-rc-first:not(p),
.so-reconnect.components-reconnect-retrying span.so-rc-retrying,
.so-reconnect.components-reconnect-failed span.so-rc-failed,
.so-reconnect.components-reconnect-paused span.so-rc-paused,
.so-reconnect.components-reconnect-resume-failed span.so-rc-resume-failed,
.so-reconnect.components-reconnect-show .so-rc-busy,
.so-reconnect.components-reconnect-retrying .so-rc-busy,
.so-reconnect.components-reconnect-failed .so-rc-stopped,
.so-reconnect.components-reconnect-paused .so-rc-stopped,
.so-reconnect.components-reconnect-resume-failed .so-rc-stopped {
	display: inline-block;
}

.so-reconnect.components-reconnect-failed div.so-rc-failed,
.so-reconnect.components-reconnect-paused div.so-rc-paused,
.so-reconnect.components-reconnect-resume-failed div.so-rc-resume-failed {
	display: flex;
}

@media (prefers-reduced-motion: reduce) {
	#components-reconnect-modal.so-reconnect[open] {
		animation: none;
	}

	/* No spin: a still ring with an orange quarter still says "working". */
	.so-reconnect-spinner {
		animation: none;
	}
}

/* ---------- Sidebar: viewport height ----------
 * The sidebar is as tall as the screen and stays put while the page scrolls, so the user menu
 * is always at the bottom. The nav scrolls on its own when it is taller than the screen. */
aside.so-sidebar {
	position: sticky;
	top: 0;
	align-self: flex-start;
	height: 100vh;
	height: 100dvh;
	min-height: 0;
}

aside.so-sidebar [data-sidebar="content"] {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
}

aside.so-sidebar [data-sidebar="footer"] {
	flex: 0 0 auto;
	border-top: 1px solid var(--so-line);
}

a.so-brand {
	color: var(--so-ink);
	text-decoration: none;
}

a.so-brand:hover {
	color: #fff;
}

a.so-brand:focus-visible {
	outline: 2px solid var(--so-accent);
	outline-offset: 4px;
}

/* ---------- User menu (sidebar footer) ---------- */
.so-user-menu {
	position: relative;
	width: 100%;
}

.so-user-trigger {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	width: 100%;
	padding: 0.5rem;
	border: 1px solid transparent;
	border-radius: 2px;
	background: transparent;
	color: var(--so-ink);
	text-align: left;
	cursor: pointer;
}

.so-user-trigger:hover,
.so-user-trigger[aria-expanded="true"] {
	background: var(--so-raise);
	border-color: var(--so-line);
}

.so-user-trigger:focus-visible {
	outline: 2px solid var(--so-accent);
	outline-offset: 1px;
}

.so-user-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 2rem;
	height: 2rem;
	border-radius: 2px;
	background: color-mix(in oklab, var(--so-accent) 18%, transparent);
	color: var(--so-accent-text);
	font: 500 0.8125rem/1 var(--font-mono);
}

.so-user-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
	flex: 1 1 auto;
	gap: 0.125rem;
}

.so-user-email,
.so-user-account {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.so-user-email {
	font-size: 0.8125rem;
	font-weight: 500;
}

.so-user-account {
	font-family: var(--font-mono);
	font-size: 0.6875rem;
	color: var(--so-ink-3);
}

.so-user-chevron {
	flex: 0 0 auto;
	width: 1rem;
	height: 1rem;
	color: var(--so-ink-3);
}

.so-user-menu-scrim {
	position: fixed;
	inset: 0;
	z-index: 40;
}

.so-user-menu-panel {
	position: absolute;
	left: 0;
	right: 0;
	bottom: calc(100% + 0.375rem);
	z-index: 41;
	padding: 0.25rem;
	border: 1px solid var(--so-line);
	border-radius: 2px;
	background: var(--so-mod);
	box-shadow: 0 16px 40px rgb(0 0 0 / 0.5);
	animation: so-user-menu-in 0.16s ease-out both;
}

@keyframes so-user-menu-in {
	from { opacity: 0; transform: translateY(4px); }
	to { opacity: 1; transform: none; }
}

.so-user-menu-who {
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
	padding: 0.5rem 0.625rem 0.625rem;
	margin-bottom: 0.25rem;
	border-bottom: 1px solid var(--so-line);
}

.so-user-menu-email {
	font-size: 0.8125rem;
	font-weight: 500;
	overflow-wrap: anywhere;
}

.so-user-menu-account {
	font-family: var(--font-mono);
	font-size: 0.6875rem;
	color: var(--so-ink-3);
}

.so-user-menu-item {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	width: 100%;
	padding: 0.5rem 0.625rem;
	border: 0;
	border-radius: 2px;
	background: transparent;
	color: var(--so-ink-2);
	font: 400 0.875rem/1.25 var(--font-sans);
	text-align: left;
	text-decoration: none;
	cursor: pointer;
}

.so-user-menu-item:hover,
.so-user-menu-item:focus-visible {
	background: var(--so-raise);
	color: var(--so-ink);
	outline: none;
}

.so-user-menu-icon {
	width: 1rem;
	height: 1rem;
	flex: 0 0 auto;
	color: var(--so-ink-3);
}

.so-user-menu-item:hover .so-user-menu-icon {
	color: var(--so-accent-text);
}

.so-user-menu-out {
	width: 0.875rem;
	height: 0.875rem;
	margin-left: auto;
	color: var(--so-ink-3);
}

.so-user-menu-sep {
	height: 1px;
	margin: 0.25rem 0;
	background: var(--so-line);
}

/* Collapsed (icon) sidebar: just the initial. */
[data-collapsible="icon"] .so-user-text,
[data-collapsible="icon"] .so-user-chevron {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.so-user-menu-panel {
		animation: none;
	}
}

/* A settings-page block without the card (Billing: the licences panel brings its own cards). */
.so-settings-section > h2 {
	font-size: 1rem;
	font-weight: 600;
	margin: 0 0 0.25rem;
}

.so-settings-section > .so-settings-lead {
	margin-bottom: 1rem;
}

/* A field label with a small action on the same line (SSH allow-list: Add my IP). */
.so-label-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	flex-wrap: wrap;
}

/* Billing details form (/billing). */
.so-billing-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem 1.25rem;
	max-width: 44rem;
}

.so-billing-wide {
	grid-column: 1 / -1;
}

.so-billing-grid .so-settings-field {
	min-width: 0;
}

.so-select {
	height: 2.25rem;
	width: 100%;
	padding: 0 0.75rem;
	border: 1px solid var(--input);
	border-radius: var(--radius);
	background: transparent;
	color: var(--so-ink);
	font-size: 0.875rem;
}

.so-select option {
	background: var(--so-mod);
}

.so-input {
	height: 2.25rem;
	width: 100%;
	padding: 0 0.75rem;
	border: 1px solid var(--input);
	border-radius: var(--radius);
	background: transparent;
	color: var(--so-ink);
	font-size: 0.875rem;
}

/* Multi-line fields (Allowed IP addresses) shouldn't inherit the single-line height. */
textarea.so-input {
	height: auto;
	min-height: 15rem; /* about 10 lines */
	padding: 0.5rem 0.75rem;
	line-height: 1.5;
	resize: vertical;
}

.so-rule-row {
	display: inline-flex;
	align-items: baseline;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.so-input[type="date"] {
	color-scheme: dark;
}

.so-audit-filters {
	display: grid;
	grid-template-columns: minmax(12rem, 1.4fr) minmax(12rem, 1.2fr) minmax(9rem, 0.8fr) minmax(9rem, 0.8fr) auto;
	gap: 0.75rem;
	align-items: end;
	margin-bottom: 1rem;
}

.so-audit-filters .so-settings-field {
	min-width: 0;
}

.so-audit-filter-actions {
	display: flex;
	gap: 0.5rem;
}

.so-audit-table td {
	vertical-align: top;
}

.so-audit-ip {
	color: var(--muted-foreground);
	font-size: 0.75rem;
	font-variant-numeric: tabular-nums;
}

.so-audit-action {
	font-size: 0.75rem;
	white-space: nowrap;
}

tr.so-audit-detail > td {
	background: color-mix(in oklab, var(--so-mod) 60%, transparent);
}

.so-audit-diff {
	width: 100%;
	font-size: 0.8125rem;
	border-collapse: collapse;
}

.so-audit-diff th {
	text-align: left;
	font-weight: 500;
	color: var(--muted-foreground);
	padding: 0.25rem 0.5rem;
}

.so-audit-diff td {
	padding: 0.25rem 0.5rem;
	border-top: 1px solid var(--border);
	vertical-align: top;
}

.so-audit-diff td:first-child {
	width: 12rem;
	color: var(--muted-foreground);
}

.so-audit-diff pre {
	margin: 0;
	white-space: pre-wrap;
	word-break: break-word;
	font-family: inherit;
}

.so-audit-diff tr.so-audit-changed td:last-child {
	color: var(--status-ok);
}

.so-audit-pager {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 0.75rem;
}

@media (max-width: 900px) {
	.so-audit-filters {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 640px) {
	.so-billing-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

.so-impersonate-banner {
	position: sticky;
	top: 0;
	z-index: 40;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1.25rem;
	margin: -0.5rem -0.5rem 1.25rem;
	padding: 0.7rem 1rem;
	background: var(--so-accent, #0e6b4f);
	color: #fff;
	font-size: 0.875rem;
	border-radius: 0.5rem;
}

.so-impersonate-banner strong {
	font-weight: 600;
}

.so-impersonate-expires {
	font-family: var(--font-mono);
	font-size: 0.75rem;
	letter-spacing: 0.02em;
	opacity: 0.85;
	margin-left: auto;
}

.so-impersonate-stop {
	appearance: none;
	border: 1px solid rgba(255, 255, 255, 0.55);
	background: transparent;
	color: #fff;
	font: inherit;
	font-size: 0.8125rem;
	padding: 0.25rem 0.75rem;
	border-radius: 0.375rem;
	cursor: pointer;
}

.so-impersonate-stop:hover {
	background: rgba(255, 255, 255, 0.12);
}

.so-link-button {
	appearance: none;
	border: 0;
	background: none;
	padding: 0;
	color: var(--so-accent-text, var(--primary));
	font: inherit;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 0.15em;
	white-space: nowrap;
}

.so-l7-disabled {
	position: relative;
	display: inline-flex;
	cursor: help;
}
.so-l7-disabled-reason {
	display: none;
	position: absolute;
	z-index: 20;
	left: 0;
	top: calc(100% + 0.35rem);
	width: max-content;
	max-width: 18rem;
	padding: 0.5rem 0.65rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--card);
	color: var(--foreground);
	font-size: 0.75rem;
	line-height: 1.35;
	box-shadow: 0 4px 16px rgb(0 0 0 / 0.35);
	white-space: normal;
}
.so-l7-disabled:hover .so-l7-disabled-reason,
.so-l7-disabled:focus-within .so-l7-disabled-reason {
	display: block;
}

.so-check-dl {
	margin: 0;
	display: grid;
	gap: 0.25rem 1rem;
}
.so-check-dl > div {
	display: grid;
	grid-template-columns: 8rem 1fr;
	gap: 0.5rem;
	font-size: 0.875rem;
}
.so-check-dl dt {
	color: var(--muted-foreground);
	font-weight: 500;
}
.so-check-dl dd {
	margin: 0;
}

/* Subscription plan on /billing: quantity fields stacked in one column. */
.so-plan-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1rem;
	max-width: 22rem;
}

.so-plan-bundles {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
	gap: 1rem 1.25rem;
	max-width: 56rem;
}

/* Extra L7 domains field when opened from an Add more L7 domains alert. */
.so-plan-highlight {
	outline: 2px solid var(--status-warn);
	outline-offset: 0.5rem;
	border-radius: var(--radius);
}

.so-plan-sub {
	margin: 1.25rem 0 0.35rem;
	font-size: 1rem;
	font-weight: 600;
}

.so-plan-subtotal,
.so-plan-preview {
	margin-top: 1rem;
	max-width: 44rem;
}

.so-plan-lines {
	margin: 0.5rem 0;
	padding-left: 1.25rem;
}

@media (max-width: 640px) {
	.so-plan-bundles {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Onboarding wizard (/welcome, /welcome/done): step indicator, actions and the Getting started checklist. */
.so-steps-wrap {
	margin: 0 0 1.25rem;
	max-width: 60rem;
}

.so-steps-count {
	font-family: var(--font-mono, ui-monospace, monospace);
	font-size: 0.75rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--so-accent-text);
	margin: 0 0 0.6rem;
}

.so-steps {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.so-step {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.875rem;
	color: var(--muted-foreground);
}

.so-step-dot {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.5rem;
	height: 1.5rem;
	border-radius: 999px;
	border: 1px solid var(--border);
	font-size: 0.75rem;
	font-weight: 600;
}

.so-step.is-current {
	color: var(--foreground);
	font-weight: 600;
}

.so-step.is-current .so-step-dot {
	border-color: var(--so-accent);
	background: var(--so-accent);
	color: var(--so-accent-ink);
}

.so-step.is-done .so-step-dot {
	border-color: var(--so-accent);
	color: var(--so-accent-text);
}

.so-wizard-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem;
	font-size: 0.875rem;
}

.so-done-lead {
	margin: 0;
	color: var(--foreground);
}

.so-done-pending {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.so-checklist-head {
	display: flex;
	align-items: baseline;
	gap: 0.75rem;
}

.so-checklist-progress {
	font-size: 0.8125rem;
	color: var(--muted-foreground);
}

.so-checklist-hide {
	margin-left: auto;
	align-self: center;
	color: var(--muted-foreground);
	border-radius: 0.375rem;
	padding: 0.25rem;
}

.so-checklist-hide:hover {
	color: var(--foreground);
	background: var(--so-raise);
}

.so-checklist {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
}

.so-checklist-item {
	display: flex;
	gap: 0.75rem;
	align-items: flex-start;
}

.so-checklist-tick {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.25rem;
	height: 1.25rem;
	margin-top: 0.1rem;
	border-radius: 999px;
	border: 1px solid var(--border);
}

.so-checklist-item.is-done .so-checklist-tick {
	border-color: var(--so-accent);
	background: var(--so-accent);
	color: var(--so-accent-ink);
}

.so-checklist-title {
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--foreground);
	text-decoration: none;
}

.so-checklist-title:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.so-checklist-item.is-done .so-checklist-title {
	color: var(--muted-foreground);
	text-decoration: line-through;
}

.so-checklist-detail {
	font-size: 0.8125rem;
	color: var(--muted-foreground);
	margin: 0.15rem 0 0.25rem;
	line-height: 1.5;
	max-width: 42rem;
}

.so-checklist-guide {
	display: inline-flex;
	align-items: center;
	gap: 0.2rem;
	font-size: 0.8125rem;
	color: var(--so-accent-text);
	text-decoration: none;
}

.so-checklist-guide + .so-checklist-guide {
	margin-left: 1rem;
}

.so-checklist-guide:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Circled-i help icon next to client-facing headings and columns. Links to the public KB. */
.so-kb-help {
	color: var(--so-ink-3);
	display: inline-flex;
	align-items: center;
	vertical-align: middle;
	flex: none;
	margin-inline-start: 0.3rem;
	border-radius: 999px;
	text-decoration: none;
	line-height: 0;
}

.so-kb-help:hover,
.so-kb-help:focus-visible {
	color: var(--so-accent-text);
	text-decoration: none;
}

.so-kb-help-icon {
	width: 0.875rem;
	height: 0.875rem;
}

.so-table th .so-kb-help,
.so-stat-label .so-kb-help,
.so-tile-label .so-kb-help {
	margin-inline-start: 0.25rem;
}


/* Assign a licence link beside an unlicensed sentry badge. */
.so-licence-link {
	margin-left: 0.5rem;
	font-size: 0.8125rem;
	white-space: nowrap;
}

/* Deny list: a single address opens its stored GeoIP location under the row. */
.so-deny-ip {
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	cursor: pointer;
	text-align: left;
}
.so-deny-location-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 2rem;
	margin: 0 0 0.25rem 0;
}
.so-deny-location-list dt {
	font-size: 0.75rem;
	color: var(--muted-foreground);
}
.so-deny-location-list dd {
	margin: 0;
}

/* Identified traffic: a group row above its sources. */
.so-table .so-group-row th,
.so-table .so-group-row td {
	color: var(--foreground);
	font-weight: 600;
	background: var(--muted);
	border-bottom: 1px solid var(--border);
}
.so-table .so-group-item {
	padding-left: 1.75rem;
}

/* Request a service: form beside the requirements. */
.so-request-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 1.25rem;
	align-items: start;
}
@media (max-width: 1024px) {
	.so-request-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}
.so-request-form {
	display: flex;
	flex-direction: column;
	gap: 0.875rem;
}
.so-request-list {
	margin: 0.5rem 0 0 1.25rem;
	padding: 0;
	list-style: decimal;
	font-size: 0.875rem;
}
.so-request-list li {
	margin-bottom: 0.4rem;
}
.so-request-why dt {
	font-weight: 600;
	font-size: 0.875rem;
	margin-top: 0.75rem;
}
.so-request-why dd {
	margin: 0.2rem 0 0 0;
	font-size: 0.875rem;
	color: var(--muted-foreground);
}

/* Domain page (John, 15 Nov 2026): header that stays put, then tabs with their own URLs. */
.so-domain-header {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.5rem;
	align-items: flex-start;
	justify-content: space-between;
	margin-bottom: 1rem;
}

.so-domain-title {
	margin-bottom: 0;
}

.so-domain-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
	align-items: center;
	margin-top: 0.25rem;
}

.so-domain-actions {
	margin-bottom: 0;
	align-items: center;
}

.so-domain-actions form {
	display: contents;
}

.so-page-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	border-bottom: 1px solid var(--border);
	margin: 0.5rem 0 1.5rem;
}

.so-page-tab {
	padding: 0.5rem 0.875rem;
	margin-bottom: -1px;
	border-bottom: 2px solid transparent;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--muted-foreground);
	text-decoration: none;
}

.so-page-tab:hover {
	color: var(--foreground);
}

.so-page-tab[aria-current="page"] {
	color: var(--foreground);
	border-bottom-color: var(--primary);
}

/* Overview counters open the tab with the detail. */
a.so-stat-link {
	display: block;
	color: inherit;
	text-decoration: none;
	transition: border-color 120ms ease;
}

a.so-stat-link:hover,
a.so-stat-link:focus-visible {
	border-color: var(--primary);
}

.so-stat-value.so-stat-text {
	font-size: 1rem;
	line-height: 1.4;
	overflow-wrap: anywhere;
}

.so-protection-table td:first-child {
	white-space: nowrap;
	font-weight: 500;
}

.so-protection-table td:last-child {
	text-align: right;
	white-space: nowrap;
}

/* Edit domain: jump links to each section. */
.so-section-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1.5rem;
}

.so-section-link {
	font-size: 0.8125rem;
	padding: 0.25rem 0.625rem;
	border: 1px solid var(--border);
	border-radius: 9999px;
	color: var(--muted-foreground);
	text-decoration: none;
}

.so-section-link:hover {
	color: var(--foreground);
	border-color: var(--primary);
}

[id].so-card,
section[id] {
	scroll-margin-top: 5rem;
}

/* Country blocking (Settings › Country blocking, domain Countries tab) */
.so-country-table td {
	vertical-align: middle;
}
.so-country-table td:last-child {
	text-align: right;
	white-space: nowrap;
}
.so-country-table .so-country-locked td:first-child svg {
	display: inline-block;
	margin-right: 0.25rem;
	vertical-align: -1px;
}
.so-muted-row {
	opacity: 0.6;
}
.so-country-add {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: flex-end;
}
.so-country-add .so-settings-field {
	margin: 0;
	min-width: 15rem;
}

/* Helpdesk: new ticket, conversation, notes, attachments, composer. */
.so-section-title {
	font-size: 1rem;
	font-weight: 600;
	margin: 0 0 0.75rem 0;
}

.so-ticket-new {
	max-width: 48rem;
	margin-bottom: 1.5rem;
}

.so-ticket-new-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: flex-end;
}

.so-ticket-new-subject {
	flex: 1 1 18rem;
}

.so-ticket-filters .so-input,
.so-ticket-filters .so-select,
.so-ticket-staff .so-select {
	min-width: 11rem;
}

.so-ticket-number {
	color: var(--muted-foreground);
	font-weight: 500;
}

.so-ticket-facts {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.so-thread {
	list-style: none;
	margin: 0 0 1.5rem 0;
	padding: 0;
	display: grid;
	gap: 0.75rem;
	max-width: 56rem;
}

.so-msg {
	border: 1px solid var(--border);
	background: var(--card);
	padding: 0.875rem 1rem;
}

/* The client's messages sit to the left, support's indented with an accent edge, notes dashed and tinted. */
.so-msg-client {
	margin-right: 3rem;
}

.so-msg-staff {
	margin-left: 3rem;
	background: var(--so-raise);
	box-shadow: inset 3px 0 0 var(--so-accent);
}

.so-msg-note {
	margin-left: 3rem;
	border: 1px dashed var(--status-warn);
	background: color-mix(in oklab, var(--status-warn-bg) 70%, var(--card));
}

.so-msg-system {
	background: color-mix(in oklab, var(--muted) 55%, var(--card));
	color: var(--muted-foreground);
}

@media (max-width: 640px) {
	.so-msg-client { margin-right: 0; }
	.so-msg-staff, .so-msg-note { margin-left: 0; }
}

.so-msg-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.75rem;
	color: var(--muted-foreground);
	margin-bottom: 0.5rem;
}

.so-msg-author {
	color: var(--foreground);
	font-weight: 600;
	font-size: 0.8125rem;
}

.so-msg-time {
	margin-left: auto;
}

.so-badge-staff {
	background: color-mix(in oklab, var(--so-accent) 16%, transparent);
	color: var(--so-accent-text);
}

.so-badge-note {
	background: var(--status-warn-bg);
	color: var(--status-warn);
}

/* The helpdesk assistant's suggested replies: staff only, dashed in the accent colour, with actions. */
.so-msg-draft {
	margin-left: 3rem;
	border: 1px dashed var(--so-accent);
	background: color-mix(in oklab, var(--so-accent) 7%, var(--card));
}

.so-msg-draft-done {
	opacity: 0.7;
}

@media (max-width: 640px) {
	.so-msg-draft { margin-left: 0; }
}

.so-badge-draft {
	background: color-mix(in oklab, var(--so-accent) 16%, transparent);
	color: var(--so-accent-text);
}

.so-msg-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin-top: 0.75rem;
}

/* Sanitised message HTML (bold, italic, lists, links, code). */
.so-rich {
	font-size: 0.875rem;
	line-height: 1.6;
	overflow-wrap: anywhere;
}

.so-rich p { margin: 0 0 0.6rem 0; }
.so-rich p:last-child { margin-bottom: 0; }
.so-rich ul, .so-rich ol { margin: 0 0 0.6rem 0; padding-left: 1.4rem; }
.so-rich ul { list-style: disc; }
.so-rich ol { list-style: decimal; }
.so-rich a { color: var(--so-accent-text); text-decoration: underline; text-underline-offset: 3px; }
.so-rich code { font-family: var(--font-mono); background: var(--so-bg); padding: 0.05rem 0.3rem; }
.so-rich pre {
	font-family: var(--font-mono);
	font-size: 0.8125rem;
	background: var(--so-bg);
	border: 1px solid var(--border);
	padding: 0.6rem 0.75rem;
	margin: 0 0 0.6rem 0;
	white-space: pre-wrap;
	overflow-x: auto;
}
.so-rich blockquote { border-left: 3px solid var(--so-line-2); padding-left: 0.75rem; color: var(--muted-foreground); margin: 0 0 0.6rem 0; }

.so-attachments {
	list-style: none;
	margin: 0.75rem 0 0 0;
	padding: 0;
	display: grid;
	gap: 0.35rem;
	font-size: 0.8125rem;
}

.so-attachments li {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
}

.so-attachment-name {
	overflow-wrap: anywhere;
}

.so-attachment-size {
	color: var(--muted-foreground);
	font-variant-numeric: tabular-nums;
}

.so-attachment-remove {
	color: var(--muted-foreground);
	font-size: 0.75rem;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.so-attachment-remove:hover {
	color: var(--foreground);
}

.so-reply {
	max-width: 56rem;
}

.so-reply-note {
	border-style: dashed;
	border-color: var(--status-warn);
}

.so-composer-tools {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem;
}

.so-composer-tool {
	height: 1.875rem;
	padding: 0 0.55rem;
	font-size: 0.8125rem;
	color: var(--muted-foreground);
	border: 1px solid transparent;
	background: transparent;
}

.so-composer-tool:hover {
	color: var(--foreground);
	background: var(--so-raise);
}

.so-composer-tool-on {
	color: var(--foreground);
	border-color: var(--so-line-2);
	background: var(--so-raise);
}

.so-composer-sep {
	width: 1px;
	height: 1.25rem;
	background: var(--border);
	margin: 0 0.25rem;
}

.so-composer-link {
	display: flex;
	gap: 0.35rem;
	align-items: center;
	margin-top: 0.4rem;
	max-width: 32rem;
}

.so-composer-files {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	margin-top: 0.6rem;
}

.so-composer-attach {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	height: 2rem;
	padding: 0 0.75rem;
	border: 1px solid var(--border);
	font-size: 0.8125rem;
	cursor: pointer;
}

.so-composer-attach:hover {
	border-color: var(--so-line-2);
	background: var(--so-raise);
}

.so-composer-attach:focus-within {
	outline: 2px solid var(--so-accent);
	outline-offset: 2px;
}

.so-composer-input {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
}

.so-check {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.875rem;
}

/* Website analytics (Admin): site and range switches, two-up tables with a share bar behind each label. */
.so-analytics-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 0.75rem;
	margin-bottom: 0.5rem;
}

.so-analytics-custom {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 0.5rem;
}

.so-analytics-range {
	margin: 0 0 1rem;
}

.so-analytics-grid {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
}

.so-analytics-grid > .so-chart {
	margin-bottom: 0;
}

.so-analytics-grid + .so-chart,
.so-analytics-grid + .so-analytics-grid,
.so-chart + .so-analytics-grid {
	margin-top: 1rem;
}

.so-analytics-grid-3 {
	grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.so-analytics-table td.so-analytics-label {
	position: relative;
	max-width: 22rem;
}

.so-analytics-bar {
	position: absolute;
	inset: 0.3rem auto 0.3rem 0;
	border-radius: 0.25rem;
	background: color-mix(in srgb, var(--chart-neutral) 18%, transparent);
	pointer-events: none;
}

.so-analytics-text {
	position: relative;
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	padding-left: 0.35rem;
}

.so-analytics-up {
	color: var(--status-ok);
}

.so-analytics-down {
	color: var(--status-danger);
}
