/*
 * Atlas: the official moderation panel's page, drawn in Atlas's look. The class names and the composition are the
 * official panel's (box, tag, item, btn, chip...); every value comes from the custom properties below, which are
 * Atlas's design tokens (documentation/dashboard-design/design/DESIGN_SYSTEM.md). Dark by default, light by
 * [data-theme="light"] or the system preference.
 */

/* ------------------------------------------------------------------ */
/* Fonts: self-hosted, so the page loads nothing from another origin   */
/* ------------------------------------------------------------------ */

@font-face {
	font-family: "Inter Variable";
	font-style: normal;
	font-display: swap;
	font-weight: 100 900;
	src: url("fonts/inter-latin-ext-opsz-normal.woff2") format("woff2-variations");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "Inter Variable";
	font-style: normal;
	font-display: swap;
	font-weight: 100 900;
	src: url("fonts/inter-latin-opsz-normal.woff2") format("woff2-variations");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "JetBrains Mono Variable";
	font-style: normal;
	font-display: swap;
	font-weight: 100 800;
	src: url("fonts/jetbrains-mono-latin-ext-wght-normal.woff2") format("woff2-variations");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "JetBrains Mono Variable";
	font-style: normal;
	font-display: swap;
	font-weight: 100 800;
	src: url("fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2-variations");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ------------------------------------------------------------------ */
/* Tokens                                                              */
/* ------------------------------------------------------------------ */

:root {
	--space-1: 4px;
	--space-2: 8px;
	--space-3: 12px;
	--space-4: 16px;
	--space-6: 24px;
	--control-xs: 20px;
	--control-sm: 24px;
	--control-md: 30px;
	--control-lg: 36px;
	--row: 30px;
	--top-h: 52px;
	--side-w: 232px;
	--side-w-rail: 56px;
	--rail-w: 360px;
	--inspector-w: 340px;
	--search-w: 320px;
	--content-max: 1760px;
	--gutter: 24px;
	--font-sans: "Inter Variable", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--font-mono: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
	--text-2xs: 11px;
	--text-xs: 12px;
	--text-sm: 13px;
	--text-md: 14px;
	--text-lg: 16px;
	--text-xl: 22px;
	--text-2xl: 28px;
	--weight-regular: 420;
	--weight-medium: 520;
	--weight-semibold: 600;
	--tracking-caps: 0.06em;
	--radius-xs: 2px;
	--radius-sm: 4px;
	--radius-md: 6px;
	--radius-lg: 8px;
	--radius-full: 999px;
	--dur-instant: 80ms;
	--dur-fast: 120ms;
	--dur-base: 200ms;
	--dur-slow: 320ms;
	--ease-standard: cubic-bezier(0.2, 0, 0, 1);
	--ease-out: cubic-bezier(0.16, 1, 0.3, 1);
	--blur-overlay: 8px;
	--vital-life: #69A148;
	--vital-food: #AF352A;
	--vital-water: #2F78BD;
	--vital-cold: #669BB1;
	--vital-low: #F2C80F;
	--vital-text: #FFFFFF;
	--vital-text-shadow: rgba(0, 0, 0, 0.6);
}

@media (max-width: 767px) {

	:root {
		--gutter: 16px;
	}
}

/* Dark (default) */
:root {
	color-scheme: dark;
	--bg: #070B12;
	--bg-raised: #0A0F18;
	--bg-sunken: #060910;
	--surface-1: #0C1320;
	--surface-2: #111A2B;
	--surface-3: #16223A;
	--surface-overlay: #121B2C;
	--scrim: rgb(3 6 11 / 0.66);
	--border: #1A2539;
	--border-strong: #273852;
	--border-tick: #3A557E;
	--border-control: #646E7E;
	--text: #E7EEF8;
	--text-muted: #A7B6CA;
	--text-faint: #8595AE;
	--text-disabled: #56657D;
	--accent: #EEF3FA;
	--accent-hover: #FFFFFF;
	--accent-fg: #070B12;
	--accent-wash: rgb(238 243 250 / 0.08);
	--focus: #EEF3FA;
	--link: #E7EEF8;
	--online: #3DD5F3;
	--online-fg: #4FD9F5;
	--online-bg: rgb(61 213 243 / 0.10);
	--status-done: #4ADE80;
	--status-done-bg: rgb(74 222 128 / 0.12);
	--status-denied: #C4A1FF;
	--status-denied-bg: rgb(196 161 255 / 0.12);
	--online-edge: rgb(61 213 243 / 0.42);
	--connecting: #FFB547;
	--connecting-fg: #FFBA55;
	--connecting-bg: rgb(255 181 71 / 0.10);
	--connecting-edge: rgb(255 181 71 / 0.44);
	--offline: #FF6B6B;
	--offline-fg: #FF7D7D;
	--offline-bg: rgb(255 107 107 / 0.10);
	--offline-edge: rgb(255 107 107 / 0.45);
	--disabled: #8C9AB0;
	--disabled-fg: #9BA8BC;
	--disabled-bg: rgb(140 154 176 / 0.09);
	--disabled-edge: rgb(140 154 176 / 0.38);
	--on-danger: #1A0708;
	--info: #9AA5FF;
	--info-fg: #A9B2FF;
	--info-bg: rgb(154 165 255 / 0.10);
	--info-edge: rgb(154 165 255 / 0.42);
	--hatch-neutral: repeating-linear-gradient(135deg, rgb(140 154 176 / 0.16) 0 1px, transparent 1px 6px);
	--hatch-warn: repeating-linear-gradient(135deg, rgb(255 181 71 / 0.16) 0 1px, transparent 1px 6px);
	--hatch-crit: repeating-linear-gradient(135deg, rgb(255 107 107 / 0.18) 0 1px, transparent 1px 6px);
	--atmo-line: rgb(58 85 126 / 0.12);
	--viz-1: #4392F7;
	--viz-2: #D13D91;
	--viz-3: #55A633;
	--viz-4: #8B50CF;
	--viz-5: #05A291;
	--viz-6: #8A84E4;
	--viz-grid: #162134;
	--viz-axis: #273852;
	--viz-label: #8595AE;
	--meter-track: #060910;
	--meter-fill: #A7B6CA;
	--meter-low: #FFB547;
	--meter-critical: #FF6B6B;
	--map-bg: #08101B;
	--map-grid: #111925;
	--map-grid-major: #212A39;
	--map-dot: #B9C8DD;
	--map-void: #03070D;
	--map-heat-0: 20 44 82;
	--map-heat-1: 54 98 152;
	--map-heat-2: 128 166 208;
	--map-heat-3: 222 236 250;
	--map-label-plate: rgb(5 9 16 / 0.86);
	--map-label-text: #E7EEF8;
	--map-vignette: rgb(3 6 11 / 0.55);
	--map-ruler-bg: #070B13;
	--viz-7: #909C07;
	--viz-8: #D4679F;
	--shadow-1: inset 0 1px 0 rgb(255 255 255 / 0.02);
	--shadow-pop: 0 12px 32px rgb(0 0 0 / 0.42), 0 2px 6px rgb(0 0 0 / 0.30);
	--shadow-overlay: 0 24px 64px rgb(0 0 0 / 0.55), 0 4px 12px rgb(0 0 0 / 0.35);
}

/* Light: separately tuned, ink accent, no page atmosphere, no corner ticks */
:root[data-theme="light"] {
	color-scheme: light;
	--bg: #F3F5F8;
	--bg-raised: #F9FAFB;
	--bg-sunken: #EDF0F5;
	--surface-1: #FFFFFF;
	--surface-2: #F6F8FA;
	--surface-3: #EEF2F8;
	--surface-overlay: #FFFFFF;
	--scrim: rgb(11 18 32 / 0.36);
	--border: #DFE4EB;
	--border-strong: #C5CEDA;
	--border-tick: transparent;
	--border-control: #7D8898;
	--text: #0B1220;
	--text-muted: #3D4A5E;
	--text-faint: #57647B;
	--text-disabled: #A3ADBC;
	--accent: #0F1A2B;
	--accent-hover: #24324A;
	--accent-fg: #FFFFFF;
	--accent-wash: rgb(15 26 43 / 0.06);
	--focus: #0F1A2B;
	--link: #0B1220;
	--online: #0C8E95;
	--online-fg: #05666B;
	--online-bg: rgb(12 142 149 / 0.10);
	--status-done: #15803D;
	--status-done-bg: rgb(21 128 61 / 0.10);
	--status-denied: #7E3FD1;
	--status-denied-bg: rgb(126 63 209 / 0.09);
	--online-edge: rgb(12 142 149 / 0.45);
	--connecting: #B97800;
	--connecting-fg: #8A5300;
	--connecting-bg: rgb(185 120 0 / 0.10);
	--connecting-edge: rgb(185 120 0 / 0.50);
	--offline: #D4402A;
	--offline-fg: #AD2A1B;
	--offline-bg: rgb(212 64 42 / 0.08);
	--offline-edge: rgb(212 64 42 / 0.45);
	--disabled: #7C8798;
	--disabled-fg: #4C5769;
	--disabled-bg: rgb(124 135 152 / 0.10);
	--disabled-edge: rgb(124 135 152 / 0.50);
	--on-danger: #FFFFFF;
	--info: #4F5BD5;
	--info-fg: #3A44B0;
	--info-bg: rgb(79 91 213 / 0.08);
	--info-edge: rgb(79 91 213 / 0.40);
	--hatch-neutral: repeating-linear-gradient(135deg, rgb(87 100 123 / 0.16) 0 1px, transparent 1px 6px);
	--hatch-warn: repeating-linear-gradient(135deg, rgb(185 120 0 / 0.22) 0 1px, transparent 1px 6px);
	--hatch-crit: repeating-linear-gradient(135deg, rgb(212 64 42 / 0.20) 0 1px, transparent 1px 6px);
	--atmo-line: transparent;
	--viz-1: #1161BB;
	--viz-2: #A82571;
	--viz-3: #388A08;
	--viz-4: #9867E1;
	--viz-5: #00897B;
	--viz-6: #5D52B4;
	--viz-grid: #E8ECF1;
	--viz-axis: #C5CEDA;
	--viz-label: #57647B;
	--meter-track: #E6EBF1;
	--meter-fill: #5B6779;
	--meter-low: #B97800;
	--meter-critical: #D4402A;
	--map-bg: #F1F4F8;
	--map-grid: #E2E7EE;
	--map-grid-major: #CED6E1;
	--map-dot: #2E3F5A;
	--map-void: #E2E7EE;
	--map-heat-0: 206 220 240;
	--map-heat-1: 140 168 210;
	--map-heat-2: 62 98 160;
	--map-heat-3: 16 40 92;
	--map-label-plate: rgb(255 255 255 / 0.92);
	--map-label-text: #0B1220;
	--map-vignette: rgb(15 26 43 / 0.05);
	--map-ruler-bg: #F8FAFC;
	--viz-7: #898D05;
	--viz-8: #C3518D;
	--shadow-1: inset 0 1px 0 rgb(255 255 255 / 0.6);
	--shadow-pop: 0 8px 24px rgb(15 26 43 / 0.12), 0 1px 3px rgb(15 26 43 / 0.10);
	--shadow-overlay: 0 24px 64px rgb(15 26 43 / 0.18), 0 4px 12px rgb(15 26 43 / 0.10);
}

/* The same light values when the system asks for light and no theme is picked */
@media (prefers-color-scheme: light) {

	:root:not([data-theme="dark"]) {
		color-scheme: light;
		--bg: #F3F5F8;
		--bg-raised: #F9FAFB;
		--bg-sunken: #EDF0F5;
		--surface-1: #FFFFFF;
		--surface-2: #F6F8FA;
		--surface-3: #EEF2F8;
		--surface-overlay: #FFFFFF;
		--scrim: rgb(11 18 32 / 0.36);
		--border: #DFE4EB;
		--border-strong: #C5CEDA;
		--border-tick: transparent;
		--border-control: #7D8898;
		--text: #0B1220;
		--text-muted: #3D4A5E;
		--text-faint: #57647B;
		--text-disabled: #A3ADBC;
		--accent: #0F1A2B;
		--accent-hover: #24324A;
		--accent-fg: #FFFFFF;
		--accent-wash: rgb(15 26 43 / 0.06);
		--focus: #0F1A2B;
		--link: #0B1220;
		--online: #0C8E95;
		--online-fg: #05666B;
		--online-bg: rgb(12 142 149 / 0.10);
		--status-done: #15803D;
		--status-done-bg: rgb(21 128 61 / 0.10);
		--status-denied: #7E3FD1;
		--status-denied-bg: rgb(126 63 209 / 0.09);
		--online-edge: rgb(12 142 149 / 0.45);
		--connecting: #B97800;
		--connecting-fg: #8A5300;
		--connecting-bg: rgb(185 120 0 / 0.10);
		--connecting-edge: rgb(185 120 0 / 0.50);
		--offline: #D4402A;
		--offline-fg: #AD2A1B;
		--offline-bg: rgb(212 64 42 / 0.08);
		--offline-edge: rgb(212 64 42 / 0.45);
		--disabled: #7C8798;
		--disabled-fg: #4C5769;
		--disabled-bg: rgb(124 135 152 / 0.10);
		--disabled-edge: rgb(124 135 152 / 0.50);
		--on-danger: #FFFFFF;
		--info: #4F5BD5;
		--info-fg: #3A44B0;
		--info-bg: rgb(79 91 213 / 0.08);
		--info-edge: rgb(79 91 213 / 0.40);
		--hatch-neutral: repeating-linear-gradient(135deg, rgb(87 100 123 / 0.16) 0 1px, transparent 1px 6px);
		--hatch-warn: repeating-linear-gradient(135deg, rgb(185 120 0 / 0.22) 0 1px, transparent 1px 6px);
		--hatch-crit: repeating-linear-gradient(135deg, rgb(212 64 42 / 0.20) 0 1px, transparent 1px 6px);
		--atmo-line: transparent;
		--viz-1: #1161BB;
		--viz-2: #A82571;
		--viz-3: #388A08;
		--viz-4: #9867E1;
		--viz-5: #00897B;
		--viz-6: #5D52B4;
		--viz-grid: #E8ECF1;
		--viz-axis: #C5CEDA;
		--viz-label: #57647B;
		--meter-track: #E6EBF1;
		--meter-fill: #5B6779;
		--meter-low: #B97800;
		--meter-critical: #D4402A;
		--map-bg: #F1F4F8;
		--map-grid: #E2E7EE;
		--map-grid-major: #CED6E1;
		--map-dot: #2E3F5A;
		--map-void: #E2E7EE;
		--map-heat-0: 206 220 240;
		--map-heat-1: 140 168 210;
		--map-heat-2: 62 98 160;
		--map-heat-3: 16 40 92;
		--map-label-plate: rgb(255 255 255 / 0.92);
		--map-label-text: #0B1220;
		--map-vignette: rgb(15 26 43 / 0.05);
		--map-ruler-bg: #F8FAFC;
		--viz-7: #898D05;
		--viz-8: #C3518D;
		--shadow-1: inset 0 1px 0 rgb(255 255 255 / 0.6);
		--shadow-pop: 0 8px 24px rgb(15 26 43 / 0.12), 0 1px 3px rgb(15 26 43 / 0.10);
		--shadow-overlay: 0 24px 64px rgb(15 26 43 / 0.18), 0 4px 12px rgb(15 26 43 / 0.10);
	}
}

@media (prefers-reduced-motion: reduce) {

	:root {
		--dur-instant: 0ms;
		--dur-fast: 0ms;
		--dur-base: 0ms;
		--dur-slow: 0ms;
	}
}

/* ------------------------------------------------------------------ */
/* Base                                                                */
/* ------------------------------------------------------------------ */

*, *::before, *::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	background: var(--bg);
	scrollbar-color: var(--border-strong) transparent;
}

html, body {
	min-height: 100%;
	margin: 0;
}

body {
	background: var(--bg);
	color: var(--text);
	font: var(--weight-regular) var(--text-sm) / 20px var(--font-sans);
	font-variant-numeric: tabular-nums;
	font-optical-sizing: auto;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, p {
	margin: 0;
}

button, input, select, textarea {
	margin: 0;
	font: inherit;
	color: inherit;
	letter-spacing: inherit;
}

button {
	cursor: pointer;
}

a {
	color: var(--link);
	text-decoration: underline;
	text-decoration-color: var(--border-strong);
	text-underline-offset: 2px;
}

a:hover {
	text-decoration-color: currentColor;
}

code, pre, kbd {
	font-family: var(--font-mono);
	font-variant-ligatures: none;
}

[hidden] {
	display: none !important;
}

::selection {
	background: color-mix(in srgb, var(--accent) 28%, transparent);
}

:focus-visible {
	outline: 2px solid var(--focus);
	outline-offset: 2px;
}

:focus:not(:focus-visible) {
	outline: none;
}

.mono {
	font-family: var(--font-mono);
	font-size: var(--text-xs);
	font-variant-ligatures: none;
}

.num {
	font-family: var(--font-mono);
	font-size: var(--text-xs);
	font-variant-numeric: tabular-nums;
}

.dim {
	color: var(--text-faint);
}

.gold {
	color: var(--text);
	font-weight: var(--weight-semibold);
}

.spacer {
	flex: 1;
}

/* ------------------------------------------------------------------ */
/* Buttons: secondary by default; green is the primary action, yellow  */
/* a change, red a ban or a removal (solid inside a modal)             */
/* ------------------------------------------------------------------ */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	flex: none;
	height: var(--control-md);
	padding: 0 12px;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
	background: var(--surface-2);
	color: var(--text);
	font: var(--weight-medium) var(--text-sm) / 1 var(--font-sans);
	white-space: nowrap;
	user-select: none;
	transition: background var(--dur-fast) var(--ease-standard), border-color var(--dur-fast) var(--ease-standard), transform var(--dur-instant) var(--ease-standard);
}

.btn:hover {
	background: var(--surface-3);
}

.btn:active:not([disabled]) {
	transform: translateY(1px);
}

.btn[disabled] {
	opacity: 0.55;
	cursor: not-allowed;
}

.btn-small {
	height: var(--control-sm);
	padding: 0 8px;
	gap: 6px;
	font-size: var(--text-xs);
}

.btn-tiny {
	height: var(--control-xs);
	padding: 0 6px;
	gap: 4px;
	font-family: var(--font-mono);
	font-size: var(--text-2xs);
	font-weight: var(--weight-regular);
}

.btn-green {
	background: var(--accent);
	border-color: var(--accent);
	color: var(--accent-fg);
}

.btn-green:hover {
	background: var(--accent-hover);
	border-color: var(--accent-hover);
}

.btn-yellow {
	background: var(--connecting-bg);
	border-color: var(--connecting-edge);
	color: var(--connecting-fg);
}

.btn-yellow:hover {
	background: color-mix(in srgb, var(--connecting) 18%, transparent);
}

.btn-teal {
	background: transparent;
	border-color: var(--border-strong);
	color: var(--text-muted);
}

.btn-teal:hover {
	background: var(--surface-2);
	color: var(--text);
}

.btn-red {
	background: var(--offline-bg);
	border-color: var(--offline-edge);
	color: var(--offline-fg);
}

.btn-red:hover {
	background: color-mix(in srgb, var(--offline) 18%, transparent);
}

.modal .btn-red:not(.btn-tiny):not(.btn-small) {
	background: var(--offline);
	border-color: var(--offline);
	color: var(--on-danger);
}

.modal .btn-red:not(.btn-tiny):not(.btn-small):hover {
	background: color-mix(in srgb, var(--offline) 88%, var(--text));
}

/* ------------------------------------------------------------------ */
/* Fields                                                              */
/* ------------------------------------------------------------------ */

.input {
	width: 100%;
	min-width: 0;
	height: var(--control-md);
	padding: 0 10px;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
	background: var(--bg-sunken);
	color: var(--text);
	font-size: var(--text-sm);
	transition: border-color var(--dur-fast) var(--ease-standard);
}

.input:hover {
	border-color: var(--border-control);
}

.input:focus-visible {
	border-color: var(--focus);
	outline: 2px solid var(--focus);
	outline-offset: -1px;
}

.input::placeholder {
	color: var(--text-faint);
	opacity: 1;
}

.input.mono {
	font-family: var(--font-mono);
	font-size: var(--text-xs);
}

select.input {
	padding-right: 6px;
}

textarea.input {
	height: auto;
	min-height: 84px;
	padding: 7px 10px;
	line-height: 20px;
	resize: vertical;
}

.field {
	display: flex;
	flex-direction: column;
	gap: 5px;
	min-width: 0;
}

.field-label {
	color: var(--text-faint);
	font: var(--weight-medium) var(--text-2xs) / 14px var(--font-mono);
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
}

.field-hint {
	color: var(--text-faint);
	font-size: var(--text-xs);
}

.check {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	cursor: pointer;
	user-select: none;
}

.check input {
	width: 14px;
	height: 14px;
	margin: 0;
	flex: none;
	accent-color: var(--accent);
}

.form-row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 10px;
}

.form-row > .field {
	flex: 1 1 140px;
}

.form-row > .field.wide {
	flex: 3 1 260px;
}

.error {
	min-height: 0;
	color: var(--offline-fg);
	font-size: var(--text-xs);
	font-weight: var(--weight-medium);
}

.error:empty {
	display: none;
}

/* ------------------------------------------------------------------ */
/* Boxes: Atlas panels, the title in the head, corner ticks in dark    */
/* ------------------------------------------------------------------ */

.box {
	position: relative;
	min-width: 0;
	padding: 0 16px 16px;
	border: 1px solid var(--border);
	border-radius: var(--radius-xs);
	background: var(--surface-1);
	box-shadow: var(--shadow-1);
	scroll-margin-top: 72px;
}

.box::before {
	content: "";
	position: absolute;
	inset: -1px;
	pointer-events: none;
	background:
		linear-gradient(var(--border-tick), var(--border-tick)) left top / 8px 1px no-repeat,
		linear-gradient(var(--border-tick), var(--border-tick)) left top / 1px 8px no-repeat,
		linear-gradient(var(--border-tick), var(--border-tick)) right top / 8px 1px no-repeat,
		linear-gradient(var(--border-tick), var(--border-tick)) right top / 1px 8px no-repeat,
		linear-gradient(var(--border-tick), var(--border-tick)) left bottom / 8px 1px no-repeat,
		linear-gradient(var(--border-tick), var(--border-tick)) left bottom / 1px 8px no-repeat,
		linear-gradient(var(--border-tick), var(--border-tick)) right bottom / 8px 1px no-repeat,
		linear-gradient(var(--border-tick), var(--border-tick)) right bottom / 1px 8px no-repeat;
}

.box.empty {
	padding: 32px 16px;
}

.box-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 10px;
	min-height: 44px;
	margin: 0 -16px 16px;
	padding: 7px 16px;
	border-bottom: 1px solid var(--border);
}

.tag {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	color: var(--text);
	font-size: var(--text-md);
	font-weight: var(--weight-semibold);
	line-height: 20px;
}

.tag-count {
	display: inline-grid;
	place-items: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-xs);
	background: var(--surface-2);
	color: var(--text-muted);
	font: var(--weight-medium) var(--text-2xs) / 1 var(--font-mono);
	white-space: nowrap;
}

.box-head .spacer {
	flex: 1;
}

.box-head > .dim {
	font-size: var(--text-xs);
}

.section-title {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 18px 0 8px;
	color: var(--text-faint);
	font: var(--weight-medium) var(--text-2xs) / 14px var(--font-mono);
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
}

.empty {
	padding: 24px 12px;
	color: var(--text-faint);
	text-align: center;
}

.notice {
	padding: 10px 12px;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
	background: var(--surface-2);
	color: var(--text-muted);
	font-size: var(--text-sm);
}

/* A player in game now: a live dot, where and as whom, then the map and the server at the end */
.live-now {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
	padding: 10px 12px 10px 14px;
	border: 1px solid color-mix(in srgb, var(--online) 35%, var(--border));
	border-radius: var(--radius-sm);
	background: var(--online-bg);
}

.live-now > .dot {
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--online) 18%, transparent);
}

.live-now-text {
	display: flex;
	flex: 1 1 280px;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 2px 10px;
	min-width: 0;
	color: var(--text-muted);
	font-size: var(--text-sm);
}

.live-now-text b {
	color: var(--text);
	font-weight: var(--weight-semibold);
}

.live-now-text .mono {
	font-size: var(--text-xs);
}

.live-now-actions {
	display: flex;
	flex: none;
	gap: 6px;
	margin-left: auto;
}

.notice.warn {
	border-color: var(--connecting-edge);
	background: var(--connecting-bg);
	color: var(--connecting-fg);
}

.notice.bad {
	border-color: var(--offline-edge);
	background: var(--offline-bg);
	color: var(--offline-fg);
}

.well {
	padding: 6px 10px;
	border: 1px dashed var(--border-strong);
	border-radius: var(--radius-xs);
	background: var(--hatch-neutral);
	color: var(--text-faint);
	font-size: var(--text-xs);
}

/* ------------------------------------------------------------------ */
/* Shell: the sidebar, the top bar, the page                           */
/* ------------------------------------------------------------------ */

.app {
	display: grid;
	grid-template-columns: var(--side-w) minmax(0, 1fr);
	min-height: 100vh;
}

/* The page atmosphere of dark: a fading 24 px grid */
.app::before {
	content: "";
	position: fixed;
	inset: 0 0 auto 0;
	z-index: -1;
	height: 400px;
	pointer-events: none;
	background-image: linear-gradient(var(--atmo-line) 1px, transparent 1px), linear-gradient(90deg, var(--atmo-line) 1px, transparent 1px);
	background-size: 24px 24px;
	-webkit-mask-image: linear-gradient(to bottom, #000, transparent 384px);
	mask-image: linear-gradient(to bottom, #000, transparent 384px);
}

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: none;
	color: var(--text);
	text-decoration: none;
}

.logo {
	width: 26px;
	height: 26px;
	flex: none;
	color: var(--online);
}

.top-title {
	display: grid;
	line-height: 1;
}

.top-title b {
	color: var(--text);
	font: var(--weight-semibold) 12px / 14px var(--font-mono);
	letter-spacing: 0.36em;
}

.top-title span {
	color: var(--text-faint);
	font: var(--weight-medium) var(--text-2xs) / 12px var(--font-mono);
	letter-spacing: 0.2em;
}

.side {
	position: sticky;
	top: 0;
	z-index: 30;
	display: flex;
	flex-direction: column;
	height: 100vh;
	border-right: 1px solid var(--border);
	background: var(--bg-raised);
}

.side .brand {
	height: var(--top-h);
	padding: 0 16px;
	border-bottom: 1px solid var(--border);
}

/* The top bar's logo stands in for the sidebar's, on phones only */
.top .brand {
	display: none;
}

.side-nav {
	flex: 1;
	min-height: 0;
	padding: 12px 8px;
	overflow-y: auto;
	scrollbar-width: thin;
}

.side-divider {
	height: 1px;
	margin: 12px 8px 8px;
	background: var(--border);
}

.side-group {
	height: 14px;
	margin: 17px 10px 7px;
	color: var(--text-faint);
	font: var(--weight-medium) var(--text-2xs) / 14px var(--font-mono);
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
}

.side-item {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	height: 32px;
	margin-bottom: 1px;
	padding: 0 10px;
	border: 0;
	border-radius: var(--radius-sm);
	background: transparent;
	color: var(--text-muted);
	font: var(--weight-medium) var(--text-sm) / 1 var(--font-sans);
	text-align: left;
	text-decoration: none;
	transition: background var(--dur-fast), color var(--dur-fast);
}

.side-item:hover {
	background: var(--surface-2);
	color: var(--text);
}

.side-item.on {
	background: var(--surface-3);
	color: var(--text);
}

.side-item.on::before {
	content: "";
	position: absolute;
	top: 8px;
	bottom: 8px;
	left: -8px;
	width: 2px;
	border-radius: 0 2px 2px 0;
	background: var(--accent);
}

.side-icon {
	display: inline-grid;
	place-items: center;
	width: 16px;
	flex: none;
	color: var(--text-faint);
	font-size: 14px;
}

.side-item.on .side-icon {
	color: var(--text);
}

.side-icon .icon {
	width: 14px;
	height: 14px;
}

/* Room for descenders (g, p, y): the item's line is 1, and the label clips what overflows */
.side-label {
	min-width: 0;
	overflow: hidden;
	line-height: 1.35;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.side-count {
	margin-left: auto;
	color: var(--text-faint);
	font: var(--weight-regular) var(--text-xs) / 1 var(--font-mono);
}

.side-item .badge {
	margin-left: auto;
}

.side-servers {
	margin: 2px 0 14px 18px;
	padding: 0 0 0 9px;
	border-left: 1px solid var(--border);
	list-style: none;
}

.side-server {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	height: 26px;
	margin-bottom: 1px;
	padding: 0 8px 0 10px;
	border: 0;
	border-radius: var(--radius-sm);
	background: transparent;
	color: var(--text-muted);
	font-size: var(--text-xs);
	text-align: left;
}

.side-server:hover {
	background: var(--surface-2);
	color: var(--text);
}

.side-server.on {
	background: var(--surface-3);
	color: var(--text);
}

.side-server .side-label {
	flex: 1;
}

.side-foot {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	border-top: 1px solid var(--border);
	color: var(--text-faint);
	font-size: var(--text-xs);
}

.column {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.top {
	position: sticky;
	top: 0;
	z-index: 20;
	display: flex;
	align-items: center;
	gap: 12px;
	height: var(--top-h);
	padding: 0 20px 0 var(--gutter);
	border-bottom: 1px solid var(--border);
	background: color-mix(in srgb, var(--bg-raised) 80%, transparent);
	-webkit-backdrop-filter: blur(var(--blur-overlay));
	backdrop-filter: blur(var(--blur-overlay));
}

.crumbs {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	overflow: hidden;
	color: var(--text-muted);
	white-space: nowrap;
}

.crumbs a {
	color: var(--text-muted);
	text-decoration: none;
}

.crumbs a:hover {
	color: var(--text);
}

.crumbs .sep {
	color: var(--text-faint);
}

.top-search {
	display: flex;
	/* The search takes the room the trail and the end of the bar leave */
	flex: 1 1 var(--search-w);
	align-items: center;
	gap: 8px;
	min-width: 160px;
	height: var(--control-md);
	margin-left: 8px;
	padding: 0 6px 0 10px;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
	background: var(--bg-sunken);
	color: var(--text-faint);
}

.top-search:focus-within {
	border-color: var(--focus);
	outline: 2px solid var(--focus);
	outline-offset: -1px;
}

.top-search > .icon {
	width: 16px;
	height: 16px;
	stroke-width: 1.75;
}

.top-search input {
	flex: 1;
	min-width: 0;
	height: 100%;
	padding: 0;
	border: 0;
	outline: none;
	background: transparent;
	color: var(--text);
}

.top-search input::placeholder {
	color: var(--text-faint);
}

.kbd {
	display: inline-grid;
	place-items: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border: 1px solid var(--border-strong);
	border-bottom-width: 2px;
	border-radius: var(--radius-xs);
	color: var(--text-faint);
	font: var(--weight-regular) var(--text-2xs) / 1 var(--font-mono);
}

.top-end {
	display: flex;
	flex: none;
	align-items: center;
	gap: 10px;
	margin-left: auto;
}

.live-pill {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	height: 28px;
	padding: 0 10px 0 9px;
	border: 1px solid var(--online-edge);
	border-radius: var(--radius-full);
	background: var(--online-bg);
	color: var(--online-fg);
	font: var(--weight-semibold) var(--text-2xs) / 1 var(--font-mono);
	letter-spacing: 0.12em;
	white-space: nowrap;
}

.live-pill.off {
	border-color: var(--offline-edge);
	background: var(--offline-bg);
	color: var(--offline-fg);
}

.who {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: none;
}

.who-name {
	display: flex;
	align-items: center;
	gap: 8px;
	height: var(--control-md);
	padding: 0 10px 0 4px;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
	background: var(--surface-1);
}

.who-name b {
	font-weight: var(--weight-semibold);
}

.who-initial {
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	border-radius: var(--radius-xs);
	background: var(--surface-3);
	font: var(--weight-semibold) var(--text-xs) / 1 var(--font-mono);
	text-transform: lowercase;
}

.icon-btn {
	display: inline-grid;
	place-items: center;
	width: var(--control-md);
	height: var(--control-md);
	padding: 0;
	border: 1px solid transparent;
	border-radius: var(--radius-sm);
	background: transparent;
	color: var(--text-muted);
	font-size: 15px;
	line-height: 1;
}

.icon-btn:hover {
	background: var(--surface-2);
	color: var(--text);
}

.icon-btn.on {
	background: var(--surface-3);
	color: var(--text);
}

.badge {
	display: inline-grid;
	place-items: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border: 1px solid var(--connecting-edge);
	border-radius: var(--radius-full);
	background: var(--connecting-bg);
	color: var(--connecting-fg);
	font: var(--weight-medium) var(--text-2xs) / 1 var(--font-mono);
}

.main {
	position: relative;
	flex: 1;
	width: 100%;
	max-width: var(--content-max);
	margin: 0 auto;
	padding: 21px var(--gutter) 40px;
}

.view {
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
}

/* The header of a page: its title and meta, its actions on the right */
.page-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 8px 16px;
}

.page-title {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.page-title h1 {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	font-size: var(--text-xl);
	font-weight: var(--weight-semibold);
	line-height: 28px;
	letter-spacing: -0.015em;
	overflow-wrap: anywhere;
}

.page-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 14px;
	color: var(--text-faint);
	font-size: var(--text-xs);
}

.page-meta b {
	color: var(--text-muted);
	font-weight: var(--weight-medium);
}

.page-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-left: auto;
}

.control {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.control > span {
	color: var(--text-faint);
	font: var(--weight-medium) var(--text-2xs) / 12px var(--font-mono);
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
}

.control > div {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: var(--control-md);
}

/* Underline tabs, with the time context at their end */
.page-tabs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	border-bottom: 1px solid var(--border);
}

.page-tabs-list {
	display: flex;
	gap: 4px;
	min-width: 0;
	margin-bottom: -1px;
	overflow-x: auto;
	scrollbar-width: none;
}

.page-tabs-list::-webkit-scrollbar {
	display: none;
}

.page-tab {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex: none;
	height: 37px;
	padding: 0 12px;
	border: 0;
	background: none;
	color: var(--text-faint);
	font: var(--weight-medium) var(--text-sm) / 1 var(--font-sans);
	text-decoration: none;
	white-space: nowrap;
}

.page-tab:hover {
	color: var(--text);
}

.page-tab.on {
	color: var(--text);
}

.page-tab.on::after {
	content: "";
	position: absolute;
	left: 4px;
	right: 4px;
	bottom: 0;
	height: 2px;
	border-radius: 2px 2px 0 0;
	background: var(--accent);
}

.page-tab:focus-visible {
	outline-offset: -2px;
}

.page-tabs-end {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-left: auto;
	padding: 4px 0;
}

.live-line {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--text-faint);
	font-size: var(--text-xs);
}

.live-line b {
	color: var(--online-fg);
	font: var(--weight-semibold) var(--text-2xs) / 1 var(--font-mono);
	letter-spacing: 0.12em;
}

.replay {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	min-height: 32px;
	padding: 3px 4px;
	border: 1px solid var(--connecting-edge);
	border-radius: var(--radius-sm);
	background: var(--connecting-bg);
	color: var(--connecting-fg);
}

.replay-chip {
	display: inline-flex;
	align-items: center;
	height: 24px;
	padding: 0 8px;
	border-radius: var(--radius-xs);
	background: var(--connecting);
	color: var(--bg);
	font: var(--weight-semibold) var(--text-2xs) / 1 var(--font-mono);
	letter-spacing: 0.12em;
}

.replay-time {
	font: var(--weight-semibold) var(--text-md) / 1 var(--font-mono);
}

.replay-behind {
	font-size: var(--text-xs);
}

.at-tag {
	display: inline-flex;
	align-items: center;
	height: 20px;
	padding: 0 6px;
	border: 1px solid var(--connecting-edge);
	border-radius: var(--radius-xs);
	background: var(--connecting-bg);
	color: var(--connecting-fg);
	font: var(--weight-medium) var(--text-xs) / 1 var(--font-mono);
}

/* Two columns: the main one and a rail */
.with-rail {
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--rail-w);
	gap: 16px;
	align-items: start;
}

.rail {
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
}

/* An empty placeholder in a column takes no room, so the columns beside it stay aligned */
.view > div:empty, .rail > div:empty {
	display: none;
}

.split {
	display: grid;
	grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
	gap: 16px;
	align-items: start;
}

.split.wide-left {
	grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
}

.split.single {
	grid-template-columns: minmax(0, 1fr);
}

.split > .box:first-child {
	position: sticky;
	top: calc(var(--top-h) + 20px);
	max-height: calc(100vh - var(--top-h) - 40px);
	overflow-x: hidden;
	overflow-y: auto;
}

/* A scrolling box keeps its corner ticks inside, or they would scroll it by a pixel */
.split > .box:first-child::before {
	inset: 0;
}

.grid-2 {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 16px;
	align-items: start;
}

/* KPI strip: one ticked panel cut into tiles */
.kpis {
	position: relative;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	gap: 1px;
	border: 1px solid var(--border);
	border-radius: var(--radius-xs);
	background: var(--border);
}

.kpi {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	padding: 11px 16px 10px;
	border: 0;
	background: var(--surface-1);
	color: inherit;
	text-align: left;
	text-decoration: none;
}

a.kpi:hover, button.kpi:hover {
	background: var(--surface-2);
}

.kpi-label {
	color: var(--text-faint);
	font: var(--weight-medium) var(--text-2xs) / 16px var(--font-mono);
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
}

.kpi-figure {
	display: flex;
	align-items: baseline;
	gap: 6px;
	min-height: 36px;
	font-size: var(--text-2xl);
	font-weight: var(--weight-semibold);
	line-height: 36px;
	letter-spacing: -0.02em;
	font-variant-numeric: proportional-nums;
}

.kpi-figure small {
	color: var(--text-faint);
	font-size: var(--text-sm);
	font-weight: var(--weight-regular);
	letter-spacing: 0;
}

/* Each part of a figure stays on one line; a figure too wide for its tile wraps between parts */
.kpi-figure {
	flex-wrap: wrap;
	row-gap: 2px;
}

.kpi-figure small {
	margin-right: 4px;
	white-space: nowrap;
}

/* Players now: how many players Atlas flags as likely using a cheat client, as big as the player count, red when any */
.kpi-cheating {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
	color: var(--text-faint);
	white-space: nowrap;
}

.kpi-cheating.on {
	color: var(--offline);
}

.kpi-cheating.on small {
	color: var(--offline-fg);
}

.kpi-meta {
	overflow: hidden;
	color: var(--text-faint);
	font-size: var(--text-xs);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.kpi-meta.warn {
	color: var(--connecting-fg);
}

/* Server cards */
.cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 12px;
}

.card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
	padding: 12px 14px;
	border: 1px solid var(--border);
	border-radius: var(--radius-xs);
	background: var(--surface-1);
	color: inherit;
	font: inherit;
	text-align: left;
	text-decoration: none;
	transition: background var(--dur-fast);
}

.card:hover {
	background: var(--surface-2);
}

.card.off {
	border-color: color-mix(in srgb, var(--offline) 30%, var(--border));
}

.card-head {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.card-bar {
	width: 3px;
	height: 14px;
	flex: none;
	border-radius: 1px;
	background: var(--viz-1);
}

.card-name {
	overflow: hidden;
	font-size: var(--text-md);
	font-weight: var(--weight-semibold);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.card-head .chip {
	margin-left: auto;
}

.card-sub {
	display: flex;
	gap: 8px;
	color: var(--text-faint);
	font: var(--weight-regular) var(--text-2xs) / 16px var(--font-mono);
}

.card-sub span:last-child {
	margin-left: auto;
}

.card-body {
	display: flex;
	align-items: flex-end;
	gap: 12px;
}

.card-figure {
	display: flex;
	flex-direction: column;
	min-width: 64px;
}

.card-figure b {
	font-size: 26px;
	font-weight: var(--weight-semibold);
	line-height: 30px;
	letter-spacing: -0.02em;
}

.card-figure span {
	color: var(--text-faint);
	font-size: var(--text-2xs);
}

/* How many players Atlas flags on the server, among its stats: in red */
.card-cheating {
	color: var(--offline-fg);
}

.card-stats .card-cheating b {
	color: var(--offline);
	font-weight: var(--weight-semibold);
}

.card-spark {
	flex: 1;
	min-width: 0;
	height: 40px;
}

.card-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 14px;
	color: var(--text-faint);
	font-size: var(--text-xs);
}

.card-stats b {
	color: var(--text-muted);
	font-weight: var(--weight-medium);
}

.segmented {
	display: inline-flex;
	gap: 2px;
	padding: 2px;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
	background: var(--bg-sunken);
}

.segmented button {
	height: 22px;
	padding: 0 8px;
	border: 1px solid transparent;
	border-radius: 3px;
	background: transparent;
	color: var(--text-faint);
	font: var(--weight-medium) var(--text-xs) / 1 var(--font-sans);
}

.segmented button:hover {
	color: var(--text);
}

.segmented button.on {
	border-color: var(--border-strong);
	background: var(--surface-3);
	color: var(--text);
}

/* A row of a list in a rail or a two-pane page: three short lines, the whole row a link */
.rows {
	display: flex;
	flex-direction: column;
	margin: 0 -16px;
	padding: 0;
	list-style: none;
}

.row {
	display: flex;
	flex-direction: column;
	gap: 2px;
	width: 100%;
	padding: 10px 16px;
	border: 0;
	border-bottom: 1px solid var(--border);
	background: transparent;
	color: inherit;
	font: inherit;
	text-align: left;
	text-decoration: none;
}

.rows li:last-child .row {
	border-bottom: 0;
}

.row:hover {
	background: var(--surface-2);
}

.row.on {
	background: var(--surface-3);
	box-shadow: inset 2px 0 0 var(--accent);
}

.row-line {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.row-title {
	overflow: hidden;
	font-weight: var(--weight-medium);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.row-meta {
	overflow: hidden;
	color: var(--text-faint);
	font-size: var(--text-xs);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.row-end {
	margin-left: auto;
	flex: none;
	color: var(--text-faint);
	font: var(--weight-regular) var(--text-2xs) / 1 var(--font-mono);
}

/* A pending request that waits too long: amber, then red */
.row-end.late {
	color: var(--connecting-fg);
	font-weight: var(--weight-medium);
}

.row-end.overdue {
	color: var(--offline-fg);
	font-weight: var(--weight-semibold);
}

/* The votes on a request, at the right end of its row */
.row-votes {
	display: inline-flex;
	flex: none;
	gap: 6px;
	margin-left: auto;
}

@media (max-width: 1199px) {

	.with-rail {
		grid-template-columns: minmax(0, 1fr);
	}

	.rail {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	}
}

@media (max-width: 1023px) {

	.app {
		grid-template-columns: var(--side-w-rail) minmax(0, 1fr);
	}

	.side .top-title, .side-label, .side-count, .side-group, .side-servers, .side-foot span {
		display: none;
	}

	.side .brand {
		justify-content: center;
		padding: 0;
	}

	.side-item {
		justify-content: center;
		padding: 0;
	}

	.side-item .badge {
		position: absolute;
		top: -4px;
		right: -4px;
	}

	.top-search {
		flex-basis: 220px;
	}
}

@media (max-width: 767px) {

	.app {
		display: block;
	}

	.side {
		flex-direction: row;
		height: auto;
		border-right: 0;
		border-bottom: 1px solid var(--border);
	}

	.side .brand, .side-foot {
		display: none;
	}

	.side-nav {
		display: flex;
		gap: 2px;
		padding: 6px 8px;
		overflow-x: auto;
	}

	.side-item {
		width: auto;
		flex: none;
		padding: 0 10px;
	}

	.side-item.on::before {
		top: auto;
		bottom: -6px;
		left: 8px;
		right: 8px;
		width: auto;
		height: 2px;
	}

	.top {
		position: static;
		flex-wrap: wrap;
		height: auto;
		padding: 8px var(--gutter);
	}

	.crumbs {
		display: none;
	}

	.top-search {
		flex: 1 1 100%;
		order: 3;
		margin-left: 0;
	}

	.split, .split.wide-left {
		grid-template-columns: minmax(0, 1fr);
	}

	.split > .box:first-child {
		position: static;
		max-height: none;
	}

	.page-actions {
		margin-left: 0;
	}
}

/* ------------------------------------------------------------------ */
/* Login                                                               */
/* ------------------------------------------------------------------ */

.login {
	display: flex;
	justify-content: center;
	min-height: 100vh;
	padding: max(48px, 14vh) 16px 40px;
}

.login-box {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 14px;
	width: 100%;
	max-width: 380px;
	height: max-content;
	padding: 24px;
	border: 1px solid var(--border);
	border-radius: var(--radius-xs);
	background: var(--surface-1);
	box-shadow: var(--shadow-1);
}

.login-box .brand {
	align-self: center;
	margin-bottom: 6px;
}

.login-box .logo {
	width: 32px;
	height: 32px;
}

.login-box .tag {
	font-size: var(--text-lg);
}

/* ------------------------------------------------------------------ */
/* Login: who are you, the forms, the setup page                       */
/* ------------------------------------------------------------------ */

/* The question: a card for each kind of person, side by side; stacked on a phone */
.login-who {
	max-width: 760px;
}

.login-who > .tag {
	align-self: center;
	margin: 0;
	font-size: var(--text-xl);
}

.login-cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
}

.login-card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	min-height: 136px;
	padding: 16px;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
	background: var(--surface-2);
	color: var(--text);
	font: inherit;
	text-align: left;
	transition: background var(--dur-fast), border-color var(--dur-fast);
}

button.login-card {
	cursor: pointer;
}

button.login-card:hover {
	border-color: var(--accent);
	background: var(--surface-3);
}

/* Not open yet: dimmed, and nothing happens */
.login-card.disabled {
	opacity: 0.55;
	cursor: default;
}

.login-card-icon {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-xs);
	background: var(--surface-1);
	color: var(--accent);
}

.login-card-icon .icon {
	width: 18px;
	height: 18px;
}

.login-card-text {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.login-card-text b {
	font-size: var(--text-md);
	font-weight: var(--weight-semibold);
}

.login-card-text span {
	color: var(--text-muted);
	font-size: var(--text-sm);
	line-height: 1.4;
}

.login-card > .chip {
	position: absolute;
	top: 12px;
	right: 12px;
}

/* A form: back to the question above the brand, the kind beside the title */
.login-back {
	align-self: flex-start;
	margin: -6px 0 -4px;
	padding: 2px 0;
	border: 0;
	background: none;
	color: var(--text-muted);
	font: inherit;
	font-size: var(--text-sm);
	cursor: pointer;
}

.login-back:hover {
	color: var(--text);
}

.login-title {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.login-title .tag {
	margin: 0;
}

.login-box .input[readonly] {
	color: var(--text-muted);
}

@media (max-width: 767px) {

	.login-cards {
		grid-template-columns: minmax(0, 1fr);
	}

	.login-card {
		flex-direction: row;
		align-items: center;
		min-height: 0;
		padding: 14px;
	}

	.login-card > .chip {
		position: static;
		margin-left: auto;
	}
}

/* ------------------------------------------------------------------ */
/* Lists of the left boxes                                             */
/* ------------------------------------------------------------------ */

.list {
	display: flex;
	flex-direction: column;
	gap: 1px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.list-group {
	margin: 14px 0 6px;
	padding: 0 10px;
	color: var(--text-faint);
	font: var(--weight-medium) var(--text-2xs) / 14px var(--font-mono);
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
}

.list-group:first-child {
	margin-top: 0;
}

.list > .dim, .list > .empty {
	padding: 8px 10px;
}

.item {
	position: relative;
	display: grid;
	grid-template-columns: 10px minmax(0, 1fr) auto;
	align-items: center;
	gap: 2px 10px;
	width: 100%;
	padding: 6px 10px;
	border: 0;
	border-radius: var(--radius-sm);
	background: transparent;
	color: var(--text-muted);
	text-align: left;
	transition: background var(--dur-fast), color var(--dur-fast);
}

.item:hover {
	background: var(--surface-2);
	color: var(--text);
}

.item.on {
	background: var(--surface-3);
	color: var(--text);
	box-shadow: inset 2px 0 0 var(--accent);
}

.item-title {
	overflow: hidden;
	font-weight: var(--weight-medium);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.item-sub {
	grid-column: 2 / 4;
	overflow: hidden;
	color: var(--text-faint);
	font: var(--weight-regular) var(--text-2xs) / 14px var(--font-mono);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.item-side {
	color: var(--text-faint);
	font: var(--weight-regular) var(--text-xs) / 1 var(--font-mono);
}

/* Status shapes: the shape carries the meaning, never the colour alone */
.dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	flex: none;
	border: 1.5px solid var(--disabled);
	border-radius: 50%;
}

.dot.on {
	border: 0;
	background: var(--online);
}

.dot.off {
	border: 0;
	border-radius: 1px;
	background: var(--offline);
}

/* ------------------------------------------------------------------ */
/* Tables                                                              */
/* ------------------------------------------------------------------ */

.table-wrap {
	max-width: 100%;
	overflow-x: auto;
	border: 1px solid var(--border);
	border-radius: var(--radius-xs);
}

.table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	font-size: var(--text-sm);
}

.table th {
	position: sticky;
	top: 0;
	z-index: 1;
	height: 30px;
	padding: 0 8px;
	border-bottom: 1px solid var(--border-strong);
	background: var(--surface-1);
	color: var(--text-faint);
	font: var(--weight-medium) var(--text-2xs) / 1 var(--font-mono);
	letter-spacing: var(--tracking-caps);
	text-align: left;
	text-transform: uppercase;
	white-space: nowrap;
}

.table td {
	height: var(--row);
	padding: 3px 8px;
	border-bottom: 1px solid var(--border);
	color: var(--text);
	vertical-align: middle;
	white-space: nowrap;
}

.table tbody tr:last-child td {
	border-bottom-color: transparent;
}

.table tbody tr {
	transition: background var(--dur-fast) var(--ease-standard);
}

.table tbody tr:hover {
	background: var(--surface-2);
}

.table tr.row-click {
	cursor: pointer;
}

.table tr.selected {
	background: color-mix(in srgb, var(--accent) 5%, transparent);
}

.table tr.selected td:first-child {
	box-shadow: inset 2px 0 0 var(--accent);
}

.table tr.banned td {
	background: var(--hatch-crit);
}

/* The players behind the address of the row under the pointer: lit together, edged in the address's colour */
.table tr.same-ip {
	background: color-mix(in srgb, var(--key) 9%, transparent);
}

.table tr.same-ip td:first-child {
	box-shadow: inset 2px 0 0 var(--key);
}

.table td.wrap {
	min-width: 180px;
	white-space: normal;
}

.table .right {
	text-align: right;
}

.table td.num, .table td.right {
	font-family: var(--font-mono);
	font-size: var(--text-xs);
	font-weight: var(--weight-medium);
}

.table td.mono {
	font-family: var(--font-mono);
	font-size: var(--text-xs);
}

.cell-nick {
	max-width: 200px;
	overflow: hidden;
	font-weight: var(--weight-medium);
	text-overflow: ellipsis;
}

.cell-actions {
	display: flex;
	gap: 4px;
}

.screen-size {
	display: inline;
}

.screen-cell .screen-flag {
	margin: 0 0 0 6px;
	cursor: pointer;
}

/* Line icons, and small square buttons showing one */
.icon {
	width: 14px;
	height: 14px;
	flex: none;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.5;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.icon.solid {
	fill: currentColor;
	stroke: none;
}

.btn > .icon {
	width: 14px;
	height: 14px;
}

.icon-action {
	display: inline-grid;
	place-items: center;
	width: 24px;
	height: 24px;
	padding: 0;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-xs);
	background: transparent;
	color: var(--text-muted);
	cursor: pointer;
	transition: background var(--dur-fast), border-color var(--dur-fast);
}

.icon-action:hover {
	border-color: var(--text-muted);
	background: var(--surface-2);
	color: var(--text);
}

/* In a table row, a little smaller: the row keeps its height and the table its width */
.table .icon-action {
	width: 22px;
	height: 22px;
}

.table .cell-actions {
	gap: 3px;
}

.icon-action.give {
	color: var(--online-fg);
}

.icon-action.kick {
	color: var(--connecting-fg);
}

.icon-action.ban {
	color: var(--offline-fg);
}

.icon-action.give:hover, .icon-action.kick:hover, .icon-action.ban:hover {
	border-color: currentColor;
}

/* A request, not the act itself: the same icon, in a dashed frame */
.icon-action.ask {
	border-style: dashed;
}

/* A player with review signals: an amber flag, its reasons in its title */
/* Likely a cheat client: the name in red, a red flag after it that explains */
.cheat-name, a.cheat-name {
	color: var(--offline-fg);
	font-weight: var(--weight-semibold);
}

a.cheat-name {
	text-decoration-color: color-mix(in srgb, var(--offline) 50%, transparent);
}

.nick-line {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	max-width: 100%;
	vertical-align: middle;
}

.nick-link {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cheat-flag {
	display: inline-grid;
	place-items: center;
	flex: none;
	width: 18px;
	height: 18px;
	padding: 0;
	border: 1px solid color-mix(in srgb, var(--offline) 45%, transparent);
	border-radius: var(--radius-xs);
	background: var(--offline-bg);
	color: var(--offline-fg);
	cursor: pointer;
	vertical-align: middle;
}

.cheat-flag:hover {
	border-color: var(--offline);
}

.cheat-flag:focus-visible {
	outline: 2px solid var(--offline);
	outline-offset: 1px;
}

.cheat-flag .icon {
	width: 11px;
	height: 11px;
}

.cheat-verdict {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
	padding: 10px 12px;
	border: 1px solid color-mix(in srgb, var(--offline) 45%, transparent);
	border-radius: var(--radius-sm);
	background: var(--offline-bg);
	color: var(--offline-fg);
	font: var(--weight-semibold) var(--text-sm) / 1.2 var(--font-mono);
	letter-spacing: var(--tracking-caps);
}

/* A banned account: a red diamond right after its name or id */
.ban-mark {
	display: inline-grid;
	place-items: center;
	flex: none;
	margin-left: 4px;
	color: var(--offline);
	vertical-align: middle;
}

.ban-mark[hidden] {
	display: none;
}

.ban-mark .icon {
	width: 9px;
	height: 9px;
}

/* A ban that ended, lifted at the account's next game: hollow and orange */
.ban-mark.ended {
	color: var(--connecting);
}

.ban-mark.ended .icon {
	width: 10px;
	height: 10px;
	stroke-width: 2;
}

.flag-icon {
	width: 13px;
	height: 13px;
	flex: none;
	color: var(--connecting);
	vertical-align: -2px;
}

.flag-pole {
	fill: none;
	stroke: currentColor;
	stroke-width: 1.5;
	stroke-linecap: round;
}

.flag-cloth {
	fill: currentColor;
}

/* ------------------------------------------------------------------ */
/* A request                                                           */
/* ------------------------------------------------------------------ */

/* Its head (kind, id, state, what it asks, who asked), its progress, its decision, then what it is about */
.box.req {
	display: flex;
	flex-direction: column;
	container: req / inline-size;
	gap: 18px;
	padding: 20px 22px 22px;
}

.req .back-link {
	margin-bottom: -6px;
}

.req-head {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.req-top {
	display: flex;
	align-items: center;
	gap: 10px;
}

.req-kind {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 24px;
	padding: 0 10px 0 8px;
	border-radius: var(--radius-full);
	background: var(--accent-wash);
	color: var(--text);
	font: var(--weight-semibold) var(--text-2xs) / 1 var(--font-mono);
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
}

.req-kind .icon {
	width: 13px;
	height: 13px;
}

/* In a row: the same label, a size smaller */
.row .req-kind {
	flex: none;
	height: 20px;
	padding: 0 8px 0 6px;
	gap: 5px;
}

.row .req-kind .icon {
	width: 11px;
	height: 11px;
}

.req-id {
	display: inline-flex;
	align-items: center;
	color: var(--text-faint);
	font: var(--weight-medium) var(--text-sm) / 1 var(--font-mono);
}

.req-id .copy {
	margin-left: 2px;
}

.req-top .status-chip {
	height: 24px;
	padding: 0 10px;
}

.req-title {
	margin: 2px 0 0;
	font-size: var(--text-xl);
	font-weight: var(--weight-semibold);
	line-height: 1.25;
	letter-spacing: -0.01em;
	overflow-wrap: anywhere;
}

.req-by {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--text-faint);
	font-size: var(--text-sm);
}

.req-by b {
	color: var(--text-muted);
	font-weight: var(--weight-medium);
}

/* Progress: asked, reviews, decision, carried out */
/* Four columns, two when the request's box is narrow; the lines between them drawn by the gaps */
.req-steps {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1px;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--border);
	list-style: none;
}

.req-step {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	min-width: 0;
	padding: 12px 14px;
	background: var(--bg-sunken);
}

@container req (max-width: 600px) {

	.req-steps {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	/* The label above, the review and its buttons below, at full width */
	.req-decide-row.review .req-decide-label {
		flex-basis: 100%;
	}
}

.req-step-dot {
	display: grid;
	place-items: center;
	flex: none;
	width: 22px;
	height: 22px;
	border: 1.5px solid var(--border-strong);
	border-radius: 50%;
	color: var(--bg);
}

.req-step-dot .icon {
	width: 12px;
	height: 12px;
	stroke-width: 2.25;
}

.req-step.done .req-step-dot {
	border-color: var(--status-done);
	background: var(--status-done);
}

.req-step.bad .req-step-dot {
	border-color: var(--offline);
	background: var(--offline);
}

.req-step.denied .req-step-dot {
	border-color: var(--status-denied);
	background: var(--status-denied);
}

.req-step.cancelled .req-step-dot {
	border-color: var(--text-faint);
	background: var(--text-faint);
}

.req-step.warn .req-step-dot {
	border-color: var(--connecting);
	background: var(--connecting);
}

.req-step.current .req-step-dot {
	border-color: var(--connecting);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--connecting) 18%, transparent);
}

.req-step.current .req-step-dot::after {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--connecting);
	animation: req-pulse 1.6s var(--ease-standard) infinite;
}

@keyframes req-pulse {

	50% {
		opacity: 0.35;
	}
}

.req-step.idle, .req-step.skip {
	opacity: 0.55;
}

.req-step-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.req-step-text b {
	font-size: var(--text-xs);
	font-weight: var(--weight-semibold);
}

.req-step-text span {
	color: var(--text-faint);
	font-size: var(--text-2xs);
	line-height: 1.35;
	overflow-wrap: break-word;
}

/* The decision: what approving does and deny or approve, then a tier for what you add (reviews, edits) */
.req-decide {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
	background: var(--surface-2);
}

.req-decide-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
	padding: 12px 14px;
}

.req-decide-row.review {
	gap: 8px 10px;
	padding: 8px 14px;
	border-top: 1px solid var(--border);
	background: var(--surface-1);
}

.req-decide-text {
	display: flex;
	flex: 1 1 260px;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.req-decide-label {
	flex: none;
	color: var(--text-faint);
	font: var(--weight-medium) var(--text-2xs) / 1 var(--font-mono);
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
}

.req-decide-row.review .req-decide-label {
	min-width: 88px;
}

.req-decide-words {
	margin: 0;
	color: var(--text-muted);
	font-size: var(--text-sm);
	line-height: 1.45;
}

.req-decide-side {
	display: flex;
	flex: 1;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.req-decide-side.end {
	flex: none;
	margin-left: auto;
}

/* The decision's buttons are the panel's own buttons, in their colours */
.req-btn .icon {
	width: 14px;
	height: 14px;
}

.req-endorse, .req-object, .req-deny {
	background: transparent;
}

.req-endorse {
	border-color: color-mix(in srgb, var(--status-done) 50%, transparent);
	color: var(--status-done);
}

.req-endorse:hover {
	background: var(--status-done-bg);
}

.req-object, .req-deny {
	border-color: color-mix(in srgb, var(--offline) 55%, transparent);
	color: var(--offline-fg);
}

.req-object:hover, .req-deny:hover {
	background: var(--offline-bg);
}

/* Your review, already given: the verdict, when, your note; then a small way to change it */
.my-review {
	display: flex;
	flex: 1 1 180px;
	flex-direction: column;
	align-items: flex-start;
	gap: 5px;
	min-width: 0;
	font-size: var(--text-sm);
}

.my-review-verdict {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 24px;
	padding: 0 10px 0 8px;
	border-radius: var(--radius-full);
	font-weight: var(--weight-semibold);
}

.my-review-verdict .icon {
	width: 13px;
	height: 13px;
	stroke-width: 2;
}

.my-review.for .my-review-verdict {
	background: var(--status-done-bg);
	color: var(--status-done);
}

.my-review.against .my-review-verdict {
	background: var(--offline-bg);
	color: var(--offline-fg);
}

.my-review-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 8px;
	min-width: 0;
	color: var(--text-faint);
	font-size: var(--text-xs);
}

.my-review-note {
	min-width: 0;
	color: var(--text-muted);
	font-style: italic;
	overflow-wrap: anywhere;
}

/* Change and Edit together at the end */
.req-change {
	margin-left: auto;
	border-color: transparent;
	background: transparent;
	color: var(--text-muted);
}

.req-change:hover {
	border-color: var(--border-strong);
	color: var(--text);
}

.you-tag {
	margin-left: 6px;
	padding: 1px 5px;
	border-radius: var(--radius-xs);
	background: var(--accent-wash);
	color: var(--text);
	font: var(--weight-medium) var(--text-2xs) / 1.3 var(--font-mono);
	text-transform: uppercase;
}

.req-change + .req-edit {
	margin-left: 0;
}

.req-edit {
	margin-left: auto;
	border-color: transparent;
	background: transparent;
	color: var(--text-muted);
}

.req-edit:hover {
	border-color: var(--border-strong);
	color: var(--text);
}

.req-approve {
	font-weight: var(--weight-semibold);
}

/* How it ended */
.req-result {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 12px 14px;
	border-radius: var(--radius-sm);
	font-size: var(--text-sm);
}

.req-result > .icon {
	width: 16px;
	height: 16px;
	margin-top: 2px;
}

.req-result div {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	overflow-wrap: anywhere;
}

.req-result span {
	color: var(--text-muted);
}

.req-result.good {
	background: var(--status-done-bg);
	color: var(--status-done);
}

.req-result.bad {
	background: var(--offline-bg);
	color: var(--offline-fg);
}

/* What it is about */
.req-section {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.req-section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 6px 10px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--border);
	color: var(--text-faint);
	font: var(--weight-medium) var(--text-2xs) / 1 var(--font-mono);
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
}

.req-section-head a {
	color: var(--text-muted);
}

.req-section .cmd-list {
	margin: 0;
}

.req-targets {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
	gap: 8px;
}

.req-target {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
	padding: 10px 12px;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--bg-sunken);
}

.req-target-text {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	font-size: var(--text-xs);
}

.req-target-text b {
	font-size: var(--text-sm);
}

.req-target-text .mono {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.req-facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 14px 20px;
}

.req-fact {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
	font-size: var(--text-sm);
}

.req-fact.wide {
	grid-column: 1 / -1;
}

.req-fact > span {
	color: var(--text-faint);
	font: var(--weight-medium) var(--text-2xs) / 1 var(--font-mono);
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
}

.req-quote {
	padding: 10px 12px;
	border-left: 3px solid var(--border-strong);
	border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
	background: var(--bg-sunken);
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

.req-duration {
	font: var(--weight-semibold) var(--text-lg) / 1.2 var(--font-mono);
}

.req-edited {
	display: flex;
	align-items: center;
	gap: 5px;
	margin-top: 4px;
	color: var(--connecting-fg);
	font: var(--weight-regular) var(--text-2xs) / 1.3 var(--font-sans);
	white-space: normal;
}

.req-edited .icon {
	width: 11px;
	height: 11px;
}

.req-reviews {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.req-reviews li {
	display: flex;
	gap: 10px;
	font-size: var(--text-sm);
}

.req-review-icon {
	display: grid;
	place-items: center;
	flex: none;
	width: 22px;
	height: 22px;
	border-radius: 50%;
}

.req-review-icon .icon {
	width: 12px;
	height: 12px;
}

.req-reviews li.for .req-review-icon {
	background: var(--status-done-bg);
	color: var(--status-done);
}

.req-reviews li.against .req-review-icon {
	background: var(--offline-bg);
	color: var(--offline-fg);
}

.req-reviews p {
	margin: 4px 0 0;
	color: var(--text-muted);
}

@media (max-width: 767px) {

	.box.req {
		padding: 16px;
	}

	.req-decide-side, .req-decide-side.end {
		flex: 1 1 100%;
		margin-left: 0;
	}

	.req-decide-side .btn {
		flex: 1;
	}

	.req-decide-row.review .req-decide-label {
		flex-basis: 100%;
	}
}

/* The state of a request: a stripe on its row, a dot in its chip and on its filter */
.status-dot {
	display: inline-block;
	width: 7px;
	height: 7px;
	flex: none;
	border-radius: 50%;
	background: currentColor;
}

.status-chip {
	gap: 5px;
}

/* How many endorsed or objected to a request, after its state */
.vote {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	height: 20px;
	padding: 0 6px;
	border-radius: var(--radius-xs);
	font: var(--weight-medium) var(--text-2xs) / 1 var(--font-mono);
}

.vote .icon {
	width: 11px;
	height: 11px;
	stroke-width: 2;
}

.vote.for {
	background: var(--status-done-bg);
	color: var(--status-done);
}

/* Your own verdict among them: ringed */
.vote.mine {
	box-shadow: inset 0 0 0 1px currentColor;
}

.vote.against {
	background: var(--offline-bg);
	color: var(--offline-fg);
}

.status-chip.st-completed {
	border-color: color-mix(in srgb, var(--status-done) 45%, transparent);
	background: var(--status-done-bg);
	color: var(--status-done);
}

.status-chip.st-denied {
	border-color: color-mix(in srgb, var(--status-denied) 45%, transparent);
	background: var(--status-denied-bg);
	color: var(--status-denied);
}

.page-tab .status-dot.status-pending {
	color: var(--connecting);
}

.page-tab .status-dot.status-completed {
	color: var(--status-done);
}

.page-tab .status-dot.status-failed {
	color: var(--offline);
}

.page-tab .status-dot.status-denied {
	color: var(--status-denied);
}

.page-tab .status-dot.status-cancelled {
	color: var(--text-faint);
}

.rows .row[class*="status-"] {
	box-shadow: inset 3px 0 0 var(--status, transparent);
}

.row.status-pending, .row.status-executing {
	--status: var(--connecting);
}

.row.status-completed {
	--status: var(--status-done);
}

.row.status-failed {
	--status: var(--offline);
}

.row.status-denied {
	--status: var(--status-denied);
}

.row.status-cancelled {
	--status: var(--border-strong);
}

/* Permissions by category, held or not, as the old Atlas showed them: Atlas's in one box, the official panel's in
   another, each titled with its mark; an Atlas admin changes Atlas's here */
.perm-top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
}

.perm-top .back-link {
	flex-basis: 100%;
}

.perm-who {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.perm-who h2 {
	margin: 0;
	font-size: var(--text-xl);
	font-weight: var(--weight-semibold);
}

.perm-box .box-head .tag {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.perm-box.atlas .box-head .tag svg {
	width: 18px;
	height: 18px;
	color: var(--accent);
}

.perm-box.official .box-head .tag svg {
	width: 16px;
	height: 16px;
	color: var(--text-muted);
}

.perm-count {
	color: var(--text-faint);
	font: var(--weight-regular) var(--text-2xs) / 1 var(--font-mono);
}

.perm-count b {
	color: var(--text);
}

.perm-note {
	margin: 0 0 12px;
	color: var(--text-faint);
	font-size: var(--text-xs);
}

.perm-box .role-row {
	margin-bottom: 12px;
}

.perm-cat {
	overflow: hidden;
	margin: 0 -16px;
	border-top: 1px solid var(--border);
}

.perm-box .perm-cat:last-child {
	margin-bottom: -16px;
}

.perm-cat-head .perm-count {
	margin-left: auto;
}

.perm-cat-head {
	display: flex;
	align-items: center;
	gap: 8px;
	height: 32px;
	padding: 0 16px;
	border-bottom: 1px solid var(--border);
	background: var(--bg-sunken);
	color: var(--text-muted);
	font: var(--weight-medium) var(--text-2xs) / 1 var(--font-mono);
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
}

.perm-cat-head .perm-count {
	letter-spacing: 0;
}

/* Two columns where there is room; each row draws its right and bottom hairline, cut at the edges */
.perm-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
	margin: 0 -1px -1px 0;
	padding: 0;
	list-style: none;
}

.perm {
	display: grid;
	grid-template-columns: 22px minmax(0, 1fr) auto;
	align-items: center;
	gap: 10px;
	padding: 9px 16px;
	border-right: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
}

.perm-icon {
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	border-radius: var(--radius-xs);
}

/* Where it can be changed, the box is a checkbox and the whole row ticks it */
button.perm-icon {
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

button.perm-icon:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.perm.editable {
	cursor: pointer;
	transition: background-color var(--dur-fast) var(--ease-standard);
}

.perm.editable:hover {
	background: var(--surface-2);
}

.perm.held .perm-icon {
	background: var(--online-bg);
	color: var(--online-fg);
}

.perm.missing .perm-icon {
	border: 1px dashed var(--border-strong);
	color: var(--text-faint);
}

.perm-icon .icon {
	width: 13px;
	height: 13px;
}

.perm-text {
	display: grid;
	gap: 2px;
	min-width: 0;
}

/* The permission's key first, what it allows under it */
.perm-id {
	color: var(--text);
	font: var(--weight-medium) var(--text-xs) / 1.4 var(--font-mono);
	overflow-wrap: anywhere;
}

.perm.missing .perm-id {
	color: var(--text-muted);
}

.perm-label {
	color: var(--text-faint);
	font-size: var(--text-xs);
	line-height: 1.4;
}

.perm-state {
	color: var(--text-faint);
	font: var(--weight-regular) var(--text-2xs) / 1 var(--font-mono);
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
	white-space: nowrap;
}

.perm.held .perm-state {
	color: var(--online-fg);
}

.perm.added {
	box-shadow: inset 2px 0 0 var(--online);
}

.perm.removed {
	box-shadow: inset 2px 0 0 var(--offline);
}

.perm.added .perm-state, .perm.removed .perm-state {
	font-weight: var(--weight-semibold);
}

.perm.added .perm-state {
	color: var(--online-fg);
}

.perm.removed .perm-state {
	color: var(--offline-fg);
}

a.who-name {
	color: inherit;
	text-decoration: none;
}

a.who-name:hover {
	background: var(--surface-2);
}

/* Access's list: a pip per Atlas permission, lit when held; who someone is, in words */
.grant-pips {
	display: inline-flex;
	flex: none;
	gap: 2px;
	margin-left: auto;
}

.grant-pips i {
	width: 5px;
	height: 14px;
	border-radius: 1px;
	background: var(--border-strong);
}

.grant-pips i.on {
	background: var(--accent);
}

.access-role {
	color: var(--text-muted);
	font-weight: var(--weight-medium);
}

.access-role.owner {
	color: var(--text);
}

.access-role.none {
	color: var(--text-faint);
	font-weight: var(--weight-regular);
}

.access-role-tag {
	color: var(--text-faint);
	font-size: var(--text-sm);
}

.access-role-tag.unsaved {
	color: var(--connecting-fg);
}

/* Access: a role to start from, a switch per permission, the changes before they are saved */
.grant-meta {
	margin-bottom: 14px;
	color: var(--text-faint);
	font-size: var(--text-sm);
}

.role-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	margin-bottom: 6px;
}

.grant-group {
	margin-top: 14px;
}

.grant {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 9px 0;
	border-bottom: 1px solid var(--border);
	transition: box-shadow var(--dur-fast), padding var(--dur-fast);
}

.grant-group .grant:last-child {
	border-bottom: 0;
}

.grant.added {
	padding-left: 10px;
	box-shadow: inset 2px 0 0 var(--online);
}

.grant.removed {
	padding-left: 10px;
	box-shadow: inset 2px 0 0 var(--offline);
}

.grant-text {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.grant-text code {
	color: var(--text-faint);
	font: var(--weight-regular) var(--text-2xs) / 1.2 var(--font-mono);
}

.grant-mark {
	flex: none;
	font: var(--weight-medium) var(--text-2xs) / 1 var(--font-mono);
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
}

.grant.added .grant-mark {
	color: var(--online-fg);
}

.grant.removed .grant-mark {
	color: var(--offline-fg);
}

.grant-note {
	margin-top: 14px;
	color: var(--text-faint);
	font-size: var(--text-xs);
}

.grant-footer {
	position: sticky;
	bottom: 0;
	z-index: 3;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 16px;
	margin: 16px -16px -16px;
	padding: 10px 16px;
	border-top: 1px solid var(--border-strong);
	background: var(--surface-overlay);
	box-shadow: 0 -8px 16px -12px var(--scrim);
}

.grant-summary {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.grant-change {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 6px;
	font-size: var(--text-xs);
}

.grant-change b {
	margin-right: 4px;
	font: var(--weight-medium) var(--text-2xs) / 1 var(--font-mono);
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
}

.grant-change code {
	padding: 2px 6px;
	border-radius: var(--radius-xs);
	font: var(--weight-regular) var(--text-2xs) / 1.4 var(--font-mono);
}

.grant-change.added b {
	color: var(--online-fg);
}

.grant-change.added code {
	background: var(--online-bg);
	color: var(--online-fg);
}

.grant-change.removed b {
	color: var(--offline-fg);
}

.grant-change.removed code {
	background: var(--offline-bg);
	color: var(--offline-fg);
}

.grant-summary .error:empty {
	display: none;
}

.grant-buttons {
	display: flex;
	flex: none;
	gap: 8px;
	margin-left: auto;
}

.role-row .segmented {
	flex-wrap: wrap;
	max-width: 100%;
}

.grant-change code {
	overflow-wrap: anywhere;
}

@media (max-width: 767px) {

	.grant-footer {
		bottom: calc(60px + env(safe-area-inset-bottom, 0px));
	}

	.grant-summary {
		flex-basis: 100%;
	}
}

/* Access, every user: staff and helpers in one list, filtered by kind, each kind under its heading; a helper's
   flags a switch each, their account and its setup link; the changes made to someone */
/* The kind under the name where the list is narrow */
.access-search {
	flex-wrap: wrap;
}

.access-search .input {
	flex: 1 1 140px;
}

.access-search .segmented {
	flex: none;
}

.access-group {
	display: flex;
	align-items: center;
	gap: 8px;
	height: 28px;
	padding: 0 16px;
	border-top: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
	background: var(--bg-sunken);
	color: var(--text-muted);
	font: var(--weight-medium) var(--text-2xs) / 1 var(--font-mono);
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
}

.access-group:first-child {
	border-top: 0;
}

.access-group .perm-count {
	margin-left: auto;
	letter-spacing: 0;
}

.access-list .chip {
	flex: none;
}

/* A helper has many flags: thinner pips, so the name keeps its room */
.grant-pips.dense {
	gap: 1px;
}

.grant-pips.dense i {
	width: 3px;
}

.access-role.off {
	color: var(--offline-fg);
}

.perm-box.helper .box-head .tag svg {
	width: 16px;
	height: 16px;
	color: var(--accent);
}

.perm.switched {
	grid-template-columns: 34px minmax(0, 1fr) auto;
}

.perm .switch {
	cursor: pointer;
}

.perm .switch:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

/* What the role picked is for, under the roles */
.role-words {
	flex-basis: 100%;
	color: var(--text-faint);
	font-size: var(--text-xs);
}

.role-words:empty {
	display: none;
}

.account-words {
	margin: 0 0 12px;
	color: var(--text-muted);
	font-size: var(--text-sm);
}

/* A form in a modal spaces its parts as the modal's body does */
.modal-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.box.moment-group { padding-inline: clamp(4px, 1.25vw, 10px); }
/* Shown once: a click selects it whole */
.setup-link {
	margin: 12px 0;
	user-select: all;
}

.password-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.password-form .perm-note {
	margin: 0;
}

.password-form .btn {
	align-self: flex-start;
}

/* A helper's own account: once the rail stacks, the password comes before the long list of flags */
@media (max-width: 1199px) {

	.my-helper .rail {
		order: -1;
	}
}

.audit-list {
	margin: 0 -16px -16px;
	padding: 0;
	list-style: none;
}

.audit-list .empty {
	padding: 16px;
}

.audit-entry {
	display: grid;
	gap: 4px;
	padding: 10px 16px;
	border-bottom: 1px solid var(--border);
}

.audit-entry:last-child {
	border-bottom: 0;
}

.audit-line {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 10px;
	min-width: 0;
}

.audit-whom {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: var(--weight-semibold);
}

.audit-whom a {
	color: inherit;
}

.audit-what {
	color: var(--text);
	font-size: var(--text-sm);
	font-weight: var(--weight-medium);
}

.audit-when {
	color: var(--text-faint);
	font-size: var(--text-xs);
}

.audit-list + .pager {
	margin: 26px 0 0;
}

/* A sector: its full position in its title, underlined when the pointer is on it */
.sector {
	cursor: help;
}

.sector:hover {
	text-decoration: underline dotted;
	text-underline-offset: 3px;
}

/* A long value cut to its column, whole in its title */
.clip {
	display: inline-block;
	max-width: 180px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	vertical-align: bottom;
}

.clip.narrow {
	max-width: 100px;
}

/* An address several players share: ×N, in a colour of its own on the page */
.ip-group {
	display: inline-flex;
	align-items: center;
	height: 18px;
	margin-left: 6px;
	padding: 0 5px;
	border: 1px solid color-mix(in srgb, var(--key) 65%, transparent);
	border-radius: var(--radius-xs);
	background: color-mix(in srgb, var(--key) 18%, transparent);
	color: var(--text);
	font: var(--weight-semibold) var(--text-2xs) / 1 var(--font-mono);
	vertical-align: middle;
	cursor: default;
}

.address + .chip, .ip-group + .chip {
	margin-left: 6px;
}

/* An account a helper gets as a cipher: shown short, its copy button beside it on the same line, never upper-cased
   (a cipher's case is part of it) */
.account {
	text-transform: none;
	white-space: nowrap;
}

.request-actions {
	margin-bottom: 12px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--border);
}

.table td.screen-review {
	background: var(--hatch-warn);
}

.copy {
	display: inline-grid;
	place-items: center;
	width: 20px;
	height: 20px;
	margin-left: 6px;
	padding: 0;
	border: 1px solid transparent;
	border-radius: var(--radius-xs);
	background: transparent;
	color: var(--text-faint);
	vertical-align: middle;
	cursor: pointer;
}

.copy .icon {
	width: 13px;
	height: 13px;
}

.copy:hover {
	border-color: var(--border-strong);
	background: var(--surface-3);
	color: var(--text);
}

/* Gauges: a small meter, amber below 30 %, red below 12 % */
.gauge {
	--p: 0%;
	display: inline-grid;
	align-items: center;
	min-width: 56px;
	gap: 3px;
	font: var(--weight-medium) var(--text-2xs) / 1 var(--font-mono);
	color: var(--text-muted);
}

.gauge::after {
	content: "";
	height: 4px;
	border-radius: 1px;
	background: linear-gradient(90deg, var(--meter-fill) var(--p), var(--meter-track) var(--p));
	box-shadow: inset 0 0 0 1px var(--border);
}

.gauge.low {
	color: var(--connecting-fg);
}

.gauge.low::after {
	background: linear-gradient(90deg, var(--meter-low) var(--p), var(--meter-track) var(--p));
}

.gauge.critical {
	color: var(--offline-fg);
}

.gauge.critical::after {
	background: linear-gradient(90deg, var(--meter-critical) var(--p), var(--meter-track) var(--p));
}

.count-btn {
	min-width: 34px;
	height: 20px;
	padding: 0 6px;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-xs);
	background: var(--surface-2);
	color: var(--text-muted);
	font: var(--weight-medium) var(--text-2xs) / 1 var(--font-mono);
}

.table .count-btn {
	min-width: 28px;
}

.count-btn:hover {
	background: var(--surface-3);
	color: var(--text);
}

.count-btn[disabled] {
	opacity: 0.4;
	cursor: default;
}

/* The activity report of a player: an icon among its row's actions, amber when it is flagged */
.icon-action.flagged {
	border-color: color-mix(in srgb, var(--connecting) 55%, transparent);
	background: var(--connecting-bg);
	color: var(--connecting-fg);
}

/* ------------------------------------------------------------------ */
/* Chips                                                               */
/* ------------------------------------------------------------------ */

.chip {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	height: 20px;
	padding: 0 6px;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-xs);
	background: var(--surface-2);
	color: var(--text-muted);
	font: var(--weight-medium) var(--text-2xs) / 1 var(--font-mono);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
}

button.chip:hover {
	background: var(--surface-3);
}

.chip-green {
	border-color: var(--online-edge);
	background: var(--online-bg);
	color: var(--online-fg);
}

.chip-red {
	border-color: var(--offline-edge);
	background: var(--offline-bg);
	color: var(--offline-fg);
}

.chip-yellow {
	border-color: var(--connecting-edge);
	background: var(--connecting-bg);
	color: var(--connecting-fg);
}

.chip-teal {
	border-color: var(--info-edge);
	background: var(--info-bg);
	color: var(--info-fg);
}

/* ------------------------------------------------------------------ */
/* Bars, server heads, facts                                           */
/* ------------------------------------------------------------------ */

.bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	margin-bottom: 12px;
	padding: 8px 12px;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--bg-sunken);
}

.bar .input {
	width: auto;
	flex: 1 1 160px;
}

.bar .input.short {
	flex: 0 1 110px;
}

.bar .spacer {
	flex: 1;
}

.server-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	margin-bottom: 6px;
}

.server-name {
	font-size: var(--text-xl);
	font-weight: var(--weight-semibold);
	line-height: 28px;
	letter-spacing: -0.015em;
}

.facts {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 18px;
	margin-bottom: 12px;
	color: var(--text-faint);
	font-size: var(--text-xs);
}

.facts b {
	color: var(--text-muted);
	font-weight: var(--weight-medium);
}

/* An address searched on the Players page: the address, its copy button, what can be done with it, its bans */
.address-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.address-text, .moment-values { overflow-wrap: anywhere; }
.address-text {
	color: var(--text);
	font-size: var(--text-lg);
	font-weight: var(--weight-semibold);
}

.address-bans {
	display: grid;
	gap: 6px;
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--border);
	font-size: var(--text-xs);
}

.address-ban {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 10px;
}

/* The inspector has room for more of an address than a table's column */
.facts .address.clip {
	max-width: 220px;
}

/* The other players behind the same address, in the map's inspector: a click selects one */
.facts.same-address {
	align-items: center;
	gap: 4px 6px;
}

.same-address .chip {
	cursor: pointer;
	text-transform: none;
}

.live-dot {
	position: relative;
	display: inline-block;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--online);
}

.live-dot::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	border: 1px solid var(--online);
	animation: ping 2400ms var(--ease-out) infinite;
}

@keyframes ping {

	from {
		transform: scale(0.6);
		opacity: 1;
	}

	to {
		transform: scale(2.2);
		opacity: 0;
	}
}

@media (prefers-reduced-motion: reduce) {

	.live-dot::after {
		animation: none;
	}
}

.switch {
	position: relative;
	width: 34px;
	height: 20px;
	flex: none;
	padding: 0;
	border: 1px solid var(--border-control);
	border-radius: var(--radius-full);
	background: var(--bg-sunken);
	transition: background var(--dur-base) var(--ease-standard);
}

.switch::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--text-muted);
	transition: left var(--dur-base) var(--ease-standard);
}

.switch.on {
	border-color: var(--accent);
	background: var(--accent);
}

.switch.on::after {
	left: 16px;
	background: var(--accent-fg);
}

.switch[disabled] {
	opacity: 0.45;
	cursor: not-allowed;
}

/* The Detection page: a rule per line, its switch, its name and what it flags, how many it flags now */
.detection-rules {
	margin: 12px 0;
	padding: 0;
	list-style: none;
}

.detection-rule {
	padding: 12px 0;
	border-bottom: 1px solid var(--border);
}

.detection-rule-head {
	display: flex;
	align-items: flex-start;
	gap: 14px;
}

.detection-rule-head .switch {
	margin-top: 1px;
}

.detection-rule-text {
	flex: 1;
	min-width: 0;
}

.detection-rule-text b {
	font-weight: var(--weight-semibold);
}

.detection-rule-text p {
	margin: 4px 0 0;
	color: var(--text-faint);
	font-size: var(--text-xs);
}

.detection-rule.off .detection-rule-text b {
	color: var(--text-muted);
}

/* A rule's threshold: a sentence with two small fields, the way to save it or to restore the rule's own */
.detection-threshold {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 8px;
	margin: 8px 0 0;
	color: var(--text-muted);
	font-size: var(--text-xs);
}

.detection-threshold .input {
	width: 72px;
	height: var(--control-sm);
	font-variant-numeric: tabular-nums;
}

/* How many a rule flags now: the overview's cheating count, a button opening the list */
.rule-count {
	display: inline-flex;
	flex: none;
	align-items: baseline;
	gap: 6px;
	min-height: 36px;
	padding: 0 8px;
	border: 1px solid transparent;
	border-radius: var(--radius-sm);
	background: none;
	color: var(--text-faint);
	font: inherit;
	white-space: nowrap;
	cursor: pointer;
}

.rule-count b {
	font-size: var(--text-2xl);
	font-weight: var(--weight-semibold);
	line-height: 36px;
	letter-spacing: -0.02em;
	font-variant-numeric: proportional-nums;
}

.rule-count small {
	font-size: var(--text-sm);
}

.rule-count:hover:not([disabled]) {
	border-color: var(--border);
	background: var(--surface-2);
}

.rule-count[disabled] {
	cursor: default;
}

.rule-count.on {
	color: var(--offline);
}

.rule-count.on small {
	color: var(--offline-fg);
}

/* A chevron, turned down when the list is open */
.rule-chevron {
	align-self: center;
	width: 7px;
	height: 7px;
	margin-left: 2px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: translateY(-1px) rotate(-45deg);
	transition: transform var(--dur-fast) var(--ease-standard);
}

.rule-chevron.open {
	transform: translateY(-3px) rotate(45deg);
}

.detection-rule-players {
	margin: 12px 0 0 48px;
}

@media (max-width: 650px) {

	.detection-rule-head {
		flex-wrap: wrap;
		row-gap: 4px;
	}

	/* The text takes the line beside the switch, the count goes under it */
	.detection-rule-text {
		flex-basis: calc(100% - 48px);
	}

	.rule-count {
		margin-left: 40px;
	}

	.detection-rule-players {
		margin-left: 0;
	}
}

/* Commands, one per line: numbered, what became of each, the server's answer under it */
.cmd-list {
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--bg-sunken);
	list-style: none;
}

.cmd-list li {
	display: grid;
	grid-template-columns: 22px minmax(0, 1fr) auto;
	align-items: center;
	gap: 4px 10px;
	padding: 9px 12px;
	border-bottom: 1px solid var(--border);
}

.cmd-list li:last-child {
	border-bottom: 0;
}

.cmd-list li.bad {
	background: var(--offline-bg);
}

.cmd-n {
	color: var(--text-disabled);
	font: var(--weight-regular) var(--text-2xs) / 1 var(--font-mono);
	text-align: right;
}

.cmd-list code {
	color: var(--text);
	font: var(--weight-medium) var(--text-sm) / 1.4 var(--font-mono);
	overflow-wrap: anywhere;
}

.cmd-answer {
	grid-column: 2 / -1;
	color: var(--text-faint);
	font: var(--weight-regular) var(--text-xs) / 1.4 var(--font-mono);
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

/* The console: a rule check or a run, its head (who, how, how it went, when) over its commands */
.console-out:not(:empty) {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 14px;
}

.runs {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.run {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.run-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 10px;
	color: var(--text-faint);
	font-size: var(--text-sm);
}

.run-head b {
	color: var(--text);
	font-weight: var(--weight-semibold);
}

.run-end {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin-left: auto;
	font-size: var(--text-xs);
}

.run-error {
	color: var(--offline-fg);
	font-size: var(--text-xs);
	overflow-wrap: anywhere;
}

/* Just ran: an accent edge, until the page is left */
.run.fresh .cmd-list {
	border-color: color-mix(in srgb, var(--accent) 60%, transparent);
	box-shadow: 0 0 0 3px var(--accent-wash);
}

.run-none {
	padding: 14px 12px;
	border: 1px dashed var(--border);
	border-radius: var(--radius-sm);
	color: var(--text-faint);
	font-size: var(--text-sm);
	text-align: center;
}

/* ------------------------------------------------------------------ */
/* Calendar of the history                                             */
/* ------------------------------------------------------------------ */

.calendar {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 3px;
	max-width: 420px;
}

.calendar-head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
}

.calendar-head b {
	min-width: 150px;
	font-weight: var(--weight-semibold);
	text-align: center;
}

.weekday {
	color: var(--text-faint);
	font: var(--weight-medium) var(--text-2xs) / 20px var(--font-mono);
	text-align: center;
	text-transform: uppercase;
}

.day {
	height: 30px;
	padding: 0;
	border: 1px solid transparent;
	border-radius: var(--radius-xs);
	background: var(--hatch-neutral);
	color: var(--text-disabled);
	font: var(--weight-medium) var(--text-xs) / 1 var(--font-mono);
	cursor: default;
}

.day.has {
	border-color: var(--border-strong);
	background: var(--surface-2);
	color: var(--text);
	cursor: pointer;
}

.day.has:hover {
	background: var(--surface-3);
}

.day.on {
	border-color: var(--accent);
	background: var(--accent);
	color: var(--accent-fg);
}

.day.today {
	box-shadow: inset 0 -2px 0 var(--online);
}

.times {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-top: 12px;
}

.hours {
	display: grid;
	grid-template-columns: repeat(24, minmax(0, 1fr));
	gap: 2px;
	margin-top: 12px;
}

.hour {
	height: 26px;
	padding: 0;
	border: 1px solid transparent;
	border-radius: var(--radius-xs);
	background: var(--hatch-neutral);
	color: var(--text-disabled);
	font: var(--weight-medium) 10px / 1 var(--font-mono);
}

.hour.has {
	border-color: var(--border-strong);
	background: var(--surface-2);
	color: var(--text-muted);
	cursor: pointer;
}

.hour.on {
	border-color: var(--accent);
	background: var(--accent);
	color: var(--accent-fg);
}

.scrub {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 12px;
}

.scrub input[type="range"] {
	flex: 1 1 240px;
	accent-color: var(--accent);
}

/* ------------------------------------------------------------------ */
/* Profile of a player                                                 */
/* ------------------------------------------------------------------ */

.profile-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
}

.avatar {
	width: 64px;
	height: 64px;
	flex: none;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-xs);
	background: var(--bg-sunken) center / 120% no-repeat;
}

.level {
	display: inline-grid;
	place-items: center;
	min-width: 40px;
	height: 40px;
	padding: 0 8px;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
	background: var(--surface-2);
	font: var(--weight-semibold) var(--text-lg) / 1 var(--font-mono);
}

.tiles {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 1px;
	margin-top: 14px;
	border: 1px solid var(--border);
	background: var(--border);
}

.tile {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 10px 14px;
	background: var(--surface-1);
}

.tile-label {
	color: var(--text-faint);
	font: var(--weight-medium) var(--text-2xs) / 14px var(--font-mono);
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
}

.tile-value {
	font-size: 22px;
	font-weight: var(--weight-semibold);
	line-height: 28px;
	letter-spacing: -0.02em;
	font-variant-numeric: proportional-nums;
}

.banned-tape {
	margin-top: 12px;
	padding: 10px 12px;
	border: 1px solid var(--offline-edge);
	border-radius: var(--radius-sm);
	background: var(--hatch-crit), var(--offline-bg);
	color: var(--offline-fg);
}

.banned-tape b {
	font: var(--weight-semibold) var(--text-xs) / 1 var(--font-mono);
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.panel-actions {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 12px;
	margin-top: 14px;
}

.action-box {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 12px;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--bg-sunken);
}

.action-box h4 {
	color: var(--text-faint);
	font: var(--weight-medium) var(--text-2xs) / 14px var(--font-mono);
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
}

.presets {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.preset {
	height: 22px;
	padding: 0 8px;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-xs);
	background: var(--bg-sunken);
	color: var(--text-faint);
	font: var(--weight-medium) var(--text-xs) / 1 var(--font-sans);
}

.preset:hover {
	color: var(--text);
}

.preset.on {
	background: var(--surface-3);
	color: var(--text);
	box-shadow: inset 0 -2px 0 var(--accent);
}

/* Inventory and cosmetics grids */
.slots {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
	gap: 6px;
}

.slot {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	min-width: 0;
	padding: 6px 4px 4px;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--bg-sunken);
	color: var(--text);
	text-align: center;
}

button.slot:hover {
	background: var(--surface-2);
}

.slot.on {
	border-color: var(--accent);
	box-shadow: inset 0 0 0 1px var(--accent);
}

.slot img {
	width: 52px;
	height: 52px;
	object-fit: contain;
}

.slot-letters {
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	border-radius: var(--radius-sm);
	background: var(--surface-3);
	color: var(--text-muted);
	font: var(--weight-semibold) var(--text-md) / 1 var(--font-mono);
}

.slot-count {
	position: absolute;
	top: 4px;
	right: 6px;
	color: var(--text);
	font: var(--weight-semibold) var(--text-2xs) / 1 var(--font-mono);
}

.slot-name {
	max-width: 100%;
	overflow: hidden;
	color: var(--text-faint);
	font-size: var(--text-2xs);
	line-height: 14px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.slot-remove {
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	padding: 0;
	border: 1px solid var(--offline-edge);
	border-radius: var(--radius-xs);
	background: var(--offline-bg);
	color: var(--offline-fg);
	font-size: 11px;
	line-height: 16px;
}

.rarity-1 { box-shadow: inset 0 -3px 0 #9b6b37; }
.rarity-2 { box-shadow: inset 0 -3px 0 #9aa0a6; }
.rarity-3 { box-shadow: inset 0 -3px 0 #e2b93b; }
.rarity-4 { box-shadow: inset 0 -3px 0 #56d0e8; }
.rarity-5 { box-shadow: inset 0 -3px 0 #a46ae6; }
.rarity-6 { box-shadow: inset 0 -3px 0 #e04343; }
.rarity-7 { box-shadow: inset 0 -3px 0 #44d17a; }
.rarity-8 { box-shadow: inset 0 -3px 0 #ffd34d; }

.json {
	max-height: 460px;
	margin: 0;
	padding: 12px;
	overflow: auto;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--bg-sunken);
	color: var(--text-muted);
	font: var(--weight-regular) var(--text-xs) / 18px var(--font-mono);
	white-space: pre;
}

.sub-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 2px;
	margin: -8px 0 12px;
	border-bottom: 1px solid var(--border);
}

.sub-tabs .page-tab {
	height: 34px;
}

/* ------------------------------------------------------------------ */
/* Modals                                                              */
/* ------------------------------------------------------------------ */

.overlay {
	position: fixed;
	inset: 0;
	z-index: 60;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	justify-items: center;
	align-items: start;
	padding: 12vh 16px 24px;
	overflow-y: auto;
	background: var(--scrim);
	animation: fade var(--dur-slow) var(--ease-out);
	overscroll-behavior: contain;
}

.modal {
	display: flex;
	flex-direction: column;
	width: min(520px, 100%);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-lg);
	background: var(--surface-overlay);
	box-shadow: var(--shadow-overlay);
	animation: rise var(--dur-slow) var(--ease-out);
}

.modal.wide {
	width: min(880px, 100%);
}

.modal-head {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 16px 20px 0;
}

.modal-head .tag {
	flex: 1;
	font-size: var(--text-lg);
	line-height: 24px;
	overflow-wrap: anywhere;
}

.modal-body {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 12px 20px 20px;
}

.modal-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	margin: 4px -20px -20px;
	padding: 12px 20px;
	border-top: 1px solid var(--border);
}

.close {
	display: inline-grid;
	place-items: center;
	width: 28px;
	height: 28px;
	flex: none;
	margin: -2px -8px 0 0;
	padding: 0;
	border: 0;
	border-radius: var(--radius-sm);
	background: transparent;
	color: var(--text-muted);
	font-size: 14px;
}

.close:hover {
	background: var(--surface-2);
	color: var(--text);
}

@keyframes rise {

	from {
		opacity: 0;
		transform: translateY(8px);
	}
}

@keyframes fade {

	from {
		opacity: 0;
	}
}

@media (max-width: 767px) {

	.overlay {
		padding-top: 6vh;
	}

	.modal-actions > * {
		flex: 1 1 auto;
	}
}

.secret {
	padding: 10px 12px;
	border: 1px dashed var(--connecting-edge);
	border-radius: var(--radius-sm);
	background: var(--connecting-bg);
	font: var(--weight-medium) var(--text-md) / 20px var(--font-mono);
	word-break: break-all;
}

.picker {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
	gap: 6px;
	max-height: 300px;
	padding: 2px;
	overflow-y: auto;
}

dl.facts-list {
	display: grid;
	grid-template-columns: minmax(96px, max-content) 1fr;
	gap: 6px 16px;
	margin: 0;
	padding: 12px 14px;
	border-radius: var(--radius-sm);
	background: var(--bg-sunken);
}

dl.facts-list dt {
	color: var(--text-faint);
}

dl.facts-list dd {
	min-width: 0;
	margin: 0;
	overflow-wrap: anywhere;
}

/* ------------------------------------------------------------------ */
/* Toasts                                                              */
/* ------------------------------------------------------------------ */

.toasts {
	position: fixed;
	right: var(--gutter);
	bottom: calc(16px + env(safe-area-inset-bottom, 0px));
	z-index: 70;
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-width: min(380px, calc(100% - 32px));
}

.toast {
	padding: 10px 12px 10px 14px;
	border: 1px solid var(--border-strong);
	border-left: 3px solid var(--online);
	border-radius: var(--radius-md);
	background: var(--surface-overlay);
	box-shadow: var(--shadow-pop);
	font-weight: var(--weight-medium);
	animation: rise var(--dur-base) var(--ease-out);
}

.toast.bad {
	border-left-color: var(--offline);
	color: var(--offline-fg);
}

.toast-link {
	color: inherit;
	font-family: var(--font-mono);
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* ------------------------------------------------------------------ */
/* Staff                                                               */
/* ------------------------------------------------------------------ */

.staff-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
	gap: 12px;
}

.staff-card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 14px;
	border: 1px solid var(--border);
	border-radius: var(--radius-xs);
	background: var(--surface-1);
}

.staff-card.disabled {
	background: var(--hatch-neutral), var(--surface-1);
	opacity: 0.7;
}

.staff-name {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-size: var(--text-lg);
	font-weight: var(--weight-semibold);
}

.perm-group {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 8px 10px;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--bg-sunken);
}

.perm-group b {
	color: var(--text-faint);
	font: var(--weight-medium) var(--text-2xs) / 14px var(--font-mono);
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
}

.perm-group .check {
	align-items: flex-start;
	line-height: 18px;
}

.perm-group .check input {
	margin-top: 2px;
}

.perm-group.atlas {
	border-color: var(--info-edge);
}

.warnings {
	margin: 0;
	padding: 10px 12px 10px 30px;
	border: 1px solid var(--connecting-edge);
	border-radius: var(--radius-sm);
	background: var(--connecting-bg);
	color: var(--connecting-fg);
	font-size: var(--text-xs);
}

.season-row {
	align-items: center;
}

.season-ribbon {
	width: auto;
	height: 45px;
}

.pager {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-top: 10px;
}

.search {
	display: flex;
	gap: 8px;
	margin-bottom: 12px;
}

/* A part of a row that takes the room left */
.grow {
	flex: 1;
	min-width: 0;
}

.bar .search {
	margin-bottom: 0;
}

.bar .search .input {
	flex: 1;
}

.note-box {
	padding: 10px 12px;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--bg-sunken);
	white-space: pre-wrap;
}

/* What became of a line: allowed or not, ran or failed, an icon and a word */
.line-status {
	display: inline-flex;
	flex: none;
	align-items: center;
	gap: 5px;
	font: var(--weight-medium) var(--text-xs) / 1 var(--font-sans);
}

.line-status.good {
	color: var(--online-fg);
}

.line-status.bad {
	color: var(--offline-fg);
}

/* ------------------------------------------------------------------ */
/* Requests                                                            */
/* ------------------------------------------------------------------ */

.kind {
	display: inline-flex;
	align-items: center;
	height: 20px;
	padding: 0 6px;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-xs);
	color: var(--text-muted);
	font: var(--weight-semibold) var(--text-2xs) / 1 var(--font-mono);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.reviews {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.reviews li {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	padding: 6px 10px;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--bg-sunken);
}

.edited {
	color: var(--connecting-fg);
	font-size: var(--text-xs);
}

.targets {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

/* ------------------------------------------------------------------ */
/* Charts                                                              */
/* ------------------------------------------------------------------ */

.chart {
	display: block;
	width: 100%;
	height: 220px;
	overflow: visible;
}

.chart .grid {
	stroke: var(--viz-grid);
	stroke-width: 1;
}

.chart .axis {
	fill: var(--viz-label);
	font: var(--weight-regular) var(--text-2xs) var(--font-mono);
}

.chart .line {
	fill: none;
	stroke: var(--viz-1);
	stroke-width: 1.75;
	stroke-linejoin: round;
	stroke-linecap: round;
}

.chart .line.second {
	stroke: var(--viz-3);
}

.chart .cursor {
	stroke: var(--text-faint);
	stroke-width: 1;
	stroke-dasharray: 3 3;
}

.chart-tip {
	position: absolute;
	z-index: 5;
	padding: 6px 8px;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-md);
	background: var(--surface-overlay);
	box-shadow: var(--shadow-pop);
	font-size: var(--text-xs);
	pointer-events: none;
	/* One line while it fits the chart, then wrapped */
	width: max-content;
	max-width: 100%;
}

.chart-wrap {
	position: relative;
}

.spark {
	display: block;
	width: 100%;
	height: 100%;
	overflow: visible;
}

.spark path {
	fill: none;
	stroke: var(--spark, var(--viz-1));
	stroke-width: 1.5;
	stroke-linejoin: round;
}

.spark circle {
	fill: var(--spark, var(--viz-1));
}

.legend {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
	color: var(--text-faint);
	font-size: var(--text-xs);
}

.legend i {
	display: inline-block;
	width: 10px;
	height: 2px;
	margin-right: 6px;
	vertical-align: middle;
	background: var(--viz-1);
}

.legend i.second {
	background: var(--viz-3);
}

/* Vitals: a 6 px track cut every 10 %, amber below 30 %, red below 12 % */
.meters {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.meter {
	display: grid;
	grid-template-columns: 44px minmax(0, 1fr) 52px;
	align-items: center;
	gap: 8px;
	height: 20px;
	font-size: var(--text-xs);
}

.meter-label {
	color: var(--text-faint);
}

.meter-track {
	--p: 0%;
	height: 6px;
	border-radius: 1px;
	background: linear-gradient(90deg, var(--fill, var(--meter-fill)) var(--p), var(--meter-track) var(--p));
	box-shadow: inset 0 0 0 1px var(--border);
	-webkit-mask-image: repeating-linear-gradient(90deg, #000 0 calc(10% - 1px), transparent calc(10% - 1px) 10%);
	mask-image: repeating-linear-gradient(90deg, #000 0 calc(10% - 1px), transparent calc(10% - 1px) 10%);
}

/* Each vital in the game's colour; a low one says so by its value */
.meter.life, .vital.life {
	--fill: var(--vital-life);
}

.meter.food, .vital.food {
	--fill: var(--vital-food);
}

.meter.water, .vital.water {
	--fill: var(--vital-water);
}

.meter.cold, .vital.cold {
	--fill: var(--vital-cold);
}

.meter-value {
	font: var(--weight-medium) var(--text-xs) / 1 var(--font-mono);
	text-align: right;
	white-space: nowrap;
}

.meter-value small {
	color: var(--text-faint);
	font-size: var(--text-2xs);
}

.meter.low .meter-value {
	color: var(--connecting-fg);
}

.meter.critical .meter-value {
	color: var(--offline-fg);
}

/* ------------------------------------------------------------------ */
/* Tactical map                                                        */
/* ------------------------------------------------------------------ */

/* The map, the rail beside it, the roster under the map; the rail runs down beside the roster */
.map-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--inspector-w);
	grid-template-rows: auto 1fr;
	grid-template-areas: "map side" "below side";
	gap: 16px;
	align-items: start;
}

.map-layout > .map-panel {
	grid-area: map;
}

.map-layout > .rail {
	grid-area: side;
}

.map-below {
	grid-area: below;
	min-width: 0;
}

.map-panel {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	border: 1px solid var(--border);
	border-radius: var(--radius-xs);
	background: var(--surface-1);
	overflow: hidden;
}

.map-stage {
	position: relative;
	height: calc(100vh - var(--top-h) - 250px);
	min-height: 480px;
	touch-action: none;
	user-select: none;
	cursor: grab;
}

.map-stage.dragging {
	cursor: grabbing;
}

.map-stage canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.map-overlay {
	position: absolute;
	z-index: 2;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
	background: color-mix(in srgb, var(--surface-1) 90%, transparent);
	-webkit-backdrop-filter: blur(var(--blur-overlay));
	backdrop-filter: blur(var(--blur-overlay));
	cursor: default;
}

/* The map's controls, above it: layers, the legend, zoom */
.map-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 12px;
	padding: 5px 8px;
	border-bottom: 1px solid var(--border);
}

.map-layers {
	display: flex;
	flex-wrap: wrap;
	gap: 2px;
}

.map-layer {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 26px;
	padding: 0 8px;
	border: 0;
	border-radius: 3px;
	background: transparent;
	color: var(--text-faint);
	font: var(--weight-medium) var(--text-xs) / 1 var(--font-sans);
}

.map-layer:hover {
	color: var(--text);
}

.map-layer.on {
	background: var(--surface-3);
	color: var(--text);
}

.map-layer .kbd {
	min-width: 16px;
	height: 16px;
}

.map-layer small {
	color: var(--text-faint);
	font: var(--weight-regular) var(--text-2xs) / 1 var(--font-mono);
}

.map-zoom {
	display: flex;
	align-items: center;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
}

.map-zoom button {
	width: 28px;
	height: 26px;
	padding: 0;
	border: 0;
	border-right: 1px solid var(--border);
	background: transparent;
	color: var(--text-muted);
	font: var(--weight-medium) var(--text-md) / 1 var(--font-mono);
}

.map-zoom button:last-child {
	border-right: 0;
}

.map-zoom button:hover {
	background: var(--surface-2);
	color: var(--text);
}

.map-zoom span {
	min-width: 38px;
	padding: 0 4px;
	border-right: 1px solid var(--border);
	color: var(--text-faint);
	font: var(--weight-regular) var(--text-2xs) / 26px var(--font-mono);
	text-align: center;
}

.map-legend {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 12px;
	color: var(--text-faint);
	font-size: var(--text-2xs);
}

.map-key i.map-ramp {
	width: 36px;
	height: 6px;
	border-radius: 1px;
	background: linear-gradient(90deg, rgb(var(--map-heat-0)), rgb(var(--map-heat-1)), rgb(var(--map-heat-2)), rgb(var(--map-heat-3)));
}

.map-key {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.map-key i {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--key, var(--map-dot));
}

.map-key i.ring {
	background: transparent;
	box-shadow: inset 0 0 0 1.5px var(--key, var(--map-dot));
}

.map-key i.flag {
	background: transparent;
	box-shadow: inset 0 0 0 2px var(--connecting);
}

.map-readout {
	position: absolute;
	z-index: 2;
	left: 24px;
	right: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	gap: 12px;
	height: 26px;
	padding: 0 12px;
	border-top: 1px solid var(--border);
	background: color-mix(in srgb, var(--surface-1) 70%, transparent);
	color: var(--text-faint);
	font: var(--weight-regular) var(--text-2xs) / 1 var(--font-mono);
	white-space: nowrap;
	overflow: hidden;
}

.map-mini {
	right: 8px;
	bottom: 34px;
	padding: 4px;
	background: color-mix(in srgb, var(--surface-1) 45%, transparent);
	opacity: 0.6;
	transition: opacity var(--dur-fast);
}

.map-mini:hover {
	opacity: 1;
}

.map-mini canvas {
	position: static;
	display: block;
	width: 112px;
	height: 112px;
	cursor: pointer;
}

.map-callout {
	position: absolute;
	z-index: 4;
	display: flex;
	flex-direction: column;
	gap: 7px;
	/* As wide as its line of figures needs (a score in the millions), within bounds */
	width: max-content;
	min-width: 216px;
	max-width: 300px;
	padding: 8px 10px 7px;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-md);
	background: color-mix(in srgb, var(--surface-overlay) 82%, transparent);
	-webkit-backdrop-filter: blur(var(--blur-overlay));
	backdrop-filter: blur(var(--blur-overlay));
	box-shadow: var(--shadow-pop);
	pointer-events: none;
}

.callout-head {
	display: flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
}

/* The colour of a tracked player */
.key-dot {
	--key: var(--text-faint);
	width: 8px;
	height: 8px;
	flex: none;
	border-radius: 50%;
	background: var(--key);
}

.callout-name {
	overflow: hidden;
	font-size: var(--text-sm);
	font-weight: var(--weight-semibold);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.callout-slot {
	flex: none;
	color: var(--text-faint);
	font: var(--weight-regular) var(--text-2xs) / 1 var(--font-mono);
}

.callout-head .chip {
	height: 16px;
	padding: 0 4px;
}

.callout-head .chip:first-of-type {
	margin-left: auto;
}

.callout-stats {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 10px;
	color: var(--text-faint);
	font-size: var(--text-2xs);
}

.callout-stats b {
	margin-right: 3px;
	color: var(--text);
	font: var(--weight-semibold) var(--text-xs) / 1 var(--font-mono);
}

.callout-where {
	margin-left: auto;
	color: var(--text-muted);
	font: var(--weight-medium) var(--text-xs) / 1 var(--font-mono);
}

/* Vitals, compact: a 2 x 2 grid of short bars */
.vitals {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px 12px;
}

.vital {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: baseline;
	row-gap: 3px;
	font-size: var(--text-2xs);
}

.vital-label {
	color: var(--text-faint);
}

.vital-value {
	font: var(--weight-medium) var(--text-2xs) / 1 var(--font-mono);
}

.vital-track {
	--p: 0%;
	grid-column: 1 / -1;
	height: 3px;
	border-radius: 1px;
	background: linear-gradient(90deg, var(--fill, var(--meter-fill)) var(--p), var(--meter-track) var(--p));
}

.vital.low .vital-value {
	color: var(--connecting-fg);
}

.vital.critical .vital-value {
	color: var(--offline-fg);
}

.callout-hint {
	color: var(--text-disabled);
	font-size: var(--text-2xs);
}

/* The time scrubber under the map */
.scrubber {
	display: flex;
	flex-direction: column;
	border-top: 1px solid var(--border);
}

.scrubber-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	padding: 8px 14px;
}

.scrubber-time {
	min-width: 92px;
	font: var(--weight-semibold) var(--text-lg) / 1 var(--font-mono);
}

.scrubber-time.live {
	color: var(--online-fg);
}

.scrubber-time.past {
	color: var(--connecting-fg);
}

.scrubber-track {
	position: relative;
	height: 54px;
	margin: 0 14px 10px;
	cursor: pointer;
	touch-action: none;
}

.scrubber-track canvas {
	display: block;
	width: 100%;
	height: 100%;
}

.icon-btn.bordered {
	border-color: var(--border-strong);
	background: var(--surface-1);
}

.icon-btn.playing {
	border-color: var(--connecting-edge);
	background: var(--connecting-bg);
	color: var(--connecting-fg);
}

/* The map's rail: inspector, tracked players, roster */
.inspector-head {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

/* What can be done to the player, right under its name */
.inspector-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 10px;
}

.inspector-mark {
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	flex: none;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
	background: var(--bg-sunken);
}

.inspector-mark i {
	display: block;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--key, var(--map-dot));
}

.inspector-name {
	min-width: 0;
	overflow: hidden;
	font-size: var(--text-lg);
	font-weight: var(--weight-semibold);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.stat-strip {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1px;
	margin: 12px 0;
	border: 1px solid var(--border);
	background: var(--border);
}

.stat {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 6px 8px;
	background: var(--surface-1);
}

.stat span {
	color: var(--text-faint);
	font: var(--weight-medium) var(--text-2xs) / 14px var(--font-mono);
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
}

.stat b {
	overflow: hidden;
	font: var(--weight-semibold) var(--text-sm) / 18px var(--font-mono);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tracked {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tracked li {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 30px;
	padding: 2px 6px;
	border-radius: var(--radius-sm);
}

.tracked li:hover {
	background: var(--surface-2);
}

.swatch {
	display: inline-grid;
	place-items: center;
	width: 16px;
	height: 16px;
	flex: none;
	padding: 0;
	border: 1px solid color-mix(in srgb, var(--key) 70%, var(--text));
	border-radius: var(--radius-xs);
	background: var(--key);
	color: var(--bg);
	font: var(--weight-semibold) 10px / 1 var(--font-mono);
}

.tracked .grow {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.roster {
	max-height: 520px;
	overflow-y: auto;
}

.roster .table td {
	height: 30px;
}

/* The roster under the map: a toggle to track, few columns */
.roster-table td:first-child, .roster-table th:first-child {
	width: 28px;
	padding-right: 0;
}

.roster-table .cell-nick {
	max-width: 220px;
}

.track-toggle {
	--key: transparent;
	display: inline-grid;
	place-items: center;
	width: 20px;
	height: 20px;
	padding: 0;
	border: 1px dashed var(--border-strong);
	border-radius: var(--radius-xs);
	background: var(--key);
	color: var(--text-faint);
	font: var(--weight-semibold) 11px / 1 var(--font-mono);
	cursor: pointer;
}

.track-toggle:hover {
	border-color: var(--accent);
	color: var(--text);
}

.track-toggle .icon {
	width: 12px;
	height: 12px;
}

.track-toggle.on {
	border-style: solid;
	border-color: color-mix(in srgb, var(--key) 70%, var(--text));
	color: var(--bg);
}

/* The vitals of a row: four pills in the game's colours, HP and food above water and cold, each filled to its
   level with its percent, outlined in yellow below 25 % as in the official panel */
.mini-vitals {
	display: inline-grid;
	grid-template-columns: repeat(2, 34px);
	gap: 2px 3px;
	vertical-align: middle;
}

.mini-vitals i {
	--p: 0%;
	--fill: var(--vital-life);
	display: block;
	height: 11px;
	border-radius: 3px;
	background: linear-gradient(90deg, var(--fill) var(--p), color-mix(in srgb, var(--fill) 22%, var(--bg-sunken)) var(--p));
	color: var(--vital-text);
	font: var(--weight-semibold) 8.5px / 11px var(--font-mono);
	font-style: normal;
	letter-spacing: 0;
	text-align: center;
	text-shadow: 0 1px 1px var(--vital-text-shadow);
}

.mini-vitals i.food {
	--fill: var(--vital-food);
}

.mini-vitals i.water {
	--fill: var(--vital-water);
}

.mini-vitals i.cold {
	--fill: var(--vital-cold);
}

.mini-vitals i.low {
	box-shadow: 0 0 0 1px var(--vital-low);
}

.roster-nick {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.roster-filter .input {
	width: 220px;
}

@media (max-width: 1023px) {

	.map-layout {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: auto;
		grid-template-areas: "map" "side" "below";
	}

	.map-stage {
		height: 620px;
	}

	.map-layout > .rail {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	}
}

@media (max-width: 767px) {

	.map-stage {
		height: 420px;
		min-height: 0;
	}

	.map-legend, .map-mini {
		display: none;
	}

	.map-layer .kbd {
		display: none;
	}
}

/* ------------------------------------------------------------------ */
/* Phone: the bottom tab bar and its sheet                             */
/* ------------------------------------------------------------------ */

.tabbar {
	display: none;
}

.sheet {
	position: fixed;
	inset: auto 0 0 0;
	z-index: 61;
	max-height: 80vh;
	padding: 8px 8px calc(16px + env(safe-area-inset-bottom, 0px));
	overflow-y: auto;
	border-top: 1px solid var(--border-strong);
	border-radius: var(--radius-lg) var(--radius-lg) 0 0;
	background: var(--surface-overlay);
	box-shadow: var(--shadow-overlay);
	animation: rise-sheet var(--dur-slow) var(--ease-out);
}

.sheet::before {
	content: "";
	display: block;
	width: 36px;
	height: 4px;
	margin: 0 auto 10px;
	border-radius: 2px;
	background: var(--border-strong);
}

/* The sheet lists every page whole: the rail's and the phone's strip's rules (icons only, centred, an underline) are undone */
.sheet .side-group {
	display: block;
	padding: 12px 14px 4px;
}

.sheet .side-group:first-child {
	padding-top: 0;
}

.sheet .side-item {
	justify-content: flex-start;
	gap: 12px;
	width: 100%;
	height: 44px;
	padding: 0 14px;
	font-size: var(--text-md);
}

.sheet .side-label {
	display: block;
}

.sheet .side-icon {
	width: 18px;
}

.sheet .side-icon .icon {
	width: 16px;
	height: 16px;
}

.sheet .side-item .badge {
	position: static;
	margin-left: auto;
}

.sheet .side-item.on::before {
	top: 12px;
	bottom: 12px;
	left: 0;
	right: auto;
	width: 3px;
	height: auto;
}

.sheet-scrim {
	position: fixed;
	inset: 0;
	z-index: 60;
	background: var(--scrim);
	animation: fade var(--dur-slow) var(--ease-out);
}

@keyframes rise-sheet {

	from {
		opacity: 0;
		transform: translateY(16px);
	}
}

@media (max-width: 767px) {

	.side {
		display: none;
	}

	.tabbar {
		position: sticky;
		bottom: 0;
		z-index: 25;
		display: grid;
		grid-template-columns: repeat(5, minmax(0, 1fr));
		height: calc(60px + env(safe-area-inset-bottom, 0px));
		padding-bottom: env(safe-area-inset-bottom, 0px);
		border-top: 1px solid var(--border);
		background: var(--bg-raised);
	}

	.tabbar-item {
		position: relative;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 4px;
		border: 0;
		background: transparent;
		color: var(--text-faint);
		font: var(--weight-medium) var(--text-2xs) / 1 var(--font-sans);
	}

	.tabbar-item .side-icon {
		width: auto;
		font-size: 19px;
	}

	.tabbar-item .side-icon .icon {
		width: 19px;
		height: 19px;
	}

	.tabbar-item.on {
		color: var(--text);
	}

	.tabbar-item.on::before {
		content: "";
		position: absolute;
		top: 0;
		left: 30%;
		right: 30%;
		height: 2px;
		background: var(--accent);
	}

	.tabbar-item .badge {
		position: absolute;
		top: 6px;
		left: 56%;
	}

	.top .brand {
		display: flex;
	}

	.top .brand .top-title span {
		display: none;
	}

	.who-name b, .who-name .chip {
		display: none;
	}

	.page-head {
		flex-direction: column;
		align-items: stretch;
	}

	.page-actions {
		margin-left: 0;
	}

	.page-actions > .btn {
		flex: 1 1 auto;
		height: var(--control-lg);
	}

	.with-rail {
		grid-template-columns: minmax(0, 1fr);
	}

	.rail {
		display: flex;
	}

	.kpis {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* ------------------------------------------------------------------ */
/* Activity report: the panel's diagnostics, in the same tokens        */
/* ------------------------------------------------------------------ */

/* An activity report's steps through the stored reports: before, the dropdown, after */
.report-step {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 14px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--border);
	font-size: var(--text-xs);
}

.report-pick {
	width: auto;
	min-width: 190px;
	font-family: var(--font-mono);
}

.analysis-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
}

.analysis-head h2 {
	font-size: var(--text-xl);
	font-weight: var(--weight-semibold);
}

.analysis-meta {
	margin: 4px 0;
	color: var(--text-faint);
	font: var(--weight-regular) var(--text-xs) / 16px var(--font-mono);
}

.analysis-metrics {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1px;
	border: 1px solid var(--border);
	background: var(--border);
}

.analysis-stat {
	padding: 10px 12px;
	background: var(--surface-1);
}

.analysis-stat b {
	display: block;
	font-size: var(--text-xl);
	font-weight: var(--weight-semibold);
}

.analysis-stat span {
	color: var(--text-faint);
	font-size: var(--text-xs);
}

.analysis-block {
	padding: 10px 12px;
	border: 1px solid var(--connecting-edge);
	border-left-width: 3px;
	border-radius: var(--radius-sm);
	background: var(--connecting-bg);
}

.analysis-block.info {
	border-color: var(--info-edge);
	background: var(--info-bg);
}

.analysis-block.muted {
	border-color: var(--border-strong);
	background: var(--bg-sunken);
}

.analysis-block-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.analysis-block p {
	margin: 6px 0 0;
}

.analysis-note {
	margin: 4px 0;
	color: var(--text-faint);
	font-size: var(--text-xs);
}

.analysis-title {
	margin: 12px 0 0;
	color: var(--text-faint);
	font: var(--weight-medium) var(--text-2xs) / 14px var(--font-mono);
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
}

.analysis-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.analysis-facts, .analysis-toolbar, .analysis-tabs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.analysis-kv {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 6px 0;
	border-bottom: 1px solid var(--border);
}

.analysis-kv span:first-child {
	color: var(--text-faint);
}

.analysis-toolbar .input {
	width: 200px;
}

.analysis-bins {
	display: flex;
	align-items: flex-end;
	gap: 4px;
	height: 100px;
	padding-top: 12px;
}

.analysis-bin {
	--h: 0%;
	display: flex;
	flex: 1;
	align-items: flex-end;
	justify-content: center;
	height: var(--h);
	min-height: 2px;
	border-radius: 2px 2px 0 0;
	background: var(--viz-1);
	color: var(--accent-fg);
	font: var(--weight-medium) 10px / 1 var(--font-mono);
}

.analysis-axis {
	display: flex;
	justify-content: space-between;
	color: var(--text-faint);
	font: var(--weight-regular) var(--text-2xs) / 16px var(--font-mono);
}

.analysis-report .table th, .analysis-report .table td {
	white-space: normal;
}

@media (max-width: 650px) {

	.analysis-metrics {
		grid-template-columns: 1fr 1fr;
	}

	.analysis-grid {
		grid-template-columns: 1fr;
	}
}

/* ------------------------------------------------------------------ */
/* List and detail                                                     */
/* ------------------------------------------------------------------ */

/* A detail opened from a list: on a phone the list steps aside, and this link brings it back */
.back-link {
	display: none;
	color: var(--text-muted);
	font-size: var(--text-sm);
	text-decoration: none;
}

.rows .empty {
	padding: 16px;
}

/* A search inside nicknames: its progress, above what it finds */
.rows .scan {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 10px;
}

/* Where a reading of the account list stands. Above, the whole list: the pages probed, the range to read and a
   cursor at the page being read. Below, the range alone: striped, filled as it is read, with its creation dates. */
.scan-map {
	flex-basis: 100%;
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-top: 4px;
}

.scan-track {
	position: relative;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
	background: var(--surface-overlay);
	overflow: hidden;
}

.scan-track-list {
	height: 14px;
}

.scan-track-range {
	height: 18px;
	background:
		repeating-linear-gradient(-45deg, var(--online-edge) 0 1px, transparent 1px 6px),
		var(--online-bg);
}

.scan-detail {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-top: 6px;
}

.scan-looking {
	position: absolute;
	top: 0;
	bottom: 0;
	border-left: 1px dashed var(--online-edge);
	border-right: 1px dashed var(--online-edge);
}

.scan-range {
	position: absolute;
	top: 0;
	bottom: 0;
	background:
		repeating-linear-gradient(-45deg, var(--online-edge) 0 1px, transparent 1px 4px),
		var(--online-bg);
}

.scan-done {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	background: var(--online);
	transition: width 0.3s ease;
}

.scan-cursor {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 2px;
	margin-left: -1px;
	background: var(--online);
}

/* An account found while reading, on the range's bar: a dashed line in the theme's yellow */
.scan-hit {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 2px;
	margin-left: -1px;
	background: repeating-linear-gradient(to bottom, var(--connecting) 0 2px, transparent 2px 4px);
	z-index: 1;
}

.scan-probe {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 1px;
	background: var(--text-faint);
}

.scan-ends {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	color: var(--text-faint);
	font-size: var(--text-xs);
	white-space: nowrap;
}

.scan-ends .scan-now {
	color: var(--text-muted);
}

/* The dialog of that search: its groups of choices, and the warning before the account list */
.find-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 14px;
}

.find-choice {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-bottom: 6px;
}

.find-choice .field-hint {
	padding-left: 21px;
}

.find-dates {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 8px;
}

.find-years {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
}

/* Advanced filters: what the list says, then what each profile says; two bounds side by side */
.find-advanced {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.find-subgroup {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 10px 12px;
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
}

.find-range {
	flex: 1;
}

.find-bounds {
	display: flex;
	align-items: center;
	gap: 6px;
}

.find-bounds .input {
	flex: 1;
	min-width: 0;
}

/* What Atlas keeps on disk of the account lists, and the button that deletes it */
.find-cache {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	padding-left: 21px;
}

.find-cache .field-hint {
	padding-left: 0;
}

/* A potential match's filters matched, of those given */
.find-score {
	font-variant-numeric: tabular-nums;
}

.find-warning {
	margin-bottom: 10px;
	padding: 10px 12px;
	border: 1px solid var(--offline-edge);
	border-radius: var(--radius-md);
	background: var(--offline-bg);
	color: var(--text);
	font-size: var(--text-sm);
	line-height: 1.5;
}

.find-warning strong {
	color: var(--offline-fg);
}

/* The trail of one session, on the page of an account */
.trail-map {
	display: block;
	width: 100%;
	max-width: 520px;
	aspect-ratio: 1;
	border: 1px solid var(--border);
	border-radius: var(--radius-xs);
	background: var(--map-bg);
}

.targets .chip {
	height: auto;
	min-height: 20px;
	white-space: normal;
	overflow-wrap: anywhere;
}

@media (max-width: 767px) {

	.split.has-detail > .box:first-child {
		display: none;
	}

	.back-link {
		display: inline-flex;
		margin-bottom: 4px;
	}
}

/* ------------------------------------------------------------------ */
/* Tickets: the player's login, the lists, the thread (Discord's look)  */
/* ------------------------------------------------------------------ */

/* The player's login: what Discord tells Atlas, and what staff see */
.login-points {
	margin: 0;
	padding-left: 18px;
	color: var(--text-muted);
	font-size: var(--text-sm);
	line-height: 1.55;
}

.btn-discord {
	justify-content: center;
}

.chip-discord {
	border-color: var(--info-edge);
	background: var(--info-bg);
	color: var(--info-fg);
}

.ticket-number {
	color: var(--text-faint);
	font: var(--weight-medium) var(--text-xs) / 1 var(--font-mono);
}

/* A ticket's type, as a request's kind: an icon and its words */
.ticket-kind {
	display: inline-flex;
	align-items: center;
	flex: none;
	gap: 6px;
	height: 22px;
	padding: 0 9px 0 7px;
	border-radius: var(--radius-full);
	background: var(--accent-wash);
	color: var(--text);
	font: var(--weight-medium) var(--text-xs) / 1 var(--font-sans);
	white-space: nowrap;
}

.ticket-kind .icon {
	width: 12px;
	height: 12px;
	color: var(--text-muted);
}

/* An anonymous type (player and abuse reports): red-ish wherever it shows */
.ticket-kind.sensitive {
	background: var(--offline-bg);
	color: var(--offline-fg);
}

.ticket-kind.sensitive .icon {
	color: var(--offline-fg);
}

.ticket-meta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	flex: 1;
}

.ticket-meta .icon {
	width: 11px;
	height: 11px;
	margin-right: 3px;
	vertical-align: -1px;
}

/* A ticket's state: a stripe on its row, a dot in its chip and on its filter, as a request's */
.row.status-open {
	--status: var(--connecting);
}

.row.status-waiting {
	--status: var(--online);
}

.row.status-closed {
	--status: var(--border-strong);
}

.page-tab .status-dot.status-open {
	color: var(--connecting);
}

.page-tab .status-dot.status-waiting {
	color: var(--online);
}

.page-tab .status-dot.status-closed {
	color: var(--text-faint);
}

/* The chips in the colours of the stripes and the dots: amber for staff's turn, teal for the author's */
.status-chip.tst-open {
	border-color: var(--connecting-edge);
	background: var(--connecting-bg);
	color: var(--connecting-fg);
}

.status-chip.tst-waiting {
	border-color: var(--online-edge);
	background: var(--online-bg);
	color: var(--online-fg);
}

.status-chip.tst-closed {
	color: var(--text-faint);
}

.ticket-top {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 6px;
}

.ticket-top .ticket-number {
	margin-left: auto;
}

.ticket-facts {
	margin-bottom: 0;
}

.ticket-author {
	color: var(--text-muted);
	font-size: var(--text-xs);
}

.ticket-author.discord {
	color: var(--info-fg);
}

/* The new ticket: the types to pick, then their questions */
.ticket-types {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: var(--space-2);
}

.ticket-type {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: var(--space-3);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-md);
	background: var(--surface-2);
	color: var(--text);
	text-align: left;
	cursor: pointer;
}

.ticket-type:hover {
	border-color: var(--border-tick);
	background: var(--surface-3);
}

.ticket-type span {
	color: var(--text-muted);
	font-size: var(--text-xs);
}

.new-ticket {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
}

.new-ticket-form {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
	border-radius: var(--radius-md);
}

.new-ticket-files {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: var(--space-2);
}

.anonymous-note,
.privacy-points {
	margin: 0;
	color: var(--online-fg);
	font-size: var(--text-sm);
}

.privacy-points {
	padding: var(--space-3) var(--space-4) var(--space-3) 32px;
	color: var(--text-muted);
	line-height: 1.6;
}

/* A ticket opened: its head, its thread, its composer */
.box.chat {
	display: flex;
	flex-direction: column;
	min-height: calc(100vh - var(--top-h) - 160px);
	max-height: calc(100vh - var(--top-h) - 40px);
	padding: 0;
}

.chat-top {
	padding: var(--space-3) var(--space-4) 0;
}

.chat-title {
	margin: 0 0 6px;
	font-size: var(--text-lg);
	font-weight: var(--weight-semibold);
	overflow-wrap: anywhere;
}

.chat-actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	padding: var(--space-2) var(--space-4);
	border-bottom: 1px solid var(--border);
}

.chat-actions select {
	width: auto;
	max-width: 200px;
	height: var(--control-sm);
	padding-top: 0;
	padding-bottom: 0;
	font-size: var(--text-xs);
}

.chat-actions:empty {
	padding: 0;
}

.chat-scroll {
	flex: 1;
	min-height: 200px;
	overflow-y: auto;
	padding: var(--space-3) 0;
}

.chat-list {
	display: flex;
	flex-direction: column;
}

.chat-form {
	margin: 0 var(--space-4) var(--space-3);
	padding: var(--space-3);
	border: 1px solid var(--border-strong);
	border-left: 3px solid var(--online);
	border-radius: var(--radius-md);
	background: var(--surface-2);
}

.chat-form-head {
	display: flex;
	justify-content: space-between;
	gap: var(--space-2);
	margin-bottom: var(--space-2);
	font-size: var(--text-sm);
}

.chat-form-fields {
	display: grid;
	grid-template-columns: max-content minmax(0, 1fr);
	gap: 4px var(--space-3);
	margin: 0;
	font-size: var(--text-sm);
}

.chat-form-fields dt {
	color: var(--text-faint);
}

.chat-form-fields dd {
	margin: 0;
	overflow-wrap: anywhere;
}

.chat-msg {
	display: grid;
	grid-template-columns: 40px minmax(0, 1fr);
	gap: var(--space-3);
	padding: 6px var(--space-4) 2px;
}

.chat-msg.cont {
	padding-top: 1px;
}

.chat-msg:hover {
	background: var(--accent-wash);
}

.chat-msg.note {
	border-left: 3px solid var(--connecting);
	background: var(--connecting-bg);
}

.chat-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: var(--radius-full);
	color: var(--vital-text);
	font-size: var(--text-lg);
	font-weight: var(--weight-semibold);
	text-transform: uppercase;
	user-select: none;
}

.chat-avatar.c0 {
	background: var(--viz-1);
}

.chat-avatar.c1 {
	background: var(--viz-2);
}

.chat-avatar.c2 {
	background: var(--viz-3);
}

.chat-avatar.c3 {
	background: var(--viz-4);
}

.chat-avatar.c4 {
	background: var(--viz-5);
}

.chat-avatar.c5 {
	background: var(--viz-6);
}

.chat-avatar.c6 {
	background: var(--viz-7);
}

.chat-avatar.c7 {
	background: var(--viz-8);
}

.chat-avatar.system {
	background: var(--surface-3);
	color: var(--text);
}

.chat-avatar .logo {
	width: 24px;
	height: 24px;
}

.chat-gutter {
	visibility: hidden;
	padding-top: 3px;
	color: var(--text-faint);
	font: var(--text-2xs) / 1 var(--font-mono);
	text-align: right;
}

.chat-msg:hover .chat-gutter {
	visibility: visible;
}

.chat-head {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 6px;
}

.chat-name {
	font-weight: var(--weight-semibold);
}

.chat-msg.from-player .chat-name {
	color: var(--online-fg);
}

.chat-time,
.chat-origin,
.chat-edited {
	color: var(--text-faint);
	font-size: var(--text-2xs);
}

.chat-origin {
	color: var(--info-fg);
}

.chat-text {
	font-size: var(--text-md);
	line-height: 1.45;
	overflow-wrap: anywhere;
}

.chat-text.struck {
	color: var(--text-faint);
	text-decoration: line-through;
}

.chat-line {
	display: block;
	min-height: 1.45em;
	white-space: pre-wrap;
}

.chat-text code {
	padding: 1px 4px;
	border-radius: var(--radius-xs);
	background: var(--bg-sunken);
	font: var(--text-sm) var(--font-mono);
}

.chat-code {
	margin: 4px 0;
	padding: var(--space-2);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--bg-sunken);
	font: var(--text-sm) / 1.45 var(--font-mono);
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

.chat-quote {
	margin: 2px 0;
	padding-left: var(--space-2);
	border-left: 4px solid var(--border-strong);
}

.chat-text a {
	color: var(--info-fg);
	text-decoration: underline;
}

.chat-deleted {
	color: var(--offline-fg);
	font-size: var(--text-xs);
}

.chat-event {
	padding: 4px var(--space-4) 4px 68px;
	color: var(--text-muted);
	font-size: var(--text-xs);
}

.chat-event.warn {
	color: var(--connecting-fg);
}

.chat-files {
	display: flex;
	align-items: flex-start;
	flex-wrap: wrap;
	gap: var(--space-2);
	margin-top: 4px;
}

/* A picture keeps its box while it loads, and on every redraw: the thread never jumps */
.chat-image {
	display: block;
	width: min(360px, 100%);
	aspect-ratio: 4 / 3;
	border-radius: var(--radius-md);
	overflow: hidden;
	background: var(--bg-sunken);
}

.chat-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.chat-video {
	max-width: min(480px, 100%);
	max-height: 320px;
	border-radius: var(--radius-md);
	background: var(--bg-sunken);
}

.chat-file {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	max-width: 400px;
	padding: var(--space-2) var(--space-3);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-md);
	background: var(--surface-2);
	color: var(--text);
	text-decoration: none;
}

.chat-file-icon {
	color: var(--text-faint);
	font-size: var(--text-lg);
}

.chat-file-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.chat-foot {
	border-top: 1px solid var(--border);
}

.chat-closed, .chat-ai-typing:not(:empty) {
	padding: var(--space-3) var(--space-4);
	color: var(--text-muted);
	font-size: var(--text-sm);
}

/* The composer: + to attach, the text, Send; dropped and pasted files above it */
.chat-composer {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: var(--space-3) var(--space-4);
}

.chat-composer.note {
	background: var(--connecting-bg);
}

.chat-compose-row {
	display: flex;
	align-items: flex-end;
	gap: var(--space-2);
	padding: 4px;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-lg);
	background: var(--surface-2);
}

.chat-compose-row:focus-within {
	border-color: var(--border-control);
}

.chat-attach {
	flex: none;
	width: var(--control-md);
	height: var(--control-md);
	border: 0;
	border-radius: var(--radius-full);
	background: var(--surface-3);
	color: var(--text-muted);
	font-size: var(--text-lg);
	cursor: pointer;
}

.chat-attach:hover {
	color: var(--text);
}

.chat-input {
	flex: 1;
	min-height: var(--control-md);
	max-height: 240px;
	padding: 6px 4px;
	border: 0;
	background: transparent;
	color: var(--text);
	font: var(--text-md) / 1.4 var(--font-sans);
	resize: none;
	outline: none;
}

.chat-compose-foot {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: var(--space-3);
	font-size: var(--text-2xs);
}

.chat-pending {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
}

.chat-pending-item {
	display: grid;
	grid-template-columns: 40px minmax(0, 1fr) auto;
	grid-template-rows: auto auto;
	column-gap: var(--space-2);
	align-items: center;
	width: 220px;
	padding: 6px;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-md);
	background: var(--surface-2);
	font-size: var(--text-xs);
}

.chat-pending-item img,
.chat-pending-item .chat-file-icon {
	grid-row: span 2;
	width: 40px;
	height: 40px;
	border-radius: var(--radius-sm);
	object-fit: cover;
	text-align: center;
	line-height: 40px;
}

.chat-pending-item.busy {
	border-style: dashed;
}

.chat-pending-item.bad {
	border-color: var(--offline-edge);
	background: var(--offline-bg);
}

.chat-pending-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.chat-pending-note {
	grid-column: 2;
	color: var(--connecting-fg);
	font-size: var(--text-2xs);
}

.chat-pending-x {
	grid-row: 1 / span 2;
	grid-column: 3;
	border: 0;
	background: transparent;
	color: var(--text-faint);
	cursor: pointer;
}

.chat-pending-x:hover {
	color: var(--offline-fg);
}

/* Files dragged over a ticket or the new ticket's form */
.dropping {
	outline: 2px dashed var(--online);
	outline-offset: -4px;
}

/* Discord on My account: the account linked on one line, then the ticket DMs, a switch each, as the Access page's lists */
.discord-box {
	margin-top: var(--space-4);
}

.discord-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.discord-account {
	display: flex;
	flex-direction: column;
}

.discord-account .perm-list {
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
}

.discord-account .perm-cat:last-child {
	margin-bottom: -16px;
}

.discord-who {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	padding-bottom: 16px;
}

.discord-avatar {
	display: grid;
	flex: none;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--info-bg);
	color: var(--info-fg);
	font-weight: var(--weight-semibold);
}

.discord-who.none .discord-avatar {
	border: 1px dashed var(--border-strong);
	background: transparent;
	color: var(--text-faint);
}

.discord-who-text {
	display: grid;
	flex: 1;
	gap: 2px;
	min-width: min(100%, 220px);
}

.discord-who-text > span {
	color: var(--text-faint);
	font-size: var(--text-xs);
}

.dm-label {
	min-width: 0;
	color: var(--text);
	font-size: var(--text-sm);
}

.dm-row.missing .dm-label {
	color: var(--text-muted);
}

.dm-row.off {
	cursor: not-allowed;
}

.dm-row.off .dm-label {
	color: var(--text-faint);
}

.link-discord {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-2);
	padding: var(--space-4);
}

.ticket-settings {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
	padding-bottom: var(--space-4);
}

.ticket-settings > .field,
.ticket-settings > .error,
.ticket-settings > .modal-actions {
	margin: 0 var(--space-4);
}

@media (max-width: 767px) {

	.chat-msg {
		grid-template-columns: 32px minmax(0, 1fr);
		padding-left: var(--space-3);
		padding-right: var(--space-3);
	}

	.chat-avatar {
		width: 32px;
		height: 32px;
		font-size: var(--text-md);
	}

	.chat-event {
		padding-left: 56px;
	}
}

/* ------------------------------------------------------------------ */
/* Starve.io account links: a player's guide, the reminder job          */
/* ------------------------------------------------------------------ */

.link-box {
	margin-bottom: var(--space-4);
}

.link-body {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
	padding: var(--space-3) var(--space-4) var(--space-4);
}

.link-form {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
}

.link-steps {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
	margin: 0;
	padding: 0;
	list-style: none;
}

.link-step {
	display: grid;
	grid-template-columns: 26px minmax(0, 1fr);
	gap: var(--space-3);
	align-items: start;
}

.link-step-n {
	display: inline-grid;
	place-items: center;
	width: 26px;
	height: 26px;
	border-radius: var(--radius-full);
	background: var(--accent-wash);
	color: var(--text);
	font: var(--weight-semibold) var(--text-sm) / 1 var(--font-mono);
}

.link-step-body {
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
	padding-top: 3px;
	font-size: var(--text-sm);
}

/* The game's own pictures, never larger than they are */
.link-guide {
	width: auto;
	max-width: 100%;
	height: auto;
	align-self: flex-start;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-md);
}

.link-code-row {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	margin-left: 38px;
}

.link-code {
	padding: 6px 12px;
	border: 1px dashed var(--border-control);
	border-radius: var(--radius-md);
	background: var(--surface-2);
	font-size: var(--text-lg);
	font-weight: var(--weight-semibold);
	letter-spacing: 0.06em;
	user-select: all;
}

/* The way to a link: four steps, those done ticked */
.link-track {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 6px;
	margin: 0 0 var(--space-2);
	padding: 0;
	list-style: none;
	counter-reset: none;
}

.link-track li {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	position: relative;
	color: var(--text-faint);
	font-size: var(--text-xs);
	text-align: center;
}

/* The rail between two steps, filled once the first is done */
.link-track li + li::before {
	content: "";
	position: absolute;
	top: 12px;
	right: calc(50% + 16px);
	left: calc(-50% + 16px);
	height: 2px;
	border-radius: 1px;
	background: var(--border-strong);
}

.link-track li.done + li::before {
	background: var(--status-done);
}

.link-track-dot {
	display: inline-grid;
	place-items: center;
	width: 26px;
	height: 26px;
	border: 2px solid var(--border-strong);
	border-radius: var(--radius-full);
	background: var(--surface-1);
	font: var(--weight-semibold) var(--text-xs) / 1 var(--font-mono);
}

.link-track-dot .icon {
	width: 13px;
	height: 13px;
	stroke-width: 2.4;
}

.link-track li.done {
	color: var(--text-muted);
}

.link-track li.done .link-track-dot {
	border-color: var(--status-done);
	background: var(--status-done);
	color: var(--accent-fg);
}

.link-track li.on {
	color: var(--text);
	font-weight: var(--weight-semibold);
}

.link-track li.on .link-track-dot {
	border-color: var(--text);
	box-shadow: 0 0 0 4px var(--accent-wash);
}

/* The connection: two accounts and what joins them */
.link-card {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(64px, 140px) minmax(0, 1fr);
	align-items: center;
	gap: var(--space-2);
	padding: var(--space-4);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-lg);
	background: var(--surface-2);
}

.link-card.done {
	border-color: color-mix(in srgb, var(--status-done) 45%, transparent);
	background: linear-gradient(90deg, var(--info-bg), var(--status-done-bg) 50%, var(--connecting-bg));
}

.link-node {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	min-width: 0;
}

.link-node.starve {
	flex-direction: row-reverse;
	text-align: right;
}

.link-node-disc {
	display: inline-grid;
	flex: none;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: var(--radius-full);
	color: var(--vital-text);
	font-size: var(--text-lg);
	font-weight: var(--weight-semibold);
}

.link-node.discord .link-node-disc {
	background: var(--viz-6);
}

.link-node.starve .link-node-disc {
	background: var(--vital-low);
	color: var(--accent-fg);
}

.link-node-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.link-node-text b {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.link-node-text span {
	color: var(--text-faint);
	font-size: var(--text-xs);
}

.link-bridge {
	display: flex;
	align-items: center;
}

.link-line {
	flex: 1;
	height: 2px;
	border-top: 2px dashed var(--border-control);
}

.link-card.done .link-line {
	border-top: 2px solid var(--status-done);
}

.link-knot {
	display: inline-grid;
	flex: none;
	place-items: center;
	width: 30px;
	height: 30px;
	border: 2px dashed var(--border-control);
	border-radius: var(--radius-full);
	background: var(--surface-1);
	color: var(--text-faint);
	font-weight: var(--weight-semibold);
}

.link-card.done .link-knot {
	border: 0;
	background: var(--status-done);
	color: var(--accent-fg);
}

.link-knot .icon {
	width: 16px;
	height: 16px;
	stroke-width: 2.6;
}

/* Just connected: the lines draw from the middle out, then the tick pops */
.link-card.fresh .link-line {
	transform-origin: center;
	animation: link-draw var(--dur-slow) var(--ease-out) both;
}

.link-card.fresh .link-knot {
	animation: link-pop 420ms var(--ease-out) 260ms both;
}

@keyframes link-draw {

	from {
		transform: scaleX(0);
	}

	to {
		transform: scaleX(1);
	}
}

@keyframes link-pop {

	0% {
		transform: scale(0.4);
		opacity: 0;
	}

	60% {
		transform: scale(1.18);
		opacity: 1;
	}

	100% {
		transform: scale(1);
	}
}

@media (prefers-reduced-motion: reduce) {

	.link-card.fresh .link-line, .link-card.fresh .link-knot {
		animation: none;
	}
}

/* While the player plays under the code: the page asks every few seconds */
.link-waiting {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border: 1px solid var(--connecting-edge);
	border-radius: 8px;
	background: var(--connecting-bg);
	color: var(--connecting-fg);
	font-weight: var(--weight-semibold);
}

.spinner {
	flex: none;
	width: 16px;
	height: 16px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: spin 0.9s linear infinite;
}

@keyframes spin {

	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {

	.spinner {
		animation-duration: 3s;
	}
}

/* A banned account: the way to a ticket */
.callout-amber {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	padding: 12px;
	border: 1px solid var(--connecting-edge);
	border-radius: 8px;
	background: var(--connecting-bg);
}

.link-done {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.link-done b {
	color: var(--status-done);
	font-size: var(--text-md);
}

.link-perks {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: var(--text-sm);
}

.link-perks .icon {
	width: 13px;
	height: 13px;
	margin-right: 6px;
	color: var(--status-done);
	vertical-align: -2px;
	stroke-width: 2.4;
}

/* An own account filled in from the linked one, and staff's mark of it */
.prefilled {
	color: var(--status-done);
}

.prefilled .icon, .verified-owner .icon {
	width: 11px;
	height: 11px;
	margin-right: 4px;
	vertical-align: -1px;
	stroke-width: 2.4;
}

/* The verified badge: a player who proved their Starve.io account */
.verified-chip {
	margin-left: 6px;
}

.verified-chip .icon {
	width: 10px;
	height: 10px;
	margin-right: 1px;
	stroke-width: 2.6;
}

.role-pick {
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
	padding: var(--space-3) var(--space-4);
}

.role-pick p {
	margin: 0;
}

.verified-owner {
	margin-left: 8px;
	vertical-align: 1px;
}

@media (max-width: 767px) {

	.link-card {
		grid-template-columns: minmax(0, 1fr);
		justify-items: center;
		text-align: center;
	}

	.link-node, .link-node.starve {
		flex-direction: column;
		text-align: center;
	}

	.link-bridge {
		width: 44px;
		transform: rotate(90deg);
	}
}

.link-job-note {
	margin: 0;
	padding: var(--space-2) var(--space-4);
	font-size: var(--text-xs);
}

.kpi-warn {
	color: var(--connecting-fg);
}

/* A run that failed: its row tinted, its error in its own words */
.table tr.bad td {
	background: var(--offline-bg);
}

.table td.error-cell {
	color: var(--offline-fg);
	white-space: normal;
}

/* ------------------------------------------------------------------ */
/* Anonymous tickets, members, messages on their way, tickets on phones */
/* ------------------------------------------------------------------ */

.row.ticket-row.sensitive {
	background: linear-gradient(90deg, var(--offline-bg), transparent 70%);
}

.row.ticket-row.sensitive:hover {
	background: var(--offline-bg);
}

.box.chat.sensitive {
	box-shadow: inset 0 3px 0 var(--offline-edge);
}

.ticket-type b {
	display: flex;
	align-items: center;
	gap: 6px;
}

.ticket-type b .icon {
	width: 14px;
	height: 14px;
	color: var(--text-muted);
}

.ticket-type b .chip {
	margin-left: auto;
}

.ticket-type.sensitive {
	border-color: var(--offline-edge);
	background: var(--offline-bg);
}

.ticket-type.sensitive:hover {
	border-color: var(--offline-fg);
}

.ticket-type.sensitive b .icon {
	color: var(--offline-fg);
}

.ticket-author.anonymous,
.anonymous-note.sensitive {
	color: var(--offline-fg);
}

.ticket-author.anonymous .icon {
	width: 11px;
	height: 11px;
	margin-right: 3px;
	vertical-align: -1px;
}

.ticket-author .verified-chip,
.ticket-account {
	margin-left: 6px;
}

.ticket-account {
	color: var(--text-muted);
	font-size: var(--text-xs);
}

.member-link {
	color: var(--text);
	font-weight: var(--weight-semibold);
	text-decoration: underline;
	text-decoration-color: var(--border-tick);
	text-underline-offset: 2px;
}

a.chat-name {
	color: inherit;
	text-decoration: none;
}

.chat-msg.from-player a.chat-name {
	color: var(--online-fg);
}

a.chat-name:hover {
	text-decoration: underline;
}

/* What not to write in an anonymous ticket, or not to ask */
.sensitive-banner {
	display: flex;
	align-items: flex-start;
	gap: var(--space-2);
	padding: var(--space-2) var(--space-3);
	border: 1px solid var(--offline-edge);
	border-radius: var(--radius-md);
	background: var(--offline-bg);
	color: var(--offline-fg);
	font-size: var(--text-sm);
	line-height: 1.45;
}

/* Player accounts: Player reports from Discord, its switch and its words */
.reports-switch {
	display: flex;
	align-items: center;
	gap: 12px;
}

.reports-switch .switch {
	cursor: pointer;
}

/* A Player report opened in Discord: not anonymous, said in yellow */
.sensitive-banner.open {
	border-color: var(--connecting-edge);
	background: var(--connecting-bg);
	color: var(--connecting-fg);
}

.sensitive-banner .icon {
	flex: none;
	width: 16px;
	height: 16px;
	margin-top: 2px;
}

.chat-foot > .sensitive-banner {
	margin: var(--space-3) var(--space-4) 0;
}

/* A message on its way: faded until the server has it; one that failed says so, with Retry */
.chat-msg.pending .chat-body {
	opacity: 0.55;
}

.chat-msg.pending.failed .chat-body {
	opacity: 1;
}

.chat-msg.failed .chat-time {
	color: var(--offline-fg);
}

.chat-retry {
	display: flex;
	gap: 6px;
	margin-top: 4px;
}

/* A member's page and My account: one layout */
.member-main {
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
}

.member-facts {
	display: grid;
	grid-template-columns: max-content minmax(0, 1fr);
	gap: 8px 16px;
	margin: 0;
	padding: var(--space-3) var(--space-4);
	font-size: var(--text-sm);
}

.member-facts dt {
	color: var(--text-muted);
}

.member-facts dd {
	min-width: 0;
	margin: 0;
	overflow-wrap: anywhere;
}

.member-body {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
	padding: var(--space-3) var(--space-4) var(--space-4);
}

.member-body .member-facts {
	padding: 0;
}

.member-body .modal-actions:empty {
	display: none;
}

.member-note {
	margin: 0;
	padding: var(--space-2) var(--space-4) var(--space-3);
	font-size: var(--text-xs);
}

.member-history {
	margin: 0;
	padding: 0;
	list-style: none;
}

.member-history li {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 10px 16px;
	border-bottom: 1px solid var(--border);
	font-size: var(--text-sm);
	overflow-wrap: anywhere;
}

.member-history li:last-child {
	border-bottom: 0;
}

/* Phones: a ticket is a screen of its own, as a Discord channel is; inputs at 16 px (iOS zooms into smaller ones),
   targets of 44 px, the composer above the keyboard and the home bar */
@media (max-width: 767px) {

	.input,
	select.input,
	.chat-input {
		font-size: 16px;
	}

	.input {
		height: 44px;
	}

	textarea.input {
		height: auto;
	}

	.box.chat .btn,
	.new-ticket .btn,
	.member-page .btn,
	.link-box .btn,
	.modal .btn {
		min-height: 44px;
	}

	.box.chat .btn-tiny {
		min-height: 36px;
	}

	.row.ticket-row {
		padding: 12px 16px;
	}

	.ticket-type {
		min-height: 64px;
	}

	body.thread-open {
		overflow: hidden;
	}

	.box.chat {
		position: fixed;
		top: var(--vv-top, 0px);
		left: 0;
		right: 0;
		z-index: 40;
		height: var(--vv-height, 100dvh);
		min-height: 0;
		max-height: none;
		padding-top: env(safe-area-inset-top, 0px);
		border: 0;
		border-radius: 0;
		background: var(--bg);
	}

	.box.chat::before {
		display: none;
	}

	.box.chat > .back-link {
		display: flex;
		align-items: center;
		min-height: 44px;
		margin: 0;
		padding: 0 var(--space-3);
		border-bottom: 1px solid var(--border);
		font-size: var(--text-md);
	}

	.chat-top {
		padding: var(--space-2) var(--space-3) 0;
	}

	.chat-title {
		font-size: var(--text-md);
	}

	.chat-top .facts {
		gap: 2px 10px;
		font-size: var(--text-xs);
	}

	.chat-actions {
		flex-wrap: nowrap;
		padding: 6px var(--space-3);
		overflow-x: auto;
		scrollbar-width: none;
	}

	.chat-actions .btn {
		flex: none;
	}

	.chat-scroll {
		min-height: 0;
		overscroll-behavior: contain;
	}

	.chat-foot > .sensitive-banner {
		margin: var(--space-2) var(--space-3) 0;
		font-size: var(--text-xs);
	}

	.chat-composer {
		padding: var(--space-2) var(--space-3) calc(var(--space-2) + env(safe-area-inset-bottom, 0px));
	}

	.chat-compose-foot > .dim {
		display: none;
	}

	.chat-compose-foot:has(> .dim:only-child) {
		display: none;
	}

	.chat-attach {
		width: 44px;
		height: 44px;
	}

	.chat-closed {
		padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom, 0px));
	}

	.ticket-row .row-line {
		flex-wrap: wrap;
		row-gap: 4px;
	}

	.ticket-meta {
		flex-wrap: wrap;
		row-gap: 2px;
	}

	.split:not(.has-detail) .pick-hint {
		display: none;
	}

	.link-code {
		font-size: 15px;
		letter-spacing: 0.02em;
		white-space: nowrap;
	}

	.member-facts {
		grid-template-columns: minmax(0, 1fr);
		gap: 2px;
	}

	.member-facts dd + dt {
		margin-top: 8px;
	}
}

/* Player accounts → Tickets: Atlas's layout in the server, what it put back, who can see ticket channels */
.kpis.kpis-pairs {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.layout-main {
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
}

.layout-main > div:empty {
	display: none;
}

.layout-note,
.rail .box > p.dim {
	margin: 0;
	padding: var(--space-2) var(--space-4) var(--space-3);
	font-size: var(--text-xs);
}

.box.notice ul {
	margin: 6px 0 0;
	padding-left: 18px;
}

.layout-category {
	white-space: nowrap;
}

.layout-category.full .mono {
	color: var(--offline-fg);
}

.exposure {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
	padding-bottom: var(--space-3);
}

.exposure > .empty {
	padding: var(--space-3) var(--space-4);
}

.exposure-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	padding: var(--space-2) var(--space-4) 0;
}

@media (forced-colors: active) {

	.box::before {
		display: none;
	}

	:focus-visible {
		outline-color: Highlight;
	}
}
