/* IRCPulse — "switchboard" theme. One bold element (the channel wall), everything else quiet. */

/* Default theme tokens ("switchboard"); other themes in assets/themes/ override them */
:root {
	--bg: #EDF0F5;
	--band: #E3E7ED;
	--surface: #F6F8FB;
	--ink: #15203A;
	--ink-2: #4A5672;
	--line: #CBD3E0;
	--accent: #1B64BE;
	--accent-ink: #FFFFFF;
	--live: #F2A600;
	--live-ink: #15203A;
	--chart-line: #1B64BE;
	--chart-area: rgba(27, 100, 190, 0.16);
	--grid: #DAE0E9;
	--hempty: #E1E6EE;
	--nav-bg: #15203A;
	--nav-border: #323C54;
	--nav-ink: #E4E9F2;
	--nav-ink-2: rgba(228, 233, 242, 0.78);
	--nav-drop-bg: #263049;
	--nav-drop-hover: #3A445B;
	--h1: #CCE3FD;
	--h2: #ACC7E8;
	--h3: #8DACD3;
	--h4: #6D90BE;
	--h5: #4D74A8;
	--h6: #2E5993;
	--h7: #0E3D7E;
	--display: Bahnschrift, "DIN Alternate", "DIN Next", "D-DIN", "Barlow Semi Condensed", "Avenir Next Condensed", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
	--text: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--r: 8px;
	--btn-r: 6px;
}
:root[data-theme="dark"] {
	--bg: #0F1729;
	--band: #192032;
	--surface: #16213A;
	--ink: #E4E9F2;
	--ink-2: #9AA6BF;
	--line: #2A3654;
	--accent: #6AABF1;
	--accent-ink: #0F1729;
	--live: #F2A600;
	--live-ink: #15203A;
	--chart-line: #519CED;
	--chart-area: rgba(81, 156, 237, 0.16);
	--grid: #1E2841;
	--hempty: #182238;
	--nav-bg: #0B1222;
	--nav-border: #29303F;
	--nav-ink: #E4E9F2;
	--nav-ink-2: rgba(228, 233, 242, 0.78);
	--nav-drop-bg: #1C2333;
	--nav-drop-hover: #323947;
	--h1: #12284A;
	--h2: #2D4567;
	--h3: #496284;
	--h4: #647EA1;
	--h5: #7F9BBE;
	--h6: #9BB8DB;
	--h7: #B6D5F8;
}
@media (prefers-color-scheme: dark) {
	:root:where(:not([data-theme="light"])) {
		--bg: #0F1729;
		--band: #192032;
		--surface: #16213A;
		--ink: #E4E9F2;
		--ink-2: #9AA6BF;
		--line: #2A3654;
		--accent: #6AABF1;
		--accent-ink: #0F1729;
		--live: #F2A600;
		--live-ink: #15203A;
		--chart-line: #519CED;
		--chart-area: rgba(81, 156, 237, 0.16);
		--grid: #1E2841;
		--hempty: #182238;
		--nav-bg: #0B1222;
		--nav-border: #29303F;
		--nav-ink: #E4E9F2;
		--nav-ink-2: rgba(228, 233, 242, 0.78);
		--nav-drop-bg: #1C2333;
		--nav-drop-hover: #323947;
		--h1: #12284A;
		--h2: #2D4567;
		--h3: #496284;
		--h4: #647EA1;
		--h5: #7F9BBE;
		--h6: #9BB8DB;
		--h7: #B6D5F8;
	}
}
:root {
	--code: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	--wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0; background: var(--bg); color: var(--ink);
	font: 400 1.0625rem/1.55 var(--text);
	font-variant-numeric: tabular-nums;
}
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.1; letter-spacing: -.005em; margin: 0 0 .5rem; }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: 1.3125rem; }
h3 { font-size: 1.0625rem; }
p { margin: 0 0 1rem; max-width: 70ch; }
code { font-family: var(--code); font-size: .9em; }
small { color: var(--ink-2); font-size: .8125rem; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--bg); padding: .5rem 1rem; z-index: 9; }
.skip:focus { left: 1rem; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }
.narrow > * { max-width: 760px; }
.sub { color: var(--ink-2); }
.empty { color: var(--ink-2); font-style: italic; }
.notice { max-width: var(--wrap); margin: 1rem auto; padding: .75rem 1.5rem; border-left: 4px solid var(--live); background: var(--surface); }

/* ---------- Bootstrap bridge: Bootstrap reads the site's tokens ---------- */
:root, [data-bs-theme] {
	--bs-body-bg: var(--bg); --bs-body-color: var(--ink); --bs-emphasis-color: var(--ink);
	--bs-secondary-color: var(--ink-2); --bs-border-color: var(--line); --bs-heading-color: inherit;
	--bs-link-color: var(--accent); --bs-link-hover-color: var(--accent); --bs-code-color: inherit;
	--bs-body-font-family: var(--text); --bs-font-sans-serif: var(--text);
}
.table { --bs-table-bg: transparent; --bs-table-color: var(--ink); --bs-table-border-color: var(--line); margin-bottom: 0; }

/* ---------- navbar ---------- */
.ip-navbar {
	--bs-navbar-color: var(--nav-ink-2); --bs-navbar-hover-color: var(--nav-ink); --bs-navbar-active-color: var(--nav-ink);
	--bs-navbar-padding-y: .55rem; --bs-navbar-nav-link-padding-x: .55rem;
	--bs-navbar-toggler-border-color: var(--nav-border); --bs-navbar-toggler-focus-width: .15rem;
	background: var(--nav-bg); border-bottom: 1px solid var(--nav-border);
	font-family: var(--text);
}
.ip-container { max-width: var(--wrap); padding-inline: 1.5rem; }
.ip-brand { display: flex; align-items: center; gap: .6rem; color: var(--nav-ink); margin-right: 1.5rem; }
.ip-brand img { border-radius: 7px; flex: none; }
.ip-brand-name { display: block; font: 700 1.3rem/1 var(--display); letter-spacing: -.01em; color: var(--nav-ink); }
.ip-navbar .nav-link { font-weight: 500; font-size: .9375rem; position: relative; white-space: nowrap; }
.ip-navbar .nav-link.active::after {
	content: ""; position: absolute; left: var(--bs-navbar-nav-link-padding-x); right: var(--bs-navbar-nav-link-padding-x);
	bottom: -.55rem; height: 3px; border-radius: 3px 3px 0 0; background: var(--live);
}
.ip-navbar .dropdown-toggle { display: inline-flex; align-items: center; gap: .4rem; }
.ip-navbar .dropdown-menu {
	--bs-dropdown-bg: var(--nav-drop-bg); --bs-dropdown-border-color: var(--nav-border); --bs-dropdown-color: var(--nav-ink);
	--bs-dropdown-link-color: var(--nav-ink); --bs-dropdown-link-hover-color: var(--nav-ink); --bs-dropdown-link-hover-bg: var(--nav-drop-hover);
	--bs-dropdown-link-active-color: var(--accent-ink); --bs-dropdown-link-active-bg: var(--accent); min-width: 10rem;
}
.ip-theme { background: none; border: 0; display: inline-flex; align-items: center; }
.ip-cta {
	display: inline-block; padding: .45rem 1rem; border-radius: var(--btn-r); font-weight: 600; font-size: .9375rem;
	background: var(--live); color: var(--live-ink); text-decoration: none; white-space: nowrap;
}
.ip-cta:hover { color: var(--live-ink); filter: brightness(1.07); text-decoration: none; }
.ip-cta-outline { background: transparent; color: var(--nav-ink); box-shadow: inset 0 0 0 1.5px var(--nav-ink-2); }
.ip-cta-outline:hover { color: var(--nav-ink); background: var(--nav-drop-hover); filter: none; }
.ip-tools .nav-item + .nav-item .ip-cta { margin-left: .4rem; }
@media (max-width: 1199.98px) {
	.ip-navbar .navbar-collapse { padding: .5rem 0 1rem; }
	.ip-navbar .nav-link.active::after { left: 0; right: auto; top: .55rem; bottom: .55rem; width: 3px; height: auto; border-radius: 0 3px 3px 0; }
	.ip-navbar .nav-link { padding-left: .9rem; }
	.ip-tools { flex-direction: row; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .5rem; border-top: 1px solid var(--nav-border); padding-top: .75rem; }
	.ip-break { flex-basis: 100%; height: 0; }
	.ip-btn-item { flex: 1 1 0; }
	.ip-btn-item .ip-cta { display: block; text-align: center; margin-left: 0 !important; }
}
select, input[type="search"], input:not([type]), textarea {
	font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--btn-r);
}

main { padding-top: 2rem; }
main > .hero:first-child { padding-top: clamp(.5rem, 4vw, 2.5rem); }

/* ---------- hero ---------- */
.hero { padding-top: clamp(2rem, 6vw, 4.5rem); padding-bottom: 2rem; }
.lede {
	font: 600 clamp(2.1rem, 5.2vw, 4.25rem)/1.04 var(--display);
	letter-spacing: -.015em; max-width: 22ch; margin-bottom: 1.75rem;
	text-wrap: balance;
}
.lede::before {
	content: ""; display: inline-block; width: .32em; height: .32em; border-radius: 50%;
	background: var(--live); vertical-align: .22em; margin-right: .2em;
	box-shadow: 0 0 0 .1em color-mix(in srgb, var(--live) 30%, transparent);
}
.num { font-variant-numeric: tabular-nums; }

/* ---------- join ---------- */
.join { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; }
.btn {
	display: inline-flex; align-items: center; gap: .5rem; padding: .65rem 1.1rem; border-radius: var(--btn-r);
	font: 600 1rem/1.2 var(--text); text-decoration: none; cursor: pointer;
	color: var(--ink); background: transparent; border: 1.5px solid var(--ink);
}
.btn:hover { background: var(--surface); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.addr { margin: 0; color: var(--ink-2); font-size: .9375rem; flex-basis: 100%; }
.addr code { color: var(--ink); background: var(--surface); padding: .1rem .4rem; border-radius: 4px; border: 1px solid var(--line); }
.copy { font: inherit; font-size: .8125rem; background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0 .25rem; text-decoration: underline; }
.tls { white-space: nowrap; }
.tls::before { content: "🔒 "; }

/* ---------- the channel wall (the one bold thing) ---------- */
.wall-wrap { background: var(--band); padding: 2.5rem 0 1rem; margin: 1.5rem 0 3rem; border-block: 1px solid var(--line); }
.wall {
	list-style: none; margin: 0 auto; padding: 0 1.5rem; max-width: var(--wrap);
	display: flex; flex-wrap: wrap; align-items: baseline; gap: .1em .55em;
}
.wall li { font: 600 calc(var(--s) * 1rem)/1.02 var(--display); letter-spacing: -.02em; }
.wall a { color: var(--ink); text-decoration: none; display: inline-flex; align-items: baseline; gap: .12em; border-radius: 4px; }
.wall a:hover .wn, .wall a:focus-visible .wn { color: var(--accent); text-decoration: underline; text-decoration-thickness: .06em; }
.wh { color: var(--ink-2); font-weight: 400; }
.wc { font: 500 max(.75rem, calc(var(--s) * .3rem))/1 var(--text); color: var(--ink-2); align-self: flex-start; margin-top: .25em; }
.wall-more { margin-top: 1.25rem; }
@media (prefers-reduced-motion: no-preference) {
	.wall li { animation: wall-in .5s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 14ms); }
	@keyframes wall-in { from { opacity: 0; transform: translateY(.25em); } }
}

/* ---------- panels ---------- */
.grid-2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 2.5rem 3rem; margin-bottom: 3rem; }
.stack { display: grid; gap: 2.5rem; align-content: start; }
.panel { border-top: 2px solid var(--ink); padding-top: 1rem; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem 1rem; margin-bottom: .5rem; }
.panel-head h2 { margin: 0; }
.more { margin-top: .75rem; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }

/* segmented range control */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--btn-r); overflow: hidden; }
.seg button { font: 500 .8125rem/1 var(--text); padding: .45rem .7rem; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* facts */
.facts { margin: 0; display: grid; gap: .1rem; }
.facts > div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; font: 600 1.25rem/1.1 var(--display); text-align: right; }
.facts dd small { display: block; font: 400 .75rem/1.3 var(--text); }
.facts.inline { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; margin: 1.25rem 0 1.5rem; }
.facts.inline > div { display: block; border: 0; padding: 0; }
.facts.inline dt { font-size: .875rem; }
.facts.inline dd { text-align: left; font-size: 1.5rem; }

/* line chart */
.linechart { position: relative; min-height: 220px; }
.linechart svg { display: block; width: 100%; height: 240px; overflow: visible; }
.lc-grid line { stroke: var(--grid); stroke-width: 1; }
.lc-ax { fill: var(--ink-2); font: 12px var(--text); }
.lc-area { fill: var(--chart-area); }
.lc-line { fill: none; stroke: var(--chart-line); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.lc-cross { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 3 3; }
.lc-dot { fill: var(--chart-line); stroke: var(--surface); stroke-width: 2; }
.tip {
	position: absolute; pointer-events: none; z-index: 5; transform: translate(-50%, calc(-100% - 12px));
	background: var(--ink); color: var(--bg); padding: .4rem .6rem; border-radius: var(--btn-r); font-size: .8125rem; line-height: 1.3; white-space: nowrap;
}
.tip b { font: 600 1rem/1.1 var(--display); display: block; }
.tableview { margin-top: .75rem; font-size: .875rem; }
.tableview summary { cursor: pointer; color: var(--ink-2); }
.tableview table { margin-top: .5rem; }

/* heatmap */
.heat { width: 100%; height: auto; display: block; max-width: 720px; }
.heat .ax { fill: var(--ink-2); font: 11px var(--text); }
.heat rect { stroke: none; }
.heat rect.hc:hover, .heat rect.hc:focus { stroke: var(--ink); stroke-width: 2; outline: none; }
.hc-empty { fill: var(--hempty); }
.hc1 { fill: var(--h1); background: var(--h1); } .hc2 { fill: var(--h2); background: var(--h2); } .hc3 { fill: var(--h3); background: var(--h3); }
.hc4 { fill: var(--h4); background: var(--h4); } .hc5 { fill: var(--h5); background: var(--h5); } .hc6 { fill: var(--h6); background: var(--h6); }
.hc7 { fill: var(--h7); background: var(--h7); }
.heat-legend { display: flex; align-items: center; gap: 2px; margin-top: .5rem; font-size: .75rem; color: var(--ink-2); }
.heat-legend i { width: 22px; height: 10px; border-radius: 2px; display: inline-block; }
.heat-legend span { margin: 0 .4rem; }

/* bars */
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.bars li { display: grid; grid-template-columns: minmax(7rem, 38%) 1fr 3.5rem; gap: .6rem; align-items: center; font-size: .9375rem; }
.bl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bt { height: 10px; }
.bf { display: block; height: 100%; background: var(--chart-line); border-radius: 0 4px 4px 0; min-width: 2px; }
.bv { text-align: right; color: var(--ink-2); }

/* rising */
.rising { list-style: none; margin: 0; padding: 0; }
.rising li { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name spark" "delta spark"; gap: 0 .75rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.rising li > a { grid-area: name; }
.rising li > .spark { grid-area: spark; }
.rising li > .up { grid-area: delta; }
.rising a { font: 600 1.0625rem/1.2 var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up { color: var(--ink-2); font-size: .8125rem; white-space: nowrap; }
.spark path { fill: none; stroke: var(--chart-line); stroke-width: 1.5; stroke-linejoin: round; }

/* ---------- channels ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.5rem 0 2rem; }
.filters input { flex: 1 1 16rem; padding: .6rem .8rem; }
.filters select { padding: .55rem .6rem; }
.chanlist { list-style: none; margin: 0; padding: 0; }
.chanlist li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .15rem 1.5rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.cl-name { font: 600 1.375rem/1.15 var(--display); text-decoration: none; color: var(--ink); overflow-wrap: anywhere; }
.cl-name:hover { color: var(--accent); text-decoration: underline; }
.cl-users { color: var(--ink-2); white-space: nowrap; align-self: baseline; }
.cl-topic { grid-column: 1 / -1; margin: 0; color: var(--ink-2); max-width: 90ch; overflow-wrap: anywhere; }
.irc { border-radius: 2px; padding: 0 .08em; }
.pager { display: flex; flex-wrap: wrap; gap: .35rem; margin: 2rem 0 3rem; }
.pager a { min-width: 2.25rem; text-align: center; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: var(--btn-r); text-decoration: none; }
.pager a[aria-current="page"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.chan { padding-top: 1.5rem; padding-bottom: 1rem; }
.chan-name { font-size: clamp(2.5rem, 7vw, 5rem); letter-spacing: -.025em; overflow-wrap: anywhere; }
.topic { margin: .5rem 0 .5rem; padding: 0 0 0 1rem; border-left: 3px solid var(--accent); font-size: 1.1875rem; line-height: 1.5; max-width: 70ch; overflow-wrap: anywhere; }
.badge-preview { display: block; margin: .75rem 0; }
.code { width: 100%; font: .8125rem/1.5 var(--code); padding: .6rem; resize: vertical; }
.members { margin-bottom: 3rem; }
.mgroup { margin-bottom: 1.75rem; }
.mgroup h3 { border-bottom: 1px solid var(--line); padding-bottom: .3rem; display: flex; justify-content: space-between; }
.mgroup .count { color: var(--ink-2); font-weight: 400; }
.mgroup ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 0 1.5rem; }
.mgroup li { padding: .12rem 0; overflow-wrap: anywhere; }
.mgroup a { text-decoration: none; color: var(--ink); }
.mgroup a:hover { color: var(--accent); text-decoration: underline; }
.pfx { color: var(--ink-2); display: inline-block; width: 1ch; margin-right: .25rem; }

/* ---------- servers ---------- */
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree ul { margin-left: .9rem; padding-left: 1rem; border-left: 1px solid var(--line); }
.tree li { padding: .3rem 0; position: relative; }
.tree ul > li::before { content: ""; position: absolute; left: -1rem; top: 1.05rem; width: .8rem; border-top: 1px solid var(--line); }
.node { display: inline-flex; flex-wrap: wrap; gap: .1rem .6rem; align-items: baseline; }
.nn { font: 600 1.0625rem/1.2 var(--display); overflow-wrap: anywhere; }
.nt { color: var(--ink-2); font-size: .8125rem; }
.nt.warn { color: var(--ink); background: color-mix(in srgb, var(--live) 35%, transparent); padding: 0 .35rem; border-radius: 4px; }
.node.svc .nn { color: var(--ink-2); font-weight: 500; }
.table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.table th, .table td { text-align: left; padding: .6rem .5rem .6rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.table thead th { color: var(--ink-2); font-weight: 500; font-size: .8125rem; }
.table tbody th { font: 600 1rem/1.25 var(--display); }
.table tbody th small { display: block; font: 400 .8125rem/1.3 var(--text); margin-top: .15rem; }
.table .r { text-align: right; }
@media (max-width: 640px) { .srv-table th:nth-child(5), .srv-table td:nth-child(5), .srv-table th:nth-child(4), .srv-table td:nth-child(4) { display: none; } }

/* ---------- records ---------- */
.records { display: flex; flex-wrap: wrap; gap: 2rem 4rem; margin: 2rem 0 3rem; }
.rec-v { font: 600 clamp(3rem, 8vw, 5.5rem)/.95 var(--display); letter-spacing: -.03em; margin: 0 0 .35rem; }
.rec-l { color: var(--ink-2); margin: 0; max-width: 18ch; }
.ranked { list-style: none; margin: 0; padding: 0; counter-reset: r; }
.ranked li { counter-increment: r; display: grid; grid-template-columns: 2rem 1fr auto; gap: .75rem; align-items: baseline; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.ranked li::before { content: counter(r); color: var(--ink-2); font-size: .875rem; }
.ranked b { font: 600 1.125rem/1 var(--display); }
.ranked.wide li { grid-template-columns: 2rem minmax(0, 1fr) auto auto; }
.ranked.wide span { color: var(--ink-2); font-size: .875rem; }
.ranked a { font: 600 1.0625rem/1.2 var(--display); overflow-wrap: anywhere; }

/* ---------- nick ---------- */
.result { margin: 1rem 0 3rem; padding: 1.25rem 1.5rem; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.res-nick { font: 600 2rem/1.1 var(--display); margin-bottom: .25rem; display: flex; align-items: center; gap: .5rem; overflow-wrap: anywhere; }
.result.off .res-nick { color: var(--ink-2); }
.dot { width: .45em; height: .45em; border-radius: 50%; background: var(--live); flex: none; }
.tag { font: 500 .75rem/1 var(--text); border: 1px solid var(--line); padding: .2rem .4rem; border-radius: 4px; color: var(--ink-2); }
.chips { list-style: none; margin: .5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.chips a { display: inline-block; padding: .25rem .7rem; border-radius: max(var(--btn-r), 4px); border: 1px solid var(--line); text-decoration: none; font-weight: 500; }
.api { padding-left: 1.1rem; }
.api li { margin-bottom: .4rem; }
.api code { color: var(--ink); }

/* ---------- footer ---------- */
.foot { max-width: var(--wrap); margin: 3rem auto 0; padding: 2rem 1.5rem 3rem; border-top: 1px solid var(--line); color: var(--ink-2); font-size: .875rem; }
.foot p { max-width: 80ch; }
.foot-tag { color: var(--ink); }
.foot-links { max-width: none !important; }
.foot-credit { margin-left: auto; }
.foot-links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }

@media (max-width: 640px) {
	.wall { gap: .05em .45em; }
	.wall li { font-size: calc((.55 + var(--s) * .45) * 1rem); }
	.wall li.minor { display: none; }
	.bars li { grid-template-columns: minmax(6rem, 42%) 1fr 3rem; }
	.filters select { flex: 1 1 100%; }
}
@media (forced-colors: active) {
	.bf, .hc1, .hc2, .hc3, .hc4, .hc5, .hc6, .hc7 { forced-color-adjust: none; }
	.lede::before, .dot { forced-color-adjust: none; }
}

/* mIRC colours were picked for white backgrounds: lift them on dark */
:root[data-theme="dark"] .irc[style*="color"] { filter: brightness(1.7) saturate(.85); }
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) .irc[style*="color"] { filter: brightness(1.7) saturate(.85); } }

/* ---------- users ---------- */
.users { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 0 2rem; }
.users li {
	display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) auto; grid-template-areas: "flag nick tags" "flag meta meta";
	gap: 0 .5rem; align-items: baseline; padding: .6rem 0; border-bottom: 1px solid var(--line);
}
.u-flag { grid-area: flag; font-size: 1.1rem; line-height: 1.2; }
.u-nick { grid-area: nick; font: 600 1.125rem/1.25 var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-nick a { color: var(--ink); text-decoration: none; }
.u-nick a:hover { color: var(--accent); text-decoration: underline; }
.u-tags { grid-area: tags; display: flex; gap: .3rem; }
.u-meta { grid-area: meta; color: var(--ink-2); font-size: .8125rem; }
.users li.is-away .u-nick a { color: var(--ink-2); }

/* ---------- home ---------- */
.lede.custom::before { content: none; }
.prose { margin-bottom: 3rem; font-size: 1.0625rem; }
.prose > * { max-width: 760px; }
.prose h2 { margin-top: 2rem; font-size: 1.5rem; }
.prose p, .prose ul, .prose ol { max-width: 68ch; }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose li { margin-bottom: .35rem; }
.prose img { max-width: 100%; height: auto; border-radius: var(--r); }
.home-chans { margin-bottom: 3rem; }
.chips.big { gap: .5rem; margin-top: .75rem; }
.chips.big a { padding: .4rem .9rem; font: 600 1.0625rem/1.2 var(--display); color: var(--ink); background: var(--surface); }
.chips.big a:hover { border-color: var(--accent); color: var(--accent); }
.chips.big span { font: 500 .8125rem/1 var(--text); color: var(--ink-2); margin-left: .25rem; }

/* ---------- channel sub-tabs & activity ---------- */
.subtabs { margin-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.subtabs .nav { --bs-nav-link-color: var(--ink-2); --bs-nav-link-hover-color: var(--ink); --bs-nav-underline-link-active-color: var(--ink); --bs-nav-underline-border-width: 3px; gap: 1.5rem; margin-bottom: -1px; }
.subtabs .nav-link { font-weight: 600; padding: .5rem 0; }
.subtabs .nav-link.active { border-bottom-color: var(--live); }
.seg-links { display: inline-flex; flex-wrap: wrap; }
.seg-links a { font: 500 .875rem/1 var(--text); padding: .55rem .85rem; color: var(--ink-2); text-decoration: none; }
.seg-links a + a { border-left: 1px solid var(--line); }
.seg-links a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.table.activity { font-variant-numeric: tabular-nums; }
.table.activity thead a { color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.table.activity thead th[aria-sort] a { color: var(--ink); font-weight: 600; }
.table.activity tbody th a { font: 600 1rem/1.2 var(--display); color: var(--ink); text-decoration: none; }
.table.activity tbody th a:hover { color: var(--accent); text-decoration: underline; }
.table.activity td.sorted { font-weight: 600; }
.table.activity tfoot th, .table.activity tfoot td { border-top: 2px solid var(--ink); font-weight: 600; border-bottom: 0; }
.hours { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; height: 180px; align-items: end; }
.hours li { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; position: relative; outline-offset: 2px; }
.hb { display: block; background: var(--chart-line); border-radius: 4px 4px 0 0; min-height: 0; }
.hours li:hover .hb, .hours li:focus .hb { filter: brightness(1.15); }
.hl { font-size: .6875rem; color: var(--ink-2); text-align: center; margin-top: .3rem; height: 1rem; }
.hl.minor { visibility: hidden; }
@media (max-width: 640px) {
	/* keep Channel, Words, Lines, Actions */
	.table.activity tr > :nth-child(2), .table.activity tr > :nth-child(n+6) { display: none; }
	.seg-links { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
	.seg-links a { text-align: center; white-space: nowrap; }
	.seg-links a + a { border-left: 0; }
	.seg-links a:nth-child(even) { border-left: 1px solid var(--line); }
	.seg-links a:nth-child(n+3) { border-top: 1px solid var(--line); }
}
.table.activity .rank { display: inline-block; min-width: 2.2em; color: var(--ink-2); font: 400 .8125rem/1 var(--text); }

/* ---------- embed: badge variants ---------- */
.badge-variants { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem 1.5rem; margin: .5rem 0 1.75rem; }
.badge-variant { margin: 0; }
.badge-variant figcaption { font-size: .875rem; color: var(--ink-2); margin-bottom: .4rem; }
.badge-stage { padding: 1.1rem; border-radius: var(--r); border: 1px solid var(--line); margin-bottom: .5rem; }
.badge-variant.light .badge-stage { background: #FFFFFF; }
.badge-variant.dark .badge-stage { background: #0F1729; border-color: #0F1729; }
.badge-stage img { display: block; }
.hours-panel { margin-bottom: 2rem; }
.table.activity tbody th a { color: var(--ink); }
