/* Hub panel. Cool slate surfaces; teal ink for anything you can press; the
   chart hues (blue, orange, aqua) only ever mean a data series; green, amber
   and red only ever mean a state. One typeface, Archivo: its width axis
   carries the hierarchy. */

:root {
	color-scheme: light;
	--page: #eef1f4;
	--surface: #fcfcfd;
	--raised: #f4f6f8;
	--sunken: #e6eaee;
	--line: #dde2e7;
	--line-strong: #c4cbd3;
	--ink: #12161c;
	--ink-2: #4b5462;
	--ink-3: #7c8592;
	--accent: #0e6b67;
	--accent-ink: #ffffff;
	--accent-wash: #dff0ee;
	--focus: #1f6fbf;

	--good: #0ca30c;
	--good-text: #006300;
	--warn: #fab219;
	--warn-text: #8a5a00;
	--bad: #d03b3b;
	--bad-text: #b02a2a;

	--s1: #2a78d6;
	--s2: #eb6834;
	--s3: #1baf7a;
	--s4: #eda100;
	--s5: #e87ba4;
	--s6: #0b98b5;
	--grid: #e4e8ec;
	--axis: #c4cbd3;
	--seq-0: #eef3fa;
	--seq-1: #cde2fb;
	--seq-2: #86b6ef;
	--seq-3: #3987e5;
	--seq-4: #1c5cab;
	--seq-5: #0d366b;
	--heat-ink: #ffffff;

	--font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--rail: 264px;
	--gutter: 16px;
	--r-1: 6px;
	--r-2: 10px;
	--shadow: 0 1px 2px rgba(18, 22, 28, 0.06), 0 8px 24px rgba(18, 22, 28, 0.06);
}

@media (prefers-color-scheme: dark) {
	:root:where(:not([data-theme="light"])) {
		color-scheme: dark;
		--page: #0f1216;
		--surface: #171b21;
		--raised: #1d222a;
		--sunken: #12161b;
		--line: #262c35;
		--line-strong: #353d48;
		--ink: #eef1f4;
		--ink-2: #b4bcc7;
		--ink-3: #7f8896;
		--accent: #3fc1b5;
		--accent-ink: #06201e;
		--accent-wash: #11302e;
		--focus: #7cc0ff;
		--good-text: #3ccf3c;
		--warn-text: #fab219;
		--bad-text: #ff7b7b;
		--s1: #3987e5;
		--s2: #d95926;
		--s3: #199e70;
		--s4: #c98500;
		--s5: #d55181;
		--s6: #22a8c4;
		--grid: #222831;
		--axis: #353d48;
		--seq-0: #1a2029;
		--seq-1: #13304f;
		--seq-2: #184f95;
		--seq-3: #2a78d6;
		--seq-4: #6da7ec;
		--seq-5: #cde2fb;
		--heat-ink: #0b0b0b;
		--shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
	}
}
:root[data-theme="dark"] {
	color-scheme: dark;
	--page: #0f1216;
	--surface: #171b21;
	--raised: #1d222a;
	--sunken: #12161b;
	--line: #262c35;
	--line-strong: #353d48;
	--ink: #eef1f4;
	--ink-2: #b4bcc7;
	--ink-3: #7f8896;
	--accent: #3fc1b5;
	--accent-ink: #06201e;
	--accent-wash: #11302e;
	--focus: #7cc0ff;
	--good-text: #3ccf3c;
	--warn-text: #fab219;
	--bad-text: #ff7b7b;
	--s1: #3987e5;
	--s2: #d95926;
	--s3: #199e70;
	--s4: #c98500;
	--s5: #d55181;
	--s6: #22a8c4;
	--grid: #222831;
	--axis: #353d48;
	--seq-0: #1a2029;
	--seq-1: #13304f;
	--seq-2: #184f95;
	--seq-3: #2a78d6;
	--seq-4: #6da7ec;
	--seq-5: #cde2fb;
	--heat-ink: #0b0b0b;
	--shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* Archivo (SIL Open Font License), served from the hub itself */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(/vendor/fonts/archivo-latin-ext-wdth-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: 'Archivo';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(/vendor/fonts/archivo-latin-wdth-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;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--page);
	color: var(--ink);
	font: 400 15px/1.5 var(--font);
	font-stretch: 100%;
	min-height: 100dvh;
}

h1, h2, h3 { margin: 0; line-height: 1.15; font-weight: 650; }
h1 { font-size: 1.6rem; font-stretch: 112%; letter-spacing: -0.01em; }
h2 { font-size: 1.08rem; font-stretch: 108%; }
h3 { font-size: 0.95rem; }
p { margin: 0; }
a { color: var(--accent); }
button, input, textarea, select { font: inherit; color: inherit; }
code, .code { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 0.86em; }

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

.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 0.86rem; }
.tiny { font-size: 0.78rem; }
.num { font-variant-numeric: tabular-nums; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* -- the shell ---------------------------------------------------------------- */

.shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100dvh; }

.rail {
	position: sticky;
	top: 0;
	height: 100dvh;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 18px 12px 12px;
	background: var(--surface);
	border-right: 1px solid var(--line);
	overflow-y: auto;
}

.wordmark {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 2px 8px 14px;
	font-weight: 750;
	font-stretch: 125%;
	font-size: 1.15rem;
	letter-spacing: -0.01em;
	color: var(--ink);
	text-decoration: none;
}
.wordmark svg { width: 26px; height: 26px; flex: none; }
.wordmark .logo { width: 30px; height: 30px; flex: none; border-radius: 8px; object-fit: cover; }

.rail-group { display: grid; gap: 2px; margin-top: 10px; }

/* Analytics | Tools: which side's games the rail lists */
.side-switch {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 2px;
	margin: 6px 0 2px;
	padding: 3px;
	border-radius: var(--r-2);
	background: var(--sunken);
	border: 1px solid var(--line);
}
.side-switch a {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	min-height: 36px;
	border-radius: 7px;
	color: var(--ink-2);
	text-decoration: none;
	font-size: 0.88rem;
	font-weight: 600;
}
.side-switch a svg { width: 16px; height: 16px; }
.side-switch a:hover { color: var(--ink); }
.side-switch a[aria-current="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
/* Settings → Roles: what each kind of access gives */
/* Settings → Roles: games down, kinds of access across */
:root { --k-analytics: #1c4f8c; --k-mod: #0a4f4c; --k-admin: #8a3a12; }
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) { --k-analytics: #8cb8ee; --k-mod: #6fcfc5; --k-admin: #f0a37c; } }
:root[data-theme="dark"] { --k-analytics: #8cb8ee; --k-mod: #6fcfc5; --k-admin: #f0a37c; }
.kind-analytics { color: var(--k-analytics); }
.kind-mod { color: var(--k-mod); }
.kind-admin { color: var(--k-admin); }
.access { display: grid; grid-template-columns: minmax(0, 1fr); }
.access-row { display: grid; grid-template-columns: minmax(180px, 1.1fr) repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; padding: 12px; border-top: 1px solid var(--line); }
.access-head { align-items: center; border-top: 0; padding-top: 0; font-size: 0.85rem; font-weight: 700; color: var(--ink-2); }
.access-head span { display: inline-flex; align-items: center; gap: 4px; }
.access-row.every { background: var(--raised); border-radius: var(--r-1); }
.access-game { display: flex; align-items: center; gap: 10px; min-height: 34px; min-width: 0; }
.access-game strong { font-weight: 600; overflow-wrap: anywhere; }
.access-game img, .access-game .ph { width: 32px; height: 32px; border-radius: var(--r-1); flex-shrink: 0; object-fit: cover; background: var(--sunken); }
.access-cell { min-width: 0; }
.cell-kind { display: none; font-size: 0.85rem; font-weight: 700; margin-bottom: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.role-chip { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; min-height: 34px; padding: 0 4px 0 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 0.88rem; font-weight: 600; }
.role-chip .role-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.role-chip button { display: grid; place-items: center; width: 26px; height: 26px; flex-shrink: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink-3); cursor: pointer; }
.role-chip button:hover { background: var(--sunken); color: var(--bad-text); }
.role-chip button svg { width: 13px; height: 13px; }
.role-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; background: var(--ink-3); }
.add-wrap { position: relative; }
.add-role { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; min-width: 34px; padding: 0 10px; border: 1px dashed var(--line-strong); border-radius: 999px; background: transparent; color: var(--ink-2); font: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer; }
.add-role svg { width: 15px; height: 15px; }
.add-role:hover, .add-role.open { border-style: solid; border-color: var(--accent); background: var(--accent-wash); color: var(--ink); }
.picker { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: 280px; max-width: calc(100vw - 48px); display: grid; gap: 6px; padding: 8px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-2); box-shadow: 0 10px 28px rgba(18, 22, 28, 0.18); }
form.picker { grid-template-columns: minmax(0, 1fr) auto; }
.access-cell:last-child .picker { left: auto; right: 0; }
.picker-list { display: grid; max-height: 260px; overflow-y: auto; }
.picker-option { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 8px; border: 0; border-radius: var(--r-1); background: transparent; color: var(--ink); font: inherit; font-size: 0.92rem; text-align: left; cursor: pointer; }
.picker-option:hover, .picker-option:focus-visible { background: var(--raised); }
.save-state { display: inline-flex; align-items: center; gap: 5px; }
.save-state svg { width: 14px; height: 14px; color: var(--accent); }
.find-game { width: 220px; }
@media (max-width: 860px) {
	.access-head { display: none; }
	.access-row { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 16px 12px; }
	.cell-kind { display: block; }
	.find-game { width: 100%; }
	.add-wrap:has(.picker) { flex-basis: 100%; }
	.picker, .access-cell:last-child .picker { position: static; width: auto; max-width: none; margin-top: 6px; box-shadow: none; }
}
.game-row.setup-row { grid-template-columns: 40px minmax(0, 1fr) auto; }
.game-row.setup-row img, .game-row.setup-row .ph { grid-row: auto; width: 40px; height: 40px; }
.back { display: inline-block; color: var(--ink-2); text-decoration: none; margin-bottom: -4px; }
.back:hover { color: var(--ink); }
.rail-title { padding: 4px 8px; font-size: 0.8rem; font-weight: 600; color: var(--ink-3); }

.rail a.item {
	display: grid;
	grid-template-columns: 28px minmax(0, 1fr) auto;
	align-items: center;
	gap: 10px;
	min-height: 40px;
	padding: 4px 8px;
	border-radius: var(--r-1);
	color: var(--ink-2);
	text-decoration: none;
	font-weight: 500;
}
.rail a.item:hover { background: var(--raised); color: var(--ink); }
.rail a.item[aria-current="page"] { background: var(--accent-wash); color: var(--ink); }
.rail a.item[aria-current="page"] .glyph svg { color: var(--accent); }
.rail .glyph { width: 28px; height: 28px; display: grid; place-items: center; }
.rail .glyph svg { width: 20px; height: 20px; }
.rail .glyph img { width: 28px; height: 28px; border-radius: 6px; background: var(--sunken); }
.rail .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail .count { font-size: 0.82rem; color: var(--ink-3); font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 6px; }
.rail .add { color: var(--accent); }
.rail-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 2px; }

.me { display: flex; align-items: center; gap: 10px; padding: 8px; }
.me img, .me .avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--sunken); flex: none; }
.me .who { min-width: 0; line-height: 1.25; }
.me .who strong { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.topbar { display: none; }

main.page {
	min-width: 0;
	padding: 24px 32px 48px;
	display: grid;
	gap: 20px;
	align-content: start;
	max-width: 1320px;
}

@media (max-width: 899px) {
	.shell { grid-template-columns: minmax(0, 1fr); }
	.rail {
		position: fixed;
		inset: 0 auto 0 0;
		z-index: 40;
		width: min(86vw, 320px);
		transform: translateX(-102%);
		transition: transform 0.2s ease;
		box-shadow: var(--shadow);
	}
	.shell.open .rail { transform: none; }
	.scrim { position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, 0.35); }
	.topbar {
		position: sticky;
		top: 0;
		z-index: 20;
		display: flex;
		align-items: center;
		gap: 8px;
		padding: calc(8px + env(safe-area-inset-top)) var(--gutter) 8px;
		background: color-mix(in srgb, var(--surface) 92%, transparent);
		backdrop-filter: blur(10px);
		border-bottom: 1px solid var(--line);
	}
	.topbar .title { font-weight: 650; font-stretch: 112%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	main.page { padding: 16px var(--gutter) 40px; gap: 16px; }
}
@media (prefers-reduced-motion: reduce) { .rail { transition: none; } }

/* -- controls ------------------------------------------------------------------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 38px;
	padding: 0 14px;
	border-radius: var(--r-1);
	border: 1px solid var(--line-strong);
	background: var(--surface);
	color: var(--ink);
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	white-space: nowrap;
}
.btn:hover { border-color: var(--ink-3); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { color: var(--bad-text); }
.btn.danger.solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--raised); }
.btn.small { min-height: 32px; padding: 0 10px; font-size: 0.88rem; }
.btn.icon { padding: 0; width: 38px; }

.input, .textarea, .select {
	width: 100%;
	min-height: 40px;
	padding: 8px 12px;
	border-radius: var(--r-1);
	border: 1px solid var(--line-strong);
	background: var(--surface);
}
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); }
.input[aria-invalid="true"] { border-color: var(--bad); }
.textarea { min-height: 90px; resize: vertical; }

.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 0.92rem; }
.field .help { color: var(--ink-2); font-size: 0.84rem; }
.field .error { color: var(--bad-text); font-size: 0.84rem; }

/* the range filter and section tabs: one row above what they scope */
.segmented {
	display: inline-flex;
	max-width: 100%;
	overflow-x: auto;
	scrollbar-width: none;
	padding: 3px;
	gap: 2px;
	border-radius: var(--r-2);
	background: var(--sunken);
	border: 1px solid var(--line);
}
.segmented button {
	border: 0;
	background: transparent;
	padding: 6px 12px;
	border-radius: 7px;
	font-weight: 600;
	font-size: 0.88rem;
	color: var(--ink-2);
	cursor: pointer;
	min-height: 32px;
	white-space: nowrap;
	flex: none;
}
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }

.tabs {
	display: flex;
	gap: 4px;
	overflow-x: auto;
	scrollbar-width: none;
	border-bottom: 1px solid var(--line);
	margin-bottom: -4px;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
	flex: none;
	padding: 10px 12px;
	color: var(--ink-2);
	font-weight: 600;
	text-decoration: none;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
}
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

.tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 0.8rem;
	font-weight: 600;
	background: var(--raised);
	border: 1px solid var(--line);
	color: var(--ink-2);
	white-space: nowrap;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dot, var(--ink-3)); flex: none; display: inline-block; }
.state-good { --dot: var(--good); }
.state-warn { --dot: var(--warn); }
.state-bad { --dot: var(--bad); }
.state-off { --dot: var(--ink-3); }

.notice {
	padding: 12px 14px;
	border-radius: var(--r-2);
	border: 1px solid var(--line);
	background: var(--surface);
	display: grid;
	gap: 6px;
}
.notice.warn { border-left: 4px solid var(--warn); }
.notice.bad { border-left: 4px solid var(--bad); }
.notice.good { border-left: 4px solid var(--good); }

.spinner {
	width: 16px; height: 16px;
	border: 2px solid var(--line-strong);
	border-top-color: var(--accent);
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
	display: inline-block;
	flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

/* -- page heads -------------------------------------------------------------------- */

.head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.head .icon-lg { width: 56px; height: 56px; border-radius: 12px; background: var(--sunken); flex: none; }
.head .titles { min-width: 0; flex: 1 1 260px; display: grid; gap: 4px; }
.head h1 { overflow-wrap: anywhere; }

.filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filters, .filters > .segmented { min-width: 0; }
/* a shop item: its name, then its kind and price */
.shop-item { display: flex; flex-direction: column; gap: 2px; min-width: 10em; }

/* -- the live figure: the one loud thing ------------------------------------------- */

.pulse {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 8px 28px;
	align-items: end;
	padding: 20px 22px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--r-2);
}
.pulse .figure { display: grid; gap: 2px; }
.pulse .figure .value {
	font-size: clamp(3rem, 7vw, 4.6rem);
	font-weight: 700;
	font-stretch: 100%;
	line-height: 0.95;
	letter-spacing: -0.035em;
}
.pulse .figure .label { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-weight: 600; }
.pulse .compare { color: var(--ink-2); font-size: 0.9rem; }
.pulse .strip { height: 84px; min-width: 0; }
.pulse .facts { grid-column: 1 / -1; display: flex; gap: 8px 28px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line); }
.pulse .facts div { display: grid; }
.pulse .facts dt { font-size: 0.8rem; color: var(--ink-3); font-weight: 600; }
.pulse .facts dd { margin: 0; font-weight: 650; font-size: 1.05rem; }
@media (max-width: 640px) {
	.pulse { grid-template-columns: minmax(0, 1fr); padding: 16px; }
}

.live-dot {
	width: 10px; height: 10px; border-radius: 50%;
	background: var(--good);
	box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 60%, transparent);
	animation: beat 2s ease-out infinite;
}
.live-dot.off { background: var(--ink-3); animation: none; }
.live-dot.warn { background: var(--warn); animation: none; }
@keyframes beat {
	0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 55%, transparent); }
	70%, 100% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--good) 0%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* -- stat tiles ------------------------------------------------------------------------- */

.tiles { display: flex; flex-wrap: wrap; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-2); overflow: hidden; }
.tile { flex: 1 1 168px; background: var(--surface); padding: 14px 16px; display: grid; gap: 4px; align-content: start; min-width: 0; }
@media (max-width: 640px) { .tile { flex-basis: 140px; } }
/* (six tiles: three a row, two on a phone, never five and a straggler) */
.tiles.thirds .tile { flex: 1 1 30%; }
.tiles.quarters .tile { flex: 1 1 22%; }
@media (max-width: 640px) { .tiles.thirds .tile, .tiles.quarters .tile { flex-basis: 40%; } }
.tile .label { font-size: 0.84rem; color: var(--ink-2); font-weight: 600; display: flex; align-items: center; gap: 2px; }
.tile .label .info { flex: none; width: 20px; height: 20px; margin: -2px 0; }
.tile .value { font-size: 1.6rem; font-weight: 650; letter-spacing: -0.02em; line-height: 1.1; overflow-wrap: anywhere; }
.tile .delta { font-size: 0.8rem; font-weight: 600; color: var(--ink-3); }
.tile .delta.up { color: var(--good-text); }
.tile .delta.down { color: var(--bad-text); }
.tile .delta.flat { color: var(--ink-3); }

/* -- panels and charts -------------------------------------------------------------------- */

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
/* (a panel as tall as two beside it) */
.grid-2 > .tall { grid-row: span 2; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); } }
.span-2 { grid-column: span 2; }
@media (max-width: 760px) { .span-2 { grid-column: auto; } .grid-2 > .tall { grid-row: auto; } }

.panel {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--r-2);
	padding: 16px 18px 18px;
	display: grid;
	gap: 12px;
	align-content: start;
	min-width: 0;
}
.panel-head { display: flex; align-items: flex-start; gap: 10px; }
.panel-head .titles { flex: 1; min-width: 0; display: grid; gap: 2px; }
.panel-head .sub { font-size: 0.84rem; color: var(--ink-2); }

/* the (i) beside a title or label, and the bubble it opens */
.info {
	display: inline-grid;
	place-items: center;
	width: 22px;
	height: 22px;
	margin-left: 4px;
	padding: 0;
	vertical-align: -4px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--ink-3);
	cursor: help;
}
.info svg { width: 16px; height: 16px; }
.info:hover, .info[aria-expanded="true"] { color: var(--ink); background: var(--sunken); }
.info-bubble {
	position: fixed;
	z-index: 50;
	max-width: min(300px, calc(100vw - 24px));
	padding: 8px 11px;
	border-radius: var(--r-1);
	background: var(--surface);
	border: 1px solid var(--line-strong);
	box-shadow: var(--shadow);
	color: var(--ink);
	font-size: 0.86rem;
	font-weight: 400;
	line-height: 1.45;
	pointer-events: none;
}
.info-bubble[hidden] { display: none; }

.chart { position: relative; min-width: 0; }
.chart.loading { opacity: 0.5; transition: opacity 0.15s; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.84rem; color: var(--ink-2); }
.legend .key { display: inline-flex; align-items: center; gap: 6px; }
.legend .line { width: 14px; height: 2px; border-radius: 1px; background: var(--c); }
.legend .swatch { width: 10px; height: 10px; border-radius: 2px; background: var(--c); }

.tip {
	position: absolute;
	z-index: 5;
	pointer-events: none;
	min-width: 120px;
	padding: 8px 10px;
	border-radius: var(--r-1);
	background: var(--surface);
	border: 1px solid var(--line-strong);
	box-shadow: var(--shadow);
	font-size: 0.84rem;
	display: grid;
	gap: 3px;
}
.tip .when { color: var(--ink-3); font-size: 0.78rem; }
.tip .rowv { display: grid; grid-template-columns: 12px auto 1fr; gap: 6px; align-items: center; }
.tip .rowv i { width: 12px; height: 2px; background: var(--c); border-radius: 1px; }
.tip .rowv strong { font-variant-numeric: tabular-nums; }
.tip .rowv span { color: var(--ink-2); }

/* uPlot, in the panel's own colors */
.uplot { font-family: var(--font) !important; }
.uplot .u-legend { display: none; }
.u-axis { color: var(--ink-3); }
.u-cursor-x { border-right: 1px solid var(--ink-3) !important; }
.u-cursor-y { display: none; }
.u-select { background: color-mix(in srgb, var(--accent) 12%, transparent) !important; }

/* horizontal bars for breakdowns */
.bars { display: grid; gap: 2px; }
.bar {
	display: grid;
	grid-template-columns: minmax(84px, 34%) minmax(0, 1fr) auto;
	align-items: center;
	gap: 10px;
	padding: 5px 4px;
	border-radius: 4px;
	font-size: 0.9rem;
}
.bar:hover, .bar:focus-visible { background: var(--raised); }
.bar .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.bar .track { height: 10px; position: relative; }
.bar .fill { position: absolute; inset: 0 auto 0 0; background: var(--c, var(--s1)); border-radius: 0 4px 4px 0; min-width: 2px; }
.bar .val { font-variant-numeric: tabular-nums; color: var(--ink-2); text-align: right; min-width: 52px; }

/* tables */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.data th { text-align: left; font-weight: 600; color: var(--ink-2); font-size: 0.82rem; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data td.n, table.data th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data tr:last-child td { border-bottom: 0; }
table.data .clip { max-width: 420px; overflow-wrap: anywhere; }

/* retention cohorts */
.cohorts td.cell { text-align: center; font-variant-numeric: tabular-nums; font-size: 0.84rem; border: 2px solid var(--surface); border-radius: 4px; padding: 6px 4px; min-width: 52px; }
.cohorts td.heat-0 { background: var(--seq-0); }
.cohorts td.heat-1 { background: var(--seq-1); }
.cohorts td.heat-2 { background: var(--seq-2); }
.cohorts td.heat-3 { background: var(--seq-3); color: var(--heat-ink); }
.cohorts td.heat-4 { background: var(--seq-4); color: var(--heat-ink); }
.cohorts td.heat-5 { background: var(--seq-5); color: var(--heat-ink); }
.cohorts td.cell.na { color: var(--ink-3); background: transparent; }
.cohorts td:first-child { white-space: nowrap; }

/* the games list */
.games { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); overflow: hidden; }
.game-row {
	display: grid;
	grid-template-columns: 48px minmax(0, 1.6fr) minmax(90px, 0.8fr) minmax(120px, 1fr) repeat(3, minmax(80px, 0.6fr));
	align-items: center;
	gap: 16px;
	padding: 12px 16px;
	color: inherit;
	text-decoration: none;
	border-top: 1px solid var(--line);
}
.game-row:first-child { border-top: 0; }
.game-row.head-row { padding-top: 10px; padding-bottom: 10px; font-size: 0.8rem; color: var(--ink-3); font-weight: 600; background: var(--raised); }
a.game-row:hover { background: var(--raised); }
.game-row img, .game-row .ph { width: 48px; height: 48px; border-radius: 10px; background: var(--sunken); }
.game-row .name { font-weight: 650; font-stretch: 108%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-row .ccu { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.game-row .n { text-align: right; font-variant-numeric: tabular-nums; }
.game-row .spark { height: 32px; }
@media (max-width: 899px) {
	.game-row { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 4px 12px; }
	.game-row img, .game-row .ph { width: 44px; height: 44px; grid-row: span 2; }
	.game-row.head-row { display: none; }
	.game-row .spark, .game-row .n.hide-sm { display: none; }
	.game-row .ccu { grid-column: 3; grid-row: 1 / span 2; }
	.game-row .meta-sm { grid-column: 2; font-size: 0.84rem; color: var(--ink-2); }
}
@media (min-width: 900px) { .game-row .meta-sm { display: none; } }

/* empty and loading states */
.empty { padding: 32px 20px; text-align: center; color: var(--ink-2); display: grid; gap: 12px; justify-items: center; }
.empty strong { color: var(--ink); font-size: 1.05rem; }
.loading-line { display: flex; align-items: center; gap: 10px; color: var(--ink-2); padding: 12px 0; }

/* setup steps: these really are a sequence */
.steps { display: grid; gap: 14px; counter-reset: step; }
.step { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; }
.step::before {
	counter-increment: step;
	content: counter(step);
	width: 30px; height: 30px;
	border-radius: 50%;
	display: grid; place-items: center;
	font-weight: 700;
	background: var(--accent-wash);
	color: var(--accent);
}
.step.done::before { content: '✓'; background: color-mix(in srgb, var(--good) 18%, transparent); color: var(--good-text); }
.step .body { display: grid; gap: 8px; padding-top: 4px; min-width: 0; }
pre.snippet {
	margin: 0;
	padding: 12px 14px;
	border-radius: var(--r-1);
	background: var(--sunken);
	border: 1px solid var(--line);
	overflow-x: auto;
	font: 0.84rem/1.5 ui-monospace, 'Cascadia Mono', Consolas, monospace;
	white-space: pre;
}

/* logs */
.logs { height: min(70vh, 720px); overflow: auto; background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r-2); padding: 8px 0; font: 0.8rem/1.5 ui-monospace, 'Cascadia Mono', Consolas, monospace; }
.log { padding: 1px 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.log time { color: var(--ink-3); margin-right: 10px; }
.log.warn { color: var(--warn-text); }
.log.error { color: var(--bad-text); background: color-mix(in srgb, var(--bad) 8%, transparent); }

/* sheets (dialogs) */
dialog.sheet {
	border: 1px solid var(--line);
	border-radius: 14px;
	padding: 0;
	width: min(560px, calc(100vw - 24px));
	max-height: calc(100dvh - 24px);
	background: var(--surface);
	color: var(--ink);
	box-shadow: var(--shadow);
}
dialog.sheet::backdrop { background: rgba(0, 0, 0, 0.4); }
dialog.sheet form { padding: 20px; display: grid; gap: 14px; }
dialog.sheet .actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding-top: 4px; }

#toasts { position: fixed; z-index: 60; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: 8px; width: min(440px, calc(100vw - 32px)); }
.toast { padding: 11px 14px; border-radius: var(--r-1); background: var(--ink); color: var(--page); font-weight: 500; box-shadow: var(--shadow); }
.toast.bad { background: var(--bad); color: #fff; }

/* sign in */
/* -- sign-in: the artwork blurred, the name in the corner -------------------------- */

.signin {
	position: relative;
	min-height: 100dvh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: clamp(32px, 6vw, 80px) clamp(16px, 6vw, 80px);
	background: #07080a;
	color: #ffffff;
	color-scheme: dark;
}
.signin-art {
	position: absolute;
	inset: -80px;
	width: calc(100% + 160px);
	height: calc(100% + 160px);
	object-fit: cover;
	filter: blur(48px) saturate(1.15);
	opacity: 0.75;
	pointer-events: none;
}
/* (darker in the corner the words sit in) */
.signin::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(to top right, rgba(7, 8, 10, 0.85) 0%, rgba(7, 8, 10, 0.25) 60%, rgba(7, 8, 10, 0.1) 100%);
	pointer-events: none;
}
.signin-body { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 32px; }
.signin-name {
	margin: 0;
	font-size: clamp(56px, 9vw, 112px);
	line-height: 0.9;
	font-weight: 800;
	font-stretch: 125%;
	letter-spacing: -0.03em;
}
.signin-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 50px;
	padding: 0 26px;
	border: 1px solid rgba(255, 255, 255, 0.4);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.06);
	color: #ffffff;
	font: inherit;
	font-size: 0.95rem;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s;
}
.signin-btn:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.7); }
.signin-btn:focus-visible { outline: 2px solid #ffffff; outline-offset: 3px; }
.signin-btn svg { width: 18px; height: 18px; transition: transform 0.15s; }
.signin-btn:hover svg { transform: translateX(3px); }
.signin-note { margin: -12px 0 0; max-width: 46ch; font-size: 0.9rem; line-height: 1.5; color: rgba(255, 255, 255, 0.82); }
.signin-note code { color: #ffffff; }
@media (prefers-reduced-motion: reduce) { .signin-btn, .signin-btn svg { transition: none; } }

/* "Access Denied": drops in from the top, holds, lifts away */
.denied-pill {
	position: fixed;
	top: 24px;
	left: 50%;
	z-index: 10;
	display: flex;
	align-items: center;
	gap: 10px;
	height: 46px;
	padding: 0 22px 0 16px;
	border-radius: 999px;
	background: #c42b2b;
	color: #ffffff;
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.01em;
	white-space: nowrap;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
	transform: translate(-50%, -140%);
	opacity: 0;
	animation: denied-pill 3.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.25s forwards;
}
.denied-pill svg { width: 18px; height: 18px; }
@keyframes denied-pill {
	0% { transform: translate(-50%, -140%); opacity: 0; }
	12%, 82% { transform: translate(-50%, 0); opacity: 1; }
	100% { transform: translate(-50%, -140%); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.denied-pill { animation-name: denied-pill-still; }
	@keyframes denied-pill-still { 0%, 92% { transform: translate(-50%, 0); opacity: 1; } 100% { transform: translate(-50%, 0); opacity: 0; } }
}

.settings-group { display: grid; gap: 16px; }
.savebar { position: sticky; bottom: 12px; display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-2); box-shadow: var(--shadow); }

.meter { height: 8px; border-radius: 4px; background: var(--seq-1); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--s1); border-radius: 4px; }
.meter.warn i { background: var(--warn); }
.meter.bad i { background: var(--bad); }

.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; margin: 0; font-size: 0.92rem; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; overflow-wrap: anywhere; }

/* -- PullFeed ------------------------------------------------------------------- */

.tabs a.gap { margin-left: 14px; position: relative; }
.tabs a.gap::before { content: ''; position: absolute; left: -9px; top: 12px; bottom: 12px; width: 1px; background: var(--line-strong); }

.feed { display: grid; gap: 8px; }
.pull {
	display: grid;
	grid-template-columns: 44px minmax(0, 1fr);
	gap: 12px;
	align-items: center;
	padding: 10px 12px 10px 14px;
	border-radius: var(--r-1);
	border: 1px solid var(--line);
	background: var(--surface);
	position: relative;
	overflow: hidden;
}
.pull::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--rarity); }
.pull .what { font-weight: 650; overflow-wrap: anywhere; }
.pull.new { animation: arrive 0.6s ease-out; }
@keyframes arrive { from { background: color-mix(in srgb, var(--rarity) 14%, var(--surface)); } }
@media (prefers-reduced-motion: reduce) { .pull.new { animation: none; } }

.face { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: var(--sunken); overflow: hidden; flex: none; }
.face .initial { font-weight: 700; color: var(--ink-3); }
.face img { position: absolute; inset: 0; width: 100%; height: 100%; }
.face.big { width: 64px; height: 64px; border-radius: 14px; }

/* -- alert history ---------------------------------------------------------------- */
.alert-list { list-style: none; margin: 0; padding: 0; }
.alert-list li { border-top: 1px solid var(--line); }
.alert-list li:first-child { border-top: 0; }
.alert-list summary { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 2px 10px; padding: 10px 2px; cursor: pointer; list-style: none; }
.alert-list summary::-webkit-details-marker { display: none; }
.alert-list summary .dot { align-self: center; }
.alert-list summary .what { font-weight: 600; overflow-wrap: anywhere; }
.alert-list summary .meta { grid-column: 2; }
.alert-list .body { padding: 0 2px 12px 20px; }
.alert-list ul { margin: 0; padding-left: 18px; }
@media (min-width: 760px) {
	.alert-list summary { grid-template-columns: auto minmax(0, 1fr) auto; }
	.alert-list summary .meta { grid-column: 3; text-align: right; }
}

/* -- a game's alert settings ------------------------------------------------------ */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 16px; }
.settings-grid .field { align-content: start; }

/* -- the game tracker (Tools → Hub tools) ------------------------------------------ */
.rail-label { padding: 10px 8px 2px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); }
.rail-label:first-child { padding-top: 0; }
.legend .mark { width: 0; height: 14px; border-left: 2px dashed var(--c); }

.chip { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; background: var(--sunken); color: var(--ink-2); font-size: 0.76rem; font-weight: 600; white-space: nowrap; }
.chip.warn { background: color-mix(in srgb, var(--warn) 22%, var(--surface)); color: var(--warn-text); }
.chip.good { background: var(--accent-wash); color: var(--accent); }

.tracker-head { align-items: flex-end; }
.track-form { flex: 1 1 340px; max-width: 520px; display: grid; gap: 6px; }
.track-form label { font-size: 0.86rem; font-weight: 600; color: var(--ink-2); display: inline-flex; align-items: center; gap: 4px; }
.track-form .row { gap: 8px; flex-wrap: nowrap; }
.track-form .input { flex: 1; min-width: 0; }
.track-form .error { margin: 0; color: var(--bad-text); }
.track-form .error:empty { display: none; }

.panel.flush { padding: 0; overflow: hidden; }
.panel.flush .table-wrap { margin: 0; position: relative; }
/* (the page's grid would otherwise grow to the table's width on a phone) */
.tracker-body { min-width: 0; }
table.tracker-table { min-width: 900px; }
table.tracker-table th { padding: 10px 8px; }
table.tracker-table th:first-child, table.tracker-table td:first-child { padding-left: 16px; }
table.tracker-table th:last-child, table.tracker-table td:last-child { padding-right: 16px; }
table.tracker-table td { vertical-align: middle; padding: 10px 8px; }
table.tracker-table td.strong { font-weight: 700; font-size: 1rem; }
table.tracker-table tbody tr:hover { background: var(--raised); }
table.tracker-table .spark { width: 120px; height: 32px; display: block; }
th button.sort { all: unset; cursor: pointer; border-radius: 4px; }
th button.sort:hover, th button.sort.on { color: var(--ink); }
th button.sort:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
a.tracked { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; min-width: 210px; }
a.tracked img, a.tracked .ph { width: 40px; height: 40px; border-radius: 9px; flex: none; background: var(--sunken); }
a.tracked .who { display: grid; gap: 2px; min-width: 0; }
a.tracked .name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 600; }
a.tracked:hover .name { color: var(--accent); }

dl.figures { margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px 16px; }
dl.figures dt { font-size: 0.82rem; font-weight: 600; color: var(--ink-2); }
dl.figures dd { margin: 2px 0 0; font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.kind-tracker { color: var(--ink-2); }
.access.hub .access-row { grid-template-columns: minmax(180px, 1.1fr) minmax(0, 3fr); }
@media (max-width: 860px) { .access.hub .access-row { grid-template-columns: minmax(0, 1fr); } }
.segmented.small { padding: 2px; flex: none; }
.segmented.small button { padding: 4px 10px; min-height: 30px; font-size: 0.82rem; }
.tip .note { max-width: 260px; margin-top: 2px; font-size: 0.74rem; color: var(--ink-3); white-space: normal; overflow-wrap: anywhere; }

/* -- Codes (Mexico Game's tools): the list and its form ------------------------------ */
/* (the page's grid would otherwise grow to the table's width on a phone) */
.codes { display: grid; gap: 12px; min-width: 0; }
.codes > .filters h2 { display: inline-flex; align-items: center; gap: 4px; }
table.codes-table { min-width: 860px; }
table.codes-table th { padding: 10px 8px; }
table.codes-table th:first-child, table.codes-table td:first-child { padding-left: 16px; }
table.codes-table th:last-child, table.codes-table td:last-child { padding-right: 16px; }
table.codes-table td { vertical-align: middle; padding: 10px 8px; }
table.codes-table td > .tiny { display: block; margin-top: 2px; }
table.codes-table td.n .meter { display: block; width: 72px; height: 5px; margin: 6px 0 0 auto; }
table.codes-table tbody tr:hover { background: var(--raised); }
.code-name { display: flex; align-items: center; gap: 4px; }
.code-name code { font-size: 0.95rem; font-weight: 700; color: var(--ink); letter-spacing: 0.02em; }
.btn.icon.tiny-btn { min-height: 26px; width: 26px; padding: 0; }
.btn.icon.tiny-btn svg { width: 14px; height: 14px; }
.code-actions { white-space: nowrap; text-align: right; }
.code-actions .btn + .btn { margin-left: 6px; }
.code-input { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; letter-spacing: 0.04em; }
.code-limits { align-items: end; }
.code-limits > label.row { min-height: 40px; }
.label-like { font-weight: 600; font-size: 0.92rem; }
.choice-list { display: grid; max-height: 240px; overflow-y: auto; padding: 4px; border: 1px solid var(--line-strong); border-radius: var(--r-1); background: var(--surface); }
.choice-list .picker-option[aria-selected="true"] { background: var(--accent-wash); color: var(--ink); box-shadow: inset 3px 0 0 var(--accent); }
/* (a phone: each code a card -- code and state, what it gives, claims and
   expiry, then its buttons -- instead of a table to scroll sideways) */
@media (max-width: 720px) {
	table.codes-table { min-width: 0; }
	table.codes-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	table.codes-table tbody, table.codes-table tr, table.codes-table td { display: block; }
	table.codes-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "code state" "gives gives" "claims expires" "actions actions"; gap: 10px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
	table.codes-table tr:last-child { border-bottom: 0; }
	table.codes-table td, table.codes-table td:first-child, table.codes-table td:last-child { padding: 0; border: 0; }
	table.codes-table .c-code { grid-area: code; }
	table.codes-table .c-state { grid-area: state; justify-self: end; }
	table.codes-table .c-gives { grid-area: gives; }
	table.data.codes-table td.c-claims { grid-area: claims; text-align: left; }
	table.data.codes-table td.c-claims .meter { margin-left: 0; }
	table.codes-table .c-expires { grid-area: expires; }
	table.codes-table [data-label]::before { content: attr(data-label); display: block; font-size: 0.76rem; font-weight: 600; color: var(--ink-3); }
	table.codes-table .code-actions { grid-area: actions; display: flex; gap: 6px; text-align: left; }
	table.codes-table .code-actions .btn { flex: 1; margin: 0; }
	table.codes-table tbody tr:hover { background: none; }
}

/* -- The Majors' tools ------------------------------------------------------------- */
.md-export { margin: 0; max-height: 420px; overflow: auto; padding: 12px 14px; border-radius: var(--r-1); background: var(--sunken); font: 0.82rem/1.5 ui-monospace, 'Cascadia Mono', Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
