/* @override
	http://localhost:8888/wp-content/themes/CAN-V7/style.css?*
	https://www.creativeapplications.net/wp-content/themes/CAN-V7-Beta/style.css?* */

/*
Theme Name: CAN V7
Theme URI: https://creativeapplications.net
Author: Creative Applications Network
Author URI: https://creativeapplications.net
Description: Version 7 of the Creative Applications Network (CAN) WordPress theme.
Version: 1.0.1
Requires at least: 6.4
Tested up to: 6.6
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: can-v7
*/

/* -----------------------------------------------------------------------
   CAN V7 — "TUI" theme
   A terminal / text-user-interface aesthetic: monospace type, box-drawn
   panels, reverse-video highlights, blinking cursor.
   ----------------------------------------------------------------------- */

:root {
	/*
	 * Theme variables — same names/contract as the site's existing member
	 * theme presets (html[data-theme="…"]), so an already-saved member
	 * preference (e.g. "carbon") renders correctly here too. Default here
	 * is the "Light" member preset — theme.css overrides this whole block
	 * per preset when a different one is active. (Previously Silver —
	 * that preset's own values moved to theme.css's own
	 * [data-theme="silver"] block, same way Light's lived there before
	 * this swap; see that file's own comment.)
	 *
	 * --tui-amber / --tui-red are CAN V7's only own additions — the member
	 * preset scheme has no separate warning/danger hues, so these stay
	 * fixed regardless of the active preset.
	 */
	--framecolor: #c9c9c9;
	--backgroundcolor: #F0F0F0;
	--backgroundcoloralt: #E8E8E8;
	--bodycolor: #24292E;
	--linecolor: #D8D8D8;
	--linkcolor: #005CC5;
	--darkcolor: #D03592;
	--codecolor: #24292E;
	--midcolor: #6F42C1;
	--shadecolor: #dfdfdf;
	--imagefilter: brightness(0.99) contrast(1.02) saturate(0.9);
	--tui-amber: #ffb454;
	--tui-red: #ff5c5c;
	--tui-font: ui-monospace, "IBM Plex Mono", "SFMono-Regular",
		Consolas, Menlo, Monaco, "Liberation Mono", monospace;
	/* Same stack as --tui-font's own default above, but never overridden by
	   a data-tui-font font-picker choice (theme.css's own
	   html[data-tui-font="inter"] only touches --tui-font) — for content
	   that must always render as actual code (Activity's own code blocks,
	   assets/css/activity.css), regardless of which UI font the member has
	   picked for everything else. */
	--tui-mono-font: ui-monospace, "IBM Plex Mono", "SFMono-Regular",
		Consolas, Menlo, Monaco, "Liberation Mono", monospace;
	--tui-font-size: 12px;
	/* Width of the reading column on single pages: 800px at the default 12px font, 20px wider for every px of font size
	   above it (880px at 16px). The wide blocks stretch past it by 220px (+5px per px) on each side. */
	--tui-content-width: calc(800px + (var(--tui-font-size) - 12px) * 20);
	--tui-content-wide-extra: calc(220px + (var(--tui-font-size) - 12px) * 5);
	--tui-window-radius: 5px; /* window corner rounding, settings window */
	/* .tui-window's own floating-panel shadow — kept as variables (rather
	   than literals in that rule below) so other UI, like #aptoc-container's
	   own scaled-down version further down, can derive from the same
	   values with calc() instead of hardcoding a separate copy that could
	   drift out of sync with it. */
	--tui-window-shadow-y: 4px;
	--tui-window-shadow-blur: 12px;

	/* WP core's block CSS references these directly (often with
	   !important, e.g. .has-small-font-size), expecting a theme.json to
	   define them — we don't have one (classic theme), so without these
	   that CSS silently does nothing. */
	--wp--preset--font-size--small: 0.85em;
	--wp--preset--font-size--medium: 1em;
	--wp--preset--font-size--large: 1.25em;
	--wp--preset--font-size--x-large: 1.5em;
}

* {
	box-sizing: border-box;
}

/* General rule: no default browser border, and no internal scrollbar (the
   embedded content should always be sized to fit, not scroll inside its
   own frame) — applies to every iframe site-wide, not just a specific
   embed type. */
iframe {
	border: none;
	overflow: hidden;
}

html {
	background: var(--framecolor);
	height: 100%;
	overscroll-behavior-y: none;
	overscroll-behavior-x: none;
	/* Reserves the scrollbar's gutter width up front, always — without
	   this, the gutter only exists once the document actually needs to
	   scroll, and windowed mode's own <main> is normally near-empty (real
	   content lives in floating windows, position: fixed, which never
	   makes the document itself tall enough to scroll — see single.php's
	   own doc comment on that shell). Classic mode's <main> renders the
	   real, tall page content directly, so it's the first time a document-
	   level scrollbar shows up at all — this keeps that transition from
	   ever changing the reserved layout width, and (paired with the
	   explicit html::-webkit-scrollbar rules just below) makes sure it's
	   consistently *our* thin styled scrollbar reserving that space
	   in both modes, not a browser default gutter appearing for the
	   first time only in classic mode. */
	scrollbar-gutter: stable;
	/* Never set anywhere in this theme until now — mobile Safari (and
	   Chrome for Android) runs its own automatic text-inflation algorithm
	   by default, boosting the font-size of whichever text nodes its own
	   heuristics decide read as "body copy in a narrow column" — applied
	   per text node, not uniformly, so it can boost one activity log
	   line's own plain text/links and leave the next one (whichever
	   happens to sit differently relative to surrounding block content,
	   e.g. a card right after it vs. not) alone. Not something any of
	   this theme's own font-size rules were ever fighting; disabling the
	   browser's own auto-inflation entirely is the standard fix. */
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	background: var(--framecolor);
	color: var(--bodycolor);
	font-family: var(--tui-font);
	font-size: var(--tui-font-size);
	line-height: 1.6;
	margin: 0;
	padding: 0;
	min-height: 100%;
	overscroll-behavior-y: none;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

/* Classic mode on a phone: the page scrolls like a normal page, so Safari's springy overscroll (the bounce at the top and bottom) is back.
   (The window desktop keeps it off: there the document itself should not move.) */
@media (max-width: 768px) {
	html[data-classic-nav="1"],
	html[data-classic-nav="1"] body {
		overscroll-behavior-y: auto;
	}
}

/* Faint scanline overlay for a bit of CRT texture, without hurting legibility. */
body::before {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 999;
	/* A 1x3px tile (one faint white line, two clear) instead of a generated gradient: Safari redrew the gradient across
	   the whole screen on every frame of a window resize, which made the page lag behind. */
	background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAADCAYAAABS3WWCAAAAEElEQVR4nGP4//8/CwMcAAAnFAMCo+IaEgAAAABJRU5ErkJggg==") repeat top left / 1px 3px;
}

/* Settings → Appearance → Reduce Effects (per browser; header.php sets the attribute before first paint, main.js flips it live):
   no scanline texture, no animations or fades and no shadows. */
html[data-reduce-effects="1"] body::before {
	display: none;
}

html[data-reduce-effects="1"] *,
html[data-reduce-effects="1"] *::before,
html[data-reduce-effects="1"] *::after {
	animation: none !important;
	transition: none !important;
	scroll-behavior: auto !important;
	box-shadow: none !important; /* shadows are costly to paint on a slow machine (windows, menus, buttons) */
	text-shadow: none !important;
}

a {
	color: var(--linkcolor);
	text-decoration: none;
}

/* A tap on a link or button on a classic page at phone width: no grey flash from the browser, and no wait for a possible double tap. */
@media (max-width: 768px) {
	.tui-classic-nav a,
	.tui-classic-nav button,
	.tui-classic-nav [data-window-type] {
		-webkit-tap-highlight-color: transparent;
		touch-action: manipulation;
	}
}

/* Links go dark under the pointer and for focus. On a classic page at phone width only for keyboard focus: a tap would flash it. */
@media (min-width: 769px) {
	a:hover,
	a:focus {
		/* background: var(--bodycolor); */
		color: var(--darkcolor);
		outline: none;
	}
}
@media (max-width: 768px) {
	body:not(.tui-classic-nav) a:hover,
	body:not(.tui-classic-nav) a:focus {
		/* background: var(--bodycolor); */
		color: var(--darkcolor);
		outline: none;
	}
}

@media (max-width: 768px) {
	.tui-classic-nav a:focus-visible {
		color: var(--darkcolor);
		outline: none;
	}

	.tui-classic-nav a:hover,
	.tui-classic-nav a:focus {
		outline: none;
	}
}

h1, h2, h3, h4, h5, h6 {
	font-weight: normal;
	color: var(--darkcolor);
	line-height: 1.3;
	margin-bottom: 1em;
}

/* <strong>/<b>/<th> are bold by default in the browser's own stylesheet,
   not from any rule of ours above — flatten those too. */
strong, b, th {
	font-weight: normal;
}

::selection {
	background: var(--shadecolor);
	color: var(--darkcolor);
}

/* Thin, on-theme scrollbar (WebKit). */
::-webkit-scrollbar {
	width: 0.5em;
}
::-webkit-scrollbar-track {
	background: var(--framecolor);
}
::-webkit-scrollbar-thumb {
	background: var(--midcolor);
}

/* Inside a floating window the track is the background colour (the page's own scrollbar, below, keeps its colours). */
.tui-window::-webkit-scrollbar-track,
.tui-window ::-webkit-scrollbar-track {
	background: var(--backgroundcolor);
}

/* Same three rules, explicitly re-targeted at <html> itself — the bare
   ::-webkit-scrollbar rules above style every *element's own* scrollbar
   (a .tui-window-body, a listing panel, ...) fine, but WebKit/Blink's
   root/document scrollbar (the one running down the true right edge of
   the page — only ever actually visible in classic mode, see html's own
   scrollbar-gutter comment above) is a separate, special-cased box some
   engine versions only pick up a custom style for when the rule targets
   the root element by name rather than relying on the bare selector
   implicitly covering it. Belt-and-suspenders: without this, that one
   particular scrollbar can silently fall back to the browser's own
   default (wider, unstyled) rendering instead of this theme's thin one,
   which reads as a stray, wider-than-expected gap next to it. */
html::-webkit-scrollbar {
	width: 10px;
}
html::-webkit-scrollbar-track {
	background: var(--backgroundcoloralt);
}
html::-webkit-scrollbar-thumb {
	background: var(--shadecolor);
	border: 2px solid var(--backgroundcoloralt);
}

/* Icons — <svg class="icon"><use href="#icon-name"></use></svg>,
   rendered via can_v7_icon(). Sized off font-size, colored via currentColor.
   Each <symbol> in the sprite sets its own fill/stroke, since icons mix
   solid (fill) and outline (stroke) styles. */
.icon {
	width: 1em;
	height: 1em;
	display: inline-block;
	vertical-align: -0.125em;
	color: currentColor;
}

@keyframes tui-blink {
	0%, 49% { opacity: 1; }
	50%, 100% { opacity: 0; }
}

/* Ported from CANV6: .blink fades its element out and in every second, .slowblink every two (used in content and
   on arrows/markers like "→ Submit Job"). Different from tui-blink above, the hard on/off cursor. */
.blink {
	animation: blinker 1s linear infinite;
}

.slowblink {
	animation: blinker 2s linear infinite;
}

@keyframes blinker {
	0% { opacity: 1; }
	50% { opacity: 0; }
	100% { opacity: 1; }
}

/* -----------------------------------------------------------------------
   Layout shell
   ----------------------------------------------------------------------- */

.tui-shell {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	width: 100%;
	padding: 1em 1em 0;
}

.site-main {
	flex: 1 0 auto;
}

.site-footer {
	flex: 0 0 auto;
}

/* Window mode: the desktop is exactly as tall as the visible screen. 100vh is the tallest iOS/iPadOS Safari viewport (toolbar
   hidden), so with the toolbar showing the page was taller than the screen and the desktop scrolled up and down. */
@supports (height: 100dvh) {
	html:not([data-classic-nav="1"]) .tui-shell {
		min-height: 100dvh;
	}

	html:not([data-classic-nav="1"]) .tui-shell,
	html:not([data-classic-nav="1"]) body {
		max-height: 100dvh;
		overflow: hidden;
	}
}

/* -----------------------------------------------------------------------
   Header / "status bar"
   ----------------------------------------------------------------------- */

.site-header {
	padding: 0 0 1em;
	margin-bottom: 2em;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.tui-classic-nav .site-header {
	margin-bottom: 0;
}

/* Server notice: centred in the header between the site title and the corner buttons. */
.site-header {
	position: relative;
}

/* The notice capsule and, for the Member Notice, the OK capsule beside it. */
.tui-notice-row {
	position: absolute;
	left: 50%;
	/* The header's own 1em bottom padding isn't part of the title row, so centre on the row above it. */
	top: calc(50% - 0.5em);
	transform: translate(-50%, -50%);
	max-width: 50vw;
	display: flex;
	align-items: center;
	gap: 0.5em;
}

.tui-notice {
	min-width: 0;
	padding: 0.25em 1em;
	font-size: 0.80em;
	border-radius: 999px;
	background: color-mix(in srgb, var(--shadecolor) 50%, transparent);
	text-align: center;
}

.tui-notice {
	color: var(--bodycolor);
}

.tui-notice a {
	color: var(--linkcolor);
}

.tui-notice .icon {
	margin-right: 0.5em;
}

/* OK: the same capsule look as the notice, a button. */
.tui-notice-ok {
	flex: 0 0 auto;
	padding: 0.25em 1em;
	font-family: var(--tui-font);
	font-size: 0.80em;
	border: none;
	border-radius: 999px;
	background: color-mix(in srgb, var(--shadecolor) 50%, transparent);
	color: var(--bodycolor);
	cursor: pointer;
}

.tui-notice-ok:hover,
.tui-notice-ok:focus {
	background: var(--shadecolor);
	color: var(--darkcolor);
}

@media (max-width: 768px) {
	.tui-notice-row {
		position: static;
		transform: none;
		max-width: 100%;
		width: 100%;
		justify-content: flex-start; /* the notice (and its OK button) starts at the left edge, its text left-aligned */
	}

	.tui-notice {
		text-align: left;
	}
}

.site-branding {
	position: relative;

	/* position: fixed;
	top:13px;
	left:14px;
	z-index: 600;
	display:flex; */
}

.site-branding .site-title {
	margin: 0;
	font-size: 1.1em;
	font-weight: normal;
}

.site-title-trigger {
	appearance: none;
	background: none;
	border: none;
	margin: 0;
	padding: 0 4px; /* classic on a phone takes the left 4px off again (below) */
	font: inherit;
	font-weight: normal;
	color: var(--linkcolor);
	cursor: pointer;
}

/* The two dashes in the title (header.php) leave a gap in a monospace font, where every character has the same width; the first is pulled
   towards the second so they read as one line. Inter gets the plain text instead: a span stops it shaping the dashes as one (it lifts them
   between capitals), so the first one stayed low. Two copies in the button, one shown at a time. */
.site-title-sans {
	display: none;
}

.site-title-dash {
	margin-right: -0.2em;
}

html[data-tui-font="inter"] .site-title-mono {
	display: none;
}

html[data-tui-font="inter"] .site-title-sans {
	display: inline;
}

.site-title-trigger:hover,
.site-title-trigger:focus {
	color: var(--darkcolor);
	outline: none;
}


.site-title-trigger[aria-expanded="true"] {
	color: var(--darkcolor);
}

/* Classic mode on a phone: the site title and the user icon sit flush with the page's own 12px edge, without the extra 4px. */
@media (max-width: 768px) {
	html[data-classic-nav="1"] .site-title-trigger {
		padding-left: 0;
	}

	html[data-classic-nav="1"] .tui-account-button {
		margin-right: calc(var(--tui-font-size) * -0.4167);
	}
}

/* Popup menu, opened by tapping the logo/site title. Always on top —
   floating windows (tui-window.js) get a z-index from an ever-growing
   counter (starts at 10, +1 every time one's brought to front), which
   would eventually climb past a modest fixed value here after enough
   clicks in a session; this is comfortably above any realistic count. */
.tui-menu {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	min-width: calc(var(--tui-font-size) * 17); /* 204px at the default 12px, growing with the font size setting */
	background: var(--backgroundcolor);
	border: 1px solid var(--linecolor);
	/* Above any floating window regardless of focus/stacking state —
	   .tui-windows itself sits at z-index: 500 (style.css, further down),
	   individual windows count up from a much lower base within that
	   (tui-window.js's own zCounter) — same "safely above anything a
	   window could reach" value as the Activity comment popup's own
	   raiseCommentPopupAboveEverything(). */
	z-index: 999999;

	border-radius: var(--tui-window-radius);
	box-shadow: 0 var(--tui-window-shadow-y) var(--tui-window-shadow-blur) rgba(0, 0, 0, var(--tui-window-shadow-opacity, 0.2));
}

/* Opens from a trigger near the right edge (the account menu) — hangs
   off the trigger's right side instead of its left. */
.tui-menu-right {
	left: auto;
	right: 0;
}

.tui-menu ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.tui-menu li {
	border-bottom: 1px dashed var(--linecolor);
}

/* A second, separate <ul> right after the first (e.g. #site-menu's own
   hardcoded home/Latest list, immediately followed by wp_nav_menu()'s own
   list — see header.php) — its first item has no border-bottom of its own
   to lean on (that's what separates items *within* one list), and the
   first list's own last item has its border-bottom stripped by
   li:last-child below, so without this there's no line between the two
   lists at all. */
.tui-menu ul + ul {
	border-top: 1px dashed var(--linecolor);
}

.tui-menu li:last-child {
	border-bottom: none;
}

/* Submenus (a menu item with children, nested in Appearance → Menus): they open beside the menu, on its right, in a box of the
   same look, while the item is hovered or has focus. On a touch screen, or a narrow one, there is no room beside the menu or
   no hover, so they are listed under their item, indented. */
.tui-menu li.menu-item-has-children {
	position: relative;
}

.tui-menu li.menu-item-has-children > a::after {
	content: "\203A";
	float: right;
	margin-left: 1em;
}

.tui-menu .sub-menu {
	display: none;
	position: absolute;
	top: -1px;
	left: calc(100% + 1px);
	min-width: calc(var(--tui-font-size) * 17);
	background: var(--backgroundcolor);
	border: 1px solid var(--linecolor);
	border-radius: var(--tui-window-radius);
	box-shadow: 0 var(--tui-window-shadow-y) var(--tui-window-shadow-blur) rgba(0, 0, 0, var(--tui-window-shadow-opacity, 0.2));
	z-index: 1;
}

.tui-menu li.menu-item-has-children:hover > .sub-menu,
.tui-menu li.menu-item-has-children:focus-within > .sub-menu {
	display: block;
}

@media (hover: none), (max-width: 768px) {
	.tui-menu li.menu-item-has-children > a::after {
		content: none;
	}

	.tui-menu .sub-menu {
		display: block;
		position: static;
		min-width: 0;
		background: none;
		border: none;
		border-top: 1px dashed var(--linecolor);
		border-radius: 0;
		box-shadow: none;
	}

	.tui-menu .sub-menu a {
		padding-left: 2em;
	}
}

.tui-menu a,
.tui-menu button {
	display: block;
	width: 100%;
	appearance: none;
	background: none;
	border: none;
	padding: 0.5em 1em;
	color: var(--bodycolor);
	font-family: var(--tui-font);
	font-size: 1em;
	/* <button>'s own UA stylesheet line-height doesn't inherit the way
	   <a>'s does (same class of quirk as .tui-featured-menu-item's own
	   font-size fix elsewhere) — without this a button item's own
	   padding-bottom read visibly smaller than an <a> item's, despite
	   both having the exact same padding. body's own 1.6 (style.css, near
	   the top), not the generic "normal" keyword — that matched the two
	   to each other but at the button's own shorter height, not the
	   anchor's real (inherited, taller) one. */
	line-height: 1.6;
	text-align: left;
	cursor: pointer;
}

.tui-menu a::before,
.tui-menu button::before {
	/* No trailing space in the string itself — relied on for the visual
	   gap before, but a flex row (.tui-menu-item--with-shortcut, below)
	   turns this ::before into its own separate flex item, and a
	   trailing space at the edge of a flex item's own box isn't reliably
	   preserved the way it is in normal inline flow. An explicit margin
	   works identically either way, for every menu item here, not just
	   the one row that happens to be flex. */
	content: "›";
	margin-right: 0.3em;
	color: var(--midcolor);
}

/* A menu item with its own trailing keyboard-shortcut hint (e.g. Latest's
   own Alt+1, matching assets/js/shortcut-keys.js's real binding) — flex
   just for this row so the hint pins to the right, not the plain block
   layout every other .tui-menu a/button gets. .tui-menu a. prefix (not
   just the class alone) to outweigh .tui-menu a's own display: block on
   specificity, not just source order. Not justify-content: space-between
   — the ::before "› " marker (just above) is itself a flex item once
   this row becomes flex, so space-between put equal space around THAT
   too, shoving "Latest" away from it into the middle instead of pinning
   just the hint to the right. margin-left: auto on the hint itself
   (below) does only that, leaving the marker and label adjacent. */
.tui-menu a.tui-menu-item--with-shortcut,
.tui-menu button.tui-menu-item--with-shortcut {
	display: flex;
	align-items: center;
}

/* In a flex row (above) the count's <sup> is its own flex item: centred, and without the space before it. Put it back at the top,
   4px off the title, like the "new activity" dot below. */
.tui-menu a.tui-menu-item--with-shortcut > sup,
.tui-menu button.tui-menu-item--with-shortcut > sup {
	align-self: flex-start;
	margin-left: 4px;
	line-height: 1.6;
}

/* The "new activity" dot (main.js) sits 4px off the title. */
[data-window-type="activity"] > sup {
	margin-left: 4px;
}

.tui-menu-shortcut-hint {
	display: inline-block;
	margin-left: auto;
	padding: 0 5px;
	background: var(--shadecolor);
	color: var(--backgroundcolor);
	font-size: 0.80em;
}

/* Mobile classic — no physical Alt key, so these hints (site/account
   menu) are just noise there, per the user. .tui-classic-nav (body_class(),
   functions.php's own can_v7_classic_nav_body_class()) + the same <768px
   breakpoint used throughout this theme's own mobile rules, not just
   .tui-classic-nav alone — the keyboard shortcuts themselves still work
   on a desktop browser in classic mode, so the hints stay there. */
@media (max-width: 768px) {
	.tui-classic-nav .tui-menu-shortcut-hint {
		display: none;
	}
}

/* A menu row inverts under the pointer and for focus. On a classic page at phone width it inverts for keyboard focus only: a tap would flash
   the row inverted for the moment before the menu closes or the page changes (a tap fires :hover, and :focus too). */
@media (min-width: 769px) {
	.tui-menu a:hover,
	.tui-menu a:focus,
	.tui-menu button:hover,
	.tui-menu button:focus {
		background: var(--darkcolor);
		color: var(--backgroundcolor);
		outline: none;
	}
}
@media (max-width: 768px) {
	body:not(.tui-classic-nav) .tui-menu a:hover,
	body:not(.tui-classic-nav) .tui-menu a:focus,
	body:not(.tui-classic-nav) .tui-menu button:hover,
	body:not(.tui-classic-nav) .tui-menu button:focus {
		background: var(--darkcolor);
		color: var(--backgroundcolor);
		outline: none;
	}
}

@media (max-width: 768px) {
	.tui-classic-nav .tui-menu a:focus-visible,
	.tui-classic-nav .tui-menu button:focus-visible {
		background: var(--darkcolor);
		color: var(--backgroundcolor);
		outline: none;
	}
}

/* Alt+click on a titlebar fades every other window out (tui-window.js);
   transition on the base class too so the fade back in animates. */
.tui-window {
	transition: opacity 0.25s ease;
}

/* The site header, footer and the corner buttons on the right dim along with them (tui-window.js sets
   .tui-focus-mode on <html> while any window is faded). */
.site-header,
.site-footer,
.tui-corner-buttons,
#tui-activity-filters {
	transition: opacity 0.25s ease;
}

.tui-focus-mode .site-header,
.tui-focus-mode .site-footer,
.tui-focus-mode .tui-corner-buttons {
	opacity: 0.1;
}

/* The Activity sidebar sits outside the windows, so it hides outright, unless the Activity window itself is the one kept in focus. */
.tui-focus-mode:not(:has(.tui-window[data-content-type="activity"]:not(.tui-window--faded))) #tui-activity-filters {
	opacity: 0;
	pointer-events: none;
}

/* .tui-window.tui-window--faded, not the lone modifier class: the base
   .tui-window rule (further down) sets pointer-events: auto and would win
   on source order, leaving faded windows clickable. visibility: hidden
   (delayed until the fade finishes) also takes them out of the tab order. */
.tui-window.tui-window--faded {
	opacity: 0;
	pointer-events: none;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

/* Right click on a window's titlebar (tui-window.js): the same small menu look as the Constructor's right click menu. */
.tui-window-menu {
	position: fixed;
	z-index: 100000;
	min-width: 9em;
	display: flex;
	flex-direction: column;
	padding: 4px 0;
	background: var(--backgroundcolor);
	border: 1px solid var(--linecolor);
	border-radius: var(--tui-window-radius);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.tui-window-menu button {
	appearance: none;
	-webkit-appearance: none;
	background: none;
	border: none;
	border-radius: 0;
	box-shadow: none;
	color: var(--bodycolor);
	font: inherit;
	font-family: var(--tui-font);
	font-size: 0.8em;
	text-align: left;
	padding: 5px 12px;
	cursor: pointer;
}

.tui-window-menu button {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5em;
}

.tui-window-menu-icon {
	flex: none;
	width: 1em;
	height: 1em;
}

.tui-window-menu button:hover:not([aria-disabled="true"]),
.tui-window-menu button:focus-visible:not([aria-disabled="true"]) {
	background: var(--shadecolor);
	color: var(--darkcolor);
	outline: none;
}

.tui-window-menu button[aria-disabled="true"] {
	opacity: 0.4;
	cursor: default;
}

/* Menu items only meaningful with the window engine (e.g. Featured). */
html[data-classic-nav="1"] .tui-menu-item--window-only {
	display: none;
}

/* Constructor mode is for a desktop screen. */
@media (max-width: 768px) {
	.tui-menu-item--desktop-only {
		display: none;
	}
}

/* Classic mode: flat menus, no shadow or rounding (incl. the hover corners below). */
/* Alt held with the main or user menu open (main.js syncAltReplace()): the item for the selected window, which an Alt-click
   would replace, is dimmed. */
#site-menu a.is-current-window,
#account-menu a.is-current-window {
	opacity: 0.5;
}

.tui-classic-nav .tui-menu {
	top: calc(100% + 6px + 0.5em); /* 0.5em lower than windows mode */
	border-radius: 0;
	box-shadow: none;
}

/* Classic mode's menus are square with no shadow; so are their submenus. */
.tui-classic-nav .tui-menu .sub-menu {
	border-radius: 0;
	box-shadow: none;
}

/* First link inside the first <li> of the first list */
.tui-menu ul:first-of-type li:first-child a:hover {
	border-top-left-radius: var(--tui-window-radius);
	border-top-right-radius: var(--tui-window-radius);
}

/* Last link inside the last <li> of the last list */
.tui-menu ul:last-of-type li:last-child a:hover {
	border-bottom-left-radius: var(--tui-window-radius);
	border-bottom-right-radius: var(--tui-window-radius);
}

.tui-classic-nav .tui-menu ul:first-of-type li:first-child a:hover,
.tui-classic-nav .tui-menu ul:last-of-type li:last-child a:hover {
	border-radius: 0;
}

@media (min-width: 769px) {
	.tui-menu a:hover::before,
	.tui-menu a:focus::before,
	.tui-menu button:hover::before,
	.tui-menu button:focus::before {
		color: var(--backgroundcolor);
	}
}
@media (max-width: 768px) {
	body:not(.tui-classic-nav) .tui-menu a:hover::before,
	body:not(.tui-classic-nav) .tui-menu a:focus::before,
	body:not(.tui-classic-nav) .tui-menu button:hover::before,
	body:not(.tui-classic-nav) .tui-menu button:focus::before {
		color: var(--backgroundcolor);
	}
}

@media (max-width: 768px) {
	.tui-classic-nav .tui-menu a:focus-visible::before,
	.tui-classic-nav .tui-menu button:focus-visible::before {
		color: var(--backgroundcolor);
	}
}

/* The shortcut hint's own normal colors (background: shadecolor, a light
   tint) are meant to read against the row's own normal background —
   inverted here so it still stands out once the row's hover state swaps
   to a dark background instead. */
@media (min-width: 769px) {
	.tui-menu a:hover .tui-menu-shortcut-hint,
	.tui-menu a:focus .tui-menu-shortcut-hint,
	.tui-menu button:hover .tui-menu-shortcut-hint,
	.tui-menu button:focus .tui-menu-shortcut-hint {
		background: var(--darkcolor);
		color: var(--shadecolor);
	}
}
@media (max-width: 768px) {
	body:not(.tui-classic-nav) .tui-menu a:hover .tui-menu-shortcut-hint,
	body:not(.tui-classic-nav) .tui-menu a:focus .tui-menu-shortcut-hint,
	body:not(.tui-classic-nav) .tui-menu button:hover .tui-menu-shortcut-hint,
	body:not(.tui-classic-nav) .tui-menu button:focus .tui-menu-shortcut-hint {
		background: var(--darkcolor);
		color: var(--shadecolor);
	}
}

@media (max-width: 768px) {
	.tui-classic-nav .tui-menu a:focus-visible .tui-menu-shortcut-hint,
	.tui-classic-nav .tui-menu button:focus-visible .tui-menu-shortcut-hint {
		background: var(--darkcolor);
		color: var(--shadecolor);
	}
}

/* Every mode and width: a menu item with a submenu slides the whole menu to the left and the submenu comes in from the right (the user
   menu, which hangs off the right edge, the other way round; main.js, createMenuSlider()). The track holds the menu's own lists; each submenu sits just to its right (the track is its containing
   block, the items in between stay static), and the menu's height follows the panel on show. */
.tui-menu:has(> .tui-menu-track) {
	overflow: hidden; /* only a menu that has submenus (the Mentions popup has none and keeps its own overflow) */
	transition: height 0.25s ease;
}

.tui-menu-track {
	position: relative;
	transition: transform 0.25s ease;
	transform: translateX(calc(-100% * var(--tui-menu-depth, 0)));
}

.tui-menu li.menu-item-has-children {
	position: static;
}

.tui-menu li.menu-item-has-children > a::after {
	content: "\203A";
	float: right;
	margin-left: 1em;
}

.tui-menu .sub-menu {
	display: block; /* the hover flyout of the desktop menu is replaced by the slide */
	position: absolute;
	top: 0;
	left: 100%;
	width: 100%;
	min-width: 0;
	background: var(--backgroundcolor);
	border: none;
	visibility: hidden;
	transition: visibility 0s 0.25s; /* stays until the slide back has finished */
}

.tui-menu li.is-open > .sub-menu {
	visibility: visible;
	transition-delay: 0s;
}

.tui-menu .sub-menu a {
	padding-left: 1em;
}

.tui-menu .tui-menu-back button::before {
	content: "\2039";
}

/* The user menu is anchored to the right edge of the screen, so it slides to the right and its submenus come in from the left. */
#account-menu .tui-menu-track {
	transform: translateX(calc(100% * var(--tui-menu-depth, 0)));
}

#account-menu .sub-menu {
	left: auto;
	right: 100%;
}

#account-menu .tui-menu-back button::before {
	content: "\203A";
}

@media (prefers-reduced-motion: reduce) {
	.tui-menu:has(> .tui-menu-track),
	.tui-menu-track {
		transition: none;
	}
}

/* A tapped menu row stays dark on a phone (main.js adds .is-pressed) so it's clear the page is loading. */
@media (max-width: 768px) {
	.tui-menu a.is-pressed,
	.tui-menu button.is-pressed {
		background: var(--darkcolor);
		color: var(--backgroundcolor);
		outline: none;
	}

	.tui-menu a.is-pressed::before,
	.tui-menu button.is-pressed::before {
		color: var(--backgroundcolor);
	}

	.tui-menu a.is-pressed .tui-menu-shortcut-hint,
	.tui-menu button.is-pressed .tui-menu-shortcut-hint {
		background: var(--darkcolor);
		color: var(--shadecolor);
	}
}

/* The down state of a tap on a classic page at phone width: a link goes dark, and a menu row inverts, only while the finger is on it
   (they have no hover state there, see above). */
@media (max-width: 768px) {
	.tui-classic-nav a:active {
		color: var(--darkcolor);
	}

	.tui-classic-nav .tui-menu a:active,
	.tui-classic-nav .tui-menu button:active {
		background: var(--darkcolor);
		color: var(--backgroundcolor);
	}

	.tui-classic-nav .tui-menu a:active::before,
	.tui-classic-nav .tui-menu button:active::before {
		color: var(--backgroundcolor);
	}

	.tui-classic-nav .tui-menu a:active .tui-menu-shortcut-hint,
	.tui-classic-nav .tui-menu button:active .tui-menu-shortcut-hint {
		background: var(--darkcolor);
		color: var(--shadecolor);
	}
}

/* -----------------------------------------------------------------------
   Boxed "window" panels — used for the main content area and each post
   ----------------------------------------------------------------------- */

.tui-box {
	position: relative;
	border: 1px solid var(--linecolor);
	background: var(--backgroundcoloralt);
	padding: 20px;
	margin-bottom: 20px;
}

.tui-box-title {
	position: absolute;
	top: -11px;
	left: 14px;
	background: var(--backgroundcolor);
	padding: 0 8px;
	color: var(--darkcolor);
	font-size: 0.80em;
	letter-spacing: 0.02em;
}

.tui-box-title .tui-dot {
	display: inline-block;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	margin-right: 5px;
	background: var(--tui-red);
	box-shadow: 10px 0 0 var(--tui-amber), 20px 0 0 var(--darkcolor);
}

/* -----------------------------------------------------------------------
   Posts
   ----------------------------------------------------------------------- */

.site-main {
	display: block;
}

.entry-header {
	margin-bottom: 1em;
}

.entry-title {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
	margin: 0;
	font-size: 1.05em;
}

/* Edit link (admins) + bookmark, grouped so they sit together at the
   title's right edge. */
.tui-entry-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 0 0 auto;
}

.entry-title a {
	color: var(--darkcolor);
}

.entry-title a:hover,
.entry-title a:focus {
	background: none;
	color: var(--darkcolor);
}

.entry-meta {
	color: var(--midcolor);
	font-size: 0.80em;
	margin-bottom: 12px;
}

/* Content/wide/full width system — same technique WordPress's own
   default block themes use. Normal content is centered and capped at
   800px; .alignwide gets a fixed extra margin on each side (so it scales
   with however wide the container actually is, staying between content
   and full width); .alignfull runs edge-to-edge. */
/* Changelog window (inc/window-handlers/changelog.php) — reuses
   .entry-content's own prose styling wholesale, just smaller: same
   "caption" size as .entry-content figcaption/.wp-caption-text
   elsewhere in this theme, since this is read-only technical changelog
   text, not article body copy. */
.tui-changelog {
	font-size: 0.80em;
}

.entry-content {
	color: var(--bodycolor);
	display: grid;
	grid-template-columns:
		[full-start] minmax(0, 1fr)
		[wide-start] minmax(0, var(--tui-content-wide-extra))
		[content-start] min(var(--tui-content-width), 100%)
		[content-end] minmax(0, var(--tui-content-wide-extra))
		[wide-end] minmax(0, 1fr)
		[full-end];
}

.entry-content > * {
	grid-column: content;
}

.entry-content p {
	margin-top: 0.5em;
	margin-bottom: 0.5em;
}

.entry-content > .alignwide {
	grid-column: wide;
	max-width: none;
}

.entry-content > .alignfull {
	grid-column: full;
	max-width: none;
	/* Also bleeds past .entry-content's own container padding (a window
	   body or a .tui-box), reaching the true edge, not just this grid's
	   own "full" column. */
	width: calc(100% + 2em);
	margin-left: -1em;
	margin-right: -1em;
	margin-top: 1em;
	margin-bottom: 1em;
}

.entry-content p:last-child {
	margin-bottom: 0;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
	margin: 1em 0 0.6em;
}

.entry-content h6 {
	font-size: 1.1em;
	margin-top: -0.5em;
}

.entry-content ul,
.entry-content ol {
	margin: 0 0 1em;
	padding-left: 1.4em;
}

.entry-content ul {
	list-style: none;
	padding-left: 1.2em;
}

.entry-content ul > li {
	position: relative;
}

.entry-content ul > li::before {
	content: "›";
	position: absolute;
	left: -1.2em;
	color: var(--darkcolor);
}

.entry-content ol {
	list-style: none;
	counter-reset: tui-ol;
}

.entry-content ol > li {
	counter-increment: tui-ol;
	position: relative;
}

.entry-content ol > li::before {
	content: counter(tui-ol) ".";
	position: absolute;
	left: -1.6em;
	width: 1.2em;
	text-align: right;
	color: var(--tui-amber);
}

.entry-content li {
	margin-bottom: 0.35em;
}

.entry-content strong {
	color: var(--darkcolor);
	font-weight: normal;
}

.entry-content em {
	color: var(--bodycolor);
	font-style: italic;
}

.entry-content blockquote {
	margin: 0.5em 0;
	padding: 0.25em 1em;
	border-left: 3px solid var(--darkcolor);
	color: var(--bodycolor);
}

.entry-content blockquote p:first-child {
	margin-top: 0;
}

/* Only when a <cite> actually follows — no gap to reserve otherwise. */
.entry-content blockquote p:last-of-type:has(+ cite) {
	margin-bottom: 1.5em;
}

.entry-content blockquote p:first-child::before {
	content: "\201C";
}

/* :last-of-type, not :last-child — a default-style quote can have a
   trailing <cite> after the <p>, which would otherwise be the actual
   last child and stop this from ever matching. */
.entry-content blockquote p:last-of-type::after {
	content: "\201D";
}

.entry-content blockquote cite {
	/* Absolute against the theme's own base size, not em (which would
	   compound with blockquote.is-style-plain's own larger font-size
	   below and end up bigger than an actual caption). */
	font-size: calc(var(--tui-font-size) * 0.85);
	font-style: normal;
	/* Stay on the theme's own font — don't inherit is-style-plain's
	   Georgia/italic treatment below. */
	font-family: var(--tui-font);
}

/* WP core's Quote block "Plain" style variation (is-style-plain) —
   "Default" (no extra class) is covered by .entry-content blockquote
   above and stays as-is. */
.entry-content blockquote.is-style-plain {
	text-align: center;
	font-size: var(--wp--preset--font-size--x-large);
	/* Matches CANV6's own is-style-plain treatment. */
	font-family: Georgia, "Times New Roman", Times, serif;
	font-style: italic;
	border-left: none;
	border-top: 1px solid var(--linecolor);
	border-bottom: 1px solid var(--linecolor);
	padding: 1em 1.5em;
}

/* Classic mobile: the large quote gets no side padding, so the text uses the full width, and a smaller size (1.35em). */
@media (max-width: 768px) {
	.tui-classic-page .entry-content blockquote.is-style-plain {
		padding-left: 0;
		padding-right: 0;
		font-size: 1.35em;
	}
}

.entry-content code {
	font-family: var(--tui-mono-font);
	background: var(--shadecolor);
	color: var(--codecolor);
}

.entry-content pre {
	background: var(--backgroundcolor);
	border: 1px solid var(--linecolor);
	padding: 14px 16px;
	overflow-x: auto;
	margin: 1.2em 0;
}

.entry-content pre code {
	border: none;
	padding: 0;
	background: none;
}

.entry-content hr {
	border: none;
	border-top: 1px dashed var(--linecolor);
	margin: 1.0em 0;
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.2em 0;
}

.entry-content thead {
	border: none;
}

.entry-content th,
.entry-content td {
	border: 1px solid var(--linecolor);
	padding: 0.5em 0.5em;
	text-align: left;
	vertical-align: top;
}

.entry-content th {
	color: var(--darkcolor);
	background: var(--backgroundcolor);
}

/* WP core Buttons block ([wp:buttons]/[wp:button]) — no theme.json in this
   theme, so without this, core's own block-library default (rounded,
   generic dark-grey fill) leaks through unstyled. Default/"fill" style
   uses the same inverted body/background look this theme already uses
   elsewhere for an emphasized/active state (.can-top-tab.active,
   save-toggle, ...); "outline" matches .tui-login's own submit button.
   Selectors match core's own structure (.wp-block-button.is-style-outline
   > .wp-block-button__link) so specificity reliably wins over its CSS. */
.entry-content .wp-block-buttons {
	margin: 1em 0;
}

.entry-content .wp-block-button .wp-block-button__link,
.entry-content .wp-block-button .wp-element-button {
	border-radius: 0;
	background: var(--bodycolor);
	color: var(--backgroundcolor);
	font-family: var(--tui-font);
	border: 1px solid var(--bodycolor);
	text-decoration: none;
}

.entry-content .wp-block-button .wp-block-button__link:hover,
.entry-content .wp-block-button .wp-block-button__link:focus,
.entry-content .wp-block-button .wp-element-button:hover,
.entry-content .wp-block-button .wp-element-button:focus {
	background: var(--darkcolor);
	border-color: var(--darkcolor);
	color: var(--backgroundcolor);
}

.entry-content .wp-block-button.is-style-outline .wp-block-button__link,
.entry-content .wp-block-button.is-style-outline .wp-element-button {
	background: none;
	color: var(--bodycolor);
	border-width: 1px;
	border-color: var(--linecolor);
}

.entry-content .wp-block-button.is-style-outline .wp-block-button__link:hover,
.entry-content .wp-block-button.is-style-outline .wp-block-button__link:focus,
.entry-content .wp-block-button.is-style-outline .wp-element-button:hover,
.entry-content .wp-block-button.is-style-outline .wp-element-button:focus {
	background: var(--shadecolor);
	border-color: var(--linecolor);
	color: var(--bodycolor);
}

/* A button given the "highlight" class in the editor (e.g. "Join our Community"): solid --midcolor with --backgroundcolor text,
   whatever the block style. Same specificity as the outline rules above, and later, so it wins; the hover goes to the
   shade colour, as on the Contact Form 7 button. */
.wp-block-button.highlight .wp-block-button__link,
.wp-block-button.highlight .wp-element-button,
.wp-block-button.is-style-outline.highlight .wp-block-button__link,
.wp-block-button.is-style-outline.highlight .wp-element-button {
	background: var(--midcolor);
	border-color: var(--midcolor);
	color: var(--backgroundcolor);
}

.wp-block-button.highlight .wp-block-button__link:hover,
.wp-block-button.highlight .wp-block-button__link:focus,
.wp-block-button.highlight .wp-element-button:hover,
.wp-block-button.highlight .wp-element-button:focus,
.wp-block-button.is-style-outline.highlight .wp-block-button__link:hover,
.wp-block-button.is-style-outline.highlight .wp-block-button__link:focus,
.wp-block-button.is-style-outline.highlight .wp-element-button:hover,
.wp-block-button.is-style-outline.highlight .wp-element-button:focus {
	background: var(--shadecolor);
	border-color: var(--shadecolor);
	color: var(--bodycolor);
}

/* Contact Form 7 (wp-content/plugins/contact-form-7) — [contact-form-7]
   shortcode, e.g. the "Add Job" page's Job Submission form. The plugin
   ships no real styling of its own (a handful of layout-only rules), so
   this is a from-scratch skin, not a port — no rounded corners anywhere,
   and a field is just an underline (border-bottom), not a boxed input,
   matching this theme's plain/typed-in TUI look rather than a form-app
   look. */

/* Spacing like Profile's and Submit's own forms (.tui-profile-field: 14px under a field, the label then a gap of 0.5em of its own small size above
   the field), whichever way the form was written: <p><label>Name</label><br>[field]</p> (the Add Job form) or <p><label>Name<br>[field]</label></p>
   (Advertise and most others). The line break is not used (the gap below is), and the field's wrapper is given a size of its own so a field inside
   a small label is not small. (Before, the label pulled the next paragraph up by 1.5em, which suited only the first way.) */
.wpcf7-form label {
	display: block;
	margin: 0;
	color: var(--darkcolor);
	font-size: 0.80em;
	letter-spacing: 0.04em;
}

.wpcf7-form p {
	margin: 0 0 14px;
}

.wpcf7-form br {
	display: none;
}

.wpcf7-form-control-wrap {
	display: block;
	margin-top: 0.4em; /* = the label's 0.5em at its 0.80em size */
	font-size: 1em;
	letter-spacing: normal;
}

/* (inside a label the wrapper starts from the label's small size: back to the page's) */
.wpcf7-form label .wpcf7-form-control-wrap {
	font-size: 1.25em;
}

.wpcf7-form-control {
	appearance: none;
	background: none;
	border: none;
	border-radius: 0;
	border: 1px solid var(--linecolor);
	color: var(--bodycolor);
	font-family: var(--tui-font);
	font-size: 1em;
	padding: 6px 2px;
	width: 100%;
	box-sizing: border-box;
}

.wpcf7-form-control:focus {
	outline: none;
	border-left-color: var(--darkcolor);
}

.wpcf7-form-control::placeholder {
	color: var(--bodycolor);
	opacity: 0.5;
}

textarea.wpcf7-form-control {
	resize: vertical;
}

/* File upload (e.g. the Job Submission form's banner/projectbanner fields)
   — same ::file-selector-button treatment as .tui-settings-bg's own file
   input (background-image upload), not the underline every other field
   above gets, since a file input's real control is the button, not the
   filename text next to it. */
input[type="file"].wpcf7-form-control {
	border: none;
	padding: 0;
}

input[type="file"].wpcf7-form-control::file-selector-button {
	appearance: none;
	background: none;
	border: 1px solid var(--linecolor);
	border-radius: 0;
	color: var(--bodycolor);
	font-family: var(--tui-font);
	font-size: 1em;
	padding: 5px 14px;
	margin-right: 10px;
	cursor: pointer;
}

input[type="file"].wpcf7-form-control::file-selector-button:hover,
input[type="file"].wpcf7-form-control::file-selector-button:focus {
	background: var(--shadecolor);
	outline: none;
}

/* Dropdown — appearance:none strips the native box (rounded corners in
   most browsers included), so the only chrome left is the same
   border-bottom underline every other field gets. A CSS-only chevron
   replaces the native one, drawn with the same --bodycolor every other
   piece of theme chrome uses, so it doesn't inherit a stray native-widget
   color in either light or dark presets. */
select.wpcf7-form-control {
	padding-right: 20px;
	background-image: linear-gradient(45deg, transparent 50%, var(--bodycolor) 50%),
		linear-gradient(135deg, var(--bodycolor) 50%, transparent 50%);
	background-position:
		calc(100% - 12px) center,
		calc(100% - 7px) center;
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
	cursor: pointer;
}

select.wpcf7-form-control option {
	background: var(--backgroundcolor);
	color: var(--bodycolor);
}

.wpcf7-form input[type="checkbox"],
.wpcf7-form input[type="radio"] {
	accent-color: var(--bodycolor);
}

/* The Buttons block's outline style (.is-style-outline, above) with a --midcolor fill and no border, --shadecolor on hover. */
.wpcf7-form input[type="submit"],
.wpcf7-form .wpcf7-submit {
	appearance: none;
	box-sizing: border-box;
	width: auto;
	background: var(--midcolor);
	border: none;
	border-radius: 0;
	color: var(--backgroundcolor);
	font-family: var(--tui-font);
	font-size: 1em;
	line-height: inherit;
	padding: calc(0.667em + 2px) calc(1.333em + 2px);
	margin: 1em 0;
	cursor: pointer;
}

.wpcf7-form input[type="submit"]:hover,
.wpcf7-form input[type="submit"]:focus,
.wpcf7-form .wpcf7-submit:hover,
.wpcf7-form .wpcf7-submit:focus {
	background: var(--shadecolor);
	color: var(--bodycolor);
	outline: none;
}

.wpcf7-not-valid-tip {
	color: #ef4444;
	font-size: 0.80em;
	margin-top: 2px;
}

.wpcf7-response-output {
	border: 1px solid var(--linecolor);
	color: var(--bodycolor);
	padding: 8px 10px;
	margin: 1.2em 0 0;
}

/* WP core Accordion block — .wp-block-accordion > .wp-block-accordion-item
   > .wp-block-accordion-heading > button.…__toggle (title + a literal "+"
   icon glyph, core's own CSS rotates it 45deg on .is-open) > .…-panel.
   Core supplies the open/close behavior and icon rotation; this just skins
   it TUI-style — a box-drawn list rather than the block's own default
   "faint divider" look. */
.entry-content .wp-block-accordion {
	border-top: 1px dashed var(--linecolor);
}

/* Question after question (each is a block of its own): one line between rows, not a row's bottom line and the next one's top line
   side by side as a double. */
.entry-content .wp-block-accordion + .wp-block-accordion {
	border-top: none;
}

.entry-content .wp-block-accordion-item {
	border-bottom: 1px dashed var(--linecolor);
	padding: 0; /* (the Help page's own style block gives its rows 0.5em above and below and 1em each side, on top of the title's own padding) */
}

/* The Help page (page 126697) only: its section titles (Signing In, Account, V7...) have no space above or below, so the first question
   sits right under its title. */
.tui-window[data-content-type="page"][data-content-id="126697"] .entry-content h2.wp-block-heading,
.page-id-126697 .entry-content h2.wp-block-heading {
	margin-top: 0;
	margin-bottom: 0;
}

.entry-content .wp-block-accordion-heading {
	margin: 0;
	font-size: 1em; /* a question is the normal text size (a button would otherwise use its own, smaller one) */
}

.entry-content .wp-block-accordion-heading__toggle {
	font-size: 1em;
	color: var(--bodycolor);
	padding: 0.45em 0.2em;
}

.entry-content .wp-block-accordion-heading__toggle:hover,
.entry-content .wp-block-accordion-heading__toggle:focus-visible {
	color: var(--darkcolor);
}

.entry-content .wp-block-accordion-heading__toggle-title {
	text-decoration: none !important; /* core underlines this on hover; the row's own hover background is enough */
}

.entry-content .wp-block-accordion-heading__toggle-icon {
	color: var(--midcolor);
	font-size: 1.2em;
	line-height: 1;
}

.entry-content .wp-block-accordion-item.is-open .wp-block-accordion-heading__toggle-icon {
	color: var(--darkcolor);
}

.entry-content .wp-block-accordion-panel {
	padding: 0 0.2em 0.5em;
	color: var(--bodycolor);
}

.entry-content img {
	max-width: 100%;
	height: auto;
}

/* Old posts (pre-"Featured Image" convention) often open their own
   content with a manually-inserted copy of the same hero image already
   shown above as .tui-window-thumb — duplicating it right at the top of
   the article body too. Hidden here rather than stripped from the actual
   post_content (a content edit, not a styling one) — only when it's the
   very first thing and nothing else shares its paragraph/link (an
   :only-child image mixed into real surrounding text stays visible; this
   only ever targets a standalone lead image). Covers every shape that
   pattern actually takes in practice: a <p> wrapping a linked image, a
   <p> wrapping a bare image, or no <p> at all (image/link as the literal
   first child). */
.entry-content > p:first-child:has(> a:only-child > img:only-child),
.entry-content > p:first-child:has(> img:only-child),
.entry-content > a:first-child:has(> img:only-child),
.entry-content > img:first-child {
	display: none;
}

/* Old Flash embeds (<object classid="clsid:d27cdb6e-..."> + its own
   <embed type="application/x-shockwave-flash"> fallback) — Flickr's old
   native video player (flickr.com/apps/video/*.swf) is the one actually
   seen in CAN's older posts, but this classid/embed-type pair is the
   generic Flash-plugin signature regardless of host, not something
   Flickr-specific to match on. Flash hasn't run in any browser since
   2020/2021 either way, so there's no live content behind any of this
   markup to size/restyle — it only ever renders as an empty broken-
   plugin box. Hidden outright, same reasoning as the duplicate lead
   image above. Never matches modern content — this theme/WP core's own
   block editor has no path that emits a raw <object>/<embed> for
   anything. */
.entry-content object,
.entry-content embed {
	display: none;
}

/* --imagefilter (theme-driven, e.g. inverted for dark presets) is only
   for diagram/schematic images, not real photos — opt in with .diagram.
   A plain ".diagram img" descendant match, not img.diagram/figure.diagram
   specifically — the block editor doesn't consistently put that class in
   the same spot: usually the <figure> wrapper, sometimes the <img>
   itself, and sometimes a <div class="wp-block-image diagram"> wrapping
   the figure (one level further out again) depending on the editor
   version/how the image was resized — matching generically on any
   ancestor covers all of those instead of enumerating each one. Same
   story for the featured-image wrapper (.tui-window-thumb), and the
   listing window group's grid/list thumbnails (.tui-grid-thumb/
   .tui-list-thumb) — same THUMB=diagram convention, set in functions.php
   and template-parts/post/content-grid.php/content-list.php
   respectively. */
.entry-content .diagram img,
.tui-window-thumb.diagram img,
.tui-grid-thumb.diagram img,
.tui-list-thumb.diagram img,
.tui-project-panel-thumb.diagram img {
	filter: var(--imagefilter);
}

/* Embed blocks (Vimeo, YouTube, etc.) — the iframe carries fixed
   width/height HTML attributes from WP, which native aspect-ratio
   overrides cleanly without depending on core's older padding-hack
   wrapper CSS. Alignment (.alignwide/.alignfull) already works via the
   generic .entry-content > * grid rules above, since this is a normal
   direct child. */
.entry-content .wp-block-embed {
	/* Longhand on purpose — an alignfull embed also gets negative
	   left/right margins from the .alignfull rule below; a "margin: 1.2em
	   0" shorthand here would win the horizontal properties (later,
	   same specificity) and cancel that bleed. */
	margin-top: 1em;
	margin-bottom: 0.5em;
}

.entry-content .wp-block-embed__wrapper iframe {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9; /* sensible default; overridden below when WP knows better */
}

/* Old posts' own bare <iframe src="//player.vimeo.com/..." width="640"
   height="360" ...> — dropped straight into content pre-oEmbed-block era,
   no .wp-block-embed__wrapper around it at all, so the rule above never
   matches these. Turns out an <iframe>'s own width/height HTML attributes
   do NOT establish a usable intrinsic ratio the way an <img>'s real pixel
   dimensions do — plain height: auto collapsed it to the browser's own
   small default iframe height instead of scaling with the width, making
   it noticeably smaller, not bigger. Same pragmatic 16/9 fallback as the
   block-embed rule above instead — old Vimeo/YouTube embeds from that
   era are overwhelmingly 16:9 anyway. */
.entry-content iframe {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
}

.entry-content .wp-embed-aspect-4-3 .wp-block-embed__wrapper iframe {
	aspect-ratio: 4 / 3;
}

.entry-content .wp-embed-aspect-1-1 .wp-block-embed__wrapper iframe {
	aspect-ratio: 1 / 1;
}

.entry-content .wp-embed-aspect-9-16 .wp-block-embed__wrapper iframe {
	aspect-ratio: 9 / 16;
}

.entry-content .wp-embed-aspect-21-9 .wp-block-embed__wrapper iframe {
	aspect-ratio: 21 / 9;
}

/* Gallery blocks — WordPress's own flex-based columns grid (columns-N,
   set per-block in the editor) handles the layout mechanics; this just
   fits it into our look. */
.entry-content .wp-block-gallery {
	/* Longhand on purpose — see the same note on .wp-block-embed above. */
	margin-top: 1em;
	margin-bottom: 1em;
}

.entry-content .wp-block-gallery .wp-block-image {
	margin: 0;
}

.entry-content .wp-block-gallery img {
	display: block;
	width: 100%;
	height: auto;
	border: none; /* a border per tile gets busy in a tight grid */
	cursor: pointer;
}

/* Any content image, wired up by main.js's wireContentImages() to open
   in a lightbox window. width: 100% (not just max-width, the generic
   .entry-content img rule above) so an image smaller than the content
   column — e.g. an old post's own 640px upload, well under the ~800px
   column — actually fills it instead of rendering at its native size;
   max-width alone only ever caps an image down, never stretches one up.
   Standalone images only: a gallery/.wp-block-gallery image's own more
   specific rule (further up/down) still wins for 100%-of-its-own-grid-
   cell instead, same tied specificity resolved by source order. */
.entry-content img[class*="wp-image-"] {
	width: 100%;
	cursor: pointer;
}

/* Some old posts' own .wp-block-image figures carry an <img> with no
   wp-image-{ID} class at all (unlike a normal block image) — the rule
   above never matches those, so they were still only capped by the
   generic .entry-content img rule's own max-width, not stretched up to
   fill the column the same way. No cursor: pointer here — without that
   class, wireContentImages() (main.js) has no attachment id to wire a
   lightbox click to, so this genuinely isn't clickable, unlike the rule
   above. */
.entry-content .wp-block-image img {
	width: 100%;
}

/* An aligned image and the paragraph after it (can_v7_wrap_floated_images()): a block of their own, so the image's float
   makes the text wrap around it. */
.tui-float-wrap {
	display: flow-root;
}

/* The pre-block-editor [gallery] shortcode's own markup — a flat
   <div class="gallery gallery-columns-N"> of <figure class="gallery-item">
   (WP core's own legacy gallery.php template, never touched by this
   theme) — same flex/no-border/full-width-tile look as .wp-block-gallery
   above, just reimplemented for this older structure instead of relying
   on WP core's own bundled (dated-looking) default gallery CSS, per the
   user: some of CAN's older imported posts still use this, not the block
   editor's own gallery. WP core supports gallery-columns-1 through -9;
   width here is 100%/N minus its share of this row's own gap, same
   percentage math core's own CSS uses, just against our own 0.5em gap
   instead of its bundled 4.35% default. */
.entry-content .gallery {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	margin: 0.5em 0;
}

.entry-content .gallery-item {
	margin: 0;
}

.entry-content .gallery-columns-1 .gallery-item { width: 100%; }
.entry-content .gallery-columns-2 .gallery-item { width: calc((100% - 0.5em * 1) / 2); }
.entry-content .gallery-columns-3 .gallery-item { width: calc((100% - 0.5em * 2) / 3); }
.entry-content .gallery-columns-4 .gallery-item { width: calc((100% - 0.5em * 3) / 4); }
.entry-content .gallery-columns-5 .gallery-item { width: calc((100% - 0.5em * 4) / 5); }
.entry-content .gallery-columns-6 .gallery-item { width: calc((100% - 0.5em * 5) / 6); }
.entry-content .gallery-columns-7 .gallery-item { width: calc((100% - 0.5em * 6) / 7); }
.entry-content .gallery-columns-8 .gallery-item { width: calc((100% - 0.5em * 7) / 8); }
.entry-content .gallery-columns-9 .gallery-item { width: calc((100% - 0.5em * 8) / 9); }

.entry-content .gallery-icon {
	line-height: 0;
}

.entry-content .gallery-icon img {
	display: block;
	width: 100%;
	height: auto;
	border: none;
	cursor: pointer;
}

.entry-content .gallery-caption {
	font-size: 0.80em;
	color: var(--bodycolor);
	margin-top: 6px;
}

/* Image/gallery captions — modern block markup (figcaption) and the
   older classic-editor markup (.wp-caption-text) both covered. */
.entry-content figcaption,
.entry-content .wp-caption-text,
figcaption.wp-element-caption {
	font-size: 0.80em;
	color: var(--bodycolor);
	margin-top: 1em;
}

/* WordPress sets 13px on a gallery image's caption with a more specific selector than the rule above. */
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
	font-size: 0.80em;
}

/* A gallery's caption is a flex item of the gallery, so the gallery's own row gap is added on top of its margin: it
   needs less margin than an image's caption to look the same. */
.entry-content .wp-block-gallery > .blocks-gallery-caption {
	margin-top: 0.5em;
}

/* The caption of a wide or full width image or gallery lines up with the body text, not the edge of the block: it is
   centred at the body's width, left aligned inside it. A full width block bleeds 1em past the body each side (so the
   caption gives that up), except in classic, where the block has its own 1em padding. */
.entry-content > .alignwide > figcaption,
.entry-content > .alignwide > .wp-element-caption,
.entry-content > .alignwide > .blocks-gallery-caption {
	max-width: min(var(--tui-content-width), 100%);
	margin-left: auto;
	margin-right: auto;
	text-align: left;
}

.entry-content > .alignfull > figcaption,
.entry-content > .alignfull > .wp-element-caption,
.entry-content > .alignfull > .blocks-gallery-caption {
	max-width: min(var(--tui-content-width), calc(100% - 2em));
	margin-left: auto;
	margin-right: auto;
	text-align: left;
}

.tui-classic-page .entry-content > .alignfull > figcaption,
.tui-classic-page .entry-content > .alignfull > .wp-element-caption,
.tui-classic-page .entry-content > .alignfull > .blocks-gallery-caption {
	max-width: min(var(--tui-content-width), 100%);
}

/* WP core's own "Small" typography setting in the block editor — same
   size/color treatment, overriding its 13px core fallback with our
   em-based sizing so it scales with --tui-font-size too. No margin here
   since this can land on inline text, not just block-level captions. */
.entry-content .has-small-font-size {
	/* font-size comes from WP core's own rule now that
	   --wp--preset--font-size--small is defined (see :root). */
	color: var(--bodycolor);
}

/* NFT blocks (blocks/block-nft.php, block-nft-v2.php — the can-blocks
   plugin's can-blocks/nft and can-blocks/nft-v2). Ported from CANV6's
   style.css (same class/id names, since the block templates themselves
   were ported verbatim), with two changes: the hardcoded
   "JetBrainsMono-Light"/"-Medium" font-family declarations were dropped
   in favor of this theme's own var(--tui-font) (colors already used the
   same --bodycolor/--backgroundcolor/--linecolor variables this theme
   uses too); and CANV6's edge-to-edge "bleed" trick on .nftiframe/
   .nftimage/.nftvideo/.nftiframeratio* (width: calc(100% + 2em);
   margin-left: -1em) was dropped — it compensated for that theme's
   .entry-content having a flat 1em padding box, which this theme's
   .entry-content (a CSS grid with a sized content column, no padding to
   bleed past) doesn't have; kept in, it just added a stray ~1em
   indent/overhang instead of bleeding anything. */
.nftiframe iframe,
.nftimage a img,
.nftvideo a video,
.nftiframeratio1x1 iframe,
.nftiframeratio4x3 iframe,
.nftiframeratio16x9 iframe {
	margin-bottom: -0.4em;
	height: 100%;
	width: 100%;
}

#nftdata li,
#ipfsdata li {
	list-style: none;
}

#nftdata,
#ipfsdata {
	font-family: var(--tui-font);
	font-size: 0.80em;
	margin-bottom: 1em;
}

#nftdata li a,
#ipfsdata li a {
	font-family: var(--tui-font);
}

#nftdata li a:hover {
	background-color: var(--bodycolor) !important;
	color: var(--backgroundcolor) !important;
}

.nftiframe,
.nftimage {
	aspect-ratio: 1 / 1;
}

/* Edge-to-edge, same convention as .entry-content > .alignfull above (and
   .tui-window-thumb's own -1em bleed for the real featured image) —
   reaches the true window edge, not just this grid's own "content" column. */
.entry-content > .nftiframe,
.entry-content > .nftimage,
.entry-content > .nftvideo,
.entry-content > .nftiframeratio1x1,
.entry-content > .nftiframeratio4x3,
.entry-content > .nftiframeratio16x9 {
	grid-column: full;
	max-width: none;
	width: calc(100% + 2em);
	margin-left: -1em;
	margin-right: -1em;
}

.nftiframe,
.nftimage,
.nftvideo {
	margin-bottom: 1em;
	border: 1px solid var(--linecolor);
	box-sizing: border-box;
	overflow: hidden;
}

.nftvideo a video,
.nftvideo video,
.nftimage img {
	width: 100%;
	margin-bottom: -0.5em;
}

.nftiframeratio1x1,
.nftiframeratio4x3,
.nftiframeratio16x9 {
	margin-bottom: 1em;
	border: 1px solid var(--linecolor);
}

.nftiframeratio1x1 {
	aspect-ratio: 1 / 1;
}

.nftiframeratio4x3 {
	aspect-ratio: 4 / 3;
}

.nftiframeratio16x9 {
	aspect-ratio: 16 / 9;
}

#ipfsdata pre {
	padding: 0;
	font-size: 1em;
	white-space: pre-wrap;
	word-break: normal;
	overflow-wrap: break-word;
	hyphens: auto;
	overflow: visible;
	/* Overrides the general .entry-content pre border — this is inline
	   description text, not a code block. */
	border: none;
	background: none;
	margin: 0;
}

/* "Media temporarily unavailable" placeholder (can_nft_render_unavailable()
   in inc/nft-resolver.php) — not part of CANV6's own CSS (that fallback
   path is new in this rebuild's resolver), styled inline by the function
   itself already; this only needs the wrapper wrapped in the same
   nftimage/nftvideo/nftiframeratio* sizing above; no separate rule needed. */

/* The lightbox window itself (image type): at least 80vw wide, and exactly as
   tall as the image (plus its caption and nav) needs — !important on the height so
   a size saved from an earlier resize can't pin it. The body's usual max-height
   would otherwise clip a tall image, so that goes; the image itself is capped
   below instead so the whole window still fits the screen. */
.tui-window[data-content-type="image"] {
	min-width: 80vw;
	max-width: calc(100vw - 32px);
	height: auto !important;
}

/* Centred on the browser window, whatever size the image makes it, until the window is dragged (tui-window.js's makeDraggable()
   adds tui-window--moved on the first move, and the window stays where it is put). The !important beats any left/top saved from
   an earlier drag. */
.tui-window[data-content-type="image"]:not(.tui-window--moved) {
	left: 50% !important;
	right: auto !important;
	top: 50% !important;
	transform: translate(-50%, -50%);
}

.tui-window[data-content-type="image"] .tui-window-body {
	max-height: none;
}

/* Just a close button in the titlebar: nothing to minimise or refresh in an image. */
.tui-window[data-content-type="image"] [data-window-action="minimize"],
.tui-window[data-content-type="image"] [data-window-action="refresh"] {
	display: none;
}

/* Lightbox window content. */
.tui-lightbox {
	text-align: center;
}

.tui-lightbox img {
	display: block;
	max-width: 100%;
	/* Leaves room for the titlebar, caption, nav row and the window's own offset. */
	max-height: calc(100vh - 220px);
	width: auto;
	height: auto;
	margin: 0 auto;
	object-fit: contain;
	border: 1px solid var(--linecolor);
}

.tui-lightbox-caption {
	margin-top: 10px;
	color: var(--bodycolor);
	font-size: 0.80em;
}

.tui-lightbox-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: 14px;
	padding-top: 10px;
	border-top: 1px dashed var(--linecolor);
}

.tui-lightbox-nav button {
	appearance: none;
	background: none;
	border: 1px solid var(--linecolor);
	color: var(--bodycolor);
	font-family: var(--tui-font);
	font-size: 0.80em;
	padding: 4px 10px;
	cursor: pointer;
}

.tui-lightbox-nav button:hover,
.tui-lightbox-nav button:focus {
	background: var(--shadecolor);
	outline: none;
}

.tui-lightbox-nav button:disabled {
	opacity: 0.4;
	cursor: default;
}

.tui-lightbox-count {
	color: var(--midcolor);
	font-size: 0.80em;
}

.posts-navigation,
.navigation.pagination {
	display: flex;
	justify-content: space-between;
	border: 1px solid var(--linecolor);
	background: var(--backgroundcoloralt);
	padding: 10px 16px;
	margin-top: 8px;
}

.posts-navigation a,
.navigation.pagination a {
	color: var(--tui-amber);
}

/* -----------------------------------------------------------------------
   Corner button (theme picker trigger)
   ----------------------------------------------------------------------- */

/* Sizes here scale with the font size setting (--tui-font-size; the old px values are that size's 12px default times a factor),
   so the icons grow with the site title and stay in line with it. */
.tui-corner-buttons {
	position: fixed;
	top: calc(var(--tui-font-size) * 1.0833); /* 13px at 12px */
	right: 1em;
	z-index: 499; /* Just under the windows (the window layer is 500) but above the page, which would otherwise cover and block them. */
	display: flex;
	align-items: center;
	gap: var(--tui-font-size); /* 12px */
}

/* Mobile: wider spacing between the buttons (1.75 × the font size), all equal (the account and search buttons' extra desktop margins are dropped). */
@media (max-width: 768px) {
	.tui-corner-buttons {
		gap: calc(var(--tui-font-size) * 1.75); /* 21px at 12px */
	}

	.tui-corner-buttons .tui-account-button {
		margin-left: 0;
	}

	.tui-corner-buttons .tui-search-button {
		margin-right: 0;
	}
}

/* The account and mentions menus are inside, so they would sit under the windows with it: lift the buttons while one is open. */
.tui-corner-buttons:has(.tui-menu:not([hidden])) {
	z-index: 600;
}

/* Classic mode: the buttons scroll away with the page (desktop and mobile). */
.tui-classic-nav .tui-corner-buttons {
	position: absolute;
}

/* ...except on the Activity page for signed-in members (desktop), where they stay in place as before. */
@media (min-width: 769px) {
	.tui-classic-nav.logged-in:has(.tui-classic-page .tui-activity) .tui-corner-buttons {
		position: fixed;
		top: calc(var(--tui-font-size) * 1.0833); /* from the top of the screen: the "under the ad" offset (100% + ...) would be a percentage of the screen here and push them off it */
	}
}

/* Wraps a corner button that owns its own popup menu (currently just
   Mentions) — a position: relative anchor for that popup's own
   position: absolute, scoped to just this one button rather than
   .tui-corner-buttons' own edges the way .tui-menu-right does for the
   account menu (only correct there because that button is the row's
   last/rightmost one). display: flex + align-items so this wrapper takes
   up exactly the button's own footprint as a .tui-corner-buttons flex
   item, not an inline gap. */
.tui-corner-menu {
	position: relative;
	display: flex;
	align-items: center;
}

/* Mentions popup ([can_user_mentions_v3], CAN Activity Logger) — the
   .tui-menu shell/position/open-close mechanics (same as site/account
   menu), but its own content is the plugin's .can-activity-log-feed list
   (the same class this theme's own Activity Log sections already use —
   template-parts/post/content.php etc.). .tui-menu's own generic
   ul/li/a rules (further up) would otherwise fight it: a second "›"
   marker from .tui-menu a::before stacking on .can-activity-log-feed
   li's own, .tui-menu a's block/padding/inverted-hover on top of that
   list's own subtler treatment. Scoped back off here (an #id beats both
   .tui-menu's and .can-activity-log-feed's own class selectors,
   regardless of source order) so the content looks exactly like it does
   everywhere else this list appears. */
#mentions-menu {
	width: 320px;
	max-height: 70vh;
	overflow-y: auto;
	padding: 8px 14px;
}

.tui-menu-header {
	margin: -8px -14px 8px;
	padding: 6px 14px;
	border-bottom: 1px solid var(--linecolor);
	color: var(--midcolor);
	font-size: 0.80em;
}

#mentions-menu a::before {
	content: none;
}

/* Room between the mention rows. */
#mentions-menu .can-activity-log-feed li {
	padding: 4px 0;
}

#mentions-menu a,
#mentions-menu button {
	width: auto;
	padding: 0;
	background: none;
}

#mentions-menu a:hover,
#mentions-menu a:focus {
	background: none;
}

/* Already-read mentions (no .unread — see .activity-mention-link.unread,
   the plugin's own style.css) fade back rather than standing out equally
   with the unread ones. */
#mentions-menu .activity-mention-link:not(.unread) {
	opacity: 0.35;
}


.tui-corner-buttons,
.tui-corner-button {
	-webkit-user-select: none; /* a long press on the theme button (the dither switch) mustn't jump to selecting the Text or other corner buttons */
	user-select: none;
	-webkit-touch-callout: none;
}

.tui-corner-button {
	appearance: none;
	width: calc(var(--tui-font-size) * 2);
	height: calc(var(--tui-font-size) * 2);
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	border: 1px solid var(--linecolor);
	background: transparent;
	color: var(--midcolor);
	font-family: var(--tui-font);
	font-size: 0.80em;
	font-weight: normal;
	cursor: pointer;
}

/* No circle chrome, just the glyph itself — same idea as .tui-font-circle
   below. Same 12px footprint as .tui-theme-circle just after it, so the
   icon matches its size rather than the base .tui-corner-button's 24px. */
.tui-layout-button {
	width: calc(var(--tui-font-size) * 1.1667);
	height: calc(var(--tui-font-size) * 1.1667);
	padding: 0;
	border: none;
	color: var(--linkcolor);
}

.tui-layout-button .icon {
	width: 100%;
	height: 100%;
	overflow: visible;
}

.tui-layout-button:hover,
.tui-layout-button:focus {
	color: var(--darkcolor);
	outline: none;
}

/* Filled with the currently active theme's accent color — updates live
   as soon as a different theme's CSS variables take over :root. */
.tui-theme-circle {
	-webkit-touch-callout: none; /* a long press on this button (the dither switch on a phone) shouldn't bring up iOS's own menu */
	-webkit-user-select: none; /* ...nor start a text selection (the magnifier and handles) */
	user-select: none;
	-webkit-tap-highlight-color: transparent;
	width: var(--tui-font-size);
	height: var(--tui-font-size);
	background: var(--darkcolor);
	border: none;
}

.tui-theme-circle:hover,
.tui-theme-circle:focus {
	outline: none;
	background: var(--linkcolor);
}

/* The "A" renders in whichever font is currently active, since it just
   inherits --tui-font like everything else — no circle, just the glyph. */
.tui-font-circle {
	width: auto;
	height: auto;
	border: none;
	border-radius: 0;
	background: none;
	padding: 0;
	font-size: calc(var(--tui-font-size) * 1.1667);
	color: var(--linkcolor);
}

.tui-font-circle:hover,
.tui-font-circle:focus {
	color: var(--darkcolor);
	outline: none;
}

@keyframes tui-pulse {
	0%, 100% {
		opacity: 1;
	}
	50% {
		opacity: 0.3;
	}
}

/* Same bare-glyph treatment as .tui-font-circle just above — no circle
   chrome, just the "@" itself. Only ever rendered at all when there's an
   actual unread mention (header.php's own condition), so the pulse is
   unconditional here rather than needing its own class/JS toggle — paused
   on hover/focus so it isn't fighting the pointer's own attention while
   the popup opens. */
.tui-mentions-button {
	width: auto;
	height: auto;
	border: none;
	border-radius: 0;
	background: none;
	padding: 0;
	font-size: calc(var(--tui-font-size) * 1.1667);
	color: var(--linkcolor);
	animation: tui-pulse 1.5s ease-in-out infinite;
}

.tui-mentions-button:hover,
.tui-mentions-button:focus {
	color: var(--darkcolor);
	outline: none;
	animation-play-state: paused;
}

.tui-account-button {
	margin-left: calc(var(--tui-font-size) * 0.8333); /* a bit of a gap, separating it from theme/font */
	border: none; /* no ring around it, just the icon */
	color: var(--linkcolor);
	margin-right: calc(var(--tui-font-size) * -0.4167 + 4px); /* classic on a phone: no extra 4px (below). The button is 2em wide around a 1.1667em icon: pull it over so the icon, not the button, sits 1em from the right edge */
}

.tui-account-button.is-logged-in {
	color: var(--linkcolor);
}

.tui-account-button .icon {
	width: calc(var(--tui-font-size) * 1.1667);
	height: calc(var(--tui-font-size) * 1.1667);
}

.tui-account-button:hover,
.tui-account-button:focus {
	color: var(--darkcolor);
	outline: none;
}

.tui-search-button {
	width: calc(var(--tui-font-size) * 1.3333);
	height: calc(var(--tui-font-size) * 1.3333);
	margin-right: calc(var(--tui-font-size) * 1.1667);
	border: none;
	-webkit-tap-highlight-color: transparent;
	color: var(--linkcolor);
}

.tui-search-button:hover,
.tui-search-button:focus,
.tui-search-button:focus-visible {
	color: var(--darkcolor);
	outline: none;
	box-shadow: none;
}

/* Activity Introduction page (page-templates/activity-introduction.php): the
   page's own intro in the left column, an animation (still to be built) in the
   right. One column once the window — or the viewport — is narrow. */
.tui-activity-intro {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1em;
}

/* The big opening line ("Activity is a live record of flows…") is a span with an
   inline font-size in the page's own content — matched by that, since it has no
   class — in --darkcolor, like the big numbers below. */
.tui-activity-intro-text span[style*="font-size:3em"] {
	color: var(--bodycolor);
}

.tui-activity-intro-animation {
	position: relative;
	min-height: 400px;
	overflow: hidden;
	/* Entries fade out toward the bottom as they leave; the top has no fade. */
	-webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent);
	mask-image: linear-gradient(to bottom, #000 72%, transparent);
}

.tui-ai-stream {
	/* Out of flow, so the stream can never make its column taller: the column is
	   as tall as the intro text beside it (at least 400px) and the stream is
	   clipped to that, overflowing entries trimmed off the bottom by the script. */
	position: absolute;
	top: 1em;
	left: 0;
	right: 0;
}

/* Introduction to Activity: the sections fade in one after the other, top to bottom. Selected as siblings after the
   opening block (.tui-activity-stats is shared with the Community page, which must not animate). */
.tui-activity-intro,
.tui-activity-intro ~ .tui-activity-stats,
.tui-activity-intro ~ .tui-activity-chart,
.tui-activity-intro ~ .tui-activity-recent,
.tui-activity-intro ~ .tui-activity-map,
.tui-activity-intro ~ .tui-activity-content {
	animation: tui-login-fade-in 0.6s ease backwards;
}

.tui-activity-intro ~ .tui-activity-stats {
	animation-delay: 0.4s;
}

.tui-activity-intro ~ .tui-activity-chart {
	animation-delay: 0.8s;
}

.tui-activity-intro ~ .tui-activity-recent {
	animation-delay: 1.2s;
}

.tui-activity-intro ~ .tui-activity-map {
	animation-delay: 1.6s;
}

.tui-activity-intro ~ .tui-activity-content {
	animation-delay: 2s;
}

@media (prefers-reduced-motion: reduce) {
	.tui-activity-intro,
	.tui-activity-intro ~ .tui-activity-stats,
	.tui-activity-intro ~ .tui-activity-chart,
	.tui-activity-intro ~ .tui-activity-recent,
	.tui-activity-intro ~ .tui-activity-map,
	.tui-activity-intro ~ .tui-activity-content {
		animation: none;
	}
}

/* The Login window's feed starts at the very top, as before. */
.tui-login-split .tui-ai-stream {
	top: 0;
}

/* The stream inside it (assets/js/activity-intro.js): each entry opens from
   nothing (grid rows 0fr -> 1fr), pushing the older ones down, in the same
   ▶︎-line style as the real Activity feed. */
.tui-ai-entry {
	display: grid;
	grid-template-rows: 0fr;
	opacity: 0;
	transition: grid-template-rows 0.45s ease, opacity 0.45s ease;
}

.tui-ai-entry.is-in {
	grid-template-rows: 1fr;
	opacity: 1;
}

.tui-ai-entry.is-out {
	opacity: 0;
}

.tui-ai-inner {
	min-height: 0;
	overflow: hidden;
	padding: 0.35em 0;
	border-bottom: 1px solid var(--linecolor);
}

.tui-ai-line {
	color: var(--bodycolor);
}

.tui-ai-mark {
	margin-right: 0.5em;
}

/* The feed as lines instead of text, as in the Login window: each word group is drawn as a thin line as long as the text it
   would have been (so they still grow as they are typed, and wrap), the verb in --midcolor and the title in --darkcolor.
   The text itself is transparent. */
.tui-ai-verb,
.tui-ai-title {
	color: transparent;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 100% 2px;
}

.tui-ai-verb {
	background-image: linear-gradient(var(--midcolor), var(--midcolor));
}

.tui-ai-title {
	background-image: linear-gradient(var(--darkcolor), var(--darkcolor));
}

.tui-typewriter-caret {
	display: inline-block;
	width: 0.5em;
	height: 0.8em;
	margin: 0 0 -0.05em 2px;
	background: var(--darkcolor);
	vertical-align: baseline;
	line-height: 0;
	animation: tui-blink 1s steps(1) infinite;
}

.tui-ai-caret {
	display: inline-block;
	width: 0.6em;
	height: 1em;
	margin-left: 2px;
	background: var(--darkcolor);
	vertical-align: text-bottom;
	animation: tui-blink 1s steps(1) infinite;
}

/* Like a real post's embed: an outlined block that fades in under the line. */
.tui-ai-media {
	width: 35%;
	aspect-ratio: 4 / 3; /* every box the same 4x3 shape */
	margin: 0.5em 0 0.15em 1.5em;
	border: 1px solid var(--linecolor);
	opacity: 0;
	transition: opacity 0.6s ease;
}

.tui-ai-media.is-in {
	opacity: 1;
}

.tui-ai-dap {
	margin-left: 0.5em;
	color: var(--midcolor);
}

.tui-ai-dap.is-pulsing {
	animation: tui-ai-pulse 0.9s ease-out;
}

@keyframes tui-ai-pulse {
	0% {
		transform: scale(1);
	}
	40% {
		transform: scale(1.8);
		color: var(--darkcolor);
	}
	100% {
		transform: scale(1);
	}
}

@media (prefers-reduced-motion: reduce) {
	.tui-ai-entry,
	.tui-ai-media {
		transition: none;
	}

	.tui-ai-caret,
	.tui-ai-dap.is-pulsing {
		animation: none;
	}
}

.tui-window--narrow-640 .tui-activity-intro {
	grid-template-columns: 1fr;
}

@media (max-width: 768px) {
	.tui-activity-intro {
		grid-template-columns: 1fr;
	}
}

/* The stats section under the intro: Days / Participants / Actions, three
   columns, a big number each in --darkcolor. Its own section, so
   a line above it. */
.tui-activity-stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1em;
	margin-top: 1em;
	padding-top: 1em;
	border-top: 1px solid var(--linecolor);
}

.tui-activity-stat-label {
	display: block;
}

.tui-activity-stat-number {
	display: block;
	font-size: 4em;
	line-height: 1.1;
	color: var(--darkcolor);
}

.tui-activity-stat-note {
	/* A superscript tucked against the top-right of the number (CANV6's was
	   <sup> at 0.25em lifted by hand): normal text size (0.25 of the 4em number),
	   aligned to the top of the line, close behind the last digit, on one line. */
	font-size: 0.25em;
	line-height: 1.4;
	vertical-align: top;
	margin-left: 1em;
	white-space: nowrap;
	color: var(--midcolor);
}

/* The 90-day graph section under the stats: a muted caption, then the chart
   (Chart.js, assets/js/activity-intro.js) in a box with a fixed height. */
.tui-activity-chart {
	margin-top: 1em;
	padding-top: 1em;
	border-top: 1px solid var(--linecolor);
}

.tui-activity-chart-caption {
	display: block;
	margin-bottom: 0.75em;
	color: var(--midcolor);
	font-size: 0.80em;
}

.tui-activity-chart-box {
	position: relative;
	height: 220px;
}

/* "Recent Actions in Activity": a caption, then the ten newest entries, one line
   each — plain text, as in CANV6. */
.tui-activity-recent {
	margin-top: 1em;
	padding-top: 1em;
	border-top: 1px solid var(--linecolor);
}

.tui-activity-recent-caption {
	display: block;
	margin-bottom: 0.75em;
	color: var(--midcolor);
	font-size: 0.80em;
}

.tui-activity-recent-list {
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 0.80em;
}

.tui-activity-recent-list li {
	margin: 0 0 0.25em;
	overflow-wrap: anywhere;
}

/* The member map (D3, assets/js/activity-intro-map.js): caption, then a box with
   the map and — until it's clicked — a transparent overlay that stops the page
   scroll from zooming it. */
.tui-activity-map {
	margin-top: 1em;
	padding-top: 1em;
	border-top: 1px solid var(--linecolor);
}

.tui-activity-map-caption {
	display: block;
	margin-bottom: 0.75em;
	color: var(--midcolor);
	font-size: 0.80em;
}

.tui-activity-map-box {
	position: relative;
	height: 500px;
}

.tui-activity-map-canvas {
	height: 100%;
	width: 100%;
}

.tui-activity-map-canvas svg {
	display: block;
	cursor: move;
}

.tui-activity-map-overlay {
	position: absolute;
	inset: 0;
	z-index: 2;
	padding: 0;
	border: none;
	background: transparent;
	cursor: zoom-in;
}

/* The second page's content ("how Activity works", page 115466): its own
   section, a line above it. */
.tui-activity-content {
	margin-top: 1em;
	padding-top: 1em;
	border-top: 1px solid var(--linecolor);
}

/* Full width, like the sections above: .entry-content is a grid that caps its
   children at an 800px reading column, which would narrow this page's columns of
   text — plain block layout lets them run the full width. (Its prose styling
   stays.) */
.tui-activity-content.entry-content {
	display: block;
}

/* No top margin on its opening heading ("How does Activity work?") — the section's
   own padding already spaces it from the line above. */
.tui-activity-content > .wp-block-columns:first-child .wp-block-heading {
	margin-top: 0;
}

/* Its tables (the page has a few) in small text. */
.tui-activity-content table {
	font-size: 0.80em;
}

/* A narrow window: smaller numbers, so three still fit across. */
.tui-window--narrow-640 .tui-activity-stat-number {
	font-size: 2.5em;
}

@media (max-width: 768px) {
	.tui-activity-stat-number {
		font-size: 2.5em;
	}
}

/* Classic page has no .tui-window-body around it to supply padding. */
.tui-activity-intro-classic {
	padding: 1em;
}

/* Member Analytics page (page-templates/member-analytics.php). */
.tui-ma-classic {
	padding: 1em;
}

/* Mobile: edge to edge, cancelling the classic page's own side padding like the listings do (the 1em padding above keeps the content inset). */
@media (max-width: 768px) {
	.tui-ma-classic {
		margin-left: -1em;
		margin-right: -1em;
	}
}

.tui-ma-wrap {
	overflow-wrap: anywhere;
}

/* Inside a TUI table: the cell's text wraps, and the log entry's own blocks sit flush. */
.tui-ma .tui-ma-log-content,
.tui-ma .tui-ma-log-code {
	margin: 0.25em 0 0;
}

.tui-ma-log {
	border-bottom: 1px solid var(--linecolor);
	padding: 1em 0;
}

.tui-ma-log-content {
	white-space: pre-wrap;
	background: var(--shadecolor);
	padding: 0.75em;
	margin: 0.5em 0;
}

.tui-ma-log-code {
	padding: 0.75em;
	overflow: auto;
}

/* Member Submissions page (page-templates/member-submit-v3.php) — form
   fields reuse .tui-profile-field/.tui-profile-input/.tui-profile-error/
   .tui-profile-field-grid directly (style.css, Profile's own form), not
   a new near-identical set; only the two-column form+sidebar layout and
   the tabs/help panels are genuinely new here. */

/* Classic mode (can_v7_user_wants_classic_nav()) — .tui-submit (the
   template's own outer wrapper div) is unstyled inside a floating
   window (nested in .tui-window-body, which already provides its own
   padding/width/border), so this is scoped to .tui-classic-page
   specifically — same border-left/right + padding + edge-to-edge-mobile
   convention as .tui-saved/.tui-events-full elsewhere in this file. */
.tui-classic-page .tui-submit {
	padding: 1em;
	background: var(--backgroundcolor);
	border-left: 1px solid var(--linecolor);
	border-right: 1px solid var(--linecolor);
}

@media (max-width: 768px) {
	.tui-classic-page .tui-submit {
		margin-left: -1em;
		margin-right: -1em;
	}
}

.tui-submit-columns {
	display: flex;
	gap: 20px;
}

.tui-submit-form-column {
	flex: 1 1 70%;
	min-width: 0;
}

.tui-submit-sidebar-column {
	flex: 0 0 30%;
	max-width: 30%;
	border-left: 1px dashed var(--linecolor);
	padding-left: 20px;
}

.tui-submit-help p {
	font-size: 0.80em;
	margin: 0 0 1em;
}

/* Shown after a successful submit (member-submit.js), above the tabs. */
.tui-submit-success {
	margin-bottom: 1.5em;
	padding: 1em;
	border: 1px solid var(--linecolor);
	background: var(--shadecolor);
}

.tui-submit-success[hidden] {
	display: none;
}

.tui-submit-success h3 {
	margin: 0 0 0.5em;
	color: var(--darkcolor);
}

.tui-submit-success p {
	margin: 0 0 1em;
	line-height: 1.6;
}

.tui-submit-intro {
	margin-bottom: 1.5em;
	line-height: 1.6;
}

.tui-profile-input.tui-submit-invalid {
	border-color: var(--tui-red);
}

/* Same file-input treatment as the Settings window's own background-image
   upload (.tui-settings-bg input[type="file"], style.css) — that one's
   scoped to its own wrapper class, so this repeats the same declarations
   under .tui-submit-file rather than reaching into an unrelated window's
   markup for a shared ancestor. */
.tui-submit-file {
	display: block;
	width: 100%;
	margin-bottom: 10px;
	color: var(--bodycolor);
	font-family: var(--tui-font);
	font-size: 0.80em;
}

.tui-submit-file::file-selector-button {
	appearance: none;
	background: none;
	border: 1px solid var(--linecolor);
	color: var(--bodycolor);
	font-family: var(--tui-font);
	font-size: 1em;
	padding: 5px 14px;
	margin-right: 10px;
	cursor: pointer;
}

.tui-submit-file::file-selector-button:hover,
.tui-submit-file::file-selector-button:focus {
	background: var(--shadecolor);
	outline: none;
}

.tui-submit-file.tui-submit-invalid::file-selector-button {
	border-color: var(--tui-red);
}

#submission-fieldset {
	border: none;
	padding: 0;
	margin: 0;
	min-width: 0;
}

#submission-fieldset:disabled {
	opacity: 0.5;
}

/* Error/success state, set by assets/js/member-submit.js after the AJAX
   submission response comes back — same color-coding convention as
   .tui-membership-status--active/--expired. Plain #submit_status (no
   modifier) stays the muted in-flight "Uploading…" look. */
#submit_status.tui-submit-status--error {
	color: var(--tui-red);
}

#submit_status.tui-submit-status--success {
	color: var(--darkcolor);
}

#submit_status {
	display: block;
	margin-top: 8px;
	font-size: 0.80em;
	color: var(--midcolor);
}

@media (max-width: 768px) {
	.tui-submit-columns {
		flex-direction: column;
	}

	.tui-submit-sidebar-column {
		max-width: 100%;
		border-left: none;
		border-top: 1px solid var(--linecolor);
		padding-left: 0;
		padding-top: 20px;
	}
}

/* Admin window. */
.tui-admin {
	display: block;
}

/* Laid out like Settings: sections under # headings, one thing per line. */
.tui-admin-links a {
	display: block;
	padding: 2px 0;
}

.tui-admin-refresh {
	margin-top: 12px;
}

/* The Member Admin heading is the first thing in its own wrapper, which would drop the
   line above it like the very first section — keep it. */
.tui-admin-member-admin > .tui-settings-section:first-child {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid var(--linecolor);
}

/* In the widget the two toggles are just the option and its switch, no headings. */
.tui-window--widget[data-content-type="admin"] .tui-admin-member-admin > .tui-settings-section,
.tui-window--widget[data-content-type="admin"] .tui-admin-daps > .tui-settings-section {
	display: none;
}

/* One "Options" heading above both toggles. */
.tui-window--widget[data-content-type="admin"] .tui-admin-member-admin::before {
	content: "# Options";
	display: block;
	margin: 0 0 0.25em;
	color: var(--darkcolor);
}

/* The widget's grid gap would space the two toggles a full line apart: pull the second up against the first. */
.tui-window--widget[data-content-type="admin"] .tui-admin-daps {
	margin-top: -1em;
}

/* Space under the content of each section. */
.tui-window--widget[data-content-type="admin"] .tui-admin-stats,
.tui-window--widget[data-content-type="admin"] .tui-admin-links {
	margin-bottom: 1.25em;
}

/* The Analytics links are spaced like the lines of the site numbers above them (plain line breaks, no padding). */
.tui-window--widget[data-content-type="admin"] .tui-admin-links a {
	padding: 0;
}

/* Toggle rows in the widget: tight, the same height each. */
.tui-window--widget[data-content-type="admin"] .tui-settings-toggle-row {
	padding: 0 0 1em;
}

/* Nothing under the last toggle. */
.tui-window--widget[data-content-type="admin"] .tui-admin-daps .tui-settings-toggle-row {
	padding-bottom: 0;
}

/* Admin window and widget: the site figures are tiles, a big number over a small label, in a grid of dashed lines (three across in the
   window, two in the widget); the Analytics links are small buttons side by side. */
.tui-admin-stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin-bottom: 1em;
	border-top: 1px dashed var(--linecolor);
	border-left: 1px dashed var(--linecolor);
}

.tui-admin-stat {
	display: flex;
	flex-direction: column-reverse;
	justify-content: flex-end;
	gap: 0.25em;
	padding: 0.5em 0.75em;
	border-right: 1px dashed var(--linecolor);
	border-bottom: 1px dashed var(--linecolor);
}

.tui-admin-stat--wide {
	grid-column: 1 / -1;
	flex-direction: column;
}

.tui-admin-stat-label {
	color: var(--bodycolor);
}

.tui-admin-stat-value {
	font-weight: normal;
	color: var(--darkcolor);
	font-size: 1.5em;
	line-height: 1;
}

.tui-admin-stat-value a {
	color: inherit;
}

/* The members' names are text, not a figure. */
.tui-admin-stat--wide .tui-admin-stat-value {
	font-size: 1em;
	line-height: 1.5;
	color: var(--bodycolor);
}

.tui-admin-links {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.5em;
}

.tui-admin-links a,
.tui-window--widget[data-content-type="admin"] .tui-admin-links a {
	padding: 0.25em 0.75em;
	text-align: left;
	border: 1px dashed var(--linecolor);
	border-radius: var(--tui-window-radius);
}

.tui-admin-links a:hover {
	background: var(--shadecolor);
}

.tui-window--widget[data-content-type="admin"] .tui-admin-stats {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Classic page has no .tui-window-body around it to supply padding. */
.tui-classic-page .tui-admin {
	padding: 1em;
}

.tui-admin-inactive {
	opacity: 0.3;
}

/* Spans both of .tui-admin's own grid columns, sitting above them,
   rather than becoming an awkward third item squeezed into the first
   column's row. */
.tui-admin-refresh {
	grid-column: 1 / -1;
	justify-self: start;
	appearance: none;
	background: none;
	border: 1px solid var(--linecolor);
	padding: 0.25em 0.75em;
	color: var(--bodycolor);
	font-family: var(--tui-font);
	font-size: 0.80em;
	cursor: pointer;
}

.tui-admin-refresh:hover {
	color: var(--darkcolor);
	border-color: var(--darkcolor);
}

/* Monitor window (inc/window-handlers/monitor.php, assets/js/monitor.js). */
.tui-monitor {
	font-size: 0.80em;
}

.tui-monitor-panel[hidden] {
	display: none;
}

/* Member Analytics: the whole page is in the Monitor's 0.80em, which suits the Summary but is small for the tabs that hold so much
   (Activity, Members, Settings, Stats). They go back to the normal text size (1em of the page: 0.80em x 1.25). */
.tui-ma .tui-monitor-panel:not([data-ma-panel="summary"]) {
	font-size: 1.25em;
}

/* Tables like a terminal's: square corners, thin lines, the header row set off with a heavier rule. */
.tui-monitor-table {
	width: 100%;
	border-collapse: collapse;
	border: 1px solid var(--linecolor);
	table-layout: auto;
}

/* The Members tab's tables share one column grid (set by <col> in member-analytics.php). */
.tui-monitor-table--fixed {
	table-layout: fixed;
}

.tui-monitor-table th,
.tui-monitor-table td {
	padding: 2px 8px;
	text-align: left;
	vertical-align: baseline;
	border: 1px solid var(--linecolor);
	overflow-wrap: anywhere;
}

/* Tables stack edge to edge, sharing one border, so a tab reads as a single table with a title row per section. */
.tui-monitor-table + .tui-monitor-table,
.tui-monitor div + div > .tui-monitor-table {
	margin-top: -1px;
}

.tui-monitor .tui-saved-tabs {
	margin-bottom: 0.5em;
}

/* .tui-monitor is already 0.80em, so the tabs' own 0.80em would shrink them again to 0.64em. */
.tui-monitor .tui-saved-tab-btn {
	font-size: 1em;
}

/* The big numbers: the same title bar as the tables, then cells whose borders (right and bottom, plus the box's top and
   left) line up like a table's however many fit on a row. */
.tui-monitor-statbox-title {
	padding: 2px 8px;
	border: 1px solid var(--linecolor);
	background: var(--shadecolor);
	color: var(--bodycolor);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.tui-monitor-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	border-left: 1px solid var(--linecolor);
}

.tui-monitor-stat {
	padding: 4px 8px;
	border-right: 1px solid var(--linecolor);
	border-bottom: 1px solid var(--linecolor);
}

.tui-monitor-stat-label,
.tui-monitor-stat-value {
	display: block;
}

.tui-monitor-stat-value {
	font-size: 2em;
	line-height: 1.1;
	color: var(--darkcolor);
}

/* The trend under a number (a line of block characters). */
.tui-monitor-stat-spark {
	display: block;
	font-family: var(--tui-mono-font);
	white-space: pre;
	color: var(--darkcolor);
	overflow: hidden;
}

.tui-monitor-table .tui-monitor-title {
	background: var(--shadecolor);
	color: var(--bodycolor);
}

.tui-monitor-table th {
	font-weight: normal;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--darkcolor);
}

.tui-monitor-table .tui-monitor-key {
	color: var(--darkcolor);
	white-space: nowrap;
}

.tui-monitor-table .tui-monitor-bar {
	font-family: var(--tui-mono-font);
	white-space: pre;
	color: var(--darkcolor);
}

/* A name that may break anywhere, so it is the first column to compress (Caches). */
.tui-monitor-table .tui-monitor-key.tui-monitor-wrap {
	white-space: normal;
	overflow-wrap: anywhere;
}

/* Sizes, times and positions stay on one line, however narrow the window gets. */
.tui-monitor-table .tui-monitor-nowrap {
	white-space: nowrap;
}

.tui-monitor-table .tui-monitor-preview {
	opacity: 0.7;
}

.tui-monitor-table .tui-monitor-action {
	width: 1%;
	white-space: nowrap;
	text-align: right;
}

.tui-monitor-table .tui-admin-refresh {
	margin: 0;
	padding: 0 0.5em;
}

/* Monitor widget mode: just the metrics (the big numbers), whichever tab was open. A fixed width, like the Admin widget. */
.tui-window--widget[data-content-type="monitor"] {
	width: 340px !important;
}

.tui-window--widget[data-content-type="monitor"] .tui-saved-tabs,
.tui-window--widget[data-content-type="monitor"] [data-monitor-loads],
.tui-window--widget[data-content-type="monitor"] [data-monitor-env],
.tui-window--widget[data-content-type="monitor"] .tui-monitor-panel:not([data-monitor-panel="performance"]) {
	display: none !important;
}

.tui-window--widget[data-content-type="monitor"] .tui-monitor-panel[data-monitor-panel="performance"] {
	display: block !important;
}

/* The widget: one row per metric (label, current value, a text trend of the last seconds), no lines. */
.tui-window--widget[data-content-type="monitor"] {
	width: 340px !important;
}

/* One grid for all rows (each row is display: contents), so the value and trend columns line up from row to row. */
.tui-monitor-sparks {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto auto;
	align-items: baseline;
	gap: 2px 1em;
}

.tui-monitor-spark-row {
	display: contents;
}

.tui-monitor-spark-label {
	color: var(--bodycolor);
}

.tui-monitor-spark-value {
	color: var(--darkcolor);
	text-align: right;
	white-space: nowrap;
}

.tui-monitor-spark-line {
	font-family: var(--tui-mono-font);
	white-space: pre;
	color: var(--bodycolor);
	min-width: 24ch;
}

/* Settings window. */
.tui-settings-section {
	margin: 20px 0 12px;
	padding-top: 20px;
	font-size: 1em;
	color: var(--darkcolor);
	border-top: 1px dashed var(--linecolor);
}

/* A dropdown in the theme's colours: the native box is stripped (appearance: none) and a chevron drawn in --bodycolor. The list that
   opens is drawn by the browser, which takes the colours below on most desktops (Safari keeps its own). */
.tui-select {
	appearance: none;
	-webkit-appearance: none;
	min-width: 9em;
	padding: 4px 24px 4px 8px;
	background-color: var(--backgroundcolor);
	background-image: linear-gradient(45deg, transparent 50%, var(--bodycolor) 50%),
		linear-gradient(135deg, var(--bodycolor) 50%, transparent 50%);
	background-position: calc(100% - 13px) center, calc(100% - 8px) center;
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
	border: 1px solid var(--linecolor);
	border-radius: 0;
	color: var(--bodycolor);
	font-family: var(--tui-font);
	font-size: 1em;
	line-height: 1.5;
	cursor: pointer;
}

.tui-select:hover {
	border-color: var(--bodycolor);
}

.tui-select:focus {
	outline: none;
	border-color: var(--darkcolor);
}

.tui-select option {
	background: var(--backgroundcolor);
	color: var(--bodycolor);
}

/* Settings → Services → Fediverse: the server field takes the row, Connect sits right beside it (not pushed to the far edge) and its
   message wraps underneath; space below the row before the note. */
.tui-fedi-connect {
	flex-wrap: wrap;
	border-top: none;
	margin-top: 0;
	padding-top: 0;
	margin-bottom: 1em;
}

.tui-fedi-connect .tui-fedi-server {
	flex: 1 1 12em;
	width: auto;
	min-width: 0;
}

.tui-fedi-connect .tui-btn {
	margin-left: 0;
}

.tui-fedi-connect .tui-settings-status {
	flex: 1 0 100%;
}

.tui-fedi-connect .tui-settings-status:empty {
	display: none;
}

/* The title that names a whole group (Services) rather than one section of it. */
.tui-settings-section--group {
	color: var(--darkcolor);
}

/* A section title with an icon at the far right (Shortcuts, opening the popup). */
.tui-settings-section--action {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.tui-settings-section-link {
	flex: 0 0 auto;
	margin: 0 0 0 auto; /* pinned to the far right */
	padding: 0 5px;
	appearance: none;
	-webkit-appearance: none;
	border: none;
	border-radius: 3px;
	box-shadow: none;
	/* The footer's key button look: the same shade behind the Alt symbol, body-colour glyph. */
	background: rgba(0, 0, 0, 0.1);
	color: var(--bodycolor);
	font: inherit;
	line-height: 1.4;
	cursor: pointer;
}

.tui-settings-section-link:hover,
.tui-settings-section-link:focus,
.tui-settings-section-link:focus-visible,
.tui-settings-section-link:active {
	color: var(--darkcolor);
	outline: none;
	border: none;
	box-shadow: none;
}

/* Settings window: a sidebar of groups beside the settings, as the API docs have. The window body has no padding of its own here;
   the sidebar runs the full height and the panel carries the 1em. */
.tui-window[data-content-type="settings"] .tui-window-body {
	padding: 0;
	/* No rubber-band at the top (or bottom): the pinned sidebar would otherwise be pulled away with the content. */
	overscroll-behavior: none;
}

/* The "loading…" line (and an error) shown before the settings arrive: the body has no padding here, so it carries the panel's 1em itself. */
.tui-window[data-content-type="settings"] .tui-window-body > p {
	padding-left: 1em;
	padding-right: 1em;
}

.tui-settings-browser {
	display: flex;
	align-items: stretch;
	min-height: 100%;
}

.tui-settings-sidebar {
	display: flex;
	flex-direction: column;
	width: 25%;
	min-width: 8em;
	flex-shrink: 0;
	/* Stays in place while the settings scroll past it; the line between them is the panel's own, so it runs the full height. */
	position: sticky;
	top: 0;
	align-self: flex-start;
}

.tui-settings-tab {
	display: flex;
	align-items: center;
	gap: 0.5em;
	width: 100%;
	padding: 0.5em 1em;
	border: none;
	border-bottom: 1px dashed var(--linecolor);
	background: none;
	color: inherit;
	font: inherit;
	line-height: 1.5;
	text-align: left;
	cursor: pointer;
}

.tui-settings-tab-icon {
	flex-shrink: 0;
	width: 0.9em;
	height: 0.9em;
	vertical-align: baseline;
}

.tui-settings-tab:focus {
	background: none;
	color: inherit;
	outline: none;
}

.tui-settings-tab:hover {
	background: var(--shadecolor);
	color: inherit;
	outline: none;
}

.tui-settings-tab.is-active,
.tui-settings-tab.is-active:hover,
.tui-settings-tab.is-active:focus {
	background-color: var(--midcolor);
	color: var(--backgroundcolor);
}

.tui-settings-main {
	flex: 1;
	min-width: 0;
	border-left: 1px solid var(--linecolor);
}

.tui-about-list {
	margin-bottom: 1em;
}

.tui-about-row {
	display: grid;
	grid-template-columns: minmax(8em, 1fr) 2fr minmax(6em, 1fr);
	gap: 0.25em 1em;
	align-items: baseline;
	padding: 0.4em 0;
	border-bottom: 1px dashed var(--linecolor);
}

.tui-about-row:last-child {
	border-bottom: none;
}

.tui-about-use,
.tui-about-license {
	font-size: 0.80em;
	color: var(--bodycolor);
}

.tui-about-license {
	text-align: right;
}

/* A narrow window stacks each credit: name, what it is for, then the license. */
.tui-window--narrow-640 .tui-about-row {
	grid-template-columns: 1fr;
}

.tui-window--narrow-640 .tui-about-license {
	text-align: left;
}

.tui-settings-panel {
	display: none;
	padding: 1em;
}

.tui-settings-panel.is-active {
	display: block;
}

/* A narrow window puts the groups in a row on top instead of a column beside the settings. */
.tui-window--narrow-640 .tui-settings-browser {
	flex-direction: column;
}

.tui-window--narrow-640 .tui-settings-sidebar {
	/* Same even grid of bordered cells as the narrow Archives tab strip, not a ragged wrapped row. */
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(8.5em, 1fr));
	width: auto;
	min-width: 0;
	align-self: stretch;
	z-index: 1;
	background: var(--backgroundcolor);
	border-top: 1px solid var(--linecolor);
	border-left: 1px solid var(--linecolor);
	margin: 1em 1em 0;
}

.tui-window--narrow-640 .tui-settings-main {
	border-left: none;
}

/* The same on a classic page, where the phone width stands in for a narrow window. */
@media (max-width: 768px) {
	.tui-classic-page .tui-settings-browser {
		flex-direction: column;
		margin-left: -1em;
		margin-right: -1em;
	}

	.tui-classic-page .tui-settings-sidebar {
		/* Same bordered grid of cells as the narrow window. */
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(8.5em, 1fr));
		width: auto;
		align-self: stretch;
		position: static;
		/* Flush with the page frame like the Archives tabs: no outer top/left border. */
		border: none;
	}

	.tui-classic-page .tui-settings-tab {
		width: auto;
		min-width: 0;
		padding: 0.5em 0.75em;
		font-size: 0.80em;
		white-space: nowrap;
		overflow: hidden;
		border-right: 1px solid var(--linecolor);
		border-bottom: 1px solid var(--linecolor);
	}

	.tui-classic-page .tui-settings-main {
		border-left: none;
	}

	.tui-classic-page .tui-about-row {
		grid-template-columns: 1fr;
	}

	.tui-classic-page .tui-about-license {
		text-align: left;
	}
}

.tui-window--narrow-640 .tui-settings-tab {
	width: auto;
	min-width: 0;
	padding: 0.5em 0.75em;
	font-size: 0.80em;
	white-space: nowrap;
	overflow: hidden;
	border-right: 1px solid var(--linecolor);
	border-bottom: 1px solid var(--linecolor);
}

/* No line floating above the very first section — same reasoning as
   .tui-membership-section:first-child. */
.tui-settings-section:first-child {
	margin-top: 0;
	padding-top: 0;
	border-top: none;
}

/* Same row treatment as .tui-membership-row (label/value pair with a
   separator line) — see inc/member-account.php. */
.tui-settings-toggle-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	padding: 6px 0;
	border-bottom: 1px dashed var(--linecolor);
	color: var(--midcolor);
}

.tui-settings-toggle {
	appearance: none;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	font-size: 1.95em;
	line-height: 1;
	color: var(--bodycolor);
}

.tui-settings-toggle-on,
.tui-settings-toggle-off {
	display: none;
}

.tui-settings-toggle[data-enabled="1"] .tui-settings-toggle-on {
	display: inline-block;
}

.tui-settings-toggle[data-enabled="0"] .tui-settings-toggle-off {
	display: inline-block;
}

.tui-settings-toggle[data-enabled="0"] {
	color: var(--bodycolor);
	opacity: 0.5;
}

/* Just the "Disable Window Engine" row (inc/window-handlers/settings.php)
   — its own note paragraph sits directly under it, so the row's usual
   separator line (the border every other .tui-settings-toggle-row still
   has) would just be a line between the toggle and its own explanation,
   not a break between two different settings. */
.tui-settings-toggle-row--no-border {
	border-bottom: none;
}

.tui-settings-note {
	margin: 0 0 16px;
	color: var(--bodycolor);
	font-size: 0.80em;
}

/* The About group's intro, at the normal text size. */
.tui-settings-note.tui-settings-note--normal {
	font-size: 1em;
}

/* API / RSS group of Settings (inc/api-rss.php) — same row/label/
   value/note treatment as .tui-membership-row and its neighbours, kept
   under its own class namespace rather than reused directly, same
   convention as .tui-settings-toggle-row. */
.tui-api-rss-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	padding: 6px 0;
	border-bottom: 1px dashed var(--linecolor);
}

.tui-api-rss-label {
	color: var(--midcolor);
}

.tui-api-rss-action {
	appearance: none;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	color: var(--bodycolor);
	font-family: var(--tui-font);
	font-size: 1em;
}

.tui-api-rss-action:hover,
.tui-api-rss-action:focus {
	color: var(--linkcolor);
	outline: none;
}

.tui-api-rss-row-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.tui-api-rss-status {
	color: var(--midcolor);
	font-size: 0.80em;
}

.tui-api-rss-reveal {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 0;
	border-bottom: 1px dashed var(--linecolor);
}

.tui-api-rss-reveal code {
	flex: 1 1 auto;
	overflow-wrap: anywhere;
	color: var(--bodycolor);
	background: var(--shadecolor);
	padding: 4px 6px;
}

.tui-api-rss-note {
	margin: 8px 0 20px;
	color: var(--bodycolor);
	font-size: 0.80em;
}

/* The section headings here (shared with Settings, which keeps its solid line) have a dashed line above them too, except the first, which
   has none. The whole line is set (not just its style): changing the style of a heading that has no line would draw one in the text colour. */
.tui-settings-panel[data-settings-panel="api-rss"] .tui-settings-section:not(:first-child) {
	border-top: 1px dashed var(--linecolor);
}

.tui-themes-note {
	margin: 8px 0 0.5em;
	color: var(--midcolor);
	font-size: 0.80em;
}

.tui-layouts-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.tui-layouts-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	padding: 6px 0;
	border-bottom: 1px dashed var(--linecolor);
	color: var(--midcolor);
}

/* The last row (Custom) has nothing under it to separate from. */
.tui-layouts-row:last-child {
	border-bottom: none;
}

.tui-layouts-actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

.tui-layouts-status {
	font-size: 0.80em;
	color: var(--midcolor);
}

.tui-layouts-row button {
	appearance: none;
	background: none;
	border: 1px solid var(--linecolor);
	color: var(--bodycolor);
	font-family: var(--tui-font);
	font-size: 0.9em;
	padding: 4px 14px;
	border-radius: var(--tui-window-radius);
	cursor: pointer;
}

.tui-layouts-row button:hover,
.tui-layouts-row button:focus {
	background: var(--shadecolor);
	outline: none;
}

/* Quick-action icon row, above the named-layout list (inc/window-handlers/
   layouts.php) — acts on whatever full-size windows are already open,
   unlike the list below it. No border/background, per the user — just a
   plain icon, twice .icon's own base 1em size, midcolor/darkcolor on hover. */
.tui-layouts-actions-row {
	display: flex;
	gap: 0.5em;
	margin-bottom: 1em;
}

.tui-layouts-action-btn {
	appearance: none;
	background: none;
	border: none;
	padding: 0;
	line-height: 1;
	cursor: pointer;
	color: var(--midcolor);
	display: flex;
	align-items: center;
}

.tui-layouts-action-btn:hover {
	color: var(--darkcolor);
}

.tui-layouts-action-btn .icon {
	width: 2em;
	height: 2em;
}

.tui-settings textarea {
	display: block;
	width: 100%;
	background: var(--backgroundcolor);
	border: 1px solid var(--linecolor);
	color: var(--bodycolor);
	font-family: var(--tui-font);
	font-size: 0.9em;
	line-height: 1.5;
	padding: 8px;
	resize: vertical;
}

.tui-settings-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 10px;
	margin-bottom: 24px;
}

/* Less space under the buttons when a toggle row's title follows (Reset Window Positions, then Suppress Window Engine): 1em. */
.tui-settings-actions--tight {
	margin-bottom: 1em;
}

.tui-settings-actions button {
	appearance: none;
	background: none;
	border: 1px solid var(--linecolor);
	color: var(--bodycolor);
	font-family: var(--tui-font);
	font-size: 0.9em;
	padding: 6px 16px;
	cursor: pointer;
}

.tui-settings-actions button:hover,
.tui-settings-actions button:focus {
	background: var(--shadecolor);
	outline: none;
}

.tui-settings-actions button:disabled {
	opacity: 0.5;
	cursor: default;
}

.tui-settings-status {
	color: var(--midcolor);
	font-size: 0.80em;
}

/* Membership window (inc/member-account.php). */
.tui-membership-row {
	display: flex;
	justify-content: space-between;
	gap: 1em;
	padding: 0.5em 0;
	border-bottom: 1px solid var(--linecolor);
}

.tui-membership-row:last-child {
	border-bottom: none;
}

.tui-membership-label {
	color: var(--bodycolor);
}

.tui-membership-value {
	color: var(--bodycolor);
}

.tui-membership-section {
	margin: 12px 0;
	font-size: 1em;
	color: var(--darkcolor);
}

/* The first heading sits right against .tui-window-body's own 16px top
   padding (margins don't collapse across padding), so its margin-top
   stacks on top of that instead of being it — 28px total vs. the 12px
   every other heading gets from its own margin-top alone. Cancels that
   out so the gap above # Account matches the rest. */
.tui-membership-section:first-child {
	margin-top: -4px;
}

/* In the Settings panel (which has its own 1em padding, no window body padding to cancel) it sits where the other groups' first heading does. */
.tui-settings-panel .tui-membership-section:first-child {
	margin-top: 0;
}

/* Delete Account only — a line above it to set the destructive section
   apart from Privacy/My Data just above, same var(--linecolor) as
   .tui-membership-links' own border-top. */
.tui-membership-section--divider {
	padding-top: 16px;
	border-top: 1px solid var(--linecolor);
}

.tui-membership-links {
	border-top: 1px solid var(--linecolor);
}

.tui-membership-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 8px 0;
	color: var(--bodycolor);
	text-decoration: none;
	border-bottom: 1px solid var(--linecolor);
}

/* Pinned to the right, its own explicit color rather than inheriting the
   link's own currentColor straight off. */
.tui-membership-link-icon {
	flex: 0 0 auto;
	color: var(--bodycolor);
}

.tui-membership-link:hover,
.tui-membership-link:focus {
	background: var(--shadecolor);
	color: var(--bodycolor);
	outline: none;
}

.tui-membership-link:hover .tui-membership-link-icon,
.tui-membership-link:focus .tui-membership-link-icon {
	color: var(--linkcolor);
}

/* Destructive action — colour-coded regardless of theme, matching the
   Status red above rather than any theme's --linkcolor. */
.tui-membership-link--danger {
	color: red;
	border-bottom: none; /* no line under Send Deletion Request... */
}

/* ...nor above it */
.tui-membership-links:has(.tui-membership-link--danger) {
	border-top: none;
}

.tui-membership-link--danger:hover,
.tui-membership-link--danger:focus {
	color: red;
}

/* Same red, default and hover both — overrides the icon's own
   midcolor/linkcolor rules above (same selector specificity, so this has
   to come after them to win). */
.tui-membership-link--danger .tui-membership-link-icon,
.tui-membership-link--danger:hover .tui-membership-link-icon,
.tui-membership-link--danger:focus .tui-membership-link-icon {
	color: red;
}

/* Status is the one value here worth colour-coding regardless of theme —
   matches the app's own Color.green/Color.red for the same field. */
.tui-membership-status--active {
	color: green;
}

.tui-membership-status--expired {
	color: red;
}

.tui-membership-payments {
	width: 100%;
	border-collapse: collapse;
	color: var(--bodycolor);
}

.tui-membership-payments th {
	color: var(--midcolor);
	text-transform: uppercase;
	font-size: 0.80em;
	font-weight: normal;
	letter-spacing: 0.04em;
	text-align: left;
	padding: 6px 0;
	border-bottom: 1px dashed var(--linecolor);
}

.tui-membership-payments td {
	padding: 6px 0;
	border-bottom: 1px solid var(--linecolor);
}

/* Same convention as .tui-listing-row:not(.tui-listing-head):hover. */
.tui-membership-payments tbody tr:hover {
	background: var(--shadecolor);
}

.tui-membership-note {
	margin: 0.5em 0 8px;
	color: var(--bodycolor);
}

/* In the Membership group of Settings the lines between rows, links and payments are dashed (the same classes elsewhere, the Education window and an
   author's Admin block, keep their solid ones). Only the style is changed, so the rows with no line (the last one, the deletion request)
   still have none. */
.tui-settings-panel[data-settings-panel="membership"] .tui-membership-row:not(:last-child),
.tui-settings-panel[data-settings-panel="membership"] .tui-membership-link:not(.tui-membership-link--danger),
.tui-settings-panel[data-settings-panel="membership"] .tui-membership-payments td {
	border-bottom-style: dashed;
}

.tui-settings-panel[data-settings-panel="membership"] .tui-membership-links:not(:has(.tui-membership-link--danger)),
.tui-settings-panel[data-settings-panel="membership"] .tui-membership-section--divider {
	border-top-style: dashed;
}

/* The last item of a section has no line under it (the next heading, or the end of the panel, closes it). */
.tui-settings-panel[data-settings-panel="membership"] .tui-membership-link:not(.tui-membership-link--danger):last-child,
.tui-settings-panel[data-settings-panel="membership"] .tui-membership-payments tbody tr:last-child td {
	border-bottom: none;
}

.tui-membership-bullets {
	margin: 0 0 4px;
	padding-left: 18px;
	color: var(--bodycolor);
}

.tui-membership-bullets li {
	margin-bottom: 4px;
}

.tui-settings-bg-preview {
	margin-bottom: 10px;
	border: 1px solid var(--linecolor);
	max-width: 240px;
}

.tui-settings-bg-preview img {
	display: block;
	width: 100%;
	height: auto;
}

.tui-settings-bg input[type="file"] {
	display: block;
	width: 100%;
	margin-bottom: 10px;
	color: var(--bodycolor);
	font-family: var(--tui-font);
	font-size: 0.80em;
}

.tui-settings-bg input[type="file"]::file-selector-button {
	appearance: none;
	background: none;
	border: 1px solid var(--linecolor);
	color: var(--bodycolor);
	font-family: var(--tui-font);
	font-size: 1em;
	padding: 5px 14px;
	margin-right: 10px;
	cursor: pointer;
}

.tui-settings-bg input[type="file"]::file-selector-button:hover,
.tui-settings-bg input[type="file"]::file-selector-button:focus {
	background: var(--shadecolor);
	outline: none;
}

/* Login window — wp_login_form()'s default markup (.login-username,
   .login-password, .login-remember, .login-submit). */
.tui-login p {
	margin: 0 0 14px;
}

.tui-login label {
	display: block;
	margin-bottom: 6px;
	color: var(--midcolor);
	font-size: 0.80em;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.tui-login input[type="text"],
.tui-login input[type="password"] {
	width: 100%;
	background: var(--backgroundcolor);
	border: 1px solid var(--linecolor);
	color: var(--bodycolor);
	font-family: var(--tui-font);
	font-size: 1em;
	padding: 6px 8px;
}

/* The fields' border keeps the link colour (see the hover rule further down) while the field is being typed in. */
.tui-login input[type="text"]:focus,
.tui-login input[type="password"]:focus {
	border-color: var(--linkcolor);
	outline: none;
}

.tui-login .login-remember label {
	display: flex;
	align-items: center;
	gap: 6px;
	text-transform: none;
	letter-spacing: normal;
	font-size: 0.9em;
	color: var(--bodycolor);
}

.tui-login .login-remember input[type="checkbox"] {
	appearance: none;
	position: relative;
	flex: 0 0 auto;
	width: 14px;
	height: 14px;
	margin: 0;
	border: 1px solid var(--linecolor);
	background: var(--backgroundcolor);
	cursor: pointer;
}

.tui-login .login-remember input[type="checkbox"]:hover {
	border-color: var(--darkcolor);
}

.tui-login .login-remember input[type="checkbox"]:focus-visible {
	outline: 1px solid var(--darkcolor);
	outline-offset: 2px;
}

.tui-login .login-remember input[type="checkbox"]:checked {
	background: var(--darkcolor);
	border-color: var(--darkcolor);
}

.tui-login .login-remember input[type="checkbox"]:checked::after {
	content: "";
	position: absolute;
	left: 4px;
	top: 1px;
	width: 4px;
	height: 7px;
	border: solid var(--backgroundcolor);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.tui-login .login-submit {
	margin-bottom: 0;
}

/* Profile-edit form (inc/window-handlers/profile.php) — same field/label
   treatment as .tui-login above. */
.tui-profile-field {
	margin: 0 0 14px;
}

/* Discord/Twitter-X/Instagram/Other URL — two columns rather than one
   long stack, since these four are all short, similarly-shaped fields.
   Falls back to a single column once the window's narrow enough to
   trigger .tui-window--narrow-640 (see tui-window.js). */
.tui-profile-field-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	column-gap: 20px;
}

.tui-window--narrow-640 .tui-profile-field-grid {
	grid-template-columns: 1fr;
}

.tui-profile-field label {
	display: block;
	margin-bottom: 0.5em;
	color: var(--darkcolor);
	font-size: 0.80em;
	text-transform: capitalize;
	letter-spacing: 0.04em;
}

.tui-profile-field label.tui-profile-label-asis {
	text-transform: none;
}

/* Every placeholder: body text at half strength, so it reads on any theme. */
input::placeholder,
textarea::placeholder {
	color: var(--bodycolor);
	opacity: 0.5;
}

.tui-profile-input {
	width: 100%;
	background: var(--backgroundcolor);
	border: 1px solid var(--linecolor);
	color: var(--bodycolor);
	font-family: var(--tui-font);
	font-size: 1em;
	padding: 6px 8px;
}

.tui-profile-input:disabled {
	color: var(--bodycolor);
	cursor: default;
	opacity: 0.5;
}

textarea.tui-profile-input {
	resize: vertical; /* always the window's full width, only the height can be dragged */
	padding-right: 1em;
}

.tui-profile-error {
	margin: 0 0 14px;
	padding: 8px 10px;
	border: 1px solid var(--linecolor);
	color: var(--bodycolor);
	background: var(--shadecolor);
}

/* Education window (inc/window-handlers/education.php) — reuses
   .tui-profile-*/.tui-membership-* for everything but these two states. */
.tui-education-note {
	color: var(--midcolor);
}

.tui-education-success {
	margin: 0 0 14px;
	padding: 8px 10px;
	border: 1px solid var(--linecolor);
	color: var(--bodycolor);
	background: var(--shadecolor);
}

/* The label above the account selector reads as a sentence, not a small field label. */
.tui-profile-field label[for="tui-education-select"] {
	color: var(--bodycolor);
	font-size: 1em;
}

#tui-education-select {
	border:0;
	background:transparent;
	border:1px solid var(--linecolor);
	-webkit-appearance: none;
}

.tui-profile-submit {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 14px 0 0;
}

/* The Update <button> defaults to line-height: normal while the View Profile <a> inherits the body's 1.6, so the link was taller. */
.tui-profile-submit .tui-btn {
	line-height: inherit;
}

.tui-profile-status {
	color: var(--midcolor);
	font-size: 0.80em;
}

/* Skills capsule editor (see the skills field in
   can_v7_render_profile_form() and main.js's 'profile' handler) — same
   box treatment as .tui-profile-input, same pill look as the read-only
   .tui-author-skill on the author window. */
.tui-skills-box {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	align-content: flex-start;
	gap: 6px;
	background: var(--backgroundcolor);
	border: 1px solid var(--linecolor);
	padding: 6px 8px;
	cursor: text;
	resize: vertical; /* always the window's full width, only the height can be dragged */
	padding-right: 1em;
	overflow: auto;
}

.tui-skill-token {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 2px 10px;
	border-radius: 999px;
	background: var(--shadecolor);
	color: var(--bodycolor);
	font-size: 0.80em;
	white-space: nowrap;
}

.tui-skill-token button {
	appearance: none;
	background: none;
	border: none;
	padding: 0;
	color: var(--bodycolor);
	font: inherit;
	opacity: 0.6;
	cursor: pointer;
}

.tui-skill-token button:hover,
.tui-skill-token button:focus {
	opacity: 1;
	outline: none;
}

.tui-skills-box input {
	flex: 1;
	min-width: 120px;
	border: none;
	outline: none;
	background: transparent;
	color: var(--bodycolor);
	font-family: var(--tui-font);
	font-size: 1em;
	padding: 4px 0;
}

.tui-skills-suggest {
	border: 1px solid var(--linecolor);
	border-top: none;
	background: var(--backgroundcolor);
	margin-top: -1px;
}

.tui-skills-suggest-item {
	padding: 6px 10px;
	color: var(--bodycolor);
	font-size: 0.9em;
	cursor: pointer;
}

.tui-skills-suggest-item:hover,
.tui-skills-suggest-item.is-active {
	background: var(--shadecolor);
}

.tui-login input[type="submit"] {
	appearance: none;
	background: none;
	border: 1px solid var(--linecolor);
	color: var(--bodycolor);
	font-family: var(--tui-font);
	font-size: 0.9em;
	padding: 6px 16px;
	cursor: pointer;
}

.tui-login input[type="submit"]:hover,
.tui-login input[type="submit"]:focus {
	background: var(--shadecolor);
	outline: none;
}

/* Font size slider, rendered inside the font picker window. */
.tui-font-size {
	padding: 10px 4px 16px;
	border-bottom: 1px dashed var(--linecolor);
	margin-bottom: 4px;
}

.tui-font-size label {
	display: flex;
	justify-content: space-between;
	color: var(--midcolor);
	font-size: 0.80em;
	margin-bottom: 8px;
}

.tui-font-size-value {
	color: var(--darkcolor);
}

/* Flat 1px bar; the part up to the thumb is drawn in --bodycolor from the --fill percentage main.js sets. */
.tui-font-size input[type="range"] {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	height: 3px; /* as tall as the 3px notches; the line itself is the 1px gradient layer below */
	background-color: transparent;
	/* Eight hand-drawn notches (9–16px, one every 1/7 of the track), then the filled part up to the thumb underneath. */
	background-image:
		linear-gradient(var(--midcolor), var(--midcolor)),
		linear-gradient(var(--midcolor), var(--midcolor)),
		linear-gradient(var(--midcolor), var(--midcolor)),
		linear-gradient(var(--midcolor), var(--midcolor)),
		linear-gradient(var(--midcolor), var(--midcolor)),
		linear-gradient(var(--midcolor), var(--midcolor)),
		linear-gradient(var(--midcolor), var(--midcolor)),
		linear-gradient(var(--midcolor), var(--midcolor)),
		linear-gradient(var(--bodycolor), var(--bodycolor)),
		linear-gradient(var(--linecolor), var(--linecolor));
	background-size: 2px 3px, 2px 3px, 2px 3px, 2px 3px, 2px 3px, 2px 3px, 2px 3px, 2px 3px, var(--fill, 0%) 1px, 100% 1px;
	background-repeat: no-repeat;
	background-position:
		0% center, 14.2857% center, 28.5714% center, 42.8571% center,
		57.1429% center, 71.4286% center, 85.7143% center, 100% center,
		0 center, 0 center;
	outline: none;
	margin: 0;
	/* Snapped to whole pixels where round() is supported (the declarations above stay for older browsers), so the markers don't jump
	   about while the window moves. */
	background-size: 2px 3px, 2px 3px, 2px 3px, 2px 3px, 2px 3px, 2px 3px, 2px 3px, 2px 3px, round(nearest, var(--fill, 0%), 1px) 1px, 100% 1px;
	background-position:
		round(nearest, 0%, 1px) center,
		round(nearest, 14.2857%, 1px) center,
		round(nearest, 28.5714%, 1px) center,
		round(nearest, 42.8571%, 1px) center,
		round(nearest, 57.1429%, 1px) center,
		round(nearest, 71.4286%, 1px) center,
		round(nearest, 85.7143%, 1px) center,
		round(nearest, 100%, 1px) center,
		0 center,
		0 center;
}

.tui-font-size input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--darkcolor);
	cursor: pointer;
	border: none;
}

.tui-font-size input[type="range"]::-moz-range-thumb {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--darkcolor);
	cursor: pointer;
	border: none;
}

/* Generic slider field — same treatment as .tui-font-size above, reused
   wherever else a labeled range input shows up (e.g. settings window). */
.tui-slider-field {
	margin-bottom: 12px;
}

.tui-slider-field label {
	margin-bottom: 0px !important;
}

.tui-slider-field:last-child {
	margin-bottom: 0;
}

.tui-slider-field label {
	display: flex;
	justify-content: space-between;
	color: var(--midcolor);
	font-size: 1em;
	margin-bottom: 8px;
}

.tui-slider-field-value {
	color: var(--darkcolor);
}

.tui-slider-field input[type="range"] {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	height: 1px;
	background: linear-gradient(to right, var(--bodycolor) var(--fill, 0%), var(--linecolor) var(--fill, 0%));
	outline: none;
	margin: 0;
}

/* The rounded-corners slider (0–16px, one step each): a marker at every step, 3px tall like the font size slider's, with the 1px line through them.
   The thumb (8px) travels from 4px in to 4px short of the end, so the markers are centred on that: tiles of (width − 8px) / 16 starting 3px in, each holding one 2px marker at its left, and the last marker is its own layer at the right. */
.tui-slider-field input[data-window-radius-slider] {
	height: 3px;
	background-color: transparent;
	background-image:
		linear-gradient(var(--midcolor), var(--midcolor)),
		linear-gradient(to right, var(--midcolor) 0 2px, transparent 2px),
		linear-gradient(var(--bodycolor), var(--bodycolor)),
		linear-gradient(var(--linecolor), var(--linecolor));
	background-size: 2px 3px, calc((100% - 8px) / 16) 3px, var(--fill, 0%) 1px, 100% 1px;
	background-repeat: no-repeat, repeat-x, no-repeat, no-repeat;
	background-position: right 3px center, 3px center, 0 center, 0 center;
	/* The markers, the fill and the line each snapped to whole pixels (round(), where supported; the declarations above stay for older
	   browsers): a fractional position made them jump about while the window moved. */
	background-image:
		linear-gradient(var(--midcolor), var(--midcolor)),
		linear-gradient(var(--midcolor), var(--midcolor)),
		linear-gradient(var(--midcolor), var(--midcolor)),
		linear-gradient(var(--midcolor), var(--midcolor)),
		linear-gradient(var(--midcolor), var(--midcolor)),
		linear-gradient(var(--midcolor), var(--midcolor)),
		linear-gradient(var(--midcolor), var(--midcolor)),
		linear-gradient(var(--midcolor), var(--midcolor)),
		linear-gradient(var(--midcolor), var(--midcolor)),
		linear-gradient(var(--midcolor), var(--midcolor)),
		linear-gradient(var(--midcolor), var(--midcolor)),
		linear-gradient(var(--midcolor), var(--midcolor)),
		linear-gradient(var(--midcolor), var(--midcolor)),
		linear-gradient(var(--midcolor), var(--midcolor)),
		linear-gradient(var(--midcolor), var(--midcolor)),
		linear-gradient(var(--midcolor), var(--midcolor)),
		linear-gradient(var(--midcolor), var(--midcolor)),
		linear-gradient(var(--bodycolor), var(--bodycolor)),
		linear-gradient(var(--linecolor), var(--linecolor));
	background-size: 2px 3px, 2px 3px, 2px 3px, 2px 3px, 2px 3px, 2px 3px, 2px 3px, 2px 3px, 2px 3px, 2px 3px, 2px 3px, 2px 3px, 2px 3px, 2px 3px, 2px 3px, 2px 3px, 2px 3px, round(nearest, var(--fill, 0%), 1px) 1px, 100% 1px;
	background-repeat: no-repeat;
	background-position:
		round(nearest, calc(3px + (100% - 6px) * 0 / 16), 1px) center,
		round(nearest, calc(3px + (100% - 6px) * 1 / 16), 1px) center,
		round(nearest, calc(3px + (100% - 6px) * 2 / 16), 1px) center,
		round(nearest, calc(3px + (100% - 6px) * 3 / 16), 1px) center,
		round(nearest, calc(3px + (100% - 6px) * 4 / 16), 1px) center,
		round(nearest, calc(3px + (100% - 6px) * 5 / 16), 1px) center,
		round(nearest, calc(3px + (100% - 6px) * 6 / 16), 1px) center,
		round(nearest, calc(3px + (100% - 6px) * 7 / 16), 1px) center,
		round(nearest, calc(3px + (100% - 6px) * 8 / 16), 1px) center,
		round(nearest, calc(3px + (100% - 6px) * 9 / 16), 1px) center,
		round(nearest, calc(3px + (100% - 6px) * 10 / 16), 1px) center,
		round(nearest, calc(3px + (100% - 6px) * 11 / 16), 1px) center,
		round(nearest, calc(3px + (100% - 6px) * 12 / 16), 1px) center,
		round(nearest, calc(3px + (100% - 6px) * 13 / 16), 1px) center,
		round(nearest, calc(3px + (100% - 6px) * 14 / 16), 1px) center,
		round(nearest, calc(3px + (100% - 6px) * 15 / 16), 1px) center,
		round(nearest, calc(3px + (100% - 6px) * 16 / 16), 1px) center,
		0 center,
		0 center;
}

.tui-slider-field input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--darkcolor);
	cursor: pointer;
	border: none;
}

.tui-slider-field input[type="range"]::-moz-range-thumb {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--darkcolor);
	cursor: pointer;
	border: none;
}

/* Theme picker list, rendered inside a floating window. */
.tui-theme-list {
	display: flex;
	flex-direction: column;
}

.tui-theme-option {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	appearance: none;
	background: none;
	border: none;
	border-bottom: 1px dashed var(--linecolor);
	color: var(--bodycolor);
	font: inherit;
	text-align: left;
	padding: 8px 4px;
	cursor: pointer;
}

.tui-theme-option:last-child {
	border-bottom: none;
}

/* The theme that is set: a dot pinned to the right of its row (assets/js/main.js markCurrentTheme()). */
.tui-theme-option {
	position: relative;
}

.tui-theme-option.is-current::after {
	content: "";
	position: absolute;
	right: 8px;
	top: 50%;
	width: 0.5em;
	height: 0.5em;
	margin-top: -0.25em;
	border-radius: 50%;
	background: var(--darkcolor);
}

.tui-theme-option:hover,
.tui-theme-option:focus {
	background: var(--shadecolor);
	outline: none;
}

/* Each swatch carries its own data-theme="<slug>" (see
   inc/window-handlers/theme.php) so its chips' colors resolve to that
   theme's own values via the same [data-theme="…"] rules in theme.css
   that switch the whole site — one source of truth, no hardcoded-per-
   swatch colors to keep in sync by hand. The "Custom" swatch is the one
   exception: each chip sets its background directly via inline style,
   since a user's custom theme has no data-theme rule of its own. */
.tui-theme-swatch {
	display: inline-flex;
	flex: 0 0 auto;
	border: 1px solid var(--linecolor);
}

.tui-theme-swatch-chip {
	width: 6px;
	height: 12px;
}

.tui-theme-swatch-chip[data-chip="backgroundcolor"] { background: var(--backgroundcolor); }
.tui-theme-swatch-chip[data-chip="bodycolor"] { background: var(--bodycolor); }
.tui-theme-swatch-chip[data-chip="linkcolor"] { background: var(--linkcolor); }
.tui-theme-swatch-chip[data-chip="darkcolor"] { background: var(--darkcolor); }
.tui-theme-swatch-chip[data-chip="midcolor"] { background: var(--midcolor); }

/* -----------------------------------------------------------------------
   Theme Designer window (inc/window-handlers/theme-designer.php)
   ----------------------------------------------------------------------- */

.tui-theme-designer-intro {
	margin: 0 0 16px;
	color: var(--bodycolor);
	font-size: 0.80em;
}

/* Plain inline text, not buttons — "Start from: Silver, Light, …" reads
   as one sentence, per the user. */
.tui-theme-designer-presets {
	margin: 0 0 16px;
	padding-bottom: 16px;
	border-bottom: 1px dashed var(--linecolor);
	color: var(--bodycolor);
	font-size: 0.80em;
}

.tui-theme-designer-preset {
	appearance: none;
	background: none;
	border: none;
	padding: 0;
	margin: 0;
	color: var(--linkcolor);
	font-family: inherit;
	font-size: inherit;
	cursor: pointer;
}

.tui-theme-designer-preset:hover,
.tui-theme-designer-preset:focus {
	color: var(--darkcolor);
	outline: none;
}

.tui-theme-designer-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 8px 0;
	border-bottom: 1px dashed var(--linecolor);
}

.tui-theme-designer-row label {
	color: var(--bodycolor);
	font-size: 0.80em;
}

.tui-theme-designer-var {
	display: block;
	margin-top: 2px;
	color: var(--codecolor);
	font-size: 1em;
}

.tui-theme-designer-inputs {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 0 0 auto;
}

.tui-theme-designer-inputs input[type="color"] {
	width: 32px;
	height: 28px;
	padding: 0;
	background: var(--backgroundcolor);
	border: 1px solid var(--linecolor);
	cursor: pointer;
}

/* The gap wasn't this input's own padding (already 0 above) — browsers
   render the actual color swatch as an internal pseudo-element with its
   own UA-stylesheet inset/border, independent of that. */
.tui-theme-designer-inputs input[type="color"]::-webkit-color-swatch-wrapper {
	padding: 0;
}

.tui-theme-designer-inputs input[type="color"]::-webkit-color-swatch {
	border: none;
}

.tui-theme-designer-inputs input[type="color"]::-moz-color-swatch {
	border: none;
}

.tui-theme-designer-text {
	width: 100px;
	background: var(--backgroundcolor);
	border: 1px solid var(--linecolor);
	color: var(--bodycolor);
	font-family: var(--tui-font);
	font-size: 0.80em;
	padding: 5px 6px;
}

.tui-theme-designer-row--filter .tui-theme-designer-text {
	width: 220px;
}

.tui-theme-designer-palette {
	margin-top: 16px;
	padding: 12px 0 0;
}

.tui-theme-designer-palette-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 8px;
	margin-bottom: 8px;
	color: var(--midcolor);
	font-size: 0.80em;
}

.tui-theme-designer-palette-head button {
	appearance: none;
	background: none;
	border: none;
	color: var(--linkcolor);
	font-family: var(--tui-font);
	font-size: 1em;
	padding: 0;
	cursor: pointer;
}

.tui-theme-designer-palette-head button:hover,
.tui-theme-designer-palette-head button:focus {
	color: var(--darkcolor);
	outline: none;
}

.tui-theme-designer-canvas {
	display: block;
	max-width: 100%;
	border: 1px solid var(--linecolor);
}

.tui-theme-designer-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px dashed var(--linecolor);
}

.tui-theme-designer-actions [data-theme-designer-reset] {
	appearance: none;
	background: none;
	border: none;
	color: var(--linkcolor);
	font-family: var(--tui-font);
	font-size: 0.80em;
	padding: 0;
	cursor: pointer;
}

.tui-theme-designer-actions [data-theme-designer-reset]:hover,
.tui-theme-designer-actions [data-theme-designer-reset]:focus {
	color: var(--bodycolor);
	outline: none;
}

.tui-theme-designer-actions .tui-settings-status {
	flex: 1 1 auto;
}

.tui-theme-designer-actions .tui-btn {
	flex: 0 0 auto;
	margin-left: auto;
}

/* -----------------------------------------------------------------------
   Floating windows
   ----------------------------------------------------------------------- */

.tui-windows {
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 500;
}

.tui-window {
	position: fixed;
	pointer-events: auto;
	/* Matches .tui-shell's own left+right padding (14px each side) — a
	   window can span edge-to-edge within the shell's gutters, same as the
	   ≤500px breakpoint below already does with its own 12px padding. */
	width: min(calc(100vw - 32px), 520px);
	max-width: calc(100vw - 32px);
	background: var(--backgroundcolor);
	border: 1px solid var(--linecolor);
	border-radius: var(--tui-window-radius);
	box-shadow: 0 var(--tui-window-shadow-y) var(--tui-window-shadow-blur) rgba(0, 0, 0, var(--tui-window-shadow-opacity, 0.2));
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

/* Per-type default opening width — only takes effect on a window's very
   first open (a saved/pinned window's own remembered width, set inline in
   tui-window.js, always wins over this). Featured's fixed 180px menu
   column (.tui-featured-menu) leaves its actual content pane cramped at
   the general 520px default. */
.tui-window[data-content-type="featured"] {
	width: min(calc(100vw - 32px), 840px);
	height: min(80vh, 640px);
}

.tui-window[data-content-type="latest"] {
	width: min(calc(100vw - 32px), 840px);
	height: min(80vh, 600px);
}

.tui-window[data-content-type="books"] {
	width: min(calc(100vw - 32px), 840px);
	height: min(80vh, 640px);
}

.tui-window[data-content-type="events"] {
	width: min(calc(100vw - 32px), 840px);
}

.tui-window[data-content-type="jobs"] {
	width: min(calc(100vw - 32px), 60vw);
}

.tui-window[data-content-type="saved"] {
	width: min(calc(100vw - 32px), 840px);
}

.tui-window[data-content-type="settings"] {
	width: min(calc(100vw - 32px), 680px);
}

/* Not in widget mode, which has its own (shrink-to-fit) sizing below — the
   :not() keeps these !importants from beating it. Fixed 280px wide, as tall as
   the list needs, not resizable; !important so a size saved from an earlier
   resize can't override it. */
.tui-window[data-content-type="layouts"]:not(.tui-window--widget) {
	width: 280px !important;
	max-width: calc(100vw - 32px);
	height: auto !important;
}

.tui-window[data-content-type="layouts"]:not(.tui-window--widget) .tui-window-resize {
	display: none;
}

.tui-window[data-content-type="layouts"]:not(.tui-window--widget) .tui-window-body {
	max-height: calc(100vh - 100px); /* Only a safety cap for a very short viewport. */
}

/* Widget mode (see main.js's setWindowWidget()/the [data-window-action="widget"]
   titlebar button) — Layouts collapses down to just its own quick-action
   icon row, same shrink-to-content idea as .tui-window--mini elsewhere,
   but for the whole named-layout list rather than a listing's own rows.
   The actual shrink-to-fit sizing is generic (.tui-window--widget below,
   not scoped to Layouts) — this only hides what's Layouts-specific. */
.tui-window[data-content-type="layouts"].tui-window--widget .tui-layouts-list {
	display: none;
}

.tui-window[data-content-type="layouts"].tui-window--widget .tui-layouts-actions-row {
	margin-bottom: 0;
}

/* Archives (CAN Taxonomy browser) — a full tabs+sidebar+content browser UI,
   same "wide" treatment as featured/latest/books rather than the generic
   520px default. Giving the window itself a real, definite height (rather
   than leaving it to grow around whatever .can-layout's own height turns
   out to be) is what makes .can-layout's own height: 100% below actually
   mean something stable, and makes resizing this window actually resize
   the visible content instead of it staying a fixed size regardless. */
.tui-window[data-content-type="archives"] {
	width: min(calc(100vw - 32px), 840px);
	height: min(80vh, 640px);
}

/* API Docs (CAN API Docs browser) — same reasoning/treatment as Archives
   just above (sidebar+content browser UI, own .can-layout sizing bug). */
.tui-window[data-content-type="api-docs"] {
	width: min(calc(100vw - 32px), 840px);
	height: min(80vh, 640px);
}

.tui-window[data-content-type="community"]:not(.tui-window--widget) {
	width: min(calc(100vw - 32px), 840px);
	height: min(840px, calc(100dvh - 100px));
}

/* The body fills the window (it is otherwise capped at 520px, which left a white block under it). */
.tui-window[data-content-type="community"]:not(.tui-window--widget) .tui-window-body {
	max-height: none;
}

/* Events, Jobs, Latest, Archives and Books open the same size (their saved size wins on a later open). */
.tui-window[data-content-type="events"]:not(.tui-window--mini),
.tui-window[data-content-type="jobs"]:not(.tui-window--mini),
.tui-window[data-content-type="latest"]:not(.tui-window--mini),
.tui-window[data-content-type="archives"]:not(.tui-window--widget),
.tui-window[data-content-type="books"]:not(.tui-window--mini) {
	width: min(calc(100vw - 32px), 840px);
	height: min(840px, calc(100dvh - 100px));
}

.tui-window[data-content-type="events"]:not(.tui-window--mini) .tui-window-body,
.tui-window[data-content-type="jobs"]:not(.tui-window--mini) .tui-window-body,
.tui-window[data-content-type="books"]:not(.tui-window--mini) .tui-window-body {
	max-height: none;
}

.tui-window[data-content-type="activity"] {
	width: 70vw;
	height: 91vh;
	height: calc(100dvh - 130px); /* the visible height on iPad Safari, minus the header and footer */
}

/* Themes — a short, single-column list of swatch+name rows
   (.tui-theme-list/-option, unlike the generic listing/single-item types
   above), not content that benefits from the generic 520px default —
   fit-content shrinks it to its own natural (narrower) width instead,
   per the user. Height is already content-sized by default (no per-type
   override needed — .tui-window itself has no explicit height, and the
   list is short enough to stay under .tui-window-body's own
   min(70vh, 520px) cap without scrolling). */
.tui-window[data-content-type="themes"] {
	/* Fixed 280px wide, as tall as the list needs, and not resizable —
	   !important so a width/height saved from an earlier resize (inline, from
	   tui-window.js) can't override it. */
	width: 280px !important;
	max-width: calc(100vw - 32px);
	height: auto !important;
}

.tui-window[data-content-type="themes"] .tui-window-resize {
	display: none;
}

.tui-window[data-content-type="themes"] .tui-window-body {
	max-height: calc(100vh - 100px); /* Only a safety cap for a very short viewport. */
}

/* Fonts window: same fixed treatment as Themes — 340px wide, as tall as its
   content needs, not resizable (!important so a size saved from an earlier
   resize can't override it). */
.tui-window[data-content-type="fonts"] {
	width: 340px !important;
	max-width: calc(100vw - 32px);
	height: auto !important;
}

.tui-window[data-content-type="fonts"] .tui-window-resize {
	display: none;
}

.tui-window[data-content-type="fonts"] .tui-window-body {
	max-height: calc(100vh - 100px); /* Only a safety cap for a very short viewport. */
}

/* The Discord page's window (page 89327, "Discord Invite", template page-templates/discord.php): as tall as its content needs, not
   resizable (!important so a height saved from an earlier resize can't override it). It is a page window, and those share one slot with
   articles and the rest, so this only holds while that page is the one showing. */
.tui-window[data-content-type="page"][data-content-id="89327"] {
	height: auto !important;
}

.tui-window[data-content-type="page"][data-content-id="89327"] .tui-window-resize {
	display: none;
}

.tui-window[data-content-type="page"][data-content-id="89327"] .tui-window-body {
	max-height: calc(100vh - 100px); /* Only a safety cap for a very short viewport. */
}

/* Login window: same fixed treatment as Fonts/Themes — 840px wide, as tall as its
   content needs, not resizable (!important so a size saved earlier can't override it).
   Minimized, it docks at the usual minimized size like any other window. */
.tui-window[data-content-type="login"]:not(.is-minimized) {
	width: 840px !important;
	max-width: calc(100vw - 32px);
	height: auto !important;
}

.tui-window[data-content-type="login"] .tui-window-resize {
	display: none;
}

.tui-window[data-content-type="login"] .tui-window-body {
	max-height: calc(100vh - 100px); /* Only a safety cap for a very short viewport. */
}

/* Welcome window (first sign-in): a fixed size, as tall as its content, not resizable; main.js centres it. */
.tui-window[data-content-type="welcome"]:not(.is-minimized) {
	width: 460px !important;
	max-width: calc(100vw - 32px);
	height: auto !important;
}

.tui-window[data-content-type="welcome"] .tui-window-body {
	max-height: calc(100vh - 100px); /* Fits its content; only a safety cap for a very short viewport. */
}

.tui-window[data-content-type="welcome"] .tui-window-resize,
.tui-window[data-content-type="welcome"] .tui-window-btn-lock,
.tui-window[data-content-type="welcome"] .tui-window-btn-refresh {
	display: none;
}

.tui-welcome {
	font-size: 1em;
}

/* The diagram above the title: 9.6s loop. A moves, B moves, A is minimised and expanded, B closes, A closes. */
.tui-welcome-diagram {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
	padding: 0.5em 0; /* space between the animation and the link under it */
	overflow: visible; /* the outline of a window at the very edge isn't clipped */
}

/* The diagram and the video link, with the dashed line under both. */
.tui-welcome-media {
	border-bottom: 1px dashed var(--linecolor);
}

.tui-welcome-media > p.tui-welcome-video-link {
	margin: 0 0 0.5em;
}

/* The introduction video: the window opens to 80vw (no wider than a 16:9 picture the screen's height can hold), the rest of the
   welcome screen is hidden, and the video sits above a link back (main.js). */
.tui-window[data-content-type="welcome"].tui-welcome-wide:not(.is-minimized) {
	width: min(80vw, calc((100vh - 12em) * 16 / 9)) !important;
	max-width: 80vw;
}

.tui-welcome.is-video > :not(.tui-welcome-video) {
	display: none;
}

.tui-welcome-video-frame {
	aspect-ratio: 16 / 9;
	background: var(--shadecolor);
}

.tui-welcome-video-frame iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

.tui-welcome-video > p {
	margin: 0.75em 0 0;
}

.tui-welcome-frame {
	fill: var(--backgroundcolor);
}

.tui-welcome-bar {
	fill: var(--backgroundcoloralt);
}

/* Everything drawn as a line (outline, titlebar line, X, title, minimise dash, content) is one style, so every inner line
   is the same: 0.5px. */
.tui-welcome-stroke {
	fill: none;
	stroke: var(--bodycolor);
	stroke-width: 0.5px;
	vector-effect: non-scaling-stroke;
}

/* The outline of each window, 1px. */
.tui-welcome-outline {
	fill: none;
	stroke: var(--bodycolor);
	stroke-width: 1px;
	vector-effect: non-scaling-stroke;
}

/* The first window is under the second until it is minimised, and over it after it expands (swapped while it sits docked). */
.tui-welcome-layer--under {
	animation: 16.7s linear infinite tui-welcome-under;
}

.tui-welcome-layer--over {
	animation: 16.7s linear infinite tui-welcome-over;
}

.tui-welcome-win {
	animation: 16.7s ease-in-out infinite;
}

.tui-welcome-win--a {
	animation-name: tui-welcome-a;
}

.tui-welcome-win--b {
	animation-name: tui-welcome-b;
}

/* Window A minimised: its content is hidden quickly first, then the titlebar keeps its height and the same X at half the width
   (the dash slides in, the title goes). */
.tui-welcome-body,
.tui-welcome-shrink {
	transform-box: fill-box;
	transform-origin: 0 0;
}

.tui-welcome-body {
	transform-origin: 50% 0;
}

/* Both windows grow taller when the Layouts widget sets them in two columns. */
.tui-welcome-win--a .tui-welcome-body {
	animation: 16.7s ease-in-out infinite tui-welcome-body-a, 16.7s ease-in-out infinite tui-welcome-grow-a;
}

.tui-welcome-win--b .tui-welcome-body {
	animation: 16.7s ease-in-out infinite tui-welcome-grow-b;
}

.tui-welcome-win--a .tui-welcome-shrink {
	animation: 16.7s ease-in-out infinite tui-welcome-shrink-a;
}

.tui-welcome-win--a .tui-welcome-slide {
	animation: 16.7s ease-in-out infinite tui-welcome-slide-a, 16.7s linear infinite tui-welcome-dash;
}

/* Minimised, the dash is a small square (restore), which the cursor presses to expand the window. */
.tui-welcome-square {
	opacity: 0;
	animation: 16.7s linear infinite tui-welcome-square;
}

/* The X and the minimise dash keep their shape when a window is stretched into its column (the window group is scaled sideways),
   and keep their distance from the window's edge. */
.tui-welcome-x,
.tui-welcome-slide,
.tui-welcome-text,
.tui-welcome-name {
	transform-box: fill-box;
	transform-origin: 0 0;
}

.tui-welcome-win--a .tui-welcome-x {
	animation: 16.7s ease-in-out infinite tui-welcome-x-a;
}

.tui-welcome-win--b .tui-welcome-x {
	animation: 16.7s ease-in-out infinite tui-welcome-x-b;
}

.tui-welcome-win--b .tui-welcome-slide {
	animation: 16.7s ease-in-out infinite tui-welcome-slide-b;
}

.tui-welcome-win--a .tui-welcome-text {
	animation: 16.7s ease-in-out infinite tui-welcome-text-a, 16.7s ease-in-out infinite tui-welcome-text-pin-a;
}

.tui-welcome-win--a .tui-welcome-name {
	animation: 16.7s ease-in-out infinite tui-welcome-text-a, 16.7s ease-in-out infinite tui-welcome-name-pin-a;
}

.tui-welcome-win--a .tui-welcome-rule {
	animation: 16.7s ease-in-out infinite tui-welcome-shrink-a, 16.7s ease-in-out infinite tui-welcome-rule-a;
	shape-rendering: auto;
}

/* Before the windows: the menu button in the top left corner is pressed, an item is chosen and a window opens; again, and the
   second window opens. */
.tui-welcome-menu {
	opacity: 0;
	animation: 16.7s linear infinite tui-welcome-menu;
}

.tui-welcome-menu-press {
	fill: var(--backgroundcoloralt);
	opacity: 0;
	animation: 16.7s linear infinite tui-welcome-menu-press;
}

.tui-welcome-menu-hover {
	fill: var(--backgroundcoloralt);
	opacity: 0;
}

.tui-welcome-menu-hover--1 {
	animation: 16.7s linear infinite tui-welcome-menu-hover-1;
}

.tui-welcome-menu-hover--3 {
	animation: 16.7s linear infinite tui-welcome-menu-hover-3;
}

/* The Layouts widget on the right: always there, a layout row is pointed at and pressed, and the
   windows take their two columns. */
.tui-welcome-hover {
	fill: var(--backgroundcoloralt);
	animation: 16.7s linear infinite tui-welcome-hover;
}

.tui-welcome-press {
	fill: var(--bodycolor);
	opacity: 0;
	animation: 16.7s linear infinite tui-welcome-press;
}

.tui-welcome-press {
	fill-opacity: 0.2;
}

.tui-welcome-cursor {
	fill: var(--bodycolor);
	stroke: var(--backgroundcolor);
	stroke-width: 0.5px;
	animation: 16.7s ease-in-out infinite tui-welcome-cursor;
}

/* The line under the titlebar becomes the window's bottom edge when minimised: as thick as the outline. */
@keyframes tui-welcome-under {
	0%, 55.63% {
		opacity: 1;
	}
	56.24%, 100% {
		opacity: 0;
	}
}

@keyframes tui-welcome-over {
	0%, 55.63% {
		opacity: 0;
	}
	56.24%, 100% {
		opacity: 1;
	}
}

@keyframes tui-welcome-a {
	0%, 11.98% {
		opacity: 0;
		transform: translate(0px, 0px);
	}
	13.78%, 29.7% {
		opacity: 1;
		transform: translate(0px, 0px);
	}
	36.58%, 50% {
		opacity: 1;
		transform: translate(36px, -8px);
	}
	52.28%, 59.22% {
		opacity: 1;
		transform: translate(96px, 90px);
	}
	63.78%, 73.06% {
		opacity: 1;
		transform: translate(36px, -8px);
	}
	78.45%, 92.22% {
		opacity: 1;
		transform: translate(39px, -4px) scale(1.2857, 1);
	}
	94.6%, 100% {
		opacity: 0;
		transform: translate(39px, -4px) scale(1.2857, 1);
	}
}

@keyframes tui-welcome-b {
	0%, 23.35% {
		opacity: 0;
		transform: translate(0px, 0px);
	}
	25.15%, 37.72% {
		opacity: 1;
		transform: translate(0px, 0px);
	}
	44.68%, 73.06% {
		opacity: 1;
		transform: translate(-26px, -13px);
	}
	78.45%, 84.43% {
		opacity: 1;
		transform: translate(-61.64px, -40px) scale(1.0909, 1);
	}
	87.13%, 100% {
		opacity: 0;
		transform: translate(-61.64px, -40px) scale(1.0909, 1);
	}
}

@keyframes tui-welcome-rule-a {
	0%, 50% {
		stroke-width: 0.5px;
	}
	52.28%, 59.22% {
		stroke-width: 1px;
	}
	63.78%, 100% {
		stroke-width: 0.5px;
	}
}

@keyframes tui-welcome-body-a {
	0%, 47.66% {
		opacity: 1;
	}
	49.39%, 63.78% {
		opacity: 0;
	}
	65.51%, 100% {
		opacity: 1;
	}
}

@keyframes tui-welcome-shrink-a {
	0%, 50% {
		transform: scaleX(1);
	}
	52.28%, 59.22% {
		transform: scaleX(0.5);
	}
	63.78%, 100% {
		transform: scaleX(1);
	}
}

@keyframes tui-welcome-slide-a {
	0%, 50% {
		transform: translateX(0px);
	}
	52.28%, 59.22% {
		transform: translateX(-28px);
	}
	63.78% {
		transform: translateX(0px);
	}
	73.06% {
		transform: translateX(0px) scaleX(1);
	}
	78.45%, 100% {
		transform: translateX(0.556px) scaleX(0.7778);
	}
}

@keyframes tui-welcome-x-a {
	0%, 73.06% {
		transform: translateX(0px) scaleX(1);
	}
	78.45%, 100% {
		transform: translateX(-0.556px) scaleX(0.7778);
	}
}

/* The lines inside the first window keep their length and their distance from its left edge when it is stretched. */
@keyframes tui-welcome-text-pin-a {
	0%, 73.06% {
		transform: translateX(0px) scaleX(1);
	}
	78.45%, 100% {
		transform: translateX(-1.333px) scaleX(0.7778);
	}
}

@keyframes tui-welcome-name-pin-a {
	0%, 73.06% {
		transform: translateX(0px) scaleX(1);
	}
	78.45%, 100% {
		transform: translateX(-2px) scaleX(0.7778);
	}
}

@keyframes tui-welcome-x-b {
	0%, 73.06% {
		transform: translateX(0px) scaleX(1);
	}
	78.45%, 100% {
		transform: translateX(-0.208px) scaleX(0.9167);
	}
}

@keyframes tui-welcome-slide-b {
	0%, 73.06% {
		transform: translateX(0px) scaleX(1);
	}
	78.45%, 100% {
		transform: translateX(0.208px) scaleX(0.9167);
	}
}

@keyframes tui-welcome-square {
	0%, 52.28% {
		opacity: 0;
	}
	52.69%, 58.98% {
		opacity: 1;
	}
	59.28%, 100% {
		opacity: 0;
	}
}

@keyframes tui-welcome-dash {
	0%, 52.28% {
		opacity: 1;
	}
	52.57%, 58.98% {
		opacity: 0;
	}
	59.28%, 100% {
		opacity: 1;
	}
}

@keyframes tui-welcome-menu {
	0%, 6.28% {
		opacity: 0;
	}
	6.59%, 11.67% {
		opacity: 1;
	}
	11.98%, 17.66% {
		opacity: 0;
	}
	17.96%, 23.05% {
		opacity: 1;
	}
	23.35%, 100% {
		opacity: 0;
	}
}

@keyframes tui-welcome-menu-press {
	0%, 5.98% {
		opacity: 0;
	}
	6.28%, 7.78% {
		opacity: 1;
	}
	8.09%, 17.37% {
		opacity: 0;
	}
	17.66%, 19.17% {
		opacity: 1;
	}
	19.47%, 100% {
		opacity: 0;
	}
}

@keyframes tui-welcome-menu-hover-1 {
	0%, 9.58% {
		opacity: 0;
	}
	9.89%, 11.67% {
		opacity: 1;
	}
	11.98%, 100% {
		opacity: 0;
	}
}

@keyframes tui-welcome-menu-hover-3 {
	0%, 20.96% {
		opacity: 0;
	}
	21.26%, 23.05% {
		opacity: 1;
	}
	23.35%, 100% {
		opacity: 0;
	}
}

@keyframes tui-welcome-text-a {
	0%, 47.66% {
		opacity: 1;
	}
	49.39%, 63.78% {
		opacity: 0;
	}
	65.51%, 100% {
		opacity: 1;
	}
}

@keyframes tui-welcome-grow-a {
	0%, 73.06% {
		transform: scaleY(1);
	}
	78.45%, 100% {
		transform: scaleY(2.7222);
	}
}

@keyframes tui-welcome-grow-b {
	0%, 73.06% {
		transform: scaleY(1);
	}
	78.45%, 100% {
		transform: scaleY(2.3333);
	}
}

@keyframes tui-welcome-hover {
	0%, 69.46% {
		opacity: 0;
	}
	70.36%, 76.04% {
		opacity: 1;
	}
	77.84%, 100% {
		opacity: 0;
	}
}

@keyframes tui-welcome-press {
	0%, 71.86% {
		opacity: 0;
	}
	72.16%, 73.65% {
		opacity: 1;
	}
	73.95%, 100% {
		opacity: 0;
	}
}

@keyframes tui-welcome-cursor {
	0%, 1.2% {
		opacity: 1;
		transform: translate(10px, 40px) scale(0.5);
	}
	2.39% {
		opacity: 1;
		transform: translate(10px, 40px) scale(0.5);
	}
	5.39% {
		opacity: 1;
		transform: translate(-13.5px, 6.5px) scale(0.5);
	}
	9.58%, 11.37% {
		opacity: 1;
		transform: translate(-11px, 16.5px) scale(0.5);
	}
	14.97%, 17.37% {
		opacity: 1;
		transform: translate(-13.5px, 6.5px) scale(0.5);
	}
	20.96%, 22.76% {
		opacity: 1;
		transform: translate(-11px, 27.5px) scale(0.5);
	}
	29.7% {
		opacity: 1;
		transform: translate(50px, 19px) scale(0.5);
	}
	36.58% {
		opacity: 1;
		transform: translate(86px, 11px) scale(0.5);
	}
	37.72% {
		opacity: 1;
		transform: translate(80px, 55px) scale(0.5);
	}
	44.68% {
		opacity: 1;
		transform: translate(54px, 42px) scale(0.5);
	}
	47.3%, 51.5% {
		opacity: 1;
		transform: translate(102px, 11px) scale(0.5);
	}
	58.39%, 63.5% {
		opacity: 1;
		transform: translate(134px, 109px) scale(0.5);
	}
	70.65%, 73.95% {
		opacity: 1;
		transform: translate(135px, 56px) scale(0.5);
	}
	81.43%, 84.43% {
		opacity: 1;
		transform: translate(-14px, 15px) scale(0.5);
	}
	89.22%, 92.22% {
		opacity: 1;
		transform: translate(60.75px, 15px) scale(0.5);
	}
	100% {
		opacity: 1;
		transform: translate(10px, 40px) scale(0.5);
	}
}

@media (prefers-reduced-motion: reduce) {
	.tui-welcome-layer {
		animation: none;
	}

	.tui-welcome-layer--over,
	.tui-welcome-widget,
	.tui-welcome-menu,
	.tui-welcome-menu-press,
	.tui-welcome-square,
	.tui-welcome-cursor {
		display: none;
	}

	.tui-welcome-win,
	.tui-welcome-win .tui-welcome-body,
	.tui-welcome-win .tui-welcome-shrink,
	.tui-welcome-win .tui-welcome-slide,
	.tui-welcome-win .tui-welcome-x,
	.tui-welcome-win .tui-welcome-text,
	.tui-welcome-win .tui-welcome-name {
		animation: none;
	}
}

.tui-welcome-title {
	margin: 0;
	padding: 0 0 0.5em;
	border-bottom: 1px dashed var(--linecolor);
	font-size: 1.5em;
}

.tui-welcome-prompt {
	display: block;
	color: var(--linkcolor);
}

.tui-welcome-title .tui-typewriter-caret {
	background: var(--linkcolor);
}

.tui-welcome > p {
	margin: 1em 0 0;
	padding-bottom: 1em;
	border-bottom: 1px dashed var(--linecolor);
}

/* Inside the diagram, once on load: the site title (the menu button in the corner), then the widget. */
.tui-welcome-site {
	animation: tui-login-fade-in 0.6s ease backwards;
	animation-delay: 0.3s;
}

.tui-welcome-widget {
	animation: tui-login-fade-in 0.6s ease backwards;
	animation-delay: 0.5s;
}

@media (prefers-reduced-motion: reduce) {
	.tui-welcome-site,
	.tui-welcome-widget {
		animation: none;
	}
}

/* The Welcome window itself fades in when it is created (on load, or after a refresh). */
.tui-window[data-content-type="welcome"] {
	animation: tui-login-fade-in 0.6s ease backwards;
}

@media (prefers-reduced-motion: reduce) {
	.tui-window[data-content-type="welcome"] {
		animation: none;
	}
}

/* The window's content fades in one part after another: the animation, then the welcome text, then the links one by one. */
.tui-welcome .tui-welcome-title {
	animation: tui-login-fade-in 0.6s ease backwards;
}

.tui-welcome .tui-welcome-diagram {
	animation: tui-login-fade-in 0.6s ease backwards;
	animation-delay: 0.6s;
}

.tui-welcome > p {
	animation: tui-login-fade-in 0.6s ease backwards;
	animation-delay: 0.3s;
}

.tui-welcome > p.tui-welcome-pick {
	padding-bottom: 0;
	border-bottom: none;
	animation-delay: 0.9s;
}

.tui-welcome-links li {
	animation: tui-login-fade-in 0.6s ease backwards;
}

.tui-welcome-links li:nth-child(1) {
	animation-delay: 1.2s;
}

.tui-welcome-links li:nth-child(2) {
	animation-delay: 1.35s;
}

.tui-welcome-links li:nth-child(3) {
	animation-delay: 1.5s;
}

.tui-welcome-links li:nth-child(4) {
	animation-delay: 1.65s;
}

.tui-welcome-links li:nth-child(5) {
	animation-delay: 1.8s;
}

.tui-welcome-links li:nth-child(6) {
	animation-delay: 1.95s;
}

@media (prefers-reduced-motion: reduce) {
	.tui-welcome .tui-welcome-diagram,
	.tui-welcome .tui-welcome-title,
	.tui-welcome > p,
	.tui-welcome-links li {
		animation: none;
	}
}

.tui-welcome-links {
	margin: 0.5em 0 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
}

/* Each row: the link, a short line about it in smaller type, and its keyboard shortcut at the right. */
.tui-welcome-links li {
	position: relative;
	display: flex;
	align-items: center;
	gap: 1em;
	margin: 0 -0.5em;
	padding: 0.4em 0.5em;
}

/* A dashed line between the rows, like the one under the animation. */
.tui-welcome-links li + li {
	border-top: 1px dashed var(--linecolor);
}

.tui-welcome-links li:hover {
	background: var(--shadecolor);
}

/* The whole row is the link. */
.tui-welcome-links li > a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.tui-welcome-links li > a {
	flex: 0 0 7em; /* the descriptions line up */
}

.tui-welcome-link-note {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 0.80em;
	color: var(--bodycolor);
}

@media (max-width: 768px) {
	.tui-welcome-link-note {
		display: none;
	}
}


/* The "single" group (WINDOW_GROUPS in main.js) — post/page/register/
   profile share one pinned slot, so they share one default size too. */
.tui-window[data-content-type="post"],
.tui-window[data-content-type="page"],
.tui-window[data-content-type="register"],
.tui-window[data-content-type="profile"] {
	width: min(calc(100vw - 32px), 840px);
	height: min(90vh, 1200px);
}

/* Single job/book detail view (each its own group, "job"/"book" — see
   jobs.php/books.php's own comments on why neither is folded into
   "single") — same size as that group. */
.tui-window[data-content-type="job"],
.tui-window[data-content-type="book"] {
	width: min(calc(100vw - 32px), 840px);
	height: min(90vh, 1200px);
}

/* .tui-window-body's own max-height (min(70vh, 520px)) would otherwise cap
   below the explicit height just set above. */
.tui-window[data-content-type="latest"] .tui-window-body,
.tui-window[data-content-type="post"] .tui-window-body,
.tui-window[data-content-type="page"] .tui-window-body,
.tui-window[data-content-type="register"] .tui-window-body,
.tui-window[data-content-type="profile"] .tui-window-body,
.tui-window[data-content-type="job"] .tui-window-body,
.tui-window[data-content-type="book"] .tui-window-body,
.tui-window[data-content-type="books"] .tui-window-body,
.tui-window[data-content-type="featured"] .tui-window-body,
.tui-window[data-content-type="archives"] .tui-window-body,
.tui-window[data-content-type="api-docs"] .tui-window-body,
.tui-window[data-content-type="activity"] .tui-window-body {
	max-height: none;
}

.can-semantic-panel-excerpt, .can-semantic-related, .can-semantic-search-input, .can-semantic-search-result, .can-semantic-search-empty, .can-semantic-panel-hint {
	font-size:1em !important;
}

.tui-window-titlebar {
	display: flex;
	align-items: center;
	gap: 0.5em;
	padding: 0.5em 0.75em 0.5em 0.75em;
	border-bottom: 1px solid var(--linecolor);
	background: var(--backgroundcolor);
	cursor: move;
	touch-action: none;
	user-select: none;
}

/* The frontmost/focused window (see bringToFront() in tui-window.js). */
.tui-window.is-active .tui-window-titlebar {
	background: var(--backgroundcoloralt);
}

.tui-window-titlebar .tui-window-btn {
	appearance: none;
	background: none;
	border: none;
	padding: 0 2px;
	font-family: var(--tui-font);
	font-size: 1em;
	line-height: 1;
	cursor: pointer;
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	color: var(--bodycolor);
}

.tui-window-titlebar .tui-window-btn .icon {
	width: 12px;
	height: 12px;
}

.tui-window-titlebar .tui-window-btn-refresh .icon {
	width: 11px;
	height: 11px;
}

/* Widget-mode toggle — a plain dot rather than an icon, same look
   whether the window's currently collapsed or not (see
   .tui-window--widget below for the collapsed state's own repositioning
   to the top-right corner). */
.tui-window-titlebar .tui-window-btn[data-window-action="widget"] {
	width: 6px;
	height: 6px;
	padding: 0;
	border-radius: 50%;
	background: var(--bodycolor);
}

.tui-window-titlebar .tui-window-btn[data-window-action="widget"]:hover {
	background: var(--darkcolor);
}

.tui-window-titlebar .tui-window-btn-lock .icon {
	width: 11px;
	height: 11px;
}

/* One icon at a time: open padlock normally, closed when locked in place. */
.tui-window-btn-lock .icon-locked,
.tui-window[data-locked] .tui-window-btn-lock .icon-unlocked {
	display: none;
}

.tui-window[data-locked] .tui-window-btn-lock .icon-locked {
	display: block;
}

/* Window mode: dragging across the desktop (header, footer, empty space) doesn't start a
   text selection; text can only be selected inside windows (and form fields). Classic
   mode is ordinary page content, so selection works as normal there. */
html:not([data-classic-nav="1"]) body {
	touch-action: manipulation; /* no double-tap zoom: a double tap on the desktop opens Constructor */
	-webkit-user-select: none;
	user-select: none;
}

html:not([data-classic-nav="1"]) .tui-window-body,
html:not([data-classic-nav="1"]) .tui-window-body *,
html:not([data-classic-nav="1"]) input,
html:not([data-classic-nav="1"]) textarea,
html:not([data-classic-nav="1"]) [contenteditable] {
	-webkit-user-select: text;
	user-select: text;
}

/* A locked full-size window can't be closed, minimised or put into mini or widget mode: those
   buttons are dimmed and inert until it's unlocked. */
.tui-window[data-locked]:not(.tui-window--mini):not(.tui-window--widget):not([data-content-type="image"]):not([data-content-type="login"]):not([data-content-type="search"]):not([data-content-type="settings"]):not([data-content-type="profile"]) .tui-window-btn[data-window-action="close"],
.tui-window[data-locked]:not(.tui-window--mini):not(.tui-window--widget):not([data-content-type="image"]):not([data-content-type="login"]):not([data-content-type="search"]):not([data-content-type="settings"]):not([data-content-type="profile"]) .tui-window-btn[data-window-action="minimize"],
.tui-window[data-locked]:not(.tui-window--mini):not(.tui-window--widget):not([data-content-type="image"]):not([data-content-type="login"]):not([data-content-type="search"]):not([data-content-type="settings"]):not([data-content-type="profile"]) .tui-window-btn[data-window-action="mini"],
.tui-window[data-locked]:not(.tui-window--mini):not(.tui-window--widget):not([data-content-type="image"]):not([data-content-type="login"]):not([data-content-type="search"]):not([data-content-type="settings"]):not([data-content-type="profile"]) .tui-window-btn[data-window-action="widget"] {
	opacity: 0.25;
	pointer-events: none;
}

/* Pulses when someone tries to drag a locked window. */
.tui-window-btn-lock.is-flashing .icon-locked {
	animation: tui-lock-flash 0.45s ease-in-out 2;
}

@keyframes tui-lock-flash {
	0%, 100% {
		transform: scale(1);
		color: var(--bodycolor);
	}
	50% {
		transform: scale(1.6);
		color: var(--darkcolor);
	}
}

/* Locked: no move/resize cursor or handle. */
.tui-window[data-locked]:not([data-content-type="image"]):not([data-content-type="login"]):not([data-content-type="search"]):not([data-content-type="settings"]):not([data-content-type="profile"]) .tui-window-titlebar {
	cursor: default;
}

.tui-window[data-locked]:not([data-content-type="image"]):not([data-content-type="login"]):not([data-content-type="search"]):not([data-content-type="settings"]):not([data-content-type="profile"]) .tui-window-resize {
	display: none;
}

/* Only full-size windows lock: not docked, mini or widget windows, nor the fixed lightbox. */
.tui-window.is-minimized .tui-window-btn-lock,
.tui-window--mini .tui-window-btn-lock,
.tui-window--widget .tui-window-btn-lock,
.tui-window[data-content-type="image"] .tui-window-btn-lock,
.tui-window[data-content-type="login"] .tui-window-btn-lock,
.tui-window[data-content-type="search"] .tui-window-btn-lock,
.tui-window[data-content-type="settings"] .tui-window-btn-lock,
.tui-window[data-content-type="profile"] .tui-window-btn-lock {
	display: none;
}

/* No lock button on windows opened in classic mode. */
html[data-classic-nav="1"] .tui-window-btn-lock {
	display: none;
}

/* The login window has nothing to refresh. */
.tui-window[data-content-type="login"] .tui-window-btn-refresh {
	display: none;
}

/* Logged-out visitors get square corners everywhere the system radius is used. */
body:not(.logged-in) {
	--tui-window-radius: 0;
}

/* A logged-out visitor can't dismiss the login window. */
body:not(.logged-in) .tui-window[data-content-type="login"] .tui-window-btn-close {
	display: none;
}

.tui-window-btn-refresh.is-spinning .icon {
	animation: tui-refresh-spin 0.7s linear infinite;
}

@keyframes tui-refresh-spin {
	to {
		transform: rotate(360deg);
	}
}

.tui-window.is-minimized .tui-window-btn-refresh {
	display: none;
}

.tui-window-btn-square {
	display: inline-block;
	width: 9px;
	height: 9px;
	border: 1px solid currentColor;
	border-radius: 0;
}

.tui-window-titlebar .tui-window-btn:hover,
.tui-window-titlebar .tui-window-btn:focus {
	color: var(--darkcolor);
	outline: none;
}

/* Widget mode (see main.js's setWindowWidget()) — a window that's become
   a transparent desktop widget rather than a normal floating window.
   Border is deliberately left untouched (per the user, it's what still
   reads as "a window" at all). Always the bottom-most window regardless
   of focus/z-order (bringToFront() in tui-window.js still raises
   win.style.zIndex normally — this !important is what keeps a widget
   pinned under every normal window despite that inline style). */
.tui-window--widget {
	z-index: 0 !important;
	background: transparent;
	box-shadow: none;
	/* Shrinks to whatever its own (collapsed) content actually needs —
	   !important on both since a dragged/resized window has its own
	   inline width/height (tui-window.js) that would otherwise keep
	   whatever size it was at right before collapsing into widget mode. */
	width: fit-content !important;
	height: auto !important;
	/* Widgets are small, so the corner rounding setting is capped at 10px for
	   them — a large radius on a narrow strip just eats it. */
	border-radius: min(var(--tui-window-radius), 10px);
}

.tui-window--widget .tui-window-body {
	padding-top: 0.5em;
}

/* Header-pinned widget (main.js's own HEADER_PINNED_WIDGET_TYPES/
   applyHeaderWidgetPinning() — just Layouts today) — reparented into
   header.php's own #tui-header-widgets, so it needs to sit as a plain
   flex item there instead of position: fixed anywhere on screen like
   every other widget. Two classes (not just this one alone) to outweigh
   the base .tui-window rule's own position: fixed on specificity, not
   just source order — same reasoning as this project's other
   specificity fixes this session. left/top left alone deliberately:
   with position: static they have no effect at all, so there's nothing
   to override even if main.js's setWindowWidget() still writes inline
   values that no longer mean anything in this state. */
.tui-window--widget.tui-window--header-pinned {
	position: static !important;
	/* Row, not the base .tui-window's own column — the titlebar (just
	   the expand dot, once restyled below) sits as a flex sibling of the
	   body (the actions row) instead of stacked above it, so
	   align-items: center lines the dot up with the buttons vertically
	   in one go rather than needing its own absolute-positioned offset
	   the way the free-floating widget's own corner dot does. Explicit
	   row — .tui-window's own base rule sets flex-direction: column,
	   and setting display: flex here alone doesn't also override that
	   (every property cascades on its own; column stayed in effect even
	   with this rule's own higher specificity, since this rule never
	   actually touched flex-direction at all). */
	display: flex;
	flex-direction: row;
	align-items: center;
	/* No border here, per the user — it's what the free-floating widget
	   deliberately keeps (style.css's own comment on that rule, just
	   above), but this is a compact header control, not "a window". */
	border: none;
}

/* No drag-handle line — nothing to drag, tui-window.js's own
   makeDraggable() already no-ops for .tui-window--header-pinned.
   !important: this selector's specificity ties with the free-floating
   widget's own .tui-window--widget .tui-window-titlebar::after rule
   further down (two classes + a pseudo-element either way), which would
   otherwise win on source order alone since it comes later in the file. */
.tui-window--header-pinned .tui-window-titlebar::after {
	content: none !important;
}

/* The free-floating widget's own titlebar (just below) is a full-width
   bar with the dot absolutely pinned to one corner of it — here it's
   just a flex sibling sized to its own (now line-less) content, pushed
   after the body via order so the dot reads as "on the right" per the
   user, and the dot itself drops back to position: static so it
   actually participates in — and gets centered by — that flex row
   instead of floating fixed in a corner of a bar that's barely there
   any more. */
.tui-window--header-pinned .tui-window-titlebar {
	height: auto;
	min-height: 0;
	position: static;
	order: 1;
	margin-left:1em;
	margin-top:2px;
}

.tui-window--header-pinned .tui-window-titlebar [data-window-action="widget"] {
	position: static;
}

/* Doesn't try to grow and push the dot away from the buttons — a plain
   flex sibling sized to its own content too, same reasoning as the
   titlebar just above. */
.tui-window--header-pinned .tui-window-body {
	flex: 0 0 auto;
	padding: 0.5em;
}

/* Same 14px as .tui-layout-button's own icon (the real "Layouts" corner
   button, header.php, right side) — per the user, matching the size of
   the other icon already sitting in the header rather than this
   window's own normal 2em. Layouts-specific since its own action-row
   icons are the only thing a header-pinned widget's body ever actually
   shows. */
.tui-window--header-pinned .tui-layouts-action-btn .icon {
	width: 14px;
	height: 14px;
}

/* The titlebar collapses to a centered drag-handle line — every real
   button it normally has (close/refresh/minimize/mini) is hidden, not
   just the title text, so nothing reads as "a toolbar" any more; the
   line is purely decorative (the titlebar as a whole is already
   draggable from anywhere on it, tui-window.js's makeDraggable()). A
   small dot in the top-right corner is the only clickable thing left —
   that's Expand ([data-window-action="widget"], same button/icon that
   turned widget mode on in the first place — clicking it again turns it
   back off), just restyled down to a dot rather than its normal icon.
   Fully transparent, same as the window itself — no visible bar at all
   behind the line/dot. */
.tui-window--widget .tui-window-titlebar {
	height: 14px;
	min-height: 14px;
	padding: 0;
	gap: 0;
	border-bottom: none;
	/* !important — otherwise .tui-window.is-active .tui-window-titlebar's
	   own backgroundcoloralt (same specificity, but this focused/active
	   state is exactly when a widget is most likely to actually have
	   that class) would still show through once focused/dragged. */
	background: transparent !important;
	justify-content: center;
	position: relative;
}

.tui-window--widget .tui-window-titlebar > * {
	display: none;
}

.tui-window--widget .tui-window-titlebar::after {
	content: "";
	display: block;
	width: 24px;
	height: 2px;
	border-radius: 1px;
	background: var(--linecolor);
}

/* Same plain dot, now just repositioned to sit on its own once every
   other button is hidden — linecolor rather than the normal titlebar's
   bodycolor, matching the drag-handle line's own color right next to it.
   Always the top-right corner, per the user — regardless of which side
   of the screen the window itself is parked on (unlike the window's own
   corner-anchored collapse/expand geometry, which does still vary by
   side — see setWindowWidget() in main.js). */
.tui-window--widget .tui-window-titlebar [data-window-action="widget"] {
	display: block;
	position: absolute;
	top: 3px;
	right: 3px;
	background: var(--linecolor);
}

/* No resize grip on a collapsed widget — same reasoning as
   .tui-window--mini/.tui-window--compact above. */
.tui-window--widget .tui-window-resize {
	display: none;
}

/* Layouts widget — pinned to the right edge, in the vertical middle of the
   window, as a column of just the quick-action icons stacked on top of each
   other (the named-layout list is hidden in widget mode already). Fixed in
   place (!important beats whatever left/top a saved or restored position
   wrote; dragging is also off — tui-window.js's makeDraggable()), no drag-
   handle line. It takes its height from its content, capped to the window
   height, and the icons shrink together if the window gets too short for
   them. The window-manager buttons treat it as taken space on the right
   (main.js's layoutBounds()). */
.tui-window--widget[data-content-type="layouts"] {
	left: auto !important;
	right: 1em !important;
	top: var(--right-widget-top, 50%) !important;
	transform: translateY(var(--right-widget-shift, -50%));
	max-height: calc(100vh - 100px);
}

.tui-window--widget[data-content-type="layouts"] .tui-window-titlebar::after {
	content: none;
}

.tui-window--widget[data-content-type="layouts"] .tui-window-titlebar {
	cursor: default;
}

.tui-window--widget[data-content-type="layouts"] .tui-window-body {
	display: flex;
	flex-direction: column;
	min-height: 0;
	max-height: none;
	overflow: hidden;
	padding: 0.5em;
}

.tui-window--widget[data-content-type="layouts"] {
	/* The icons' base size — 12px (the UI size) on a tall window, scaling
	   down with the window's height when there isn't room for the whole
	   column (6 icons 2em tall + 5 gaps of 0.5em = 14.5em, plus the widget's
	   own chrome, ~140px). Sizes in em from this, so one number drives it. */
	--layouts-widget-em: clamp(6px, calc((100vh - 140px) / 14.5), 12px);
}

.tui-window--widget[data-content-type="layouts"] .tui-layouts-actions-row {
	flex: 0 0 auto;
	flex-direction: column;
	align-items: center;
	margin: 0;
	font-size: var(--layouts-widget-em);
}

.tui-window--widget[data-content-type="layouts"] .tui-layouts-action-btn {
	/* A <button> doesn't inherit font-size, and the icons are sized in em. */
	font-size: var(--layouts-widget-em);
}

/* Apply + Save dots: bottom corners of the Layouts widget only (the
   normal window has the Custom row's own buttons) — Save on the left, Apply
   on the right. Small filled --linecolor circles (6px, the same size as the expand dot), in flow right under the
   last icon, the same distance from it as the expand dot is from the first
   icon above (the titlebar's 14px plus the body's 0.5em top padding, less the
   dot's own 3px offset and 6px height), and the pair at the bottom right, Save right beside Apply, its right edge 3px in
   like the dot's (not the body's 0.5em padding). Darker on hover, and
   Save briefly while it flashes "saved". */
/* Constructions widget — tiles, one per construction that has a Layout, in a column pinned to the right edge
   under the Layouts widget, the same width (main.js's placeRightWidgets() sets the variables below so the pair is
   centred on the window's height together). Each tile is a small symmetric pixel glyph from the name with its first
   letters over it; the name is the tooltip. Only the tiles show in widget mode, and only in widget mode. */
.tui-constructions-widget {
	display: none;
}

.tui-window--widget[data-content-type="constructions"] {
	--layouts-widget-em: clamp(6px, calc((100vh - 140px) / 14.5), 12px);
	left: auto !important;
	right: 1em !important;
	top: var(--right-widget-top, 50%) !important;
	transform: translateY(var(--right-widget-shift, -50%));
	width: var(--right-widget-width, fit-content) !important;
	max-height: var(--right-widget-max, calc(100vh - 100px));
}

.tui-window--widget[data-content-type="constructions"] .tui-window-titlebar {
	cursor: default;
}

.tui-window--widget[data-content-type="constructions"] .tui-window-titlebar::after {
	content: none;
}

.tui-window--widget[data-content-type="constructions"] .tui-window-body {
	display: flex;
	flex-direction: column;
	min-height: 0;
	max-height: none;
	overflow: hidden;
	padding: 0.5em;
}

.tui-window--widget[data-content-type="constructions"] .tui-constructions {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-height: 0;
	overflow-y: auto;
	scrollbar-width: none;
}

.tui-window--widget[data-content-type="constructions"] .tui-constructions::-webkit-scrollbar {
	display: none;
}

.tui-window--widget[data-content-type="constructions"] .tui-constructions > :not(.tui-constructions-widget) {
	display: none;
}

.tui-window--widget[data-content-type="constructions"] .tui-constructions-widget {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5em;
	font-size: var(--layouts-widget-em);
}

.tui-constructions-tile {
	position: relative;
	display: block;
	flex: 0 0 auto;
	width: 2em;
	height: 2em;
	padding: 0;
	border: 1px solid var(--darkcolor);
	border-radius: min(var(--tui-window-radius), 4px);
	background: transparent;
	color: var(--darkcolor);
	font: inherit;
	line-height: 1;
	cursor: pointer;
	overflow: hidden;
}

.tui-constructions-tile:hover,
.tui-constructions-tile:focus-visible {
	border-color: var(--midcolor);
	color: var(--midcolor);
	outline: none;
}

.tui-constructions-tile-glyph {
	position: absolute;
	inset: 12%;
	width: 76%;
	height: 76%;
	opacity: 0.3;
}

.tui-constructions-tile:hover .tui-constructions-tile-glyph,
.tui-constructions-tile:focus-visible .tui-constructions-tile-glyph {
	opacity: 0.5;
	color: var(--midcolor);
}

.tui-constructions-tile-letters {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.8em;
	font-weight: bold;
	letter-spacing: 0;
}

.tui-layouts-widget-squares {
	display: none;
}

.tui-window--widget[data-content-type="layouts"] .tui-layouts {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.tui-window--widget[data-content-type="layouts"] .tui-layouts-widget-squares {
	display: flex;
	align-self: flex-end; /* Save right beside Apply, the pair at the bottom right */
	gap: 4px;
	flex: 0 0 auto;
	/* Bottom: 3px from the border, like the dot's 3px from the top (the body's
	   own 0.5em padding sits below, so pull in by the difference). */
	margin: calc(14px + 0.5em - 9px) calc(3px - 0.5em) calc(3px - 0.5em);
}

.tui-layouts-widget-square {
	display: block;
	flex: 0 0 auto;
	width: 6px;
	height: 6px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: var(--linecolor);
	cursor: pointer;
}

.tui-layouts-widget-square:hover,
.tui-layouts-widget-square:focus-visible,
.tui-layouts-widget-square.is-saved {
	background: var(--darkcolor);
	outline: none;
}

/* Archives widget — a vertical chart, one bar per month (can_v7_render_archives_chart(),
   inc/window-handlers/archives.php), newest at the top. The window takes the
   same height the Layouts tile buttons use (92vh), the chart fills it, and
   its bars share that height evenly, so a shorter viewport just compacts
   them. The chart is at most 50px wide; a bar's width is its post count
   relative to the busiest month. The full window's response carries the
   chart too, hidden until widget mode. */
.tui-archives-widget {
	display: none;
}

.tui-window--widget[data-content-type="archives"] {
	/* Fixed in place on the left edge, under the header (same 17px gutter
	   and 50px top the window-manager buttons use) — !important so it beats
	   whatever inline left/top a saved or restored position wrote. Dragging
	   is also off (tui-window.js's makeDraggable()), and the window-manager
	   buttons treat this strip as taken space (main.js's layoutBounds()). The
	   92vh is capped so it never runs off a short viewport from that top. */
	left: 17px !important;
	right: auto !important;
	top: 50px !important;
	height: min(92vh, calc(100vh - 60px)) !important;
	height: calc(100dvh - 50px - var(--tui-footer-h, 64px)) !important; /* the visible height, ending above the footer */
}

.tui-window--widget[data-content-type="archives"] .tui-archives {
	display: none;
}

/* It can't be dragged, so no drag-handle line (or move cursor) in its titlebar. */
.tui-window--widget[data-content-type="archives"] .tui-window-titlebar::after {
	content: none;
}

.tui-window--widget[data-content-type="archives"] .tui-window-titlebar {
	cursor: default;
}

.tui-window--widget[data-content-type="archives"] .tui-window-body {
	flex: 1 1 auto;
	min-height: 0;
	max-height: none;
	overflow: hidden;
	padding: 0 0.5em 0.5em;
}

.tui-window--widget[data-content-type="archives"] .tui-archives-widget {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1px;
	width: 50px;
	height: 100%;
}

.tui-archives-bar {
	display: block;
	flex: 1 1 0;
	min-height: 0;
	width: calc(var(--aw, 0.04) * 100%);
	background: var(--midcolor);
}

/* Hover wave: main.js sets each bar's size directly (inline flex-basis) from
   the pointer's continuous position, so the bar nearest the pointer is about
   1em tall and the ones around it ease back to their resting share, and
   shifts the whole column so that bar stays under the pointer. The short
   transitions below only smooth the frame-to-frame steps and the way in/out
   — the motion itself comes from the pointer. */
.tui-archives-widget {
	will-change: transform;
	transition: transform 0.08s linear;
}

.tui-archives-bar {
	transition: flex-basis 0.08s linear, background-color 0.12s ease;
}

.tui-archives-widget.is-measuring,
.tui-archives-widget.is-measuring .tui-archives-bar {
	transition: none !important;
}


/* The month open in the Listing window (.is-current), and the "hot" bar (data-hot, set by main.js from the pointer position)
   — not :hover, which also matches whichever bar the live, distorted layout
   puts under the pointer and so darkened a second one on a short window. */
a.tui-archives-bar.is-current,
a.tui-archives-bar[data-hot],
a.tui-archives-bar:focus-visible {
	background: var(--darkcolor);
	outline: none;
}

.tui-archives-bar.is-empty {
	width: 2px;
	background: var(--linecolor);
}

.tui-classic-titlebar {
	cursor: default;
	border-top: 1px solid var(--linecolor);
	border-left: 1px solid var(--linecolor);
	border-right: 1px solid var(--linecolor);
}

/* can_v7_window_section_title() (inc/template-tags.php) — same bordered-
   bar look as .tui-classic-titlebar just above, but for a section header
   inside a window/page's own content rather than the page-top bar
   itself, so it gets a bottom border too (the classic one relies on
   whatever comes right after it for that edge) and none of that class's
   classic-only mobile edge-to-edge margins. */
.tui-window-section-title {
	cursor: default;
	border-top: 1px solid var(--linecolor);
	border-bottom: 1px solid var(--linecolor);
	/* margin-top: 1em; */
	margin-bottom: 1em;
	/* Edge-to-edge — same -1em bleed convention as .tui-window-thumb,
	   negating .tui-window-body's own 1em padding (style.css) to
	   reach the window's true left/right edge, where its border-left/
	   right/right already draw the line this doesn't need its own
	   copy of. */
	padding-left: 1em;
	padding-right: 1em;
	margin-left: -1em;
	margin-right: -1em;
}

/* A section title is not the window's title bar: it keeps the background colour whether or not the window is the active one
   (which gives the real title bar the alternate colour). */
.tui-window-section-title,
.tui-window.is-active .tui-window-section-title {
	background: var(--backgroundcolor);
}

/* Classic mode (desktop and mobile): this section title also shows up
   inside .tui-classic-page (e.g. a single post's own "Activity Log"
   heading), not just a real window — the -1em/+1em bleed above assumes
   a window body's own 1em padding, which .tui-classic-page never has
   (its own edge is .tui-shell's 14px on desktop, a flat 12px on mobile —
   see that class's own edge-to-edge rule further up), so the same -1em
   always overshoots past it instead of landing flush. No bleed here
   instead — sits flush within whatever .tui-classic-page's own padding
   already is, plus its own flat 12px so the title's text isn't jammed
   against its border. */
.tui-classic-page .tui-window-section-title {
	margin-left: 0;
	margin-right: 0;
	padding-left: 1em;
	padding-right: 1em;
}

/* Mobile: edge to edge, cancelling .tui-shell's own side padding (14px,
   12px on small screens) — same convention as .tui-classic-page
   .tui-listing-intro etc. further down. The 12px padding above stays, so
   the title's own text/border still sit 12px in from the true edge, same
   as everything else in .tui-classic-page on mobile. */
@media (max-width: 768px) {
	.tui-classic-page .tui-window-section-title {
		margin-left: -1em;
		margin-right: -1em;
	}
}

/* [can_post_activity_feed]'s own output (template-parts/post/content.php's
   "Activity Log" section) — its markup is just <ul><li><a>date text</a>
   </li></ul>, no separate date/text elements to split into the Activity
   window's own two-column mini layout (.tui-activity-mini, inc/window-
   handlers/activity.php's can_v7_render_activity_mini() — that one has
   real date/text markup to key off), so this matches its look instead:
   same "›" marker/compact spacing/font-size/link color convention as
   .tui-activity-mini-row and jobs'/Latest's own mini rows. */
.can-activity-log-feed {
	list-style: none;
	margin: 0,0,12px,0;
	padding: 0 0 1em 0;


}

.can-activity-log-feed li {
	display: flex;
	align-items: flex-start;
	gap: 0px;
	padding: 0px 0;
	font-size: 0.80em;
}

.can-activity-log-feed li::before {
	content: "›";
	flex: 0 0 auto;
	color: var(--bodycolor);
}

.can-activity-log-feed a {
	min-width: 0;
	color: var(--linkcolor);
}

/* Classic mode: same flush-within-.tui-classic-page's-own-padding
   reasoning as .tui-window-section-title just above — this list sits
   directly under that title with no window body padding of its own to
   inherit, so it needs the same 12px kept in by hand. */
.tui-classic-page .can-activity-log-feed {
	padding-left: 1em;
	padding-right: 1em;
}

/* Mobile: edge to edge, same convention as .tui-window-section-title
   just above. */
@media (max-width: 768px) {
	.tui-classic-page .can-activity-log-feed {
		margin-left: -1em;
		margin-right: -1em;
	}
}

/* The API docs' Activity Log section: the embed already has its own 1em padding, so the list adds none, and it reads at full size. */
.tui-api-docs .can-activity-embed .can-activity-log-feed,
.tui-classic-page .tui-api-docs .can-activity-embed .can-activity-log-feed,
div#can-api-content.can-content div.can-section.active div.can-feature-card div.can-activity-embed ul.can-activity-log-feed {
	margin-left: 0;
	margin-right: 0;
	padding-left: 0 !important; /* the plugin's own rule sets 1.5em, 0.75em text and its own font on this list */
	padding-right: 0;
	font-family: var(--tui-font) !important;
	font-size: 1em !important;
}

.tui-api-docs .can-activity-embed {
	padding-top: 0;
}

.tui-api-docs .can-activity-embed .can-activity-log-feed li {
	font-size: 0.80em;
	gap: 0.5em; /* between the › and the entry */
}

.can-activity-log-feed a:hover,
.can-activity-log-feed a:focus {
	background: none;
	color: var(--darkcolor);
}

/* Wraps [can_leave_comment-v2] on a single post (template-parts/post/
   content.php) — data-activity-channels' own carrier div (inc/template-
   tags.php's can_v7_activity_channels_attr()), given a class here so it
   can carry its own look too. display: flow-root, not just background —
   the plugin's own .can-comment-btn is float: left (its own style.css),
   so without something to contain that float this box collapses to
   ~0 height around it, leaving the button visually half on this
   background and half hanging out below it. */
.tui-activity-comment-wrap {
	display: flow-root;
	background: var(--backgroundcolor);
	margin-bottom:1em;
}

/* Classic mode: same flush-within-.tui-classic-page's-own-padding
   reasoning as .tui-window-section-title/.can-activity-log-feed above —
   left/right to keep it off the page's own edge, bottom so the button row
   inside it doesn't sit flush against whatever comes next. */
.tui-classic-page .tui-activity-comment-wrap {
	padding-left: 12px;
	padding-right: 12px;
	padding-bottom: 12px;
}

/* Mobile: edge to edge, same convention as .tui-window-section-title/
   .can-activity-log-feed above. */
@media (max-width: 768px) {
	.tui-classic-page .tui-activity-comment-wrap {
		margin-left: -1em;
		margin-right: -1em;
	}
}

/* Comment popup ([can_leave_comment-v2],
   class-can-activity-logger-comment-shortcode-v2.php) — made to look/
   behave like this theme's own .tui-window (border/titlebar/shadow,
   draggable by its title — assets/js/activity.js's own
   centerCommentPopupOnWindow()/makeCommentPopupDraggable() handle the
   position/drag side of that), not the plugin's own plain modal centered
   on the whole browser viewport. That plugin's own inline <style> there
   (position: fixed; top/left: 50%; transform: translate(-50%, -50%)) is
   untouched — this only wins the width/chrome properties it doesn't
   contest; left/top/transform get overridden as inline styles directly
   by that JS instead (inline always beats a stylesheet rule regardless
   of specificity), not fought over here.

   Here in style.css rather than assets/css/activity.css (where this
   used to live) — that file only loads once the Activity window/page
   itself opens (activity.js's own loadStylesheet()), but the same
   shortcode also renders from template-parts/post/content.php's own
   single-post "Activity Log" section now, which never touches Activity
   at all, let alone opens it — the popup rendered with none of this
   styling there, just the plugin's own bare inline <style>. */

/* .can-comment-btn (the trigger that opens the popup above) — same move,
   same reason: was .tui-activity .can-comment-btn in assets/css/
   activity.css, scoped to a context this button no longer only ever
   appears inside. */
.can-comment-btn {
	appearance: none;
	border-radius: 0;
	font-family: var(--tui-font);
	/* Same "caption" size as .entry-content figcaption/.wp-caption-text
	   elsewhere in this theme — overrides the plugin's own 0.75em. */
	font-size: 0.80em;
	color: var(--bodycolor);
}

.can-comment-btn:hover {
	background-color: var(--shadecolor);
	color: var(--bodycolor);
}

.can-comment-popup {
	/* assets/js/activity.js's raiseCommentPopupAboveEverything() moves
	   this into #tui-windows so it can stack above every floating window
	   (see that function's own comment) — but #tui-windows itself is
	   pointer-events: none by design (a click-through container; each
	   real .tui-window opts back in with its own pointer-events: auto,
	   style.css), and this popup isn't one of those, so once reparented
	   it silently inherited none too — every click/drag on it (the
	   titlebar, Cancel/Submit, the textarea) passed straight through to
	   whatever was behind it instead. Also why the popup-related
	   selectors in this file dropped their old .tui-activity prefix
	   (further down too) — once reparented, it's no longer a descendant
	   of .tui-activity at all, so anything scoped that way would stop
	   applying the moment it moved. */
	pointer-events: auto;
	width: min(90vw, 500px);
	max-width: 90vw;
	max-height: 80vh;
	/* overflow-x: hidden, not auto on both axes — a vertical scrollbar
	   (when content is tall enough to need one) eats into the available
	   width, and .can-comment-text's own width: calc(100% - 24px) below
	   is computed before that reduction, overflowing horizontally by
	   however wide the scrollbar is. A modal only ever needs to scroll
	   vertically anyway. */
	overflow-x: hidden;
	overflow-y: auto;
	border: 1px solid var(--linecolor);
	background: var(--backgroundcolor);
	border-radius: var(--tui-window-radius);
	box-shadow: 0 var(--tui-window-shadow-y) var(--tui-window-shadow-blur) rgba(0, 0, 0, var(--tui-window-shadow-opacity, 0.55));
}

/* Same look as .tui-window-titlebar (style.css) — not that class directly,
   since this title's own content (a two-line notice, not a plain window
   title) needs its own layout rather than that rule's single-line flex
   row. align-items: flex-start (not center) keeps the close button
   pinned to the top-right corner rather than vertically centered against
   that taller block. */
/* position: relative (not display: flex — its actual content is loose
   text + a <br> + a <span>, meant to flow normally: title on its own
   full-width line, the "Use @username..." note wrapping below it in
   smaller text) so the injected close button below can sit absolutely
   positioned in the corner instead of joining that content as a flex
   item, which broke the <br>'s own line-break (flex overrides normal
   inline layout, scattering title/note/button into a row together). */
.can-comment-popup-title {
	position: relative;
	padding: 8px 32px 8px 12px;
	border-bottom: 1px solid var(--linecolor);
	background: var(--backgroundcolor);
	cursor: move;
	touch-action: none;
	user-select: none;
	font-family: var(--tui-font);
	font-size: 1em;
	color: var(--bodycolor);
}

/* Same look as .tui-window-titlebar .tui-window-btn (style.css) — the
   plugin's own markup has no titlebar close button at all (just
   Cancel/Submit further down), so activity.js's own
   ensureCommentPopupChrome() injects this one, reusing the
   .can-cancel-comment class directly so the existing cancel handler
   picks it up for free. */
.can-comment-popup-close {
	appearance: none;
	background: none;
	border: none !important;
	padding: 0 2px !important;
	/* .can-comment-popup-title is no longer a flex row (see its own
	   comment above) — positioned in the corner directly instead of
	   relying on flex placement, matching a real window's own titlebar
	   close button spot. */
	position: absolute;
	top: 8px;
	right: 8px;
	font-family: var(--tui-font);
	font-size: 1em;
	line-height: 1;
	cursor: pointer;
	color: var(--bodycolor);
}

.can-comment-popup-close:hover {
	color: var(--darkcolor);
}

/* Same input treatment as .tui-login's own text fields (style.css). */
.can-comment-text {
	display: block;
	box-sizing: border-box;
	width: 100%;
	background: var(--backgroundcolor);
	border: 1px solid var(--linecolor);
	color: var(--bodycolor);
	font-family: var(--tui-font);
	font-size: 1em;
	padding: 12px;
	resize: vertical;
	/* A textarea's own initial layout pass (right when the popup flips
	   from display: none to block) can settle a beat after this — an
	   explicit overflow-x: hidden here (not just on .can-comment-popup
	   above) means that transient mismatch never shows as a horizontal
	   scrollbar on the textarea itself, whatever its exact cause.
	   Vertical scroll still works fine for text taller than the box. */
	overflow-x: hidden;
}

.can-comment-text:focus {
	outline: none;
}

.can-submit-comment-area {
	display: flex;
	gap: 8px;
	padding: 0 12px 12px;
}

/* Same look as .tui-btn (style.css). */
.can-submit-comment,
.can-submit-comment-area button,
.can-cancel-comment {
	appearance: none;
	border-radius: 0;
	padding: 4px 10px;
	background: var(--backgroundcolor);
	border: 1px solid var(--linecolor);
	color: var(--bodycolor);
	font-family: var(--tui-font);
	font-size: 1em;
	cursor: pointer;
}

.can-submit-comment-area button:hover {
	background: var(--shadecolor) !important;
	color: var(--bodycolor) !important;
}

.can-submit-comment:hover,
.can-cancel-comment:hover {
	background: var(--shadecolor);
	color: var(--bodycolor);
}

/* Mobile: cancels .tui-shell's own side padding (14px, 12px on small
   screens) so it runs edge to edge. */
@media (max-width: 768px) {
	.tui-classic-titlebar {
		margin-left: -1em;
		margin-right: -1em;
	}
}

.tui-window-title {
	flex: 1 1 auto;
	min-width: 0;
	color: var(--bodycolor);
	font-size: 0.80em;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Minimized: only the titlebar shows, docked bottom-right, tap to restore. */
.tui-window.is-minimized .tui-window-body {
	display: none;
}

/* Same fixed-height gotcha as the mini-mode override above, generalized:
   minimize() clears the window's *inline* height, but any type with its
   own fixed window-frame height (latest: min(80vh,600px); the "single"
   group/job/book: min(90vh,1200px), all above) would otherwise keep that
   CSS height even with the body hidden, leaving a tall empty box under
   the titlebar instead of collapsing to just it. Equal specificity to
   those rules, so being later here (source order) is what wins. */
.tui-window.is-minimized,
/* (Also for the types whose own height rule is written with :not(...), which outranks the line above: Events, Jobs, Latest, Books,
   Archives and Community.) */
.tui-window.is-minimized[data-content-type] {
	height: auto;
	min-height: 0;
}

.tui-window.is-minimized .tui-window-titlebar {
	cursor: pointer;
	/* The titlebar's own line under it is the window's bottom edge now (with the body hidden), so no second line next to the window's outline. */
	border-bottom: 0;
}

.tui-window.is-minimized .tui-window-resize {
	display: none;
}

/* A mini jobs window that's also docked/minimized would otherwise show
   two identical square glyphs (the mini toggle's own + the minimize
   button's) side by side — hide the mini toggle so only one shows. */
.tui-window.is-minimized [data-window-action="mini"] {
	display: none;
}

/* Same reasoning — only the titlebar shows once minimized (see
   .tui-window.is-minimized .tui-window-body above), so there's nothing
   for widget mode to collapse down from/expand back into anyway. */
.tui-window.is-minimized [data-window-action="widget"] {
	display: none;
}

.tui-window-body {
	flex: 1 1 auto;
	padding: 1em;
	overflow: auto;
	max-height: min(70vh, 520px);
}

/* Same collapse-to-one-column behavior WP core's own block-library CSS
   applies at its own viewport breakpoint (781px) — but that's a *viewport*
   media query, which never fires for a window narrower than that on an
   otherwise-wide desktop screen (a window maxes out at 520px, or wider if
   manually drag-resized). .tui-window--narrow-640 is set/cleared by a
   ResizeObserver watching each window's actual width (see tui-window.js) —
   not a CSS container query, so as to not make .tui-window-body a
   containing block for its own position:fixed descendants (the listing
   thumbnail tooltip, the register page's sketch tooltip, ...), which
   `container-type` would otherwise silently do as a side effect.

   Both rules below need to win over one *more* viewport-relative core
   rule each, not just the stacking one already mentioned above:
   `@media (min-width: 782px) { .wp-block-columns { flex-wrap: nowrap
   !important; } }` — always active on a normal desktop browser regardless
   of the window's own width, so without overriding it too, forcing
   flex-basis: 100% on each column just squeezes them onto one cramped
   row instead of actually wrapping them onto their own lines. Both our
   rules have higher specificity than core's (two classes vs. one), so
   they still win despite core's matching !important. */
.tui-window--narrow-640 .wp-block-columns:not(.is-not-stacked-on-mobile) {
	flex-wrap: wrap !important;
}

.tui-window--narrow-640 .wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
	flex-basis: 100% !important;
}

.wp-block-columns.is-layout-flex {
	gap: 0.5em;
}

.wp-block-columns {
	margin-bottom:1em;
	margin-top:1em;
}

/* Full-width columns run edge to edge, so text in the first column sits 1em
   from the left edge and text in the last column 1em from the right edge
   (images stay edge to edge). Classic pages already pad .alignfull. */
.entry-content:not(.tui-classic-page .entry-content) .wp-block-columns.alignfull > .wp-block-column:first-child > :not(figure):not(.alignfull) {
	padding-left: 1em;
}
.entry-content:not(.tui-classic-page .entry-content) .wp-block-columns.alignfull > .wp-block-column:last-child > :not(figure):not(.alignfull) {
	padding-right: 1em;
}

.wp-block-video video {
	margin-bottom: -0.5em;
	margin-top: 0.5em;
}

/* Article Progress & TOC (assets/js/article-progress-toc.js) — #aptoc-container's
   own left/right/top all come from that file's syncPosition(), computed
   from the window's live getBoundingClientRect() (it lives inside
   #tui-windows, not nested under its own .tui-window — .tui-window's own
   overflow:hidden would clip it the moment it's positioned outside the
   window's box, which positioning it "just outside, flush against the
   window's left edge" requires, and it needs to be inside #tui-windows
   rather than document.body for z-index syncing against sibling windows
   to mean anything at all — see that file's own comment on both). Nothing
   to override here; the plugin's own position:fixed (aptoc-style.css,
   loaded as-is, unmodified) is correct again now that it isn't nested
   under a positioned ancestor.

   pointer-events: auto below counters .tui-windows' own
   pointer-events:none (style.css, needed there so empty space between
   windows doesn't block clicks through to the page) — every actual
   .tui-window already re-enables it on itself the same way.

   Every rule below is prefixed with `body` solely to outrank
   aptoc-style.css on specificity — matching specificity isn't enough
   here, since that stylesheet is injected by article-progress-toc.js's
   loadStylesheet() on tui-content-loaded, i.e. well *after* this
   (style.css) already loaded in <head>, so on a tied specificity +
   !important fight the plugin's later-loaded rule would otherwise win
   regardless of what this file says. */
body #aptoc-container {
	pointer-events: auto;
	border: 1px solid var(--linecolor);
	/* 1/3 of .tui-window's own floating-panel shadow — derived from the
	   same --tui-window-shadow-* variables via calc() (not a separate
	   hardcoded copy) so this stays a third of whatever that shadow
	   actually is, including if a theme ever overrides
	   --tui-window-shadow-opacity. Unlike .tui-window's own centered
	   version, this container sits flush (0 gap, no right border — see
	   below) against the window's left edge, so a symmetric shadow would
	   visibly bleed onto the window itself; the negative x-offset matches
	   the (already-thirded) blur radius exactly so that bleed cancels out
	   to ~0 instead of compounding it. */
	box-shadow:
		calc(var(--tui-window-shadow-blur) / -3)
		calc(var(--tui-window-shadow-y) / 3)
		calc(var(--tui-window-shadow-blur) / 3)
		rgba(0, 0, 0, calc(var(--tui-window-shadow-opacity, 0.2) / 3));
	/* This theme's own monospace stack instead of the plugin's own
	   hardcoded "JetBrainsMono-Light"/1rem — !important to win over the
	   plugin's own matching !important declarations. Set here so every
	   descendant inherits it, rather than patching each of the plugin's
	   own per-element font rules individually.
	   #aptoc-container lives on <body> (see this file's own comment
	   above), not nested inside .entry-content — em here is relative to
	   body's own font-size (--tui-font-size, this theme's base UI chrome
	   size), not the article's own larger reading size, so 1em reads as
	   plain UI-chrome size sitting next to the article rather than a
	   smaller sidebar caption. */
	font-family: var(--tui-font) !important;
	font-size: 0.9em !important;
}

/* Classic mode (can_v7_user_wants_classic_nav()) — the plugin's own
   unmodified aptoc-style.css sits this flush in the page's own left
   margin on desktop (left: 1em; see article-progress-toc.js's own doc
   comment on why classic mode's #aptoc-container is left completely
   untouched position-wise otherwise, unlike the floating-window case
   above). The floating-panel shadow above reads as stray/floaty with
   nothing of the theme's own underneath it to lift off, unlike the
   floating-window case — dropped for classic mode only, per the user.
   The left border stays (border-left here is the same 1px solid
   var(--linecolor) the base rule above already sets on every side —
   this only exists to keep it explicit after briefly dropping it, per
   the user). body-prefixed, same specificity-over-aptoc-style.css
   reasoning as the block above. */
body .tui-classic-page #aptoc-container {
	border-left: 1px solid var(--linecolor);
	box-shadow: none;
}

/* left, not right — only the plugin's own desktop rule (min-width: 768px,
   aptoc-style.css) sets a left at all; its mobile one (max-width: 768px)
   positions off `right` instead with no `left` of its own, so setting
   `left` unconditionally above would stretch the box between the two
   instead of sizing to content there. Same breakpoint as the plugin's
   own desktop rule, so this only ever nudges the one it's actually
   overriding. 1px further right than its bare 1em, per the user. */
@media (min-width: 768px) {
	body .tui-classic-page #aptoc-container {
		left: calc(1em + 1px);
	}
}

/* #aptoc-progress-percent/#aptoc-toc-list li a/.footnote-tooltip each set
   their own font-size directly (one inside #aptoc-container, one
   appended straight to <body>) — a rule matching an element directly
   always wins over an inherited value from its parent regardless of
   specificity, so #aptoc-container's own override above never reaches
   them; each needs its own matching override. */
body #aptoc-toc-list li a,
body .footnote-tooltip,
body #aptoc-progress-percent {
	font-family: var(--tui-font) !important;
	font-size: 0.9em !important;
}

/* 1/3 smaller than the plugin's own 10px 0 (aptoc-style.css, loaded
   as-is) — body-prefixed for the same load-order reason as the rules
   above, since that stylesheet loads after this one. */
body .aptoc-dot {
	margin: calc(10px * 2 / 3) 0;
}

/* Activity window's filter toolbar (inc/window-handlers/activity.php builds
   the markup, assets/js/activity.js moves it into a floating right-side
   sidebar attached to the window — same #tui-windows-attachment mechanism
   as #aptoc-container above, mirrored to the other side; see that file's
   own comment on syncFilterPosition() for the position math). Unlike
   #aptoc-container this is entirely our own markup (not a plugin's), so
   nothing here needs the `body` prefix / !important fights that block
   above deals with — no competing later-loaded stylesheet to outrank. */
#tui-activity-filters {
	position: fixed;
	/* top is a real top-edge value (syncFilterPosition() anchors it to the
	   window's own titlebar bottom-right corner), not a center-point needing
	   a translateY(-50%) to offset against — unlike #aptoc-container above. */
	pointer-events: auto;
	display: flex;
	flex-direction: column;
	width: 240px;
	background: var(--backgroundcolor);
	/* No left border — that edge sits flush against the window's own right
	   border, which would otherwise double up. */
	border-top: 1px solid var(--linecolor);
	border-right: 1px solid var(--linecolor);
	border-bottom: 1px solid var(--linecolor);
	border-radius: 0 var(--tui-window-radius) var(--tui-window-radius) 0;
	font-family: var(--tui-font);
	/* 1em, not a fraction — sits outside the window as its own panel next
	   to the feed, not nested inside it, so it should read as the same
	   body/UI chrome size (--tui-font-size) as everything else, not a
	   smaller caption. */
	font-size: 1em;
	/* 1/3 of .tui-window's own floating-panel shadow, same derivation as
	   #aptoc-container's above — positive x-offset here instead of
	   negative, since this sidebar sits flush against the window's *right*
	   edge and should lean away from it (rightward), not into it. */
	box-shadow:
		calc(var(--tui-window-shadow-blur) / 3)
		calc(var(--tui-window-shadow-y) / 3)
		calc(var(--tui-window-shadow-blur) / 3)
		rgba(0, 0, 0, calc(var(--tui-window-shadow-opacity, 0.2) / 3));
}

/* Collapse-sidebar toggle — a titlebar button now (assets/js/activity.js),
   swapped to sit next to the widget-mode button rather than straddling
   the sidebar's own edge, per the user. No dedicated box size — it
   shares main.js's own mini-mode button's box/font-size via the generic
   .tui-window-titlebar .tui-window-btn rule. The glyph itself reuses
   mini's own '=' character, rotated 90deg on this inner span so the two
   strokes read as vertical instead of horizontal, matching mini's icon
   rather than a custom one. */
.tui-activity-filters-collapse-glyph {
	display: inline-block;
	transform: rotate(90deg);
}

.tui-window-titlebar [data-window-action="activity-filters-collapse"] {
	position: relative;
	left: 2px;
}

/* Collapsed — the sidebar's own children hide; the element itself stays
   put (position/border/background unchanged) so it reads as a thin
   strip. The toggle button lives in the titlebar now, not inside here,
   so there's nothing left to exclude from this. */
#tui-activity-filters.tui-activity-filters--collapsed {
	width: auto;
	overflow: visible;
	/* Nothing of it is left to see: its children are hidden and the toggle is in the titlebar, so the border and shadow
	   were only a small stub beside the window's edge (the script shows/hides the element itself, so this can't be display: none). */
	border: none;
	box-shadow: none;
	background: none;
}

/* !important: switchFiltersTab() (assets/js/activity.js) sets the
   current panel's visibility via jQuery .show()/.hide() — an inline
   style, which otherwise wins over this class rule by specificity. A
   page refresh that restores a ?channel= URL (still present from an
   earlier pushState, even across a widget-mode round trip) runs that
   restore regardless of the sidebar's own collapsed state, punching an
   inline display:block through this hide and showing just the Channels
   list with its tabs/Filters sibling still (correctly) hidden. */
#tui-activity-filters.tui-activity-filters--collapsed > * {
	display: none !important;
}

/* Filters (the panel showing by default) sizes to its own natural
   content — no scroll. Channels (44 real entries as of writing, easily
   taller) is capped to that same height instead of growing the whole
   sidebar taller than Filters and shifting on every tab switch, and
   scrolls *within* it — --activity-filters-height is Filters' own
   measured scrollHeight, set once by assets/js/activity.js (its own
   comment explains why: sibling panels toggled via display:none/block
   can't reference each other's height in pure CSS), so this stays
   correct if the filter list itself ever changes instead of drifting
   from a hardcoded px guess. Scrollbar hidden the same way the Activity
   window's own body is (style.css's own [data-content-type="activity"]
   .tui-window-body rule) — still scrollable, just no visible
   track/thumb in a sidebar this narrow. */
.tui-activity-filters-list {
	/* A little breathing room above/below — Filters' own first/last item,
	   or wherever Channels' scroll happens to start/end. Included in
	   Filters' own measured scrollHeight above (JS reads it after this
	   applies), so Channels' own max-height already accounts for it too. */
	padding-top: 0px;
	padding-bottom: 10px;
}

.tui-activity-filters-list[data-activity-filters-panel="channels"] {
	max-height: var(--activity-filters-height, 374px);
	overflow-y: auto;
	scrollbar-width: none;
}
.tui-activity-filters-list[data-activity-filters-panel="channels"]::-webkit-scrollbar {
	display: none;
}

.tui-activity-filter-btn {
	display: block;
	width: 100%;
	white-space: nowrap;
	text-align: left;
	padding: 0.5em 1em;
	border: none;
	background: none;
	color: var(--bodycolor);
	font-family: inherit;
	font-size: inherit;
	cursor: pointer;
}

.tui-activity-filter-btn:hover {
	background: var(--shadecolor);
	color: var(--bodycolor);
}

/* Gap marking where the personal filters (Everything/My Actions/My Daps/
   Mentions) give way to content-type ones, starting at "New Posts" — see
   inc/window-handlers/activity.php's own comment on this class. */
.tui-activity-filter-btn--group-start {
	margin-top: 1em;
}

/* Filters/Channels tabs — same .tui-saved-tabs/.tui-saved-tab-btn visual
   convention as the Saved window's own tabs (border-bottom instead of
   that row's border-all/border-left-between-siblings, since this is a
   single full-width row atop a narrow vertical sidebar rather than a
   wrapped horizontal group). Panel show/hide is assets/js/activity.js's
   own doing (toggling [data-activity-filters-panel]'s display), not CSS. */
.tui-activity-filters-tabs {
	display: flex;
	border-bottom: 1px solid var(--linecolor);
}

.tui-activity-filters-tab-btn {
	appearance: none;
	background: none;
	border: none;
	padding: 0.5em 1em;
	color: var(--bodycolor);
	font-family: inherit;
	font-size: inherit;
	cursor: pointer;
	margin: 0px;
}

.tui-activity-filters-tab-btn:hover,
.tui-activity-filters-tab-btn:focus {
	color: var(--bodycolor);
	outline: none;
}

.tui-activity-filters-tab-btn.is-active {
	background: var(--bodycolor);
	color: var(--backgroundcolor);
}

.tui-activity-filter-btn.active {
	background: var(--darkcolor);
	color: var(--backgroundcolor);
}

/* Channel list (data-activity-filters-panel="channels") — same button
   shape as .tui-activity-filter-btn above, plus a count on the right
   (CANV6's own sidebar showed count as a dimmed number next to each
   channel; kept here rather than dropped since it's genuinely useful
   context, just via flex space-between instead of that version's inline
   styles). */
.tui-activity-channel-btn {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	width: 100%;
	text-align: left;
	padding: 6px 14px;
	border: none;
	background: none;
	color: var(--bodycolor);
	font-family: inherit;
	font-size: 1em;
	cursor: pointer;
}

.tui-activity-channel-btn:hover {
	background: var(--shadecolor);
	color: var(--bodycolor);
}

.tui-activity-channel-btn.active {
	background: var(--darkcolor);
	color: var(--backgroundcolor);
}

.tui-activity-channel-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tui-activity-channel-count {
	flex: 0 0 auto;
	color: var(--midcolor);
	font-size: 0.80em;
}

.tui-activity-channel-btn.active .tui-activity-channel-count {
	color: var(--backgroundcolor);
}

.tui-activity-channels-empty {
	padding: 6px 14px;
	color: var(--midcolor);
}

/* Below both panels, visible regardless of which tab is active — misc
   actions/links (Scroll to Top today, more to come), not filtering, so
   visually separated with its own border rather than living inside
   either .tui-activity-filters-list. */
.tui-activity-filters-actions {
	border-top: 1px solid var(--linecolor);
}

/* Activity chart (inc/activity-components/week-browser.php) — same
   separator treatment as .tui-activity-filters-actions just above, right
   after the filters list's own last item (People/Tools), per the user. */
#tui-week-browser {
	border-top: 1px solid var(--linecolor);
	padding: 0.5em;
}

/* Shared by both a real <button> (Scroll to Top) and a real <a> (Edit
   Profile, and any future page link — see inc/window-handlers/activity.php's
   own comment) — text-decoration/box-sizing reset for the <a> case, since
   a button has neither by default but a link does. */
.tui-activity-filters-action-btn {
	display: block;
	width: 100%;
	box-sizing: border-box;
	text-align: left;
	padding: 6px 14px;
	border: none;
	background: none;
	color: var(--bodycolor);
	font-family: inherit;
	font-size: inherit;
	text-decoration: none;
	cursor: pointer;
}

.tui-activity-filters-action-btn:hover {
	background: var(--linecolor);
	color: var(--bodycolor);
}

/* The links under the week browser (Scroll to Top, Edit Profile, About, version) are hidden on touch devices (iPad). */
@media (hover: none) and (pointer: coarse) {
	#tui-activity-filters .tui-activity-filters-actions {
		display: none;
	}
}

/* Too little height for the whole sidebar: only the filters/channels stay (assets/js/activity.js). */
#tui-activity-filters.tui-activity-filters--compact #tui-week-browser,
#tui-activity-filters.tui-activity-filters--compact .tui-activity-filters-actions {
	display: none;
}

/* Plugin version/README link — same 0.85em "caption" size as .tui-changelog/
   .entry-content figcaption/.wp-caption-text elsewhere in this theme
   (style.css's own comment on those), not the sidebar's normal 0.9em, and
   dimmer than a regular action since it's credit/meta, not something to
   act on the same way Scroll to Top/Edit Profile are. */
.tui-activity-filters-version {
	display: block;
	width: 100%;
	box-sizing: border-box;
	text-align: left;
	padding: 6px 14px;
	border: none;
	background: none;
	color: var(--bodycolor);
	font-family: inherit;
	font-size: 0.8em;
	cursor: pointer;
}

.tui-activity-filters-version:hover {
	background: var(--linecolor);
	color: var(--bodycolor);
}

/* Activity window's own scrollbar hidden — filtering now lives in the
   floating sidebar to its right (above), so the feed's own scrollbar had
   nothing to its right anymore but empty space; still scrollable, just
   without ::-webkit-scrollbar's usual thin-track rendering (see that rule
   above) or Firefox's own scrollbar-width. */
.tui-window[data-content-type="activity"] .tui-window-body {
	scrollbar-width: none;
	padding-top: 0;
}
.tui-window[data-content-type="activity"] .tui-window-body::-webkit-scrollbar {
	display: none;
}

/* Post thumbnail inside a window — bleeds edge-to-edge by negating the
   body's own padding (1em, not the stale 20px this was still hardcoded
   to — .tui-window-body's own padding: 1em, per the user; the 8px
   mismatch at the default 12px font size was overflowing the window's
   own right edge), flush against the titlebar and both sides. */
.tui-window-thumb {
	margin: 0 -1em 0.5em;
}

/* A page window with a featured image: the picture sits flush under the titlebar, cancelling the body's 1em padding above it. */
.tui-window[data-content-type="page"] .tui-window-body > .tui-window-thumb {
	margin-top: -1em;
}

.tui-window-thumb img {
	display: block;
	width: 100%;
	height: auto;
	background: var(--backgroundcoloralt); /* visible while the image loads */
}

/* Three dots in the middle of the picture's box until it has loaded (thumbnail.php adds is-loaded), same stepping as the NFT "loading…" label. */
.tui-window-thumb:has(> img:not(.is-loaded)) {
	position: relative;
}

.tui-window-thumb:has(> img:not(.is-loaded))::after {
	content: ".";
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--darkcolor);
	pointer-events: none;
	animation: tui-thumb-dots 1.2s steps(1) infinite;
}

@keyframes tui-thumb-dots {
	0% {
		content: ".";
	}
	33% {
		content: "..";
	}
	66% {
		content: "...";
	}
}

.tui-window-resize {
	position: absolute;
	right: 2px;
	bottom: 2px;
	width: 1em;
	height: 1em;
	/* Explicit, not just DOM-order-implied — Safari's own scrollbar-corner
	   hit-testing (native browser chrome, not a normal stacked DOM layer)
	   doesn't reliably let go of this exact corner just because
	   ::-webkit-scrollbar{display:none} hid it visually elsewhere on
	   .tui-window-body, making the resize handle hard/impossible to grab
	   there specifically (Chrome doesn't have this quirk). */
	z-index: 5;
	cursor: nwse-resize;
	touch-action: none;
	background: linear-gradient(
		135deg,
		transparent 0 40%,
		var(--shadecolor) 40% 55%,
		transparent 55% 65%,
		var(--shadecolor) 65% 80%,
		transparent 80%
	);
}

/* Invisible, larger hit area around the visible glyph above (same
   reasoning as the z-index comment there) — a pointer/mouse event
   anywhere on this pseudo-element's box still fires on .tui-window-resize
   itself (pseudo-elements aren't part of the DOM, so event.target is
   always the real host element), it just gives Safari's phantom
   scrollbar-corner gutter a much smaller fraction of the total grabbable
   area to actually be contesting. */
.tui-window-resize::before {
	content: '';
	position: absolute;
	inset: -8px;
}

.tui-window-resize:hover {
	background: linear-gradient(
		135deg,
		transparent 0 40%,
		var(--darkcolor) 40% 55%,
		transparent 55% 65%,
		var(--darkcolor) 65% 80%,
		transparent 80%
	);
}

/* Search window before a search has actually been run — see main.js's
   tui-content-loaded handling of data-has-query. No drag handle (a
   hidden handle also can't receive the pointerdown tui-window.js's
   resize listener is bound to, so this alone is enough to disable it
   too), and no bottom padding on the body — its only content at this
   point is the edge-to-edge search bar itself, so the normal padding
   would otherwise show as dead space between the input and the window's
   bottom edge. */
.tui-window--compact .tui-window-resize {
	display: none;
}

.tui-window--compact .tui-window-body {
	padding-bottom: 0;
}

/* While still loading, the compact search box's own real content
   (the search bar — [data-search-window-form] input, style.css) hasn't
   arrived yet to cancel this body's own top padding the way its
   margin: -1em -1em 0 normally does, and the loading <p> itself is
   hidden entirely for search (.tui-window[data-content-type="search"]
   .tui-window-body.is-loading p, further down) — so without this, the
   box sat at just its own 1em padding-top while loading, then visibly
   grew ~24px the instant the real input arrived. padding-top: 0 here +
   a min-height matching that input's own real total height (its 12px+
   12px padding, plus body's own 1.6 line-height at the input's 1em font
   size) reserves the same space up front instead, so there's nothing
   left to visibly expand into once it loads — regardless of how long
   that takes. */
.tui-window--compact .tui-window-body.is-loading {
	padding-top: 0;
	min-height: calc(24px + 1.6em);
}

/* A search that's running keeps its form (margin: -1em -1em 0, which cancels the body's 1em top padding), so the padding
   stays or the form is pulled up out of the box while the results load. */
.tui-window--compact .tui-window-body.is-loading:has([data-search-window-form]) {
	padding-top: 1em;
}

/* Same compact width as the docked/minimized state (tui-window.js's
   minimizeToDock(), win.style.width = '280px') — a max-width, not a
   forced width, so it only ever shrinks a wider window, never widens a
   narrower one. */
.tui-window--compact {
	max-width: 280px;
}

.tui-window-body.is-loading {
	color: var(--midcolor);
}

.tui-window-body.is-loading p {
	margin-top: 0.25em;
	/* Hidden for the first 200ms, so fast loads never flash the text. */
	opacity: 0;
	animation: tui-show-after-delay 0s 200ms forwards;
}

/* The Activity window's body has no top padding of its own (above), so its loading text takes that 1em as margin to sit where it does in the other windows. */
.tui-window[data-content-type="activity"] .tui-window-body.is-loading p {
	margin-top: 1.25em;
}

/* The same text for a Layout opened from a construction with nothing kept for it yet (inc/nodes.php), which is real content, not the loading state. */
.tui-node-layout-loading {
	margin-top: 0.25em;
	color: var(--midcolor);
}

.tui-node-layout-loading::after {
	content: "";
	display: inline-block;
	width: 0.6em;
	height: 1em;
	margin-left: 4px;
	background: var(--darkcolor);
	vertical-align: text-bottom;
	animation: tui-blink 1s steps(1) infinite;
}

@keyframes tui-show-after-delay {
	to {
		opacity: 1;
	}
}

.tui-window-body.is-loading p::after {
	content: "";
	display: inline-block;
	width: 0.6em;
	height: 1em;
	margin-left: 4px;
	background: var(--darkcolor);
	vertical-align: text-bottom;
	animation: tui-blink 1s steps(1) infinite;
}

/* Search's own "loading…" flash — data-content-type is set the moment the
   window's created (tui-window.js's open(), before its first fetch even
   starts), so this applies from frame one, not just once content's
   loaded. A blank/compact search open is near-instant anyway (see
   main.js's own compact-on-open handling), so the text never has time to
   read as anything but a flash. */
.tui-window[data-content-type="search"] .tui-window-body.is-loading p {
	display: none;
}

/* No "loading…" text in a widget — it's a tiny desktop element, and the text
   (with its blinking cursor) just flashes in it while the content swaps. Widget
   mode is applied as the window is created (main.js's 'tui-window-created'
   hook) for a restored one, so this holds from the first frame. */
.tui-window--widget .tui-window-body.is-loading p {
	display: none;
}

.tui-window-error {
	color: var(--tui-red);
}

.tui-window .tui-listing,
.tui-window .entry-content {
	color: var(--bodycolor);
}

@media (max-width: 500px) {
	.tui-window {
		width: calc(100vw - 36px);
	}
}

/* A window's own width (base rule above, and every per-type override) can
   ask for up to 100vw, but max-width still clips it down to
   calc(100vw - 32px) regardless — true edge-to-edge (e.g. the Mobile
   layout's Latest, layouts.js) needs that cap lifted too, only below the
   width a layout like that is actually meant for. */
@media (max-width: 767px) {
	.tui-window {
		max-width: 100vw;
	}
}

/* -----------------------------------------------------------------------
   Front page directory listing ("ls -la")
   ----------------------------------------------------------------------- */

.tui-listing {
	display: flex;
	flex-direction: column;
}

/* "No posts yet.": the listing is a flex column, so the paragraph's own top margin would add to the gap above it. */
.tui-listing-empty {
	margin-top: 0;
}

.tui-listing-row {
	display: flex;
	gap: 1em;
	padding: 0.25em 0;
}

.tui-listing-head {
	color: var(--midcolor);
	border-bottom: 1px dashed var(--linecolor);
	margin-bottom: 4px;
	text-transform: uppercase;
	font-size: 0.80em;
	letter-spacing: 0.04em;
}

.tui-listing-row:not(.tui-listing-head):hover {
	background: var(--shadecolor);
}

.tui-load-more {
	display: block;
	width: 100%;
	padding: 0.5em 1em;
	background: var(--backgroundcolor);
	border: 1px solid var(--linecolor);
	border-top: none;
	border-bottom: none;
	color: var(--bodycolor);
	font-family: var(--tui-font);
	font-size: 1em;
	cursor: pointer;
	text-transform: capitalize;
	margin-top: 1em;
}

/* Inside a real floating window, unlike classic — top/bottom border
   back, per the user. */
.tui-window .tui-load-more {
	border-top: 1px solid var(--linecolor);
	border-bottom: 1px solid var(--linecolor);
	margin-bottom: 1em;
}

/* The Jobs window's own last row doesn't need its own trailing
   border-bottom (.tui-job-row's base rule above) right against Load
   More's own new border-top just above — same reasoning as classic's
   own .tui-job-row:last-child rules further down, just for a real
   floating window instead. */
.tui-window .tui-job-row:last-child {
	border-bottom: none;
}

.tui-load-more:hover,
.tui-load-more:focus {
	background: var(--shadecolor);
	color: var(--bodycolor);
	outline: none;
}

.tui-load-more:disabled {
	cursor: default;
	opacity: 0.6;
}

.tui-col-date {
	color: var(--bodycolor);
	flex: 0 0 auto;
	width: 84px;
}

.tui-col-status {
	color: var(--bodycolor);
	flex: 0 0 auto;
	width: 84px;
}

.tui-col-name {
	flex: 1 1 auto;
	min-width: 0;
}

.tui-col-name a {
	color: var(--linkcolor);
}

.tui-col-name a:hover,
.tui-col-name a:focus {
	background: none;
	color: var(--darkcolor);
}

/* Thumbnail tooltip — hidden until the title link is hovered/focused,
   then follows the cursor (top/left set from mousemove — see main.js). */
.tui-list-thumb {
	position: fixed;
	z-index: 50;
	display: block;
	width: 280px;
	padding: 1em 1em 0;
	border: 1px solid var(--linecolor);
	background: var(--backgroundcolor);
	box-shadow: 0 var(--tui-window-shadow-y) var(--tui-window-shadow-blur) rgba(0, 0, 0, var(--tui-window-shadow-opacity, 0.2));
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.1s ease;
}

.tui-list-thumb img {
	display: block;
	width: 100%;
	height: auto;
}

.tui-list-thumb-excerpt {
	display: block;
	padding: 1em 0;
	color: var(--bodycolor);
	font-size: 0.80em;
	line-height: 1.4;
	white-space: normal;
}

.tui-col-name a:hover .tui-list-thumb,
.tui-col-name a:focus .tui-list-thumb {
	opacity: 1;
	visibility: visible;
}

.tui-col-category,
.tui-col-author {
	color: var(--midcolor);
	flex: 0 0 auto;
	width: 92px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tui-col-category {
	color: var(--bodycolor);
}

@media (max-width: 500px) {
	.tui-listing-row {
		flex-wrap: wrap;
		gap: 4px 16px;
	}
}

/* Shared between the job card (below) and the single job view
   (template-parts/job/content.php). */
.tui-job-status {
	font-weight: normal;
}

.tui-job-status--active {
	color: var(--darkcolor);
}

.tui-job-status--expired {
	color: var(--bodycolor);
}

/* Single job view (template-parts/job/content.php) — same bracketed-row
   treatment as the grid card's merged Category/People/Tools row (see
   .tui-grid-meta-terms), just outside the .entry-content grid context. */
.tui-job-tags-row {
	text-transform: lowercase;
	margin-top: 1.2em;
	color: var(--midcolor);
	font-size: 0.80em;
}

/* Same treatment for the single book view (template-parts/book/content.php). */
.tui-book-tags-row {
	margin-top: 1.5em;
	color: var(--midcolor);
	font-size: 0.80em;
	margin-bottom: 1em;
}

/* Same treatment for the single post/event view's own footer terms row
   (template-parts/post/content.php) — wraps can_v7_render_post_terms_rows()'s
   output (posts) or plain event_category text (events, which has no
   window type registered to link through that helper). */
.tui-post-tags-row {
	margin-top: 0;
	color: var(--midcolor);
	font-size: 0.80em;
	margin-bottom: 1em;
}

/* An event's category, under its description. */
.tui-post-tags-row.tui-event-category {
	margin-top: 1em;
}

/* can_v7_render_post_terms_rows()'s own per-taxonomy rows — one row per
   taxonomy with a literal label, unlike .tui-grid-meta-terms' single
   merged row above (grid cards keep that look; this is the single-post
   page only). Needs its own overflow/white-space override since
   .tui-grid-meta-row's base rule (ellipsis/nowrap, meant for the grid
   card's own fixed-width column) would otherwise truncate a long term
   list instead of wrapping it. */
/* Two classes, since .tui-grid-meta-row's own rule comes later in this file and would otherwise win. */
.tui-grid-meta-row.tui-post-terms-row {
	overflow: visible;
	text-overflow: clip;
	white-space: normal;
}

.tui-post-terms-label {
	color: var(--bodycolor);
	margin-right: 0.3em;
}

/* .tui-event-facts reused standalone here (see template-parts/event/
   content-card.php for its usual home, nested next to the date box) —
   just needs its own spacing since it's not inside .tui-event-meta here. */
.tui-event-facts--single {
	margin: 12px 0;
}

/* Single event view's two-column layout (template-parts/post/content.php) —
   a big date on the left, everything else (header/thumbnail/facts/
   content/tags) on the right, per the user. */
.tui-event-single {
	display: flex;
	gap: 24px;
	align-items: flex-start;
}

.tui-event-single-date {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.tui-event-single-date-month {
	font-size: 1.2em;
	text-transform: uppercase;
	color: var(--midcolor);
}

.tui-event-single-date-day {
	font-size: 6em;
	line-height: 1;
	color: var(--bodycolor);
}

.tui-event-single-date-end {
	font-size: 0.80em;
	color: var(--midcolor);
}

.tui-event-single-body {
	flex: 1 1 auto;
	min-width: 0;
}

/* .tui-window-thumb's usual -1em bleed (style.css's own .tui-window-thumb
   rule) assumes it sits directly in the window body's 1em padding —
   nested one level deeper here (inside .tui-event-single-body, itself a
   flex item next to the date column), that offset no longer lines up
   with anything and just misaligns the image from the title/content
   either side of it. Flush instead, so image/title/content share the
   same left (and right) edge. */
.tui-event-single-body .tui-window-thumb {
	margin: 0 0 16px;
}

/* .entry-content's own display: grid (further up) reserves wide/full
   alignment gutters either side of the actual text column — meaningful
   for a real Gutenberg-authored post that might use a wide/full image,
   meaningless here: the Calendar Plugin's event description is always
   plain, unstructured text (see events.php's own doc comment), so those
   empty gutters just make a short description look oddly narrow/columned
   for no reason. Collapse back to a normal block here only, not
   .entry-content generally. */
.tui-event-single-body .entry-content {
	display: block;
}

/* Jobs listing — not the list/grid toggle other listing types get (see
   can_v7_render_post_listing()'s fixed_template). Its own row/column
   classes throughout (.tui-job-row/.tui-job-col-*), not
   template-parts/post/content-list.php's .tui-listing-row/.tui-col-* or
   content-grid.php's cards, so a jobs listing doesn't read as more
   articles. No shared header row — each job is its own full-width row
   (template-parts/job/content-row.php), thumbnail + role/company on the
   first line and a wrapped date/status/tags meta line right below it,
   inside that same row rather than columns aligned to anything above them.

   .tui-listing--fixed is shared by every listing type using
   $args['fixed_template'] (currently jobs and books) — qualified by
   [data-listing-type] below since jobs wants a flex column of rows and
   books wants a CSS grid of posters; nothing here without that qualifier. */
.tui-listing--fixed[data-listing-type="jobs"] {
	display: flex;
	flex-direction: column;
}

/* No shared column-header row — each job is its own full-width row, the
   "columns" (role/company, then date/status/tags as a wrapped meta line)
   laid out inside .tui-job-col-body rather than aligned to anything above
   them. */
.tui-job-row {
	display: flex;
	align-items: flex-start;
	gap: 1em;
	padding: 0.5em 0.5em 0.5em 0.5em;
	border-bottom: 1px solid var(--linecolor);
	margin-left: 0em;
}

.tui-job-row:hover {
	background: var(--shadecolor);
}

.tui-job-col-thumb {
	flex: 0 0 auto;
	display: block;
	width: 64px;
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.tui-job-col-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tui-job-col-body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1 1 auto;
	min-width: 0;
}

/* Full, unparsed post title — only shown in .tui-window--mini (below),
   where the split role/company treatment doesn't apply. */
.tui-job-title-full {
	display: none;
}

.tui-window--mini .tui-job-title-role {
	display: none;
}

.tui-window--mini .tui-job-title-full {
	display: inline;
}

.tui-job-col-role a {
	color: var(--linkcolor);
}

/* Explicit :hover/:focus — otherwise this ties in specificity with the
   site-wide a:hover rule (style.css's top-level a:hover) and, coming
   later in the file, would silently win and cancel its color change. */
.tui-job-col-role a:hover,
.tui-job-col-role a:focus {
	background: none;
	color: var(--darkcolor);
}

.tui-job-company {
	display: block;
	color: var(--midcolor);
	font-size: 0.80em;
}

/* The meta line — date/status/tags flow together and wrap naturally
   (no fixed column widths to line up with, there's no header row any
   more), separated by a middot rather than relying on gap alone to read
   as distinct fields. */
.tui-job-col-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	row-gap: 0.5em;
	margin-top: 0.25em;
	color: var(--bodycolor);
	font-size: 0.80em;
}

.tui-job-col-meta > * + *::before {
	content: "\00b7";
	margin: 0 6px;
	color: var(--linecolor);
}

.tui-job-col-tags {
	text-transform: lowercase;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* "Mini" mode (toggled by the titlebar button next to minimize — see
   main.js's setWindowMini()/tui-content-loaded handlers for 'jobs' and
   'latest'): just titles, nothing else — no intro/heading/button, no
   column-header row, no "load more" (mini stays fixed to what's already
   loaded — no reason to grow past a quick-glance list). Jobs additionally
   drops expired jobs entirely and every column but the role title, just
   below; Latest's own column/grid rules are further down, near its grid/
   list listing styles. Same no-resize treatment as the search window's
   .tui-window--compact — see that rule just above and main.js's height
   stash/restore in the mini click handler. */
.tui-window--mini .tui-listing-intro,
.tui-window--mini .tui-listing-head,
.tui-window--mini .tui-load-more {
	display: none;
}

.tui-window--mini .tui-window-resize {
	display: none;
}

.tui-window--mini .tui-window-body {
	padding: 0.5em;
	/* The base rule's max-height: min(70vh, 520px) was tuned for full-size
	   listings, not mini's own much smaller content — on a shorter
	   viewport that cap can still land just under a mini poster/thumb's
	   real height (books/featured), clipping it into an unwanted
	   scrollbar. Mini content is deliberately small everywhere it's used,
	   so it's safe to just let it size to its own content instead. */
	max-height: none;
}

/* Same compact width as the docked/minimized state (tui-window.js's
   minimizeToDock(), win.style.width = '280px') — a max-width, not a
   forced width, so it only ever shrinks a wider window, never widens a
   narrower one. */
.tui-window--mini {
	max-width: 280px;
}

.tui-window--mini .tui-job-row:has(.tui-job-status--expired) {
	display: none;
}

.tui-window--mini .tui-job-col-thumb,
.tui-window--mini .tui-job-col-meta,
.tui-window--mini .tui-job-company {
	display: none;
}

.tui-window--mini .tui-job-row {
	padding: 4px 0;
	border-bottom: none;
	/* Same size the theme uses for captions — style.css's
	   .entry-content figcaption. */
	font-size: 0.80em;
	/* Overrides the base row's align-items: center (line 2094, still
	   wanted there for the full multi-column row) — mini only ever shows
	   the title, so a wrapped two-line title should keep the "›" marker
	   next to its first line, not centered against the whole block. */
	align-items: flex-start;
	/* Pinned explicitly (same 12px the base rule already uses) so
	   Latest's mini rows below can match it exactly rather than each
	   inheriting whatever gap their own base rule happens to use. */
	gap: 6px;
}

/* Just the title link's own hover (reverse-video, from the site-wide
   a:hover rule) — the row's own shadecolor hover on top of that reads as
   a double hover for a row that's really just one link now. */
.tui-window--mini .tui-job-row:hover {
	background: none;
}

/* Same "›" marker as .entry-content ul > li::before — as a flex item
   here (this row's already a flex container), not absolutely positioned
   like that one, since there's no indent to hang it off of. */
.tui-window--mini .tui-job-row::before {
	content: "›";
	flex: 0 0 auto;
	color: var(--bodycolor);
}

/* Books listing — a cover-forward poster grid (see
 * inc/window-handlers/books.php's file comment for why: no reliable
 * structured data to build a jobs-style list from, so this leans on the
 * one thing that's always real, the cover). Own classes throughout
 * (.tui-book-poster*), bigger/borderless covers than content-grid.php's
 * article cards, no excerpt/date/author. Each cover opens the image
 * lightbox directly (see template-parts/book/content-poster.php +
 * wireBookGalleryIds() in main.js), not this window. */
/* 220px at --tui-font-size's own 12px default (the article grid's columns) — tied to that variable
   instead of a flat px value, same as Latest/Events/Archives/Saved's own
   grid formulas (e.g. .tui-listing--grid further down), so the font-size
   picker grows/shrinks these poster covers too (.tui-book-poster-cover
   img's own width: 100% already scales with whatever this cell's own
   width is — it just wasn't tied to anything that itself scaled). One
   shared rule for both the floating Books window and the front page's
   own Books teaser (page-templates/front.php) — both use this exact
   selector, so fixing it here covers both at once. */
.tui-listing--fixed[data-listing-type="books"] {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(calc(var(--tui-font-size) * 18.333), 1fr)); /* the same columns as the article grid (.tui-listing--grid) */
	gap: 1em;
}

@media (max-width: 500px) {
	.tui-listing--fixed[data-listing-type="books"] {
		grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	}
}

.tui-book-poster-cover {
	display: block;
}

.tui-book-poster-cover img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3; /* the same proportion as an article's thumbnail (.tui-grid-thumb) */
	object-fit: cover;
	border: 1px solid var(--linecolor);
}

.tui-book-poster-title {
	display: flex; /* the save button pinned to the right of the title, as on an article's card (.tui-grid-title) */
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.5em;
	margin: 8px 0 0;
	font-size: 0.9em;
	font-weight: normal;
}

.tui-book-poster-title a {
	color: var(--linkcolor);
}

/* Events (inc/window-handlers/events.php) — the Calendar Plugin's 'events'
   CPT. Same $args['fixed_template'] convention as jobs/books above; a card
   grid like books', just wider cards (an event card carries more — date,
   location, categories, excerpt, URL — than a book poster). Own classes
   throughout (.tui-event-*), not content-grid.php's cards. Same column
   sizing as Latest's own grid view (.tui-listing--grid, further down) —
   was a plain 260px minmax, noticeably larger cards than Latest's
   220px-at-default-font-size formula produces. */
.tui-listing--fixed[data-listing-type="events"] {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(calc(var(--tui-font-size) * 18.333), 1fr));
	gap: 1em;
}

.tui-event-card {
	display: flex;
	flex-direction: column;
}

.tui-event-thumb {
	display: block;
	aspect-ratio: 4 / 3;
	background: var(--shadecolor);
	overflow: hidden;
}

.tui-event-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tui-event-body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 10px;
}

.tui-event-meta {
	display: flex;
	align-items: flex-start;
	gap: 0.5em;
}

/* Pinned to the far right of the date-box/facts row, not the title below
   it — per the user. .tui-event-meta's own align-items: flex-start
   already puts it at the same top edge as the date box. */
.tui-event-meta .tui-save-toggle {
	margin-left: auto;
}

.tui-event-date-box {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-start;
	width: 44px;
	height: 44px;
	text-align: left;
}

.tui-event-date-month {
	font-size: 0.80em;
	text-transform: uppercase;
	color: var(--darkcolor);
}

.tui-event-date-day {
	font-size: 2em;
	color: var(--darkcolor);
}

.tui-event-facts {
	list-style: none;
	margin: 0;
	padding: 0;
	color: var(--bodycolor);
	font-size: 0.80em;
	line-height: 1.5;
}

.tui-event-fact-icon {
	width: 0.9em;
	height: 0.9em;
	margin-right: 4px;
	vertical-align: -0.1em;
}

.tui-event-fact--soon {
	color: var(--darkcolor);
}

.tui-event-title {
	display: block;
	color: var(--linkcolor);
	margin-top: 0.5em;
	margin-bottom: 0.5em;
}

/* Overrides the site-wide a:hover reverse-video background — plain text
   color change instead, same as jobs' own .tui-job-col-role a:hover. */
.tui-event-title:hover,
.tui-event-title:focus {
	background: none;
	color: var(--darkcolor);
	outline: none;
}

.tui-event-excerpt {
	color: var(--bodycolor);
	font-size: 1em;
	margin-top: 0.5em;
	margin-bottom: 0.5em;
	overflow-wrap: anywhere;
}

.tui-event-link {
	color: var(--linkcolor);
	font-size: 0.80em;
	align-self: flex-start;
	margin-bottom: 0.5em;
}

.tui-event-link-icon {
	width: 0.85em;
	height: 0.85em;
	margin-left: 2px;
	vertical-align: -0.05em;
}

/* Category-filter buttons above the listing (can_v7_render_events_category_filters()) —
   one bordered strip with dividers between buttons, same construction as
   the list/grid toggle (.tui-listing-view-toggle/.tui-view-btn): the
   container owns the one outer border, buttons themselves have none. */
/* A secondary toolbar — same construction as .tui-listing-toolbar's own
   .tui-listing-view-toggle (one bordered group, dividers between buttons,
   not individually-boxed pills), and the same flush top alignment as
   .tui-listing-toolbar itself. Sized to its own content (not full width)
   since there's only ever this one group here, unlike the primary toolbar's
   left/right pair. */
.tui-event-filters,
.tui-saved-tabs {
	display: flex;
	flex-wrap: wrap;
	width: fit-content;
	max-width: 100%;
	border: 1px solid var(--linecolor);
	margin-bottom: 1em;
}

/* The Saved window (inc/window-handlers/saved.php) shares this construction — its tabs sit a little higher. */
.tui-saved-tabs {
	margin-top: -4px;
}

.tui-event-filter-btn,
.tui-saved-tab-btn {
	appearance: none;
	background: none;
	border: none;
	padding: 5px 10px;
	color: var(--midcolor);
	font-family: var(--tui-font);
	font-size: 0.80em;
	cursor: pointer;
}

.tui-event-filter-btn + .tui-event-filter-btn,
.tui-saved-tab-btn + .tui-saved-tab-btn {
	border-left: 1px solid var(--linecolor);
}

.tui-event-filter-btn:hover,
.tui-event-filter-btn:focus,
.tui-saved-tab-btn:hover,
.tui-saved-tab-btn:focus {
	color: var(--bodycolor);
	outline: none;
}

.tui-event-filter-btn.is-active,
.tui-saved-tab-btn.is-active {
	background: var(--bodycolor);
	color: var(--backgroundcolor);
}

/* The plugin's own fitLayoutHeight() (can-taxonomy.js, assets/js/
   archives.js's own comment on its data-can-tax-plugin-js) sizes this to
   `window.innerHeight - offsetTop` — correct on its own dedicated
   full-page /archives-browser/ (where the browser viewport really is the
   available space), wrong once embedded in a small floating window: it
   bakes in a height tall enough for the *whole browser viewport*, clipped
   by .can-layout's own overflow: hidden (the plugin's own CSS) into
   either empty space or cut-off content depending on how the window
   happens to be sized, and never responding to the window being resized
   since it's driven by the browser viewport, not this window.
   Overridden here instead of in JS — a JS fix that measured the floating
   window's own rendered box to compute a height hit a feedback loop,
   since that box had no height of its own either at the time; it just
   grew to fit this same content. Fixed now: .tui-window's own archives
   rule just above gives the *window* a real, definite height, so
   height: 100% here resolves against that (via .tui-window-body's own
   flex: 1 1 auto — its max-height: none, further up, stops it
   double-capping against that same real size) rather than either a
   viewport measurement or an arbitrary constant — so resizing the window
   now actually resizes this. .can-sidebar/.can-content's own height:
   100% (the plugin's own CSS) chains off this the same way, so their own
   internal scroll (the actual, intentional scrolling — a term list
   taller than fits) keeps working. !important: needed to beat the
   plugin's own inline style, which JS keeps re-setting on every resize.
   Scoped to a real floating window only (.tui-window, not
   .tui-classic-page) — on a classic-nav page
   (can_v7_user_wants_classic_nav(), inc/window-handlers/settings.php)
   this genuinely is a full page, so the plugin's own
   window.innerHeight-based math is the correct approach there, not a bug
   to override. A percentage height only resolves against a *definite*
   ancestor height — .tui-archives (this theme's own wrapper) and
   .can-taxonomy-browser (the plugin's own top-level div) sit in between
   here and .tui-window-body, both plain auto-height blocks, so without
   giving them their own height: 100% too, .can-layout's 100% above had
   nothing definite to resolve against and fell back to its own content
   size — same bug as before, just relabelled. .can-taxonomy-browser also
   needs to be a flex column (not just height: 100%): .can-top-tabs and
   .can-layout are siblings inside it (templates/browser.php), so a plain
   height: 100% on .can-layout alone claims the *whole* box independent
   of the tabs bar above it, overflowing past the bottom by the tabs
   bar's own height — flex + flex: 1 1 auto on .can-layout instead makes
   it fill only what's actually left over, same as .tui-window-body
   itself already does one level up. min-height: 0 overrides flexbox's
   own default min-height: auto (which would otherwise let .can-layout's
   content force it back to content size, the exact bug this is fixing). */
.tui-window .tui-archives {
	height: 100%;
}

/* Archives browser's posts grid — turns out to be a dead end: the
   plugin's own can-taxonomy.js does stagger-add an "animate" class to
   each .griditem (its own animateGridItems()), but its AJAX post loader
   (includes/ajax.php) actually renders each card via
   get_template_part('/template-parts/content', 'grid') — this theme's
   own template-parts/content-grid.php shim, which delegates straight to
   template-parts/post/content-grid.php, the exact same .tui-grid-card
   template Latest's own grid uses. .griditem never appears here at all;
   see style.css's own .tui-listing--grid .tui-grid-card rules further
   down (extended to also cover #grid-layout — the cards' real direct
   container, per that same ajax.php: '<div id="grid-layout"
   class="archive">' . $grid_html . '</div>'; .can-posts-grid, the
   plugin's own CSS class for this, doesn't actually appear in the
   rendered markup at all) for the real fix. */

.tui-window .tui-archives .can-taxonomy-browser {
	height: 100%;
	display: flex;
	flex-direction: column;
}

.tui-window .tui-archives .can-top-tabs {
	flex: 0 0 auto;
}

.tui-window .tui-archives .can-layout {
	flex: 1 1 auto;
	min-height: 0;
	height: auto !important;
}

/* Archives stacks to one column below 768px, the CAN Taxonomy plugin's own
   breakpoint (can-taxonomy.css, never modified from here) — this
   re-applies that plugin's own max-width: 768px stacked-layout rules,
   including the mobile term dropdown (toggle button + list), whose styling
   exists ONLY inside the plugin's 768px query and so rendered completely
   unstyled anywhere else. A WINDOW narrower than 768px
   (.tui-window--narrow-768, tui-window.js — the plugin's own query is
   viewport-relative, so useless for a narrow window on a wide screen); a
   viewport that narrow is the plugin's own query. Scoped under .tui-archives so API Docs (also a
   .can-layout) is unaffected. The plugin's own min-width: 769px "hide the
   mobile sidebar" rule is !important, so the mobile sidebar re-show needs
   !important plus a higher-specificity selector to beat it;
   :not(.relationships-view) keeps the plugin's own hide-in-relationships-view
   rule working. Dropdown restyled onto this theme's tokens (flat, no shadow,
   inherited font) rather than copied verbatim. */
.tui-window--narrow-768 .tui-archives .can-top-tabs {
	flex-wrap: wrap;
	row-gap: 0.25em;
}

.tui-window--narrow-768 .tui-archives .can-layout {
	flex-direction: column;
}

.tui-window--narrow-768 .tui-archives .can-filter {
	border-right: 1px solid var(--linecolor) !important;
}

.tui-window--narrow-768 .tui-archives .can-term-header {
	border-left: none !important;
}

.tui-window--narrow-768 .tui-archives .can-sidebar {
	display: none;
}

.tui-window--narrow-768 .tui-archives .can-mobile-sidebar:not(.relationships-view) {
	display: flex !important;
	flex-direction: column;
	background: var(--shadecolor);
	border-bottom: 1px solid var(--linecolor);
}

.tui-window--narrow-768 .tui-archives .can-sidebar-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 0.75em 1em;
	background: var(--backgroundcolor);
	border: none;
	border-left: 1px solid var(--linecolor);
	border-right: 1px solid var(--linecolor);
	border-radius: 0;
	color: var(--bodycolor);
	font: inherit;
	cursor: pointer;
}

.tui-window--narrow-768 .tui-archives .can-sidebar-toggle:hover {
	background: var(--shadecolor);
	color: var(--darkcolor);
}

.tui-window--narrow-768 .tui-archives .can-sidebar-toggle-arrow {
	display: inline-block;
	margin-left: 0.5em;
	transition: transform 0.2s ease;
}

.tui-window--narrow-768 .tui-archives .can-sidebar-toggle.open .can-sidebar-toggle-arrow {
	transform: rotate(180deg);
}

.tui-window--narrow-768 .tui-archives .can-sidebar-dropdown {
	max-height: min(50vh, 300px);
	overflow-y: auto;
	background: var(--backgroundcolor);
	border-top: 1px solid var(--linecolor);
	border-left: 1px solid var(--linecolor);
	border-right: 1px solid var(--linecolor);
}

.tui-window--narrow-768 .tui-archives .can-sidebar-dropdown-content {
	padding: 0;
}

.tui-window--narrow-768 .tui-archives .can-sidebar-dropdown .can-group-label {
	position: sticky;
	top: 0;
	z-index: 9;
	padding: 0.5em 1em;
	background: var(--shadecolor);
	color: var(--darkcolor);
	border-bottom: 1px solid var(--linecolor) !important;
}

.tui-window--narrow-768 .tui-archives .can-sidebar-dropdown .can-group-children {
	padding: 0;
	border: none !important;
}

.tui-window--narrow-768 .tui-archives .can-sidebar-dropdown .can-term {
	padding: 0.5em 1em;
	cursor: pointer;
	border-bottom: 1px solid var(--linecolor) !important;
}

.tui-window--narrow-768 .tui-archives .can-sidebar-dropdown .can-term:hover {
	background: var(--shadecolor);
}

/* Archives sidebar: the horizontal lines (under the filter, the group headings and each item) are dashed, and so is the divider
   beside the sort buttons around the filter. (!important: the plugin's mobile dropdown sets its own with it.) */
.tui-archives .can-filter-bar,
.tui-archives .can-group-label,
.tui-archives .can-term {
	border-bottom-style: dashed !important;
}

.tui-archives .can-sort-btn {
	border-right-style: dashed !important;
}

/* Archives sidebar: an item is shaded on hover. The selected one keeps its own colours, and a group heading is already shaded. */
.tui-archives .can-term:not(.active):not(.can-group-label):hover {
	background-color: var(--shadecolor);
}

/* Narrow (< 768px) Archives, Events and Saved windows: the tab strip wraps, and a flex-wrapped strip
   only has borders between neighbours, so its second line looked like a
   stray fragment. Lay the tabs out as an even grid of bordered cells
   instead (full width, every tab its own equal-width cell). Windows only —
   classic mode has its own full-width, bottom-border-only strip. */
.tui-window--narrow-768 .tui-event-filters,
.tui-window--narrow-768 .tui-saved-tabs,
.tui-window--narrow-768 .tui-archives .can-top-tabs {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(7.5em, 1fr));
	width: 100%;
	row-gap: 0; /* the stacking rules above set 0.25em for the old flex-wrap strip — a gap here splits the cell borders */
	border: none;
	border-top: 1px solid var(--linecolor);
	border-left: 1px solid var(--linecolor);
	margin-bottom: 1em;
}

.tui-window--narrow-768 .tui-event-filter-btn,
.tui-window--narrow-768 .tui-saved-tab-btn,
.tui-window--narrow-768 .tui-archives .can-top-tab {
	text-align: left;
	border-right: 1px solid var(--linecolor);
	border-bottom: 1px solid var(--linecolor);
}

.tui-window--narrow-768 .tui-event-filter-btn + .tui-event-filter-btn,
.tui-window--narrow-768 .tui-saved-tab-btn + .tui-saved-tab-btn,
.tui-window--narrow-768 .tui-archives .can-top-tab + .can-top-tab {
	border-left: none;
}

/* API Docs (CAN API Docs browser) — same .can-layout sizing bug/fix as
   Archives just above (see that block's own long comment for the full
   reasoning), simpler here: .can-layout is .can-api-docs-browser's only
   child (no .can-top-tabs-style sibling eating part of the box), so a
   plain height: 100% chain is enough — no flex-fill-the-remainder trick
   needed. */
.tui-window .tui-api-docs,
.tui-window .tui-api-docs .can-api-docs-browser {
	height: 100%;
}

.tui-window .tui-api-docs .can-layout {
	height: 100% !important;
}

/* Archives window (inc/window-handlers/archives.php) — the CAN Taxonomy
   plugin's own top tab bar (.can-top-tabs/.can-top-tab, its "active" class
   not "is-active"), restyled to match the same bordered pill-strip look
   as Events' filter bar just above, rather than the plugin's own default
   look. Scoped under .tui-archives (this window's own wrapper) so it only
   affects this window, not the plugin's dedicated archives-browser page. */
.tui-archives .can-top-tabs {
	display: flex;
	/* fit-content still gives the snug pill-strip look (border hugging
	   just the tabs) when everything fits on one line, but without a cap
	   it sized to the tabs' own full natural combined width regardless of
	   the window's actual available space — with this many tabs (Topics/
	   People/Tools/Chronology/Categories/Authors/Tags/Relationships),
	   wider than a modest-sized window, pushing the whole
	   .can-taxonomy-browser into horizontal overflow. max-width caps
	   that; flex-wrap lets tabs that don't fit wrap to a second line
	   instead of overflowing. */
	width: fit-content;
	max-width: 100%;
	flex-wrap: wrap;
	border: 1px solid var(--linecolor);
	margin: 0 0 1em;
	padding: 0;
}

/* No dimming: the plugin fades inactive tabs with opacity (0.4/0.7), which also faded their
   borders. The tab colours below carry the inactive/hover/active states instead. */
.tui-archives .can-top-tab,
.tui-archives .can-top-tab:hover,
.tui-archives .can-top-tab:focus {
	opacity: 1;
}

.tui-archives .can-top-tab {
	appearance: none;
	background: none;
	border: none;
	padding: 0.5em 1em;
	color: var(--midcolor);
	font-family: var(--tui-font);
	font-size: 0.80em;
	cursor: pointer;
	text-decoration: none;
}

.tui-archives .can-top-tab + .can-top-tab {
	border-left: 1px solid var(--linecolor);
}

.tui-archives .can-top-tab:hover,
.tui-archives .can-top-tab:focus {
	color: var(--bodycolor);
	outline: none;
}

.tui-archives .can-top-tab.active {
	background: var(--bodycolor);
	color: var(--backgroundcolor);
}

/* The plugin's own results container (includes/ajax.php's
   '<div id="grid-layout" class="archive">' wrapping content-grid.php's
   .tui-grid-card items — see template-parts/content-grid.php's shim) has
   no grid layout of its own (unstyled in the plugin's own CSS), so cards
   just stacked one per row. Same grid treatment as Latest's own grid view
   (.tui-listing--grid above), scoped under .tui-archives so it only
   applies inside this window. Column minimum tied to --tui-font-size
   (220px at its 12px default) rather than a flat px value, so scaling the
   UI font up/down (the font-size picker) grows/shrinks these cards with
   it instead of leaving them fixed while everything else scales. */
.tui-archives #grid-layout {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(calc(var(--tui-font-size) * 18.333), 1fr));
	gap: 20px;
}

@media (max-width: 500px) {
	.tui-archives #grid-layout {
		grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
		gap: 16px;
	}
}

/* The term-detail header (title/description above the results grid,
   includes/ajax.php's '<div class="can-term-header">') has its own
   right border and left padding in the plugin's own CSS — border
   dropped, and the left padding moved onto the sidebar column instead
   (.can-sidebar below) so the whole left column gets it, not just this
   header. Scoped to this window only. */
.tui-archives .can-term-header {
	border-right: none;
	border-left: none;
	border-bottom: none;
	padding-left: 0;
}

.tui-archives .can-placeholder,
.tui-archives .can-loading {
	border: none;
	padding-left: 0;
}

.tui-archives .can-content {
	padding-left: 1em;
}

/* No left inset once the layout stacks (window narrower than 768px, or a
   viewport that narrow — same two triggers as the stacking rules above). */
.tui-window--narrow-768 .tui-archives .can-content {
	padding-left: 0;
}

@media (max-width: 768px) {
	.tui-archives .can-content {
		padding-left: 0;
	}
}

.tui-archives .can-viz-header {
	padding-left: 1em;
	border-right: none;
}

.tui-archives #can-viz-container,
.tui-archives #can-viz-container svg,
.tui-archives .can-semantic-stage,
.tui-archives #can-semantic-container {
	border-right: none;
}

/* API Docs window (inc/window-handlers/api-docs.php) — the CAN API Docs
   plugin's own [can_api_docs] browser. Scoped under .tui-api-docs (this
   window's own wrapper) so it only affects this window, not the plugin's
   dedicated /api/ page. */
.tui-api-docs .can-api-docs-browser .can-main {
	border-right: none;
}

/* Reports window (inc/window-handlers/reports.php) — the Matomo Analytics
   Reports plugin's own [matomo_member_reports] tables (.member-analytics
   — the plugin ships no border/collapse styling of its own, just zebra
   striping). Scoped under .tui-reports (this window's own wrapper) so it
   only affects this window, not the plugin's dedicated /reports/ page. */
.tui-reports .member-analytics {
	width: 100%;
	border-collapse: collapse;
	margin: 0.5em 0 1.2em;
	/* Same "caption" size as .entry-content figcaption/.wp-caption-text
	   elsewhere in this theme (also reused by .tui-changelog) — this is
	   read-only stats data, not article body copy. */
	font-size: 0.80em;
}

.member-analytics-pagenumbers {
	margin-top: 1em;
}

.tui-reports .member-analytics th,
.tui-reports .member-analytics td {
	border: 1px solid var(--linecolor);
	padding: 6px 10px;
	text-align: left;
}

.tui-reports .member-analytics th {
	color: var(--darkcolor);
	background: var(--backgroundcolor);
}

/* Overrides the plugin's own hardcoded #f9f9f9 even-row striping. */
.tui-reports .member-analytics tbody tr:nth-child(even) {
	background: none;
}

/* The plugin's own .hideonmobile columns (assets/css/
   matomo-analytics-reports.css) only ever hide below a real 768px
   *viewport* — correct for the plugin's own dedicated /reports/ page,
   but this window can be much narrower than the viewport while the
   viewport itself stays wide (a floating window, manually resized), so
   those extra detail columns need to go by the WINDOW's own width
   instead here. tui-window.js's own .tui-window--narrow-640 (same
   ResizeObserver-driven class the block-columns stacking elsewhere
   already uses) is exactly that signal — per the user, hide the same
   columns once the window itself crosses that width, same as mobile
   already does for the real page. */
.tui-window--narrow-640 .tui-reports .hideonmobile {
	display: none;
}

/* Activity window CSS moved to its own file, assets/css/activity.css —
   see that file's own header comment for why. */

.tui-events-section-heading {
	margin: 20px 0 10px;
	color: var(--bodycolor);
	font-size: 1em;
}

.tui-event-note {
	color: var(--midcolor);
	font-size: 0.9em;
}

/* Same column sizing as Latest's own grid view (.tui-listing--grid,
   further down) — was a plain 260px minmax, noticeably larger cards than
   Latest's flat 220px. */
.tui-event-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(calc(var(--tui-font-size) * 18.333), 1fr));
	gap: 1em;
	margin-bottom: 12px;
}

/* Same narrow-screen column minimum as Latest's grid (.tui-listing--grid). */
@media (max-width: 500px) {
	.tui-event-grid,
	.tui-listing--fixed[data-listing-type="events"] {
		grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	}
}

/* Past events — CANV6's own semi-disabled preview treatment (inline
   opacity/pointer-events there), promoted to a real class here. */
.tui-event-grid--past {
	opacity: 0.4;
	pointer-events: none;
}

.tui-event-subscribe {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 12px 0;
}

/* "Mini" mode (assets/js/main.js's events toggle) — a single soonest-
   ending event (image/date/meta/title), computed server-side
   (inc/window-handlers/events.php's can_v7_render_events_mini()) since,
   unlike jobs/latest/books' mini views, it isn't necessarily anywhere in
   the currently-loaded listing. Hidden by default; .tui-events-full is
   the reverse, hidden only once mini. Same --darkcolor title/12px gap/
   flex-start convention as jobs' own mini row (.tui-window--mini
   .tui-job-row), adapted to a single image+text card instead of a list
   of hidden-field rows. */
.tui-event-mini {
	display: none;
}

.tui-window--mini[data-content-type="events"] .tui-event-mini {
	display: block;
}

.tui-window--mini[data-content-type="events"] .tui-events-full {
	display: none;
}

.tui-event-mini-card {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	color: inherit;
}

/* Overrides the site-wide a:hover reverse-video background — this card is
   one big link, so that background would cover the whole thing rather
   than reading as a normal text-link hover. */
.tui-event-mini-card:hover,
.tui-event-mini-card:focus {
	background: none;
	color: inherit;
}

.tui-event-mini-thumb {
	flex: 0 0 auto;
	display: block;
	width: 64px;
	aspect-ratio: 4 / 3;
	background: var(--shadecolor);
	overflow: hidden;
}

.tui-event-mini-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tui-event-mini-body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.tui-event-mini-date {
	color: var(--midcolor);
	font-size: 0.80em;
}

.tui-event-mini-meta {
	color: var(--bodycolor);
	font-size: 0.80em;
}

.tui-event-mini-title {
	color: var(--linkcolor);
}

.tui-book-poster-title a:hover,
.tui-book-poster-title a:focus {
	background: none;
	color: var(--darkcolor);
	outline: none;
}

.tui-book-poster-tags {
	margin-top: 2px;
	color: var(--bodycolor);
	font-size: 0.80em;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Books window's own mini mode — a one-book-at-a-time slideshow rather
   than jobs'/latest's "collapse to just titles" (see main.js's
   tui-content-loaded handler for 'books'): the exact same poster
   (cover/title/tags) as the full grid, just one at a time, with a
   prev/next bar reusing the image lightbox's own nav styling
   (.tui-lightbox-nav/-prev/-next/-count) rather than inventing a
   second near-identical one. */
.tui-window--mini[data-content-type="books"] .tui-book-poster {
	display: none;
}

.tui-window--mini[data-content-type="books"] .tui-book-poster.is-active {
	display: block;
}

/* Shorter than the full poster's own 2:3 cover ratio — mini's own 280px
   max-width would otherwise still render a full-height (~420px) cover,
   dominating the whole window. object-fit: cover (already set on the img
   itself above) crops cleanly into this shorter box instead of distorting it. */
.tui-window--mini[data-content-type="books"] .tui-book-poster-cover {
	overflow: hidden;
}

.tui-window--mini[data-content-type="books"] .tui-book-poster-cover img {
	max-height: 280px;
}

/* The mini window sizes itself to the book, so there is nothing to scroll: without this a scrollbar appears when the content is a pixel or
   two taller than the body (the added [Books] and [Topic] lines under the tags). */
.tui-window--mini[data-content-type="books"] .tui-window-body {
	overflow-y: hidden;
}

.tui-book-mini-nav {
	display: none;
}

.tui-window--mini[data-content-type="books"] .tui-book-mini-nav {
	display: flex;
	/* Tighter than .tui-lightbox-nav's own defaults — this window is
	   always 280px max, the real image lightbox isn't. */
	gap: 6px;
	padding-top: 8px;
	margin-top: 8px;
}

.tui-window--mini[data-content-type="books"] .tui-book-mini-nav button {
	padding: 4px 6px;
	flex: 0 0 auto;
}

.tui-window--mini[data-content-type="books"] .tui-book-mini-nav .tui-lightbox-count {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Drop the "prev"/"next" words at this width — the chevron plus the
   count alone is enough, and keeps both buttons from getting crowded
   out/clipped by .tui-window's own overflow: hidden. */
.tui-window--mini[data-content-type="books"] .tui-lightbox-nav-label {
	display: none;
}

/* Featured slideshow (inc/window-handlers/featured.php) — a title menu on
   the left, the active post's thumbnail/excerpt/meta on the right. Ported
   from CANV6's inc/featured-slideshow.php; the meta block itself reuses
   .tui-grid-meta (see template-parts/featured/content.php's own comment
   for why), just this wrapper/menu/panel layer is new. */
.tui-featured {
	display: flex;
	gap: 1em;
}

.tui-featured-menu {
	/* 240px at --tui-font-size's own 12px default — tied to that variable
	   instead of a flat px value, same reasoning as the menu items' own
	   font-size: inherit further down (both this column's width and its
	   items' text need to actually reference the variable somewhere —
	   em alone isn't enough once a <button>'s own UA stylesheet font-size
	   breaks the inheritance chain, see that rule's own comment). */
	flex: 0 0 calc(var(--tui-font-size) * 20);
	display: flex;
	flex-direction: column;
	gap: 2px;
	font-size: 0.80em;
}

.tui-featured-menu-item {
	appearance: none;
	background: none;
	border: none;
	border-left: 2px solid transparent;
	padding: 0.5em 0em 0.5em 0.5em;
	text-align: left;
	font-family: var(--tui-font);
	/* A <button>'s own UA stylesheet font-size doesn't inherit from its
	   parent by default (unlike every other element here) — without
	   this, .tui-featured-menu's own font-size: 0.80em (and the
	   --tui-font-size chain behind it) never reached this text at all,
	   so it stayed a flat browser-default size regardless of the
	   font-size picker. 1em (not inherit — same computed result, just
	   matching the rest of this theme's own convention) per the user. */
	font-size: 1em;
	color: var(--bodycolor);
	cursor: pointer;
}

.tui-featured-menu-item:hover,
.tui-featured-menu-item:focus {
	color: var(--darkcolor);
	outline: none;
}

.tui-featured-menu-item.is-active {
	color: var(--bodycolor);
	background: var(--shadecolor);
	border-left-color: var(--darkcolor);
}

.tui-featured-content {
	flex: 1 1 auto;
	min-width: 0;
}

.tui-featured-panel {
	display: none;
}

.tui-featured-panel.is-active {
	display: block;
}

.tui-featured-thumb {
	display: block;
}

.tui-featured-thumb img {
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid var(--linecolor);
}

.tui-featured-title {
	margin: 1em 0 0.5em;
	font-size: 1em;
	font-weight: normal;
}


.tui-featured-title a {
	color: var(--linkcolor);
}

.tui-featured-title a:hover,
.tui-featured-title a:focus {
	background: none;
	color: var(--darkcolor);
	outline: none;
}

.tui-featured-excerpt {
	color: var(--bodycolor);
	font-size: 1em;
	margin-bottom: 10px;
	overflow-wrap: anywhere;
}

/* Narrow window (see tui-window.js's observeNarrowWidth()) — menu above
   content instead of side-by-side, same convention as the WP-core
   block-columns collapse elsewhere in this theme. */
.tui-window--narrow-640 .tui-featured {
	flex-direction: column;
}

.tui-window--narrow-640 .tui-featured-menu {
	flex: 0 0 auto;
	flex-direction: row;
	flex-wrap: wrap;
}

/* Same collapse as .tui-window--narrow-640 above, for the classic-nav
   front page (can_v7_user_wants_classic_nav(), index.php) — no floating
   window there to drive .tui-window--narrow-640 (that's a ResizeObserver
   watching a window's own width, not the viewport), but a real page's
   width IS the viewport width, so a plain media query is the right
   equivalent here instead. */
@media (max-width: 640px) {
	.tui-classic-page .tui-featured {
		flex-direction: column;
	}

	.tui-classic-page .tui-featured-menu {
		flex: 0 0 auto;
		flex-direction: row;
		flex-wrap: wrap;
	}
}

/* Featured window's own mini mode — same one-at-a-time slideshow idea as
   books' own mini mode (.tui-window--mini[data-content-type="books"]
   above: reuses the image lightbox's nav styling,
   .tui-lightbox-nav/-prev/-next/-count, rather than inventing a second
   near-identical one), just image-only here too — the title/excerpt/meta
   menu.tui-featured-panel already carries are hidden, not shown small. */
.tui-window--mini[data-content-type="featured"] .tui-featured-menu {
	display: none;
}

.tui-window--mini[data-content-type="featured"] .tui-featured-title,
.tui-window--mini[data-content-type="featured"] .tui-featured-excerpt,
.tui-window--mini[data-content-type="featured"] .tui-grid-meta {
	display: none;
}

/* The "project thumb" ratio — same aspect-ratio/object-fit box as
   .tui-grid-thumb (template-parts/post/content-grid.php's regular
   project cards) — per the user, instead of the full-mode panel's own
   natural-ratio image. */
.tui-window--mini[data-content-type="featured"] .tui-featured-thumb {
	display: block;
	aspect-ratio: 4 / 3;
	background: var(--shadecolor);
	overflow: hidden;
}

.tui-window--mini[data-content-type="featured"] .tui-featured-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border: none;
}

.tui-featured-mini-nav {
	display: none;
}

.tui-window--mini[data-content-type="featured"] .tui-featured-mini-nav {
	display: flex;
	/* Tighter than .tui-lightbox-nav's own defaults — this window is
	   always 280px max, the real image lightbox isn't. */
	gap: 6px;
	padding-top: 8px;
	margin-top: 8px;
}

.tui-window--mini[data-content-type="featured"] .tui-featured-mini-nav button {
	padding: 4px 6px;
	flex: 0 0 auto;
}

.tui-window--mini[data-content-type="featured"] .tui-featured-mini-nav .tui-lightbox-count {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: var(--bodycolor);
}

/* Drop the "prev"/"next" words at this width, same reasoning as books'
   own mini nav. */
.tui-window--mini[data-content-type="featured"] .tui-lightbox-nav-label {
	display: none;
}

/* Featured window's own widget mode (assets/js/main.js's
   WIDGET_MODE_TYPES) — pure CSS collapse, same as layouts'/admin's own
   (no server round trip, see .tui-window--widget below for the shared
   mechanics): just the latest post's image, nothing else. No extra
   markup/logic needed for "latest" — inc/window-handlers/featured.php's
   own WP_Query has no explicit orderby, so it's already date DESC, and
   .tui-featured-panel.is-active (above) already always starts on index
   0 (that same latest post) before any user click ever changes it. Same
   menu/title/excerpt/meta hides as mini mode's own block above, just
   scoped to widget instead — only the thumb box itself differs: mini's
   own width: 100% relies on the percentage context of its own 280px-max
   window, which .tui-window--widget's width: fit-content doesn't give,
   so this gets an explicit px box instead (smaller than mini's own, to
   actually read as a small desktop widget rather than another window). */
.tui-window--widget[data-content-type="featured"] .tui-featured-menu,
.tui-window--widget[data-content-type="featured"] .tui-featured-title,
.tui-window--widget[data-content-type="featured"] .tui-featured-excerpt,
.tui-window--widget[data-content-type="featured"] .tui-grid-meta,
.tui-window--widget[data-content-type="featured"] .tui-featured-mini-nav {
	display: none;
}

.tui-window--widget[data-content-type="featured"] {
	width: 280px !important;
}

.tui-window--widget[data-content-type="featured"] .tui-featured-thumb {
	display: block;
	/* Same effective box as mini's own width: 100% — mini's thumb fills
	   .tui-window--mini's 280px max-width minus the window's own 1px
	   border each side and .tui-window-body's own 1em padding each side,
	   a context widget mode's width: fit-content doesn't provide, so
	   this works out the same number explicitly instead. */
	width: calc(280px - 2px - 2em);
	aspect-ratio: 4 / 3;
	background: var(--shadecolor);
	overflow: hidden;
}

.tui-window--widget[data-content-type="featured"] .tui-featured-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border: none;
}

/* Listing window toolbar — back/forward pinned left, list/grid view switch
   pinned right — sitting between the window's own titlebar and its
   content. See can_v7_render_listing_toolbar() in
   inc/window-handlers/listing.php. */
.tui-listing-toolbar {
	display: flex;
	justify-content: space-between;
	margin: 0px 0 1em;
}

/* Classic-nav mode (can_v7_user_wants_classic_nav() — index.php's own real
   render of the Latest listing when "Disable Window Engine" is on): no
   list/grid toggle (grid is the fixed default there, index.php's own
   ?view= pre-set) and no back/forward — that's floating-window-specific
   history (pushListingHistory() in main.js, one window reused for many
   different listing subjects), meaningless on a real page that's always
   just this one. */

.tui-classic-page .can-taxonomy-browser {
	background: var(--backgroundcolor);
	border-left: none;
	border-right: none;
}

.tui-classic-page {
	background: var(--backgroundcolor);
	border-bottom: 1px solid var(--linecolor);
}

/* Desktop: 1em side padding and left/right borders on the content only, matching the titlebar's own. */
@media (min-width: 769px) {
	.tui-classic-page > :not(.tui-classic-titlebar) {
		padding-left: 1em;
		padding-right: 1em;
		border-left: 1px solid var(--linecolor);
		border-right: 1px solid var(--linecolor);
	}

	/* The single's own container already draws these borders. */
	.single .tui-classic-page > :not(.tui-classic-titlebar) {
		border-left: none;
		border-right: none;
	}

	/* A page's featured image: no side borders. */
	.tui-classic-page > .tui-window-thumb {
		border-left: none;
		border-right: none;
	}

	/* First and last content blocks: no outer margin, 1em padding instead. */
	.tui-classic-page > .tui-classic-titlebar + :not(.tui-classic-titlebar),
	.tui-classic-page > :first-child:not(.tui-classic-titlebar) {
		margin-top: 0;
		padding-top: 1em;
	}

	.tui-classic-page > :last-child:not(.tui-classic-titlebar) {
		margin-bottom: 0;
		padding-bottom: 1em;
	}

	/* The Activity section draws its own borders and keeps its parts flush inside it. */
	.tui-classic-page > .tui-activity-section {
		padding: 0;
	}

	/* The Activity, Register and Events pages fill the page themselves (Register draws its own frame): no side padding or extra borders. */
	.tui-classic-page:has(.tui-activity) > .tui-activity,
	.tui-classic-page:has(> [data-register-page]) > [data-register-page],
	.tui-classic-page:has(> .tui-events-full) > .tui-events-full {
		padding: 0;
	}

	.tui-classic-page:has(.tui-activity) > .tui-activity {
		border-left: none;
		border-right: none;
	}

	/* The Settings page draws its own sidebar and panel padding: none from the page. */
	.tui-classic-page > .tui-settings-browser,
	.tui-classic-page > .tui-classic-titlebar + .tui-settings-browser,
	.tui-classic-page > .tui-settings-browser:last-child {
		padding: 0;
	}

	/* The Archives browser fills the page itself: no side or top padding. */
	.tui-classic-page > .tui-archives,
	.tui-classic-page > .tui-classic-titlebar + .tui-archives {
		padding-left: 0;
		padding-right: 0;
		padding-top: 0;
	}
}

.tui-classic-page:has(.tui-activity) {
	background: none;
}

/* Mobile: edge to edge, cancelling .tui-shell's own side padding (14px,
   12px on small screens) the same way .tui-classic-page .tui-listing's
   own established convention already does further down — just applied to
   the classic page itself now, with its own flat 12px kept regardless of
   which of the two margin values is currently cancelling .tui-shell's. */
@media (max-width: 768px) {
	.tui-classic-page {
		margin-left: -1em;
		margin-right: -1em;
		padding-left: 1em;
		padding-right: 1em;
	}

	/* The page's or article's own text starts 1em below the titlebar, unless a featured image sits between them (only the content directly under
	   the page, not an entry-content nested inside it). */
	.tui-classic-page > :not(.tui-window-thumb) + .entry-content {
		padding-top: 1em;
	}

	/* The Community page template (page-templates/community.php, also Archives' introduction) wraps its text in its own box, so the
	   rule above doesn't reach it. */
	.tui-classic-page > .tui-community {
		padding-top: 1em;
	}
}

.tui-classic-page .wp-block-gallery, .tui-classic-page .wp-block-columns {
	padding-left: 0em;
	padding-right: 0em;
	margin-bottom: 1em;
	margin-top: 1em;
}

.tui-classic-page .alignfull {
	padding-left: 1em;
	padding-right: 1em;
}




.tui-classic-page .can-content {
	padding-right: 1em;
}

.tui-classic-page .tui-grid-meta-row {
	padding-left: 0;
	padding-right: 1em;
	padding-bottom: 0em;
}

.tui-classic-page .tui-post-tags-row,
.tui-classic-page .tui-book-tags-row {
	padding-left: 1em;
	padding-right: 1em;
	padding-bottom: 0.5em;
}

.tui-classic-page .tui-event-single-date {
	padding-left: 12px;
}

/* Classic event single: the header and image sit in the body column beside the date, so they're pinned to its left edge
   instead of centred on the page's content width like other singles. */
.tui-classic-page .tui-event-single-body .entry-header {
	padding-left: 0;
	padding-right: 0;
	text-align: left;
}

.tui-classic-page .tui-event-single-body .entry-title {
	text-align: left;
}

/* The bookmark/edit buttons stay in the page's top right corner (as on other singles): anchored to the whole event layout,
   not to the narrower body column's header. */
.tui-classic-page .tui-event-single {
	position: relative;
}

.tui-classic-page .tui-event-single-body .entry-header {
	position: static;
}

/* The whole body column (title, image, text) stops at the same 1200px the picture does, so the text can't run wider than it. */
.tui-classic-page .tui-event-single-body {
	max-width: 1200px;
}

.tui-classic-page .tui-event-single-body .tui-window-thumb {
	margin-left: 0;
	margin-right: 0;
}

.tui-classic-page .tui-event-grid--past {
	padding-bottom: 1em;
	margin-bottom: 0;
}

/* Mobile classic: no fixed-height inner scroller — the whole page scrolls.
   !important because archives.js's correctClassicLayoutHeight() sets an
   inline pixel height on .can-layout (sized for the desktop two-pane view). */
@media (max-width: 768px) {
	.tui-classic-page .tui-archives .can-layout {
		height: auto !important;
		overflow: visible;
		position: static;
	}

	.tui-classic-page .tui-archives .can-content {
		height: auto;
		overflow-y: visible;
	}
}

.tui-classic-page .can-taxonomy-browser .can-top-tabs {
	border-top: none;
	padding-left: 0em;
	border-left: none;
	margin-bottom:0px;
	width: 100%;
	border-right:none;
	border-bottom: 1px solid var(--linecolor);
}

.tui-classic-page .tui-listing {
	border-left: 1px solid var(--linecolor);
	border-right: 1px solid var(--linecolor);
/*	border-bottom: 1px solid var(--linecolor);*/
}

.tui-classic-page .tui-listing-intro {
	padding: 16px;
	border-bottom: 1px solid var(--linecolor);
	border-left: 1px solid var(--linecolor);
	border-right: 1px solid var(--linecolor);
	background: var(--backgroundcolor);
	margin-bottom: 0px;
}

/* Mobile: edge to edge, cancelling .tui-shell's side padding. */
@media (max-width: 768px) {
	.tui-classic-page .tui-listing-intro {
		margin-left: -1em;
		margin-right: -1em;
	}
}

.tui-classic-page .tui-listing {
	background: var(--backgroundcolor);
	padding: 1em;
}

@media (max-width: 768px) {
	.tui-classic-page .tui-listing,
	.tui-classic-page .can-taxonomy-browser {
		margin-left: -1em;
		margin-right: -1em;
	}

	/* The plugin sets width: 100%, which a negative margin shifts but doesn't widen. */
	.tui-classic-page .can-taxonomy-browser {
		width: auto;
	}
}

/* The -20px bleed on .alignfull/.nft* blocks and the featured image
   assumes a window body's 20px padding; a classic page's side padding is
   .tui-shell's 14px (12px on small screens), so match that instead of
   overflowing sideways. */
.tui-classic-page .entry-content > .alignfull,
.tui-classic-page .entry-content > .nftiframe,
.tui-classic-page .entry-content > .nftimage,
.tui-classic-page .entry-content > .nftvideo,
.tui-classic-page .entry-content > .nftiframeratio1x1,
.tui-classic-page .entry-content > .nftiframeratio4x3,
.tui-classic-page .entry-content > .nftiframeratio16x9 {
	width: min(calc(100% + 2em), 1600px); /* full width, but no wider than 1600px */
	justify-self: center; /* centred in the full-width column: the 1em bleed each side as before, or equal margins once capped */
	margin-left: 0;
	margin-right: 0;
	margin-bottom: 1em;
	margin-top: 1em;
}

.tui-classic-page .tui-window-thumb {
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
}

.tui-classic-page .tui-events-full {
	background: var(--backgroundcolor);
	border-left: 1px solid var(--linecolor);
	border-right: 1px solid var(--linecolor);
}

.tui-classic-page .tui-event-grid, .tui-classic-page .tui-events-section-heading, .tui-classic-page .tui-events-full .tui-event-note {
	padding-left: 1em;
	padding-right: 1em;
}

.tui-classic-page .tui-event-filters {
	border-top: none;
	flex-wrap: normal;
	border-bottom: 1px solid var(--linecolor);
}

/* .tui-events-full (inc/window-handlers/events.php) wraps this whole
   page's content — filters/city section/main listing/Past Events all
   together — so making just this one edge to edge on classic mobile
   (cancelling .tui-shell's own side padding) covers everything inside
   it too, instead of repeating the same treatment on each of its
   children individually. Its own background above already applies here
   at every width, no need to repeat it. */
@media (max-width: 768px) {
	.tui-classic-page .tui-events-full {
		margin-left: -1em;
		margin-right: -1em;
	}

	/* The main "All Events" listing inside .tui-events-full is itself a
	   .tui-listing, which already gets this exact same -14px cancelling
	   margin from the generic .tui-classic-page .tui-listing mobile rule
	   above — stacked on top of .tui-events-full's own new one, it was
	   compounding and running past the real edge instead of landing
	   flush on it. Reset back to 0 here so only the outer wrapper's
	   margin actually does the cancelling; its own 12px padding (that
	   same generic rule) still gives it the same breathing room as its
	   siblings (filters/city grid/heading). */
	.tui-classic-page .tui-events-full .tui-listing {
		margin-left: 0;
		margin-right: 0;
	}
}

/* Latest (the posts page, .blog) and the front page (.home,
   page-templates/front.php's own Latest/Events sections) — listing
   blocks inset by 12px of padding each side at every width instead of
   running edge to edge. */

.blog .tui-classic-page .tui-listing,
.blog .tui-classic-page .tui-listing--grid,
.home .tui-classic-page .tui-listing,
.home .tui-classic-page .tui-listing--grid {
	margin-left: 0;
	margin-right: 0;
	padding-left: 1em;
	padding-right: 1em;
}

/* First card (and, to try it out, every 8th — the count carries on through "load more") always spans 2 columns — Latest and the Archives teaser
   (page-templates/front.php) only, not Events/Books (own card shapes, and
   Jobs/Books are .tui-listing--fixed, not this class anyway) — per the
   user. */
.home .tui-classic-page .tui-listing--grid[data-listing-type="latest"] > .tui-grid-card:first-child,
.home .tui-classic-page .tui-listing--grid[data-listing-type="archives"] > .tui-grid-card:first-child,
.home .tui-classic-page .tui-listing--grid[data-listing-type="latest"] > .tui-grid-card:nth-child(8n),
.home .tui-classic-page .tui-listing--grid[data-listing-type="archives"] > .tui-grid-card:nth-child(8n) {
	grid-column: span 2;
}

/* The Latest window's grid view, the same way: the first card and every 8th span 2 columns. Not in mini mode, and not in a
   window narrower than 640px, where the grid can be a single column (a 2-column span would add an extra one). */
.tui-window[data-content-type="latest"]:not(.tui-window--mini):not(.tui-window--narrow-640) .tui-listing--grid > .tui-grid-card:is(:first-child, :nth-child(8n)) {
	grid-column: span 2;
}

/* Featured slideshow (page-templates/front.php) — same 12px inset as
   Latest/Events just above, so all three sections line up. */
.home .tui-classic-page .tui-featured {
	padding-top: 1em;
	padding-left: 1em;
	padding-right: 1em;
	border-left: 1px solid var(--linecolor);
	border-right: 1px solid var(--linecolor);
}

/* Front page's own Active Jobs teaser, and the real Jobs archive
   (post-type-archive-jobs) — same on classic desktop and mobile, no
   separate media query needed. The last row doesn't need its own
   trailing border-bottom (.tui-job-row's base rule, style.css), same as
   any other listing that ends a section rather than needing a separator
   before more content directly below it (on the archive, that's the
   Load More button, a sibling of the whole listing, not this row's own
   sibling — unaffected by :last-child here either way). */
.home .tui-classic-page .tui-job-row:last-child,
.post-type-archive-jobs .tui-classic-page .tui-job-row:last-child {
	border-bottom: none;
}

/* Featured Topics (page-templates/front.php) — same 12px inset +
   bordered-column look as Latest/Events/Jobs just above (those inherit
   their own border from the generic .tui-classic-page .tui-listing rule
   for free, via their shared .tui-listing class — this is its own class,
   so it needs its own copy), so it lines up with the rest. */
.home .tui-classic-page .tui-featured-topics {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 1em;
	border-left: 1px solid var(--linecolor);
	border-right: 1px solid var(--linecolor);
}

/* Mobile: edge to edge, same convention as Latest/Events/Jobs' own
   .tui-listing/-grid mobile rule further down — the border above then
   reaches the true screen edge, content stays inset via the padding. */
@media (max-width: 768px) {
	.home .tui-classic-page .tui-featured-topics {
		margin-left: -1em;
		margin-right: -1em;
	}
}

/* Same pill look as the Profile editor's own skills tokens
   (.tui-skill-token, further up) — a real link here instead, so it gets
   its own hover feedback, same darkcolor-on-hover convention as
   .tui-author-skill's own neighbours use for a badge/capsule link. */
.tui-featured-topic {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 2px 10px;
	border-radius: 999px;
	background: var(--shadecolor);
	color: var(--bodycolor);
	font-size: 0.80em;
	white-space: nowrap;
}

.tui-featured-topic:hover,
.tui-featured-topic:focus {
	background: var(--bodycolor);
	color: var(--backgroundcolor);
	outline: none;
}

.home .tui-classic-page .tui-featured-topic,
.can-archives-topics .tui-featured-topic {
	font-size: 1em;
}

.tui-featured-topic-count {
	color: var(--midcolor);
}

.tui-featured-topic:hover .tui-featured-topic-count,
.tui-featured-topic:focus .tui-featured-topic-count {
	color: var(--backgroundcolor);
}

/* No gap between the front page's own sections (Latest/Featured/Events,
   page-templates/front.php) — each one's own titlebar directly follows
   the previous section's content as a sibling, per the user. */
.home .tui-classic-page > .tui-classic-titlebar:not(:first-child) {
	margin-top: 0;
}

.tui-classic-page .tui-load-more {
	border-top: 1px solid var(--linecolor);
	margin-top: 0px;
}



/* Mobile: edge to edge, cancelling .tui-shell's side padding. */
@media (max-width: 768px) {
	.blog .tui-classic-page .tui-listing,
	.blog .tui-classic-page .tui-listing--grid,
	.home .tui-classic-page .tui-listing,
	.home .tui-classic-page .tui-listing--grid {
		margin-left: -1em;
		margin-right: -1em;
	}
}

/* Load more, classic mobile — front page and the Jobs archive
   (post-type-archive-jobs, archive.php's own body class), same
   edge-to-edge treatment as the listing above it, rather than sitting
   inset with its own left/right border falling short of the screen edge,
   per the user. An explicit calc() width, not width: auto — a <button>
   keeps its native appearance (no appearance: none anywhere on
   .tui-load-more), which shrink-wrapped it to its own text at
   width: auto instead of stretching like a plain block element would,
   throwing off centering and leaving a gap on the right. */
@media (max-width: 768px) {
	.home .tui-classic-page .tui-load-more,
	.post-type-archive-jobs .tui-classic-page .tui-load-more {
		width: calc(100% + 2em);
		margin-left: -1em;
		margin-right: -1em;
		border-left: 1px solid var(--linecolor);
		border-right: 1px solid var(--linecolor);
	}
}

/* Featured slideshow, classic mobile front page — same edge-to-edge
   treatment (cancels .tui-shell's own side padding via a negative
   margin; its own 12px padding stays, for breathing room around the
   slideshow itself), border dropped since it'd otherwise sit right at
   the screen edge, per the user. Explicit background: .tui-featured
   itself has none, so the negative margin's own overlap into .tui-shell's
   side padding was showing that area's own background (body's
   --framecolor, not .tui-classic-page's --backgroundcolor) through —
   looked like a left/right gap even though the box itself was flush. */

.tui-classic-page .entry-header {
	margin-top: 1em;
	/* Full page width, so the edit/bookmark buttons sit in the page's own top right corner; the side padding centres the
	   title block on the article content below (same width as .entry-content, at least 1em from each edge). */
	padding-left: max(1em, calc((100% - var(--tui-content-width)) / 2));
	padding-right: max(1em, calc((100% - var(--tui-content-width)) / 2));
	text-align: left;
	max-width: none;
	margin-left: 0;
	margin-right: 0;
	/* The save-toggle button's own positioning context (below) — kept
	   here, not on .entry-title, so its "pinned to the right edge" stays
	   anchored to this header's own full width regardless of the title's
	   own max-width/centering, per the user. */
	position: relative;
}

/* .entry-title itself is display:flex with justify-content:space-between
   (its own base rule, further up — pins the title against the bookmark
   save-toggle button), which ignores text-align on this header entirely
   — that property only ever affects a flex container's own text-align
   for text wrapping inside its items, never how the items themselves are
   positioned. Dropped back to block (text-align on .entry-header, above,
   now actually applies) so the title text alone centers across the full
   width — the save-toggle button is taken out of that flow entirely via
   absolute positioning instead, pinned to the right edge regardless of
   the title's own length/centering, per the user. */
.tui-classic-page .entry-title {
	display: block;
	font-size: 2em;
	max-width: none;
	margin-left: 0;
	margin-right: 0;
}

.tui-classic-page .entry-header .tui-entry-actions {
	position: absolute;
	right: 0;
	top: 1em;
	margin-right: 1em;
}

@media (max-width: 768px) {
	.home .tui-classic-page .tui-featured {
		margin-left: -1em;
		margin-right: -1em;
		border-left: 1px solid var(--linecolor);
		border-right: 1px solid var(--linecolor);
		background: var(--backgroundcolor);
	}
	/* Reverts the desktop-only centered/larger-title treatment
	   (.tui-classic-page .entry-header/.entry-title/.tui-save-toggle
	   above) back to the same plain windowed-mode look on mobile, per
	   the user — only the properties those desktop rules actually
	   changed need overriding here; everything else (align-items,
	   justify-content, gap, …) was never touched by them and is already
	   inherited correctly from the base .entry-header/.entry-title/
	   .tui-save-toggle rules further up. Same specificity either way
	   (.tui-classic-page .entry-header/.entry-title in both), so this
	   wins purely by coming later in source order once this media query
	   matches. */
	.tui-classic-page .entry-header {
		margin-top: 1em;
		padding-left: 0em;
		padding-right: 0em;
		text-align: left;
		position: static;
	}

	.tui-classic-page .entry-title {
		display: flex;
		font-size: 1.05em;
		max-width: none;
		margin-left: 0;
		margin-right: 0;
	}

	.tui-classic-page .entry-header .tui-entry-actions {
		position: static;
		margin-right: 0;
	}
}

/* Breathing room before the page's own bottom edge/border — per the user. */
.tui-classic-page .entry-content {
	padding-bottom: 1em;
}

/* Classic single (post/job/book — single.php's own classic renderer,
   WP core's own "single" body class covers all three). */
.single .tui-classic-page {
	border-left: 1px solid var(--linecolor);
	border-right: 1px solid var(--linecolor);
	border-bottom: 1px solid var(--linecolor);
}

/* The titlebar is still the page's own first child (markup unchanged) —
   its own left/right borders (the base .tui-classic-titlebar rule) sit
   flush against the ones just added to .tui-classic-page itself,
   doubling up into a visibly thicker line. Dropped here rather than
   moving the titlebar out of .tui-classic-page in markup — the page's
   own border already draws that same line, and plenty of other rules
   (.tui-classic-page .entry-header etc.) rely on the titlebar staying a
   normal child of it. */
.single .tui-classic-page > .tui-classic-titlebar {
	border-left: none;
	border-right: none;
}

/* Classic front page grids: an explicit column count per viewport tier (set --front-cols),
   with a fixed px gap, so neither the font size setting nor card content changes the layout.
   Tiers: <768, 768–1439, 1440–1599, ≥1600. */
.home .tui-classic-page .tui-listing--grid,
.home .tui-classic-page .tui-listing--fixed[data-listing-type="books"],
.home .tui-classic-page .tui-featured {
	--front-cols: 2;
	grid-template-columns: repeat(var(--front-cols), minmax(0, 1fr));
	gap: 12px;
}

@media (min-width: 768px) {
	.home .tui-classic-page :is(.tui-listing--grid, .tui-listing--fixed[data-listing-type="books"], .tui-featured) { --front-cols: 4; }
}

/* 768–1439: every 6th and 7th card span 2 columns instead of every 8th (the first still does). */
@media (min-width: 768px) and (max-width: 1439px) {
	.home .tui-classic-page .tui-listing--grid[data-listing-type="latest"] > .tui-grid-card:nth-child(8n),
	.home .tui-classic-page .tui-listing--grid[data-listing-type="archives"] > .tui-grid-card:nth-child(8n) {
		grid-column: auto;
	}
	.home .tui-classic-page .tui-listing--grid[data-listing-type="latest"] > .tui-grid-card:nth-child(6n),
	.home .tui-classic-page .tui-listing--grid[data-listing-type="latest"] > .tui-grid-card:nth-child(7n),
	.home .tui-classic-page .tui-listing--grid[data-listing-type="archives"] > .tui-grid-card:nth-child(6n),
	.home .tui-classic-page .tui-listing--grid[data-listing-type="archives"] > .tui-grid-card:nth-child(7n) {
		grid-column: span 2;
	}
}

/* Front page Books teaser: the same columns as the post grid above (2, then 4, 5 and 6 as the page widens, the same 12px gap), and it
   shows one full row of its 12 covers (6 on a phone: three rows of two). */
@media (max-width: 767px) {
	.home .tui-classic-page .tui-listing--fixed[data-listing-type="books"] > :nth-child(n + 7) {
		display: none;
	}
}

/* 768–1439: 4 columns, so 4 of its 12 covers. */
@media (min-width: 768px) and (max-width: 1439px) {
	.home .tui-classic-page .tui-listing--fixed[data-listing-type="books"] > :nth-child(n + 5) {
		display: none;
	}
}

/* 1440–1599: 5 columns, so 5 covers. */
@media (min-width: 1440px) and (max-width: 1599px) {
	.home .tui-classic-page .tui-listing--fixed[data-listing-type="books"] > :nth-child(n + 6) {
		display: none;
	}
}

/* 1600 and up: 6 columns, so 6 covers. */
@media (min-width: 1600px) {
	.home .tui-classic-page .tui-listing--fixed[data-listing-type="books"] > :nth-child(n + 7) {
		display: none;
	}
}

/* 1440–1599: the Events teaser shows 5 of its 6 cards. */
@media (min-width: 1440px) and (max-width: 1599px) {
	.home .tui-classic-page .tui-front-events > :last-child {
		display: none;
	}
}

/* 768–1439: the Events teaser shows 4 of its 6 cards. */
@media (min-width: 768px) and (max-width: 1439px) {
	.home .tui-classic-page .tui-front-events > :nth-last-child(-n + 2) {
		display: none;
	}
}

/* 1440–1599: only the first card spans 2 columns (no every-8th). */
@media (min-width: 1440px) and (max-width: 1599px) {
	.home .tui-classic-page .tui-listing--grid:is([data-listing-type="latest"], [data-listing-type="archives"]) > .tui-grid-card:nth-child(8n) {
		grid-column: auto;
	}
}

@media (min-width: 1440px) {
	.home .tui-classic-page :is(.tui-listing--grid, .tui-listing--fixed[data-listing-type="books"], .tui-featured) { --front-cols: 5; }
}

/* ≥1600: every 7th and 9th card span 2 columns instead of every 8th (the first still does). */
@media (min-width: 1600px) {
	.home .tui-classic-page .tui-listing--grid:is([data-listing-type="latest"], [data-listing-type="archives"]) > .tui-grid-card:nth-child(8n) {
		grid-column: auto;
	}
	.home .tui-classic-page .tui-listing--grid:is([data-listing-type="latest"], [data-listing-type="archives"]) > .tui-grid-card:is(:nth-child(7n), :nth-child(9n)) {
		grid-column: span 2;
	}
}

@media (min-width: 1600px) {
	.home .tui-classic-page :is(.tui-listing--grid, .tui-listing--fixed[data-listing-type="books"], .tui-featured) { --front-cols: 6; }
}

.tui-classic-page .tui-listing--grid {
	/* margin-left: -14px;
	margin-right: -14px; */
	padding-left: 1em;
	padding-right: 1em;
}

.tui-classic-page .tui-listing-toolbar {
	display: none;
}

.tui-listing-nav,
.tui-listing-view-toggle {
	display: flex;
	border: 1px solid var(--linecolor);
}

.tui-view-btn {
	appearance: none;
	background: none;
	border: none;
	padding: 0.25em 0.5em;
	line-height: 1;
	cursor: pointer;
	color: var(--midcolor);
	display: flex;
	align-items: center;
	margin: 0px;
}

.tui-view-btn + .tui-view-btn {
	border-left: 1px solid var(--linecolor);
}

.tui-view-btn:hover,
.tui-view-btn:focus {
	background: var(--darkcolor);
	color: var(--backgroundcolor);
}

.tui-view-btn:disabled {
	cursor: default;
	opacity: 0.35;
}

.tui-view-btn:disabled:hover {
	color: var(--midcolor);
	background: var(--backgroundcolor);
}

/* Reverse-video for the active view, same convention as selection/hover
   states elsewhere in the theme. */
.tui-view-btn.is-active {
	background: var(--darkcolor);
	color: var(--backgroundcolor);
}

/* A term/author's title + description, under the toolbar above (page 1
   only) — see can_v7_render_listing_intro() in inc/window-handlers/listing.php. */
.tui-listing-intro {
	margin-bottom: 16px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--linecolor);
}

.tui-listing-title-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0px 0 6px;
}

.tui-listing-title {
	margin: 0;
}

/* Right-hand group in a listing heading row (Edit link + Save toggle). */
.tui-listing-title-actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

/* Mobile: twice the spacing between the edit, share and bookmark buttons, on articles (.tui-entry-actions) and archives. */
@media (max-width: 768px) {
	.tui-entry-actions,
	.tui-listing-title-actions {
		gap: 20px;
	}
}

/* Compact bordered button — pinned right of the heading via
   .tui-listing-title-row's space-between (currently just the jobs
   window's "Submit Job" link, can_v7_render_job_list_header()/
   $args['heading_extra'] in inc/window-handlers/jobs.php). */
.tui-btn {
	flex: 0 0 auto;
	padding: 4px 10px;
	background: var(--backgroundcolor);
	border: 1px solid var(--linecolor);
	color: var(--bodycolor);
	font-family: var(--tui-font);
	font-size: 1em;
	white-space: nowrap;
	cursor: pointer;
}

.tui-btn:hover,
.tui-btn:focus {
	background: var(--shadecolor);
	color: var(--bodycolor);
}

.tui-listing-description {
	color: var(--bodycolor);
	font-size: 1em;
	padding-right: 20%;
	overflow-wrap: anywhere;
}

.tui-listing-description p:last-child {
	margin-bottom: 0;
}

/* Author window's website/location/social/education badges — see
   can_v7_render_author_meta() in inc/template-tags.php. */
.tui-author-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 12px;
	margin-bottom: 16px;
}

/* With no skills below them, the icons are the last thing in the header: the header's own bottom padding is the gap. */
.tui-listing-intro .tui-author-badges:last-child {
	margin-bottom: 0;
}

.tui-author-badge {
	position: relative;
	display: inline-flex;
	color: var(--midcolor);
}

.tui-author-badge .icon {
	width: 12px;
	height: 12px;
}

/* Override the site-wide a:hover reverse-video background (style.css's
   top-level a:hover rule) — just the icon's own fill (currentColor)
   changes here, no background swatch behind it. */
a.tui-author-badge:hover,
a.tui-author-badge:focus {
	background: none;
	color: var(--darkcolor);
}

/* Mouse-following tooltip — CANV6's own .tooltip/.tooltip span mechanism
   (its style.css, "Tooltip" section) ported verbatim, per the user, and
   genuinely generic: any element gets one just by carrying the .tooltip
   class around a real <span> child, no per-feature CSS needed. The
   .tooltip class itself is what assets/js/main.js's own mousemove
   positioning hooks onto (.closest('.tooltip')). display:none/block
   instead of CANV6's own bare .tooltip:hover span, since :focus is
   supported too (a keyboard-focused element gets no mouse position to
   follow, so its label just appears at its last-set/default position;
   acceptable — hover is the primary path for both current uses).
   Originally built for the author window's own website/location/
   Twitter/Instagram badges (can_v7_author_meta_badge(), inc/
   template-tags.php — colors there were already background: bodycolor,
   color: backgroundcolor, which is what this still matches); also used
   by the CAN Activity Logger plugin's own Comment/Like/Save/Share
   buttons now (wireActivityButtonTooltips(), assets/js/activity.js —
   added from the theme side since the plugin itself is never modified,
   reusing this exact mechanism rather than inventing a second one).
   .tui-tooltip-label, not a bare "span" — those buttons already have
   their own two internal <span class="can-activity-btn-icon ...">
   icons (normal/hover swap), and a bare span selector matched those
   too, forcing them to position: fixed with no size constraint on
   hover and blowing each icon up to its SVG's own unconstrained
   natural size. can_v7_author_meta_badge()'s own label span (inc/
   template-tags.php) carries this same class for the same reason,
   even though it has no sibling spans to collide with today.

   .tooltiphover is a THIRD label class that also matches this rule —
   the CAN Activity Logger plugin's own code-block buttons (Apply
   Theme/Copy Code, card-activity-post.php, markup+CSS this project
   doesn't own) use that name instead, ported from the live site's own
   "Tooltip" CSS section. Folded into this same rule/mechanism rather
   than given its own separate CSS, so it gets the same mouse-following
   behavior as every other tooltip here instead of CANV6's older
   static-position one — main.js's upgradeTooltipLabels() matches it
   the same way (see that function's own comment).

   Not scoped under .tooltip (".tooltip .tui-tooltip-label") any more,
   and display is no longer driven by :hover/:focus here — main.js's own
   upgradeTooltipLabels() reparents every label to <body> on first sight
   (escapes an ancestor's own stacking context, e.g. will-change:opacity
   on the composer's own buttons, assets/css/activity.css, which trapped
   position:fixed behind later page content despite a z-index — same
   technique activity.js's own raiseCommentPopupAboveEverything() already
   uses), which also means it's no longer a DOM descendant of .tooltip at
   all — that selector, and a :hover/:focus one, would simply never
   match again. main.js's own mouseover/mouseout(/focusin/focusout)
   listeners toggle display directly instead. */
.tui-tooltip-label,
.tooltiphover {
	display: none;
	position: fixed;
	padding: 3px 8px;
	background: var(--bodycolor);
	color: var(--backgroundcolor);
	border-radius: var(--tui-window-radius);
	/* var(--tui-mono-font), not var(--tui-font) (the member's own
	   font-picker choice, e.g. the Inter preset) — "system font" here
	   means this project's own always-monospace baseline (same variable/
	   same reasoning as .tui-activity .can-code-block's own comment
	   further down), not the CSS system-ui generic keyword; that looked
	   like no change at all since Inter was deliberately designed to
	   closely resemble native system UI fonts. font-size tied to
	   --tui-font-size directly rather than a plain 0.80em, so it's
	   always exactly 0.8x the base UI size regardless of which element's
	   own font-size this happens to be nested inside (a .can-activity-btn
	   vs. a .tui-author-badge, say) — a plain em would cascade off
	   whatever that ancestor's own font-size happened to be instead. */
	font-family: var(--tui-mono-font);
	font-size: calc(var(--tui-font-size) * 0.8);
	line-height: 1.3;
	/* normal, not nowrap — a flat max-width alone just overflows
	   horizontally instead of actually constraining a long label (e.g.
	   the composer's own "Embed Live URL..." one, inc/activity-
	   components/activity-post.php) without also letting it wrap. */
	white-space: normal;
	max-width: 200px;
	pointer-events: none;
	z-index: 10;
}

/* A job's excerpt tooltip, on its title: wider than the standard 200px so it reads as a paragraph. */
.tui-job-excerpt-tip {
	max-width: 320px;
}

/* Classic mode: square tooltips, like the other classic chrome. */
.tui-classic-nav .tui-tooltip-label,
.tui-classic-nav .tooltiphover {
	border-radius: 0;
}

/* ...except the Featured Topics ones, which keep the system rounded corners (main.js moves a label out to <body>, so this
   can't be scoped under the capsule). */
.tui-classic-nav .tui-tooltip-label--round {
	border-radius: var(--tui-window-radius);
}

/* The map in an Activity entry (the CAN Activity plugin's can-activity-maps.js) builds its own tooltip with inline styles
   (padding, a 12px font, square corners), so these need !important to bring it in line with the other tooltips. */
.map-tooltip {
	padding: 3px 8px !important;
	border-radius: var(--tui-window-radius) !important;
	font-family: var(--tui-mono-font) !important;
	font-size: calc(var(--tui-font-size) * 0.8) !important;
	line-height: 1.3;
	max-width: 200px;
}

/* Mobile — no real hover there, so these would otherwise get stuck
   showing (or need a tap to dismiss) instead of just not appearing,
   per the user. !important: main.js's own mouseover/focusin handlers
   (just above) set display: block via inline style directly, which
   otherwise always wins over a plain stylesheet rule regardless of
   specificity. */
@media (max-width: 768px) {
	.tui-tooltip-label,
	.tooltiphover {
		display: none !important;
	}
}


.tui-author-skills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 10px;
}

.tui-author-skill {
	padding: 2px 10px;
	border-radius: 999px;
	background: var(--shadecolor);
	color: var(--bodycolor);
	font-size: 0.80em;
}

/* Admin-only panel's own action row (can_v7_render_author_admin_panel(),
   inc/template-tags.php) — Edit This User/Reports/Saved Articles as
   plain buttons in a line (.tui-btn, already used for the jobs window's
   "Submit Job") instead of Membership's own stacked full-width
   .tui-membership-link rows, per the user. */
.tui-author-admin-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
}

.tui-author-admin-actions .tui-btn {
	font-size: 0.80em;
}

/* The Admin block is only ever shown to an administrator: its rows and buttons are in --darkcolor (the heading already is), the same as
   what "See all Daps" shows in Activity, so what they see that members can't is plain to see. */
.tui-author-admin-row .tui-membership-label,
.tui-author-admin-row .tui-membership-value,
.tui-author-admin-actions .tui-btn {
	color: var(--darkcolor);
}

/* The search window's own input (inc/window-handlers/search.php) — no
   header search field, so this is the only way to type a query. */
.tui-search-button .icon {
	width: 100%;
	height: 100%;
}

/* Bleeds edge-to-edge, flush with the window's titlebar and both sides —
   same negative-margin trick .tui-window-thumb uses against the body's
   own padding (1em, not the stale 16px/20px this was still hardcoded
   to) — with normal (not negative) bottom margin, so it doesn't pull
   search results up underneath it once there are any. */
[data-search-window-form] {
	margin: -1em -1em 0;
}

/* The bar holds the token capsules and the input on one wrapping line. */
.tui-search-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	padding: 1em;
	background: var(--backgroundcolor);
	cursor: text;
}

.tui-search-bar:focus-within {
	background: var(--shadecolor);
}

[data-search-window-form] input[type="search"] {
	flex: 1;
	min-width: 120px;
	margin: 0;
	background: transparent;
	border: none;
	color: var(--bodycolor);
	font-family: var(--tui-font);
	font-size: 1em;
	padding: 0;
	appearance: none;
}

/* Token capsules — same inverted look as the CAN Search plugin's widget. */
.tui-search-token {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 2px 8px 2px 10px;
	background: var(--darkcolor);
	color: var(--backgroundcolor);
	border-radius: var(--tui-window-radius);
	font-size: 1em;
	line-height: 1.6;
	white-space: nowrap;
	cursor: default;
}

.tui-search-token-remove {
	appearance: none;
	background: none;
	border: none;
	padding: 0;
	color: inherit;
	font: inherit;
	font-size: 0.9em;
	line-height: 1;
	cursor: pointer;
	opacity: 0.6;
}

.tui-search-token-remove:hover,
.tui-search-token-remove:focus {
	opacity: 1;
}

[data-search-window-form] input[type="search"]::-webkit-search-cancel-button {
	appearance: none;
}

[data-search-window-form] input[type="search"]:focus {
	outline: none;
}

/* Separates the results area from the search bar above it — only present
   once a search has actually run (the compact, input-only state has no
   .tui-search-results at all), so there's never a stray line under an
   otherwise-empty window. */
.tui-search-results {
	/* Bleeds the border-top edge-to-edge (same -1em trick the search bar
	   above it uses against .tui-window-body's own padding, not the
	   stale 20px this margin/padding pair was still hardcoded to) and
	   sits flush against the input with no gap above it — the
	   left/right padding puts the actual result content back at the
	   normal 1em indent to match, the top value is just breathing room
	   below the line, unrelated to the body's own padding. */
	margin: 0 -1em;
	padding: 16px 1em 0;
	border-top: 1px solid var(--linecolor);
}

/* Space + a separating line between each results section (People/Tools/
   Tags/Members/Articles/…) — same solid --linecolor rule .tui-search-results'
   own top border and .tui-listing-intro's bottom border already use. None
   needed after the last section — .tui-window-body's own bottom padding
   already covers the space, and a line right at the window's edge would be
   redundant. */
.tui-search-results [data-search-section] {
	margin-bottom: 12px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--linecolor);
}

.tui-search-results [data-search-section]:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: none;
}

/* Search's own section headings (People/Tools/Tags/Members/Articles/…)
   repeat down the window as plain in-line labels, not the one big
   page-level heading .tui-listing-title is everywhere else it's used (a
   term/author's own name atop Latest/People/Category/etc. — see
   can_v7_render_listing_intro()) — scoped down here rather than touched
   at that shared class' own level, which would shrink those too. */
.tui-search-results .tui-listing-title {
	font-size: 1em;
	font-weight: normal;
	color: var(--midcolor);
	margin-bottom: 8px;
}

/* A People/Tools/Tags result's post count — .tui-col-category's own fixed
   92px width left-aligns short content within it (fine for an actual
   category name sandwiched between other fixed-width columns elsewhere,
   but here it's the row's last item, so a 2-digit count just sat with a
   wide gap of unused box to its right instead of at the row's true right
   edge). margin-left: auto pins it flush right regardless of its own
   width, with no fixed box to misalign inside. */
.tui-search-count {
	flex: 0 0 auto;
	margin-left: auto;
	color: var(--midcolor);
}

/* A member result's membership level, pinned to the row's right edge —
   same flush-right positioning as .tui-search-count just above; the
   capsule look itself is .tui-author-skill (the Author window's own
   badge/skill pill, see style.css's own .tui-author-badge block),
   reused as-is rather than styled again. align-self: flex-start —
   .tui-listing-row's own default align-items: stretch otherwise stretched
   this to the row's full height (however tall the bio text next to it
   made it), turning the pill into a tall oval instead of a compact badge. */
.tui-search-member-level {
	flex: 0 0 auto;
	align-self: flex-start;
	margin-left: auto;
}

/* Search results (inc/window-handlers/search.php) — excerpt text under a
   result's title, with the plugin's own <mark> match-highlighting. */
.tui-search-excerpt {
	color: var(--midcolor);
	font-size: 0.80em;
	margin-top: 2px;
	overflow-wrap: anywhere;
}

/* Activity results: content on top (normal size), title link below it,
   smaller. Excerpt <mark> highlighting reuses .tui-search-excerpt mark. */
.tui-search-activity-content {
	overflow-wrap: anywhere;
}

.tui-search-activity-content mark {
	background: none;
	color: var(--darkcolor);
}

.tui-search-activity-title {
	display: block;
	margin-top: 2px;
	font-size: 0.80em;
	color: var(--midcolor);
}

/* Link color, like the bookmark beside it — .entry-title a would otherwise
   win with --darkcolor inside the article heading. */
/* The edit pencil is only ever shown to an administrator (an article, a page, a job, a taxonomy's description): --darkcolor, like the rest of
   what only they see (the Admin block on a member's page, See all Daps in Activity). */
.tui-entry-edit,
.entry-title .tui-entry-edit {
	color: var(--darkcolor);
}

.tui-entry-edit-icon {
	width: 0.9em;
	height: 0.9em;
	vertical-align: -0.1em;
	fill: currentColor;
}

/* In the article header's action group, match the bookmark next to it. The
   bookmark is a <button>, which doesn't inherit the heading's font-size (the
   browser's own 13.33px default), so its 1em icon stays small — while this
   <a> does inherit it (2em on the classic page), which made the pencil huge.
   Same base size, same 1em icon. The bookmark's own rules are untouched. */
.tui-entry-actions .tui-entry-edit {
	font-size: 13.3333px;
	line-height: 1;
}

.tui-entry-actions .tui-entry-edit-icon {
	width: 1em;
	height: 1em;
	vertical-align: baseline;
}

/* Icon before a People/Members result's own name — same size/spacing
   construction as .tui-event-fact-icon. */
.tui-search-name-icon {
	width: 0.9em;
	height: 0.9em;
	margin-right: 4px;
	vertical-align: -0.1em;
}

/* A People/Tools/Tags/Members result's own bio/description — unlike an
   Article/Activity result's excerpt (a snippet of someone else's content,
   kept muted above), this is the subject's own text about themselves, so
   it reads at full --bodycolor rather than --midcolor. */
.tui-search-bio {
	color: var(--bodycolor);
	overflow-wrap: anywhere;
}

.tui-search-excerpt mark {
	background: none;
	color: var(--darkcolor);
}

/* -----------------------------------------------------------------------
   Listing grid view (thumb / title / excerpt / meta) — the alternative to
   .tui-listing's rows, toggled via the toolbar above. Same .tui-listing
   element, just with a --grid modifier (see template-parts/post/content-grid.php).
   ----------------------------------------------------------------------- */

/* Column minimum tied to --tui-font-size (220px at its 12px default) —
   see .tui-archives #grid-layout's own comment on why, above. */
.tui-listing--grid,
.tui-grid-listing {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(calc(var(--tui-font-size) * 18.333), 1fr));
	gap: 1em;
}

@media (max-width: 500px) {
	.tui-listing--grid,
	.tui-grid-listing {
		grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
		gap: 1em;
	}
}

/* Related posts (inc/related-posts.php) — the last thing on a single
   article/book/event, so it needs its own trailing space before the
   window/page edge, unlike every other .tui-listing--grid use (a listing
   window/page, where "the end of the grid" is immediately followed by
   its own Load More button/pagination, not blank space). */
.tui-related-grid {
	padding-bottom: 1em;
}

/* Five related posts across the full width, 20% each, in classic and in windows. */
@media (min-width: 769px) {
	.tui-classic-page .tui-related-grid {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}
}
.tui-window .tui-related-grid {
	grid-template-columns: repeat(5, minmax(0, 1fr));
}

/* Under 768px (the window's own width in a window, the browser's in classic): two columns, fifth card hidden. */
@media (max-width: 768px) {
	.tui-classic-page .tui-related-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.tui-classic-page .tui-related-grid > :nth-child(5) {
		display: none;
	}
}
.tui-window--narrow-768 .tui-related-grid {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}
.tui-window--narrow-768 .tui-related-grid > :nth-child(5) {
	display: none;
}

/* Mobile classic: edge to edge, cancelling .tui-shell's side padding —
   same convention as .tui-classic-page .tui-listing-intro/.tui-listing
   above, per the user. */
@media (max-width: 768px) {
	.tui-classic-page .tui-related-grid {
		margin-left: -1em;
		margin-right: -1em;
	}
}

.tui-grid-card {
	display: flex;
	flex-direction: column;
}

/* First 12 cards animate in, one after another, on every fresh render of
   a grid listing (a plain CSS animation replays whenever these elements
   are newly inserted — a window's AJAX content swap included, no JS
   needed). Capped at 12 so a long feed's later cards don't sit at
   opacity: 0 waiting their turn — nth-child(n+13) skips the animation
   entirely and just renders normally, immediately. */
.tui-listing--grid .tui-grid-card,
#grid-layout .tui-grid-card {
	animation: tui-grid-card-in 0.4s ease both;
}

.tui-listing--grid .tui-grid-card:nth-child(n + 13),
#grid-layout .tui-grid-card:nth-child(n + 13) {
	animation: none;
}

.tui-listing--grid .tui-grid-card:nth-child(1),
#grid-layout .tui-grid-card:nth-child(1) { animation-delay: 0ms; }
.tui-listing--grid .tui-grid-card:nth-child(2),
#grid-layout .tui-grid-card:nth-child(2) { animation-delay: 40ms; }
.tui-listing--grid .tui-grid-card:nth-child(3),
#grid-layout .tui-grid-card:nth-child(3) { animation-delay: 80ms; }
.tui-listing--grid .tui-grid-card:nth-child(4),
#grid-layout .tui-grid-card:nth-child(4) { animation-delay: 120ms; }
.tui-listing--grid .tui-grid-card:nth-child(5),
#grid-layout .tui-grid-card:nth-child(5) { animation-delay: 160ms; }
.tui-listing--grid .tui-grid-card:nth-child(6),
#grid-layout .tui-grid-card:nth-child(6) { animation-delay: 200ms; }
.tui-listing--grid .tui-grid-card:nth-child(7),
#grid-layout .tui-grid-card:nth-child(7) { animation-delay: 240ms; }
.tui-listing--grid .tui-grid-card:nth-child(8),
#grid-layout .tui-grid-card:nth-child(8) { animation-delay: 280ms; }
.tui-listing--grid .tui-grid-card:nth-child(9),
#grid-layout .tui-grid-card:nth-child(9) { animation-delay: 320ms; }
.tui-listing--grid .tui-grid-card:nth-child(10),
#grid-layout .tui-grid-card:nth-child(10) { animation-delay: 360ms; }
.tui-listing--grid .tui-grid-card:nth-child(11),
#grid-layout .tui-grid-card:nth-child(11) { animation-delay: 400ms; }
.tui-listing--grid .tui-grid-card:nth-child(12),
#grid-layout .tui-grid-card:nth-child(12) { animation-delay: 440ms; }

/* The Events window's cards come in the same way as Latest's: the first 12 one after another (40ms apart), a plain CSS fade that plays
   whenever they are newly inserted, no JS. Later cards skip it and render straight away. */
.tui-listing--fixed[data-listing-type="events"] > .tui-event-card {
	animation: tui-grid-card-in 0.4s ease both;
}

.tui-listing--fixed[data-listing-type="events"] > .tui-event-card:nth-child(n + 13) {
	animation: none;
}

.tui-listing--fixed[data-listing-type="events"] > .tui-event-card:nth-child(1) { animation-delay: 0ms; }
.tui-listing--fixed[data-listing-type="events"] > .tui-event-card:nth-child(2) { animation-delay: 40ms; }
.tui-listing--fixed[data-listing-type="events"] > .tui-event-card:nth-child(3) { animation-delay: 80ms; }
.tui-listing--fixed[data-listing-type="events"] > .tui-event-card:nth-child(4) { animation-delay: 120ms; }
.tui-listing--fixed[data-listing-type="events"] > .tui-event-card:nth-child(5) { animation-delay: 160ms; }
.tui-listing--fixed[data-listing-type="events"] > .tui-event-card:nth-child(6) { animation-delay: 200ms; }
.tui-listing--fixed[data-listing-type="events"] > .tui-event-card:nth-child(7) { animation-delay: 240ms; }
.tui-listing--fixed[data-listing-type="events"] > .tui-event-card:nth-child(8) { animation-delay: 280ms; }
.tui-listing--fixed[data-listing-type="events"] > .tui-event-card:nth-child(9) { animation-delay: 320ms; }
.tui-listing--fixed[data-listing-type="events"] > .tui-event-card:nth-child(10) { animation-delay: 360ms; }
.tui-listing--fixed[data-listing-type="events"] > .tui-event-card:nth-child(11) { animation-delay: 400ms; }
.tui-listing--fixed[data-listing-type="events"] > .tui-event-card:nth-child(12) { animation-delay: 440ms; }

@media (prefers-reduced-motion: reduce) {
	.tui-listing--fixed[data-listing-type="events"] > .tui-event-card {
		animation: none;
	}
}

/* The Books window's posters (and the front page's Books teaser) come in the same way: the first 24 (a whole page) one after another
   (40ms apart), later ones straight away. */
.tui-listing--fixed[data-listing-type="books"] > .tui-book-poster {
	animation: tui-grid-card-in 0.4s ease both;
}

.tui-listing--fixed[data-listing-type="books"] > .tui-book-poster:nth-child(n + 25) {
	animation: none;
}

.tui-listing--fixed[data-listing-type="books"] > .tui-book-poster:nth-child(1) { animation-delay: 0ms; }
.tui-listing--fixed[data-listing-type="books"] > .tui-book-poster:nth-child(2) { animation-delay: 40ms; }
.tui-listing--fixed[data-listing-type="books"] > .tui-book-poster:nth-child(3) { animation-delay: 80ms; }
.tui-listing--fixed[data-listing-type="books"] > .tui-book-poster:nth-child(4) { animation-delay: 120ms; }
.tui-listing--fixed[data-listing-type="books"] > .tui-book-poster:nth-child(5) { animation-delay: 160ms; }
.tui-listing--fixed[data-listing-type="books"] > .tui-book-poster:nth-child(6) { animation-delay: 200ms; }
.tui-listing--fixed[data-listing-type="books"] > .tui-book-poster:nth-child(7) { animation-delay: 240ms; }
.tui-listing--fixed[data-listing-type="books"] > .tui-book-poster:nth-child(8) { animation-delay: 280ms; }
.tui-listing--fixed[data-listing-type="books"] > .tui-book-poster:nth-child(9) { animation-delay: 320ms; }
.tui-listing--fixed[data-listing-type="books"] > .tui-book-poster:nth-child(10) { animation-delay: 360ms; }
.tui-listing--fixed[data-listing-type="books"] > .tui-book-poster:nth-child(11) { animation-delay: 400ms; }
.tui-listing--fixed[data-listing-type="books"] > .tui-book-poster:nth-child(12) { animation-delay: 440ms; }
.tui-listing--fixed[data-listing-type="books"] > .tui-book-poster:nth-child(13) { animation-delay: 480ms; }
.tui-listing--fixed[data-listing-type="books"] > .tui-book-poster:nth-child(14) { animation-delay: 520ms; }
.tui-listing--fixed[data-listing-type="books"] > .tui-book-poster:nth-child(15) { animation-delay: 560ms; }
.tui-listing--fixed[data-listing-type="books"] > .tui-book-poster:nth-child(16) { animation-delay: 600ms; }
.tui-listing--fixed[data-listing-type="books"] > .tui-book-poster:nth-child(17) { animation-delay: 640ms; }
.tui-listing--fixed[data-listing-type="books"] > .tui-book-poster:nth-child(18) { animation-delay: 680ms; }
.tui-listing--fixed[data-listing-type="books"] > .tui-book-poster:nth-child(19) { animation-delay: 720ms; }
.tui-listing--fixed[data-listing-type="books"] > .tui-book-poster:nth-child(20) { animation-delay: 760ms; }
.tui-listing--fixed[data-listing-type="books"] > .tui-book-poster:nth-child(21) { animation-delay: 800ms; }
.tui-listing--fixed[data-listing-type="books"] > .tui-book-poster:nth-child(22) { animation-delay: 840ms; }
.tui-listing--fixed[data-listing-type="books"] > .tui-book-poster:nth-child(23) { animation-delay: 880ms; }
.tui-listing--fixed[data-listing-type="books"] > .tui-book-poster:nth-child(24) { animation-delay: 920ms; }

@media (prefers-reduced-motion: reduce) {
	.tui-listing--fixed[data-listing-type="books"] > .tui-book-poster {
		animation: none;
	}
}

@keyframes tui-grid-card-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

.tui-grid-thumb {
	display: block;
	aspect-ratio: 4 / 3;
	background: var(--shadecolor);
	overflow: hidden;
}

/* The article's length under its thumbnail (can_v7_render_length_line()): the full width is 1000 words. */
.tui-grid-length {
	display: flex;
	align-items: flex-start;
}

.tui-grid-length-bar {
	display: block;
	height: 2px;
	width: calc(var(--length, 0) * 100%);
	background: var(--darkcolor);
}

.tui-grid-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* A live embed over the thumbnail (an article in Activity with a LIVEURL): the page or video fills the same 4:3 box and fades in
   once it has loaded (main.js adds .is-live), so the thumbnail shows until then, and stays if the embed never loads. */
.tui-grid-live {
	position: relative;
}

.tui-grid-live iframe,
.tui-grid-live video {
	position: absolute;
	top: 0;
	left: 0;
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	object-fit: cover;
	background: var(--backgroundcolor);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.tui-grid-live iframe.is-live,
.tui-grid-live video.is-live {
	opacity: 1;
}

/* Centred over the thumbnail while the embed loads (main.js adds .is-loading): • then •• then ••• and round again. */
.tui-grid-live-dots {
	position: absolute;
	top: 50%;
	left: 50%;
	display: none;
	transform: translate(-50%, -50%);
	color: var(--darkcolor);
	font-size: 1.5em;
	line-height: 1;
	white-space: nowrap;
	pointer-events: none;
}

.tui-grid-live.is-loading .tui-grid-live-dots {
	display: block;
}

.tui-grid-live-dots span:nth-child(2) {
	animation: tui-live-dot-2 1.2s steps(1) infinite;
}

.tui-grid-live-dots span:nth-child(3) {
	animation: tui-live-dot-3 1.2s steps(1) infinite;
}

@keyframes tui-live-dot-2 {
	0% { visibility: hidden; }
	33.3% { visibility: visible; }
}

@keyframes tui-live-dot-3 {
	0% { visibility: hidden; }
	66.6% { visibility: visible; }
}

.tui-grid-title {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.5em;
	font-size: 1em;
	padding: 1em 0 0.5em 0;
	margin: 0px;
}

/* A member's level capsule in a card's bottom row (the same one the profile shows), in place of the plain label. */
/* Member cards and cards with a bio (People, Tools, Tags): the bottom row sits at the bottom of every card, so a row of them lines up
   however long the bios are. */
.tui-grid-card--member .tui-grid-meta,
.tui-grid-card:has(.tui-node-bio) .tui-grid-meta {
	margin-top: auto;
	margin-bottom: 1em;
	padding-top: 0.5em;
}

.tui-grid-meta .can-uhc-membership,
.tui-membership-value .can-uhc-membership {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 8px;
	border-radius: 3px;
	background: var(--shadecolor);
	color: var(--midcolor);
	font-size: 0.80em;
	font-weight: normal;
	line-height: 1;
	white-space: nowrap;
}

/* In the Membership window the capsule is the usual small size, 0.80em (the label's own 0.8em applies on top of the capsule's, so the
   capsule itself stays at 1em; the cards' 0.80em on both would make it 0.64em). */
.tui-membership-value .can-uhc-membership {
	font-size: 1em;
}

.tui-grid-meta .can-uhc-membership .can-membership-icon,
.tui-membership-value .can-uhc-membership .can-membership-icon {
	display: block;
	flex: none;
	width: 10px;
	height: 10px;
	fill: currentColor;
}

.tui-grid-excerpt p {
	padding: 0em 0;
	margin: 0px;
}

.tui-listing--grid .tui-grid-excerpt p,
.tui-grid-listing .tui-grid-excerpt p {
	padding: 0.5em 0;
}

/* Save/unsave bookmark toggle (can_v7_render_save_toggle(),
   inc/template-tags.php) — pinned to the right of the title via
   .tui-grid-title's own flex above. Same two-icon-pair/[data-*] show-hide
   convention as .tui-settings-toggle in the Settings window. */
.tui-save-toggle {
	flex: 0 0 auto;
	appearance: none;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	color: var(--bodycolor);
}

.tui-save-toggle:hover,
.tui-save-toggle:focus {
	color: var(--bodycolor);
	outline: none;
}

/* Share button + menu in an article's header, next to the bookmark (can_v7_render_share_button(), main.js). Same size as the
   bookmark; the menu looks like the Share menu in Activity and opens under the button, lined up with its right edge. */
.tui-share {
	position: relative;
	display: inline-flex;
}

.tui-share-toggle {
	flex: 0 0 auto;
	appearance: none;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	color: var(--darkcolor);
}

.tui-share-toggle:hover,
.tui-share-toggle:focus {
	color: var(--darkcolor);
	outline: none;
}

.tui-share-menu {
	position: absolute;
	top: 100%;
	right: 0;
	margin-top: 0.5em;
	min-width: 180px;
	background: var(--backgroundcolor);
	border: 1px solid var(--linecolor);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
	font-size: var(--tui-font-size);
	font-weight: normal;
	line-height: 1.4;
	z-index: 100;
}

.tui-share-menu[hidden] {
	display: none;
}

.tui-share-menu a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2em;
	padding: 0.5em 1em;
	color: var(--bodycolor);
	text-decoration: none;
	white-space: nowrap;
}

.tui-share-menu a:hover,
.tui-share-menu a:focus {
	background: var(--bodycolor);
	color: var(--backgroundcolor);
	outline: none;
}

.tui-share-menu .icon {
	width: 1em;
	height: 1em;
}

.tui-save-toggle-outline,
.tui-save-toggle-fill {
	display: none;
}

.tui-save-toggle[data-saved="0"] .tui-save-toggle-outline {
	display: inline-block;
	color: var(--darkcolor);
}

.tui-save-toggle[data-saved="1"] .tui-save-toggle-fill {
	display: inline-block;
	color: var(--darkcolor);
}

/* Hovering an unsaved bookmark previews the filled one (same as the plugin's
   own Save button in Activity, which swaps its normal/hover icon pair) — so
   it fills on hover everywhere the toggle appears: grid cards, the single
   header, term/author headings, Activity. */
.tui-save-toggle[data-saved="0"]:hover .tui-save-toggle-outline {
	display: none;
}

.tui-save-toggle[data-saved="0"]:hover .tui-save-toggle-fill {
	display: inline-block;
	color: var(--darkcolor);
}

/* Hidden in any window's mini mode (currently only reachable via Latest's
   — content-grid.php's cards, whose title row it sits in isn't itself
   hidden by that mini view) — no room/reason for it in a collapsed row. */
.tui-window--mini .tui-save-toggle {
	display: none;
}

.tui-grid-title a {
	color: var(--linkcolor);
}

.tui-grid-title a:hover,
.tui-grid-title a:focus {
	background: none;
	color: var(--darkcolor);
	outline: none;
}

/* An attached Activity Entry's title is plain text, not a link, so it takes the body colour. */
.tui-grid-card--entry .tui-grid-title {
	color: var(--bodycolor);
}

.tui-grid-excerpt {
	color: var(--bodycolor);
	font-size: 1em;
	margin-bottom: 8px;
	overflow-wrap: anywhere;
}

.tui-grid-meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
	color: var(--midcolor);
	font-size: 0.80em;
}

.tui-grid-meta-row {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* No letter/icon prefix telling date/author/tags apart any more, so a
   little typographic weight does that job instead: date and author in
   the full body color, tags left muted (inherited from .tui-grid-meta). */
.tui-grid-meta-date,
.tui-grid-meta-author {
	color: var(--bodycolor);
}

/* Every Category/People/Tools term, across all three taxonomies, merged
   into one row (was three near-identical-looking rows once nothing
   distinguished them) — wrap and comma-separate them rather than
   truncating like the single-line date/author rows above, and bracket
   the whole thing as one unit. */
.tui-grid-meta-terms {
	overflow: visible;
	color: var(--bodycolor); /* the [brackets] and commas; the links keep the link colour */
	white-space: normal;
	padding-bottom: 1em;
}

/* The Theme row sits directly under the taxonomy row: the gap goes after it, not between the two. */
.tui-grid-meta-terms:has(+ .tui-grid-meta-topic) {
	padding-bottom: 0;
}

/* Latest window's own mini mode — same .tui-window--mini model as jobs'
   above (see main.js), just scoped to [data-content-type="latest"] since
   'latest' shares its pinned window with Person/Tool/Tag/Category/Author
   (WINDOW_GROUPS' "listing" group) and mini only means something for
   Latest itself — main.js strips the class/button if that shared window
   ever loads one of those other types. Handles both the list view's
   columns and the grid view's cards, since either can be active when
   mini gets toggled. */

/* Latest/Books/Featured/Activity each have a fixed window-frame height set
   on their own .tui-window[data-content-type="…"] rule above (jobs/events
   only get a width override, not height). setWindowMini() clears the
   window's *inline* height when entering mini, but that CSS rule then
   takes over and keeps the frame pinned to full height regardless — same
   specificity, so source order here (after the base rule) is what makes
   this win. Let mini size to its own small content instead, same as every
   other mini type. */
.tui-window--mini[data-content-type="latest"],
.tui-window--mini[data-content-type="books"],
.tui-window--mini[data-content-type="featured"],
.tui-window--mini[data-content-type="activity"] {
	height: auto;
}

/* No scrolling inside Featured's mini view — the body's own overflow: auto was
   showing a scrollbar over content that's only a hair too tall for it. */
.tui-window--mini[data-content-type="featured"] .tui-window-body {
	overflow: hidden;
}

.tui-window--mini[data-content-type="latest"] .tui-col-date,
.tui-window--mini[data-content-type="latest"] .tui-col-category,
.tui-window--mini[data-content-type="latest"] .tui-col-author {
	display: none;
}

/* Back/forward nav and the list/grid view switch — both live in one
   .tui-listing-toolbar wrapper (see can_v7_render_listing_toolbar() in
   inc/listing-engine.php); neither is worth the space in a quick-glance
   mini list. */
.tui-window--mini[data-content-type="latest"] .tui-listing-toolbar {
	display: none;
}

.tui-window--mini[data-content-type="latest"] .tui-listing-row {
	padding: 4px 0;
	font-size: 0.80em;
	/* A wrapped two-line title should keep the "›" marker next to its
	   first line, not centered against the whole row — same reasoning
	   as jobs' mini row above. */
	align-items: flex-start;
	/* Same 6px as jobs' mini row above — .tui-listing-row's own base gap
	   is 16px (built for the full date/name/category/author row), which
	   read as more indented than jobs' single-link mini row. */
	gap: 6px;
}

.tui-window--mini .tui-grid-title {
	padding: 0px;
}

/* Same "row highlights instead of just the link" avoidance as jobs'
   .tui-window--mini .tui-job-row:hover above — .tui-listing-row's base
   hover (style.css, "Status is the one value...") stays in place outside
   mini. */
.tui-window--mini[data-content-type="latest"] .tui-listing-row:hover {
	background: none;
}

/* Same color as jobs' .tui-job-col-role a (darkcolor, not the standard
   --linkcolor every other listing/grid title uses) — scoped to mini only,
   so the full Latest list/grid keep their normal link color. */
.tui-window--mini[data-content-type="latest"] .tui-col-name a,
.tui-window--mini[data-content-type="latest"] .tui-grid-title a {
	color: var(--linkcolor);
}

/* Overrides the site-wide a:hover reverse-video background — plain text
   color change instead, same as jobs' own .tui-job-col-role a:hover. */
.tui-window--mini[data-content-type="latest"] .tui-col-name a:hover,
.tui-window--mini[data-content-type="latest"] .tui-col-name a:focus,
.tui-window--mini[data-content-type="latest"] .tui-grid-title a:hover,
.tui-window--mini[data-content-type="latest"] .tui-grid-title a:focus {
	background: none;
	color: var(--darkcolor);
	outline: none;
}

.tui-window--mini[data-content-type="latest"] .tui-listing--grid {
	display: block;
}

.tui-window--mini[data-content-type="latest"] .tui-grid-thumb,
.tui-window--mini[data-content-type="latest"] .tui-grid-length, /* the length line is its own flex item here: it added a second 12px gap before the title */
.tui-window--mini[data-content-type="latest"] .tui-grid-excerpt,
.tui-window--mini[data-content-type="latest"] .tui-grid-meta {
	display: none;
}

.tui-window--mini[data-content-type="latest"] .tui-grid-card {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	/* Same 6px as jobs' mini row and Latest's own mini list-row above. */
	gap: 6px;
	padding: 4px 0;
}

.tui-window--mini[data-content-type="latest"] .tui-grid-title {
	margin: 0;
	font-size: 0.80em;
}

/* Same "›" marker as jobs' .tui-window--mini .tui-job-row::before —
   both rows are flex containers, so this lands as a flex item ahead of
   the title in either view. */
.tui-window--mini[data-content-type="latest"] .tui-listing-row::before,
.tui-window--mini[data-content-type="latest"] .tui-grid-card::before {
	content: "›";
	flex: 0 0 auto;
	color: var(--bodycolor);
}

/* Cap mini's quick-glance list to 6 rows — unlike Activity (its own
   separate, server-rendered preview query, inc/window-handlers/
   activity.php's can_v7_render_activity_mini()), Latest mini is a pure
   CSS restyle of whatever the normal listing already loaded (up to 12,
   inc/listing-engine.php's own $per_page), so the count here is just
   hiding rows past the 6th rather than a smaller query. List view's
   nth-child starts at n+8, not n+7 — .tui-listing-head (already hidden
   in mini via style.css's own .tui-window--mini .tui-listing-head rule)
   is still the first .tui-listing-row child, so real row 6 sits at
   child position 7 and the cutoff is one higher than grid's own. */
.tui-window--mini[data-content-type="latest"] .tui-listing-row:nth-child(n + 8),
.tui-window--mini[data-content-type="latest"] .tui-grid-card:nth-child(n + 7) {
	display: none;
}

/* Featured slideshow's meta (template-parts/featured/content.php) — date/
   author/terms all on one line instead of .tui-grid-meta's default
   stacked rows, separated by the same "|" convention as the footer nav
   (.footer-navigation li::before). */
.tui-featured-panel .tui-grid-meta {
	flex-direction: row;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 10px;
}

.tui-featured-panel .tui-grid-meta-row {
	overflow: visible;
	white-space: normal;
}

.tui-featured-panel .tui-grid-meta-row + .tui-grid-meta-row::before {
	content: "|";
	margin-right: 10px;
	color: var(--linecolor);
}

/* -----------------------------------------------------------------------
   Footer / function-key bar
   ----------------------------------------------------------------------- */

.site-footer {
	align-self: flex-start;
	padding: 12px 0;
	margin-top: 24px;
	color: var(--bodycolor);
	font-size: 0.80em;
	line-height: 1; /* the body's 1.6 made the footer line too tall */
	opacity: 1;
}

.footer-navigation ul {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	/* Was 0 0 8px — that 8px separated this from .tui-shortcuts below it,
	   which is currently disabled (see footer.php), so no reason to
	   reserve space for it now. */
	margin: 0;
	padding: 0;
}

.footer-navigation li {
	display: flex;
	align-items: center;
	gap: 10px;
}

.footer-navigation li:first-child::before,
.footer-navigation li.footer-nav-no-separator::before {
	content: none;
}

.footer-navigation li::before {
	content: "|";
	color: var(--bodycolor);
}

.footer-navigation a {
	color: var(--bodycolor);
}

.footer-navigation a:hover {
	color: var(--darkcolor);
	background: none !important;
}

.footer-navigation button {
	background: none !important;
}
.footer-navigation button:hover {
	color: var(--darkcolor) !important;
}

/* The version link is a <button>, unlike its <a> siblings — buttons don't
   inherit font-size/font-family from their ancestors by default (browser
   UI font instead) and come with their own background/border chrome, so
   both need resetting explicitly here to actually match its siblings,
   rather than falling out of .site-footer's own font-size for free.
   font-size: 1em (not a fixed size) is what makes that inheritance-like
   match happen, since em always resolves against the parent's own
   already-cascaded size (.site-footer's 0.85em), same as the <a>s get
   automatically. */
.footer-navigation button {
	appearance: none;
	background: none;
	border: none;
	padding: 0;
	margin: 0;
	cursor: pointer;
	color: var(--bodycolor);
	font-family: var(--tui-font);
	font-size: 1em;
}

.footer-navigation button:hover {
	background: var(--midcolor);
	color: var(--backgroundcolor);
}

/* Shortcut key hints — visual only for now, see footer.php. */
.tui-shortcuts {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	color: var(--midcolor);
}

.tui-key {
	display: inline-block;
	color: var(--bodycolor);
	background: var(--shadecolor);
	padding: 0 5px;
	margin-right: 4px;
}

/* Saved window (inc/window-handlers/saved.php) — hide/show panels toggled by assets/js/saved.js; its tabs share the
   Events filter styling (.tui-event-filters, above) and the narrow bordered-cell grid (below, with Archives). */
.tui-saved-panel {
	display: none;
}

.tui-saved-panel.is-active {
	display: block;
}

.tui-saved-empty {
	color: var(--midcolor);
}

/* 404 window/classic page (inc/window-handlers/not-found.php). */
.tui-not-found {
	padding: 0 0 2em;
	text-align: left;
}

/* Classic page has no .tui-window-body around it to supply padding. */
.tui-classic-page .tui-not-found {
	padding: 1em;
}

.tui-not-found-ascii {
	margin: 0 0 1em;
	color: var(--darkcolor);
	line-height: 1.2;
}

.tui-not-found-title {
	margin: 0 0 0.5em;
	font-size: 1.2em;
	color: var(--darkcolor);
}

.tui-not-found p {
	color: var(--bodycolor);
}

/* The Saved window's grid (.tui-grid-listing — it doesn't go through can_v7_render_post_listing()) shares
   .tui-listing--grid's own rule above, so the two can't drift apart. */

/* assets/js/saved.js appends this remove button onto every card (post or
   archive) inside a Saved panel — scoped position:relative here rather
   than on .tui-grid-card/.tui-event-card generally, since those are
   shared with other windows that don't have this button. */
.tui-saved-panel .tui-grid-card,
.tui-saved-panel .tui-event-card {
	position: relative;
}

.tui-saved-remove {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 22px;
	height: 22px;
	display: flex;
	align-items: center;
	justify-content: center;
	appearance: none;
	background: var(--backgroundcolor);
	border: 1px solid var(--linecolor);
	color: var(--midcolor);
	cursor: pointer;
}

.tui-saved-remove .icon {
	width: 14px;
	height: 14px;
}

.tui-saved-remove:hover,
.tui-saved-remove:focus {
	color: var(--bodycolor);
	border-color: var(--bodycolor);
	outline: none;
}

/* An administrator looking up another member's saved list
 * (inc/window-handlers/saved.php's own $id param) — every save/remove
 * control here operates on the current VIEWER's own usermeta, never the
 * looked-up member's, so they're hidden entirely rather than left live
 * and silently wrong. assets/js/saved.js still adds .tui-saved-remove
 * as normal (it has no reason to know about this), so this has to hide
 * it after the fact rather than the JS just not adding it. */
.tui-saved[data-saved-readonly="1"] .tui-save-toggle,
.tui-saved[data-saved-readonly="1"] .tui-saved-remove {
	display: none;
}

/* Classic mode (page.php's own can_v7_user_wants_classic_nav() branch) —
   .tui-saved (inc/window-handlers/saved.php's own wrapper div) is
   unstyled inside a floating window (nested in .tui-window-body, which
   already provides padding/width/border on its own), so all of this is
   scoped to .tui-classic-page specifically — same border-left/right +
   edge-to-edge-mobile convention as .tui-events-full (events.css... er,
   style.css's own .tui-classic-page .tui-events-full rule). Padding
   lives on the wrapper itself (not the tabs/panels individually) since,
   unlike Events, nothing in here needs to bleed past it. */
.tui-classic-page .tui-saved {
	padding: 1em;
	background: var(--backgroundcolor);
	border-left: 1px solid var(--linecolor);
	border-right: 1px solid var(--linecolor);
}

@media (max-width: 768px) {
	.tui-classic-page .tui-saved {
		margin-left: -1em;
		margin-right: -1em;
	}
}

/* -----------------------------------------------------------------------
   CAN Activity Logger — user hover card overrides
   Site-wide (not Activity-window-scoped, unlike assets/css/activity.css —
   this card triggers off any /author/ link anywhere), so it lives here
   rather than there. The plugin's own assets/css/style.css sizes these in
   rem (1rem / 0.75rem) against the root font-size, not --tui-font-size, so
   they don't scale with the theme's font-size slider — em here instead,
   matching this theme's own font-relative convention.
   ----------------------------------------------------------------------- */

.can-user-hover-card {
	border-radius: var(--tui-window-radius);
}

.can-uhc-username {
	font-size: 1.1em;
	color: var(--darkcolor);
}

.can-uhc-membership-label {
	font-size: 0.80em;
}

.can-uhc-bio {
	opacity: 1;
}

/* -----------------------------------------------------------------------
   Small screens
   ----------------------------------------------------------------------- */

@media (max-width: 768px) {
	.site-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.tui-shell {
		padding: 1em 1em 0;
	}
}

/* -----------------------------------------------------------------------
   APTOC
   ----------------------------------------------------------------------- */

   div#aptoc-toc-list-container {
   	margin-left: 1em;
   }
   ul#aptoc-toc-list li {
   	margin-left: 0.5em;
   }
   ol#cancustomfootnotes.wp-block-footnotes {
   	padding-left: 0px;
   }
	/* Right-aligned numbers (1. through 10.+ all flush against the text,
	   not the native marker's own left-aligned "10." vs " 1." stagger) —
	   ::marker only supports a small fixed set of properties per spec
	   (color/font/content/etc.), text-align isn't one of them, so the
	   native marker is hidden and a counter-driven ::before fakes it
	   instead, sized wide enough for a 2-digit number. Absolutely
	   positioned, not display:flex on the <li> itself — a footnote <li>
	   has more than one child (its own text plus the back-reference
	   arrow link), and flex laid all of THOSE out side by side as
	   separate columns too, not just the marker — broke multi-paragraph/
	   multi-link footnotes into a garbled two-column mess. Absolute
	   positioning takes the counter out of flow entirely, so the <li>'s
	   own children stay in normal block flow, untouched. */
	#cancustomfootnotes.wp-block-footnotes {
		counter-reset: cancustomfootnote;
	}
	#cancustomfootnotes.wp-block-footnotes li {
   	padding-left: 2.5em;
		list-style: none;
		position: relative;
		/* Long links break onto the next line instead of widening the page. */
		overflow-wrap: anywhere;
	}
	#cancustomfootnotes.wp-block-footnotes li::before {
		counter-increment: cancustomfootnote;
		content: counter(cancustomfootnote) ".";
		position: absolute;
		left: 0;
		width: 2em;
		text-align: right;
	}

	button#aptoc-scroll-to-top-btn {
		background: none;
	}

/* Classic mode, viewport < 768px: the same bordered-cell tab grid the narrow windows get
   (.tui-window--narrow-768 rules above) for Archives, Events and Saved. Archives and
   Events sit edge to edge inside a frame that already draws the side borders, so no top
   or left border here, and margin-right: -1px lets the last cell's right border sit on
   the frame's own instead of doubling it. Saved gets the same treatment from its own rule
   at the end of this file (it pulls itself out of the page's 1em padding). */
@media (max-width: 767px) {
	.tui-classic-page .can-taxonomy-browser .can-top-tabs,
	.tui-classic-page .tui-event-filters,
	.tui-classic-page .tui-saved-tabs {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(7.5em, 1fr));
		width: auto;
		margin-right: -1px;
		border: none;
		row-gap: 0;
	}

	.tui-classic-page .tui-archives .can-top-tab,
	.tui-classic-page .tui-event-filter-btn,
	.tui-classic-page .tui-saved-tab-btn {
		text-align: left;
		border-right: 1px solid var(--linecolor);
		border-bottom: 1px solid var(--linecolor);
	}

	.tui-classic-page .tui-archives .can-top-tab + .can-top-tab,
	.tui-classic-page .tui-event-filter-btn + .tui-event-filter-btn,
	.tui-classic-page .tui-saved-tab-btn + .tui-saved-tab-btn {
		border-left: none;
	}
}

/* Narrow list view (window < 768px, or the viewport in classic mode): no columns, the
   same layout as a job row. Title on the first line, then date · category · author as a
   wrapped meta line below it, a rule between rows, and no column-header row. Mini mode
   has its own rules. */
.tui-window--narrow-768:not(.tui-window--mini) .tui-listing--list .tui-listing-head {
	display: none;
}

.tui-window--narrow-768:not(.tui-window--mini) .tui-listing--list .tui-listing-row {
	flex-wrap: wrap;
	align-items: center;
	gap: 0;
	row-gap: 0.25em;
	padding: 0.5em;
	border-bottom: 1px solid var(--linecolor);
}

.tui-window--narrow-768:not(.tui-window--mini) .tui-listing--list .tui-col-name {
	order: 1;
	flex: 1 1 100%;
	overflow-wrap: anywhere;
}

.tui-window--narrow-768:not(.tui-window--mini) .tui-listing--list .tui-col-date,
.tui-window--narrow-768:not(.tui-window--mini) .tui-listing--list .tui-col-status,
.tui-window--narrow-768:not(.tui-window--mini) .tui-listing--list .tui-col-category,
.tui-window--narrow-768:not(.tui-window--mini) .tui-listing--list .tui-col-author {
	flex: 0 1 auto;
	width: auto;
	max-width: 100%;
	font-size: 0.80em;
}

.tui-window--narrow-768:not(.tui-window--mini) .tui-listing--list .tui-col-date,
.tui-window--narrow-768:not(.tui-window--mini) .tui-listing--list .tui-col-status {
	order: 2;
}

.tui-window--narrow-768:not(.tui-window--mini) .tui-listing--list .tui-col-category {
	order: 3;
}

.tui-window--narrow-768:not(.tui-window--mini) .tui-listing--list .tui-col-author {
	order: 4;
}

.tui-window--narrow-768:not(.tui-window--mini) .tui-listing--list .tui-col-category:empty {
	display: none;
}

.tui-window--narrow-768:not(.tui-window--mini) .tui-listing--list .tui-col-status::before,
.tui-window--narrow-768:not(.tui-window--mini) .tui-listing--list .tui-col-category::before,
.tui-window--narrow-768:not(.tui-window--mini) .tui-listing--list .tui-col-author::before {
	content: "\00b7";
	margin: 0 6px;
	color: var(--linecolor);
}

@media (max-width: 768px) {
	.tui-classic-page .tui-listing--list .tui-listing-head {
		display: none;
	}

	.tui-classic-page .tui-listing--list .tui-listing-row {
		flex-wrap: wrap;
		align-items: center;
		gap: 0;
		row-gap: 0.25em;
		padding: 0.5em;
		border-bottom: 1px solid var(--linecolor);
	}

	.tui-classic-page .tui-listing--list .tui-col-name {
		order: 1;
		flex: 1 1 100%;
		overflow-wrap: anywhere;
	}

	.tui-classic-page .tui-listing--list .tui-col-date,
	.tui-classic-page .tui-listing--list .tui-col-status,
	.tui-classic-page .tui-listing--list .tui-col-category,
	.tui-classic-page .tui-listing--list .tui-col-author {
		flex: 0 1 auto;
		width: auto;
		max-width: 100%;
		font-size: 0.80em;
	}

	.tui-classic-page .tui-listing--list .tui-col-date,
	.tui-classic-page .tui-listing--list .tui-col-status {
		order: 2;
	}

	.tui-classic-page .tui-listing--list .tui-col-category {
		order: 3;
	}

	.tui-classic-page .tui-listing--list .tui-col-author {
		order: 4;
	}

	.tui-classic-page .tui-listing--list .tui-col-category:empty {
		display: none;
	}

	.tui-classic-page .tui-listing--list .tui-col-status::before,
	.tui-classic-page .tui-listing--list .tui-col-category::before,
	.tui-classic-page .tui-listing--list .tui-col-author::before {
		content: "\00b7";
		margin: 0 6px;
		color: var(--linecolor);
	}
}

/* Staggered fade-in for job rows, the same as the Activity feed's entries: a plain CSS animation that replays whenever rows
   are newly inserted (window swap, Load more), no JS. Only the first 24 (a full page) are staggered (90ms apart), later ones fade straight in.
   nth-child starts at 2 because the column header (.tui-job-head) is the list's first child. `backwards`, not `both`, so the
   animation doesn't keep each row a stacking context afterwards. */
.tui-listing--fixed[data-listing-type="jobs"] > .tui-job-row {
	animation: tui-job-row-in 0.55s ease backwards;
}

.tui-listing--fixed[data-listing-type="jobs"] > .tui-job-row:nth-child(2) { animation-delay: 0ms; }
.tui-listing--fixed[data-listing-type="jobs"] > .tui-job-row:nth-child(3) { animation-delay: 90ms; }
.tui-listing--fixed[data-listing-type="jobs"] > .tui-job-row:nth-child(4) { animation-delay: 180ms; }
.tui-listing--fixed[data-listing-type="jobs"] > .tui-job-row:nth-child(5) { animation-delay: 270ms; }
.tui-listing--fixed[data-listing-type="jobs"] > .tui-job-row:nth-child(6) { animation-delay: 360ms; }
.tui-listing--fixed[data-listing-type="jobs"] > .tui-job-row:nth-child(7) { animation-delay: 450ms; }
.tui-listing--fixed[data-listing-type="jobs"] > .tui-job-row:nth-child(8) { animation-delay: 540ms; }
.tui-listing--fixed[data-listing-type="jobs"] > .tui-job-row:nth-child(9) { animation-delay: 630ms; }
.tui-listing--fixed[data-listing-type="jobs"] > .tui-job-row:nth-child(10) { animation-delay: 720ms; }
.tui-listing--fixed[data-listing-type="jobs"] > .tui-job-row:nth-child(11) { animation-delay: 810ms; }
.tui-listing--fixed[data-listing-type="jobs"] > .tui-job-row:nth-child(12) { animation-delay: 900ms; }
.tui-listing--fixed[data-listing-type="jobs"] > .tui-job-row:nth-child(13) { animation-delay: 990ms; }
.tui-listing--fixed[data-listing-type="jobs"] > .tui-job-row:nth-child(14) { animation-delay: 1080ms; }
.tui-listing--fixed[data-listing-type="jobs"] > .tui-job-row:nth-child(15) { animation-delay: 1170ms; }
.tui-listing--fixed[data-listing-type="jobs"] > .tui-job-row:nth-child(16) { animation-delay: 1260ms; }
.tui-listing--fixed[data-listing-type="jobs"] > .tui-job-row:nth-child(17) { animation-delay: 1350ms; }
.tui-listing--fixed[data-listing-type="jobs"] > .tui-job-row:nth-child(18) { animation-delay: 1440ms; }
.tui-listing--fixed[data-listing-type="jobs"] > .tui-job-row:nth-child(19) { animation-delay: 1530ms; }
.tui-listing--fixed[data-listing-type="jobs"] > .tui-job-row:nth-child(20) { animation-delay: 1620ms; }
.tui-listing--fixed[data-listing-type="jobs"] > .tui-job-row:nth-child(21) { animation-delay: 1710ms; }
.tui-listing--fixed[data-listing-type="jobs"] > .tui-job-row:nth-child(22) { animation-delay: 1800ms; }
.tui-listing--fixed[data-listing-type="jobs"] > .tui-job-row:nth-child(23) { animation-delay: 1890ms; }
.tui-listing--fixed[data-listing-type="jobs"] > .tui-job-row:nth-child(24) { animation-delay: 1980ms; }
.tui-listing--fixed[data-listing-type="jobs"] > .tui-job-row:nth-child(25) { animation-delay: 2070ms; }

@keyframes tui-job-row-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.tui-listing--fixed[data-listing-type="jobs"] > .tui-job-row {
		animation: none;
	}
}

/* Stacked layout: no column for an unset closing date, and the label says what the date is. */
.tui-job-col-closing:empty {
	display: none;
}

.tui-job-col-closing--soon {
	color: var(--darkcolor);
}

.tui-job-col-closing--past {
	opacity: 0.5;
}

/* Wide jobs list (window 768px or wider, or a classic page wider than 768px): the same single-line column
   layout as the Latest list — date, role and company, status, tags — instead of the stacked title and meta
   line. Narrower than that, the stacked layout above is used as is. Mini mode has its own rules. */
.tui-window:not(.tui-window--narrow-768):not(.tui-window--mini) .tui-job-row {
	align-items: center;
}

.tui-window:not(.tui-window--narrow-768):not(.tui-window--mini) .tui-job-col-thumb {
	width: 48px;
}

.tui-window:not(.tui-window--narrow-768):not(.tui-window--mini) .tui-job-col-body {
	flex-direction: row;
	align-items: center;
	gap: 1em;
}

.tui-window:not(.tui-window--narrow-768):not(.tui-window--mini) .tui-job-col-role {
	order: 1;
	flex: 1 1 auto;
	min-width: 0;
	overflow-wrap: anywhere;
}

.tui-window:not(.tui-window--narrow-768):not(.tui-window--mini) .tui-job-col-meta {
	display: contents;
}

.tui-window:not(.tui-window--narrow-768):not(.tui-window--mini) .tui-job-col-meta > * + *::before {
	content: none;
}

.tui-window:not(.tui-window--narrow-768):not(.tui-window--mini) .tui-job-col-date {
	flex: 0 0 auto;
	width: 84px;
}

.tui-window:not(.tui-window--narrow-768):not(.tui-window--mini) .tui-job-col-status {
	order: 2;
	flex: 0 0 auto;
	width: 92px;
}

.tui-window:not(.tui-window--narrow-768):not(.tui-window--mini) .tui-job-col-closing {
	display: block;
	order: 3;
	flex: 0 0 auto;
	width: 92px;
}

.tui-window:not(.tui-window--narrow-768):not(.tui-window--mini) .tui-job-col-tags {
	order: 4;
	flex: 0 0 auto;
	width: 180px;
}

.tui-window:not(.tui-window--narrow-768):not(.tui-window--mini) .tui-job-col-closing:empty::after {
	content: "-";
}

.tui-window:not(.tui-window--narrow-768):not(.tui-window--mini) .tui-job-closing-label {
	display: none;
}

@media (min-width: 769px) {
	.tui-classic-page .tui-job-row {
		align-items: center;
	}

	.tui-classic-page .tui-job-col-thumb {
		width: 48px;
	}

	.tui-classic-page .tui-job-col-body {
		flex-direction: row;
		align-items: center;
		gap: 1em;
	}

	.tui-classic-page .tui-job-col-role {
		order: 1;
		flex: 1 1 auto;
		min-width: 0;
		overflow-wrap: anywhere;
	}

	.tui-classic-page .tui-job-col-meta {
		display: contents;
	}

	.tui-classic-page .tui-job-col-meta > * + *::before {
		content: none;
	}

	.tui-classic-page .tui-job-col-date {
		flex: 0 0 auto;
		width: 84px;
	}

	.tui-classic-page .tui-job-col-status {
		order: 2;
		flex: 0 0 auto;
		width: 92px;
	}

	.tui-classic-page .tui-job-col-closing {
		display: block;
		order: 3;
		flex: 0 0 auto;
		width: 92px;
	}

	.tui-classic-page .tui-job-col-tags {
		order: 4;
		flex: 0 0 auto;
		width: 180px;
	}

	.tui-classic-page .tui-job-col-closing:empty::after {
		content: "-";
	}

	.tui-classic-page .tui-job-closing-label {
		display: none;
	}
}

/* Wide jobs list column headers (can_v7_job_list_head()) — only shown with the wide row layout above, and
   widths match its columns: thumbnail, date, job, status, tags. The header text is 0.80em, so its em gap and
   padding are scaled up 1.25x so they come out the same px as the rows' 1em gap and 0.5em padding. */
.tui-job-head {
	display: none;
}

.tui-window:not(.tui-window--narrow-768):not(.tui-window--mini) .tui-job-head {
	display: flex;
	gap: 1.25em;
	padding: 0.625em;
}

.tui-job-head-thumb {
	flex: 0 0 auto;
	width: 48px;
}

.tui-job-head-date {
	flex: 0 0 auto;
	width: 84px;
}

.tui-job-head-role {
	flex: 1 1 auto;
	min-width: 0;
}

.tui-job-head-status {
	flex: 0 0 auto;
	width: 92px;
}

.tui-job-head-closing {
	flex: 0 0 auto;
	width: 92px;
}

.tui-job-head-tags {
	flex: 0 0 auto;
	width: 180px;
}

@media (min-width: 769px) {
	.tui-classic-page .tui-job-head {
		display: flex;
		gap: 1.25em;
		padding: 0.625em;
	}
}

/* CAN stats block (inc/can-stats-block.php): big numbers with a label above and a
   short description below, in a row of columns. */
.can-stats .featurecode {
	display: block;
	font-size: 0.80em;
	color: var(--midcolor);
	padding-bottom: 0.25em;
}

.can-stats .featureheading {
	display: block;
	color: var(--darkcolor);
	font-size: 3em;
	line-height: 1.1em;
	padding-bottom: 0.25em;
}

.can-stats .featureheading a {
	color: inherit;
	text-decoration: none;
}

.can-stats .can-stats-chart {
	height: 110px;
}

.can-stats .can-stats-years {
	display: block;
	font-size: 1.2em;
}

.can-stats .wp-block-column {
	padding: 1em;
	border: 1px solid var(--linecolor);
}

/* The two rows of boxes touch: no margin between them, one shared border line. */
.can-stats .wp-block-columns {
	margin-top: 0;
	margin-bottom: 0;
}

.can-stats .wp-block-columns + .wp-block-columns {
	margin-top: -1px;
}

/* Side by side the boxes share one vertical line (when stacked they keep their own). */
.can-stats .wp-block-columns {
	gap: 0;
}

@media (min-width: 782px) {
	.can-stats .wp-block-column + .wp-block-column {
		border-left: none;
	}
}

/* A section title on that page outside the stats blocks (the Featured one): same small, mid-colour label as theirs. */
.can-archives-section-title {
	display: block;
	margin-top: 1.25em; /* 1em at the page's size, as this label is set at 0.80em */
	padding: 1.25em 0 0.25em;
	border-top: 1px solid var(--linecolor);
	font-size: 0.80em;
	color: var(--midcolor);
}

/* The front page's Featured Topics capsules, under their label on the Archives page. */
.can-archives-topics {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding-bottom: 0.25em;
}

/* The signed-out Archives page: the sections fade in one after the other, top to bottom (the text; the four rows of
   numbers; Featured Topics with its label; Featured with its label). The text and Featured Topics/Featured are told
   apart from the Community page's by what sits around them. */
.tui-community-text:has(~ .can-stats--open),
.can-stats--open > .wp-block-columns,
.can-archives-topics,
.can-archives-section-title,
.can-archives-section-title + .tui-featured {
	animation: tui-login-fade-in 0.6s ease backwards;
}

.can-stats--open > .wp-block-columns:nth-child(1) {
	animation-delay: 0.4s;
}

.can-stats--open > .wp-block-columns:nth-child(2) {
	animation-delay: 0.8s;
}

.can-stats--open > .wp-block-columns:nth-child(3) {
	animation-delay: 1.2s;
}

.can-stats--open > .wp-block-columns:nth-child(4) {
	animation-delay: 1.6s;
}

.can-archives-section-title:has(+ .can-archives-topics),
.can-archives-topics {
	animation-delay: 2s;
}

.can-archives-section-title:not(:has(+ .can-archives-topics)),
.can-archives-section-title + .tui-featured {
	animation-delay: 2.4s;
}

@media (prefers-reduced-motion: reduce) {
	.tui-community-text:has(~ .can-stats--open),
	.can-stats--open > .wp-block-columns,
	.can-archives-topics,
	.can-archives-section-title,
	.can-archives-section-title + .tui-featured {
		animation: none;
	}
}

/* The signed-out Archives page's sections (template-parts/page/archives-welcome.php): no boxes, a divider line above each
   row of sections with 1em around it, like the Community page's. */
.can-stats--open .wp-block-columns,
.can-stats--open .wp-block-columns + .wp-block-columns {
	margin-top: 1em;
	padding-top: 1em;
	border-top: 1px solid var(--linecolor);
}

.can-stats--open .wp-block-column {
	border: none;
	padding: 0 1em 0 0;
}

.tui-login .tui-login-links {
	margin-top: 3em;
	margin-bottom: 0; /* the window body's own 1em padding is the space below */
	font-size: 0.80em;
}

/* Back to Sign In (reset view) pins to the bottom left of the column, in line with the sign-in view's small links. */
.tui-login--reset {
	display: flex;
	flex-direction: column;
	min-width: 0; /* a grid item otherwise won't shrink below its widest content */
	text-align: left;
}

.tui-login--reset input[type="text"],
.tui-login--reset input[type="submit"] {
	box-sizing: border-box;
	max-width: 100%;
}

.tui-login--reset .tui-login-reset,
.tui-login--reset .tui-login-reset > * {
	max-width: 100%;
	overflow-wrap: anywhere;
}

.tui-login--reset > .tui-login-links {
	margin-top: auto;
	padding-top: 3em;
}

/* Register: styled like the Sign In button, sitting to its right. */
.tui-login .tui-login-register {
	display: inline-block;
	border: 1px solid var(--linecolor);
	color: var(--bodycolor);
	font-family: var(--tui-font);
	font-size: 0.9em;
	padding: 6px 16px;
	margin-left: 0.5em;
	text-decoration: none;
	cursor: pointer;
}


/* Register: Button fixes */

input.stripe-button-el {
	background: none !important;
	border: none !important; 
	box-shadow: none;
}

.component-frame.visible {
    width: 200px !important;
    height: 45px !important;
    margin-bottom: 0px !important;
    cursor: pointer;
    clip-path: inset(1px round 5px);
	margin-top: 2px !important;
}

#swpm_paypal_button_0 {
	height: 50px !important;
	
}

.can-btn-appstore {
	margin-bottom: -1em !important;
}

.paypal-buttons-layout-horizontal {
	width: 200px !important;
	height: 50px !important;
		
}



.tui-login .tui-login-register:hover,
.tui-login .tui-login-register:focus {
	background: var(--shadecolor);
	outline: none;
}

/* Classic search results: section titles (People, Articles, …) get side padding. */
.tui-classic-page .tui-search-results .tui-listing-title {
	padding-left: 1em;
	padding-right: 1em;
}

/* Classic search page: the field and results sit inside the page's normal width, not bled out to the edges as in a window. */
/* No padding either (on desktop the classic page's own 1em side padding would otherwise reach it). */
.tui-classic-page [data-search-window-form] {
	margin: 0;
	padding: 0;
}

/* ...and the bar inside it has no top padding. */
.tui-classic-page .tui-search-bar {
	padding-top: 0;
}

.tui-classic-page .tui-search-results {
	margin: 0;
	padding: 0;
}

/* Footer "F15" button: same font as the footer links, shade background, body-colour text. */
.footer-navigation button.tui-shortcuts-open {
	background: rgba(0, 0, 0, 0.1) !important;
	color: var(--bodycolor);
	border: none;
	padding: 0 5px;
	margin: 0;
	font: inherit;
	cursor: pointer;
}

.footer-navigation button.tui-shortcuts-open:hover {
	color: var(--darkcolor) !important;
}

/* Shortcuts overlay: centred panel on a transparent, blurred backdrop (lightbox style). */
.tui-shortcuts-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1em;
	background: transparent;
}

.tui-shortcuts-overlay[hidden] {
	display: none;
}

.tui-shortcuts-overlay-inner {
	width: 100%;
	max-width: 600px;
	max-height: 100%;
	overflow-y: auto;
	padding: 1em;
	color: var(--bodycolor);
	border: 1px solid var(--linecolor);
	border-radius: var(--tui-window-radius);
	box-shadow: 0 var(--tui-window-shadow-y) var(--tui-window-shadow-blur) rgba(0, 0, 0, var(--tui-window-shadow-opacity, 0.2));
	background: color-mix(in srgb, var(--backgroundcolor) 90%, transparent);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
}

.tui-shortcuts-overlay-title {
	margin-bottom: 1em;
	color: var(--darkcolor);
}

/* The key column is as wide as the longest key combo (shared by every row through the subgrid) and never wraps. */
.tui-shortcuts-overlay-list {
	display: grid;
	grid-template-columns: max-content 1fr;
	column-gap: 1em;
}

.tui-shortcuts-overlay-row {
	display: grid;
	grid-column: 1 / -1;
	grid-template-columns: subgrid;
	align-items: baseline;
	padding: 0.4em 0;
}

.tui-shortcuts-overlay-row .tui-key-combo {
	justify-self: start;
	white-space: nowrap;
}

/* A combo is one capsule per key; the plus between them (and a trailing note) has no background. */
.tui-key-combo .tui-key {
	margin-right: 0;
}

.tui-key-plus {
	margin: 0 4px;
}

.tui-key-note {
	margin-left: 6px;
	color: var(--midcolor);
}

.tui-key-combo {
	margin-right: 4px;
}

.tui-shortcuts-overlay-row .tui-key-combo {
	margin-right: 0;
}

/* Shortcut keys (overlay list and the footer F15 button): 3px rounded corners. */
.tui-shortcuts-overlay-row .tui-key,
[data-shortcuts-list] .tui-key,
.footer-navigation button.tui-shortcuts-open {
	border-radius: 3px;
}

/* Save Shortcuts pulses its background while something has been changed and not yet saved (shortcuts.js, syncShortcutSave()). */
[data-shortcuts-save].is-dirty {
	animation: tui-save-pulse 1.6s ease-in-out infinite;
}

@keyframes tui-save-pulse {
	0%,
	100% {
		background-color: var(--backgroundcolor);
	}

	50% {
		background-color: var(--shadecolor);
	}
}

@media (prefers-reduced-motion: reduce) {
	[data-shortcuts-save].is-dirty {
		animation: none;
	}
}

/* Settings → Shortcuts: what it does on the left, a field with its key combination on the right. */
.tui-shortcuts-settings-list {
	margin-bottom: 1em;
}

.tui-shortcuts-settings-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1em;
	padding: 0.4em 0;
}

.tui-shortcuts-settings-row:not(:last-child) {
	border-bottom: 1px dashed var(--linecolor);
}

.tui-shortcut-field {
	padding: 0.25em 0.5em;
	text-align: right;
	background: transparent;
	border: 1px solid var(--linecolor);
	border-radius: 3px;
	color: inherit;
	font: inherit;
	cursor: pointer;
}

/* The combination's own 4px right margin would make the frame wider on the right than on the left. */
.tui-shortcut-field .tui-key-combo {
	margin-right: 0;
}

.tui-shortcut-field:focus,
.tui-shortcut-field.is-capturing {
	outline: none;
	border-color: var(--darkcolor);
}

.tui-shortcut-field.is-changed {
	border-color: var(--bodycolor);
}

.tui-shortcuts-settings-row .tui-key {
	border-radius: 3px;
}

/* A click shortcut: the key held (a choice, as wide as its text) with "+ Click (where)" after it. */
.tui-shortcut-modifier {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
}

.tui-shortcut-modifier select.tui-shortcut-field {
	text-align: left;
}

.tui-shortcuts-overlay-row > span:last-child {
	text-align: right;
}

.tui-shortcuts-overlay-row:not(:last-child) {
	border-bottom: 1px dashed var(--linecolor);
}

/* Admin widget mode: everything in a single column, small text. */
.tui-window--widget[data-content-type="admin"] .tui-admin {
	grid-template-columns: 1fr;
	gap: 1em;
	font-size: calc(0.80em * var(--tui-admin-scale, 1));
}

/* The Refresh button sits in the widget's top-right corner instead of under the numbers. */
.tui-window--widget[data-content-type="admin"] .tui-admin {
	position: relative;
}

.tui-window--widget[data-content-type="admin"] .tui-admin-refresh {
	position: absolute;
	top: 0;
	right: 0;
	margin: 0;
}

/* No dividing lines between the sections in the widget: just the headings, with the line's space removed. */
.tui-window--widget[data-content-type="admin"] .tui-settings-section {
	border-top: none;
	padding-top: 0;
	margin: 0 0 0.25em;
}

/* fit-content shrinks a window to the space left between its left edge and the viewport's right edge, which squashes the
   Admin widget when it's pushed against that edge. a fixed width keeps it the same wherever it sits. */
/* The width can be dragged (the grip at the bottom right, assets/js/main.js): the text scales with it. */
.tui-window--widget[data-content-type="admin"] {
	width: var(--tui-admin-w, 280px) !important;
}

.tui-window--widget[data-content-type="admin"] .tui-window-resize {
	display: block;
}

/* The main menu opens at the same distance from the top of the screen as the account menu:
   the corner buttons row is 13px down and 24px tall, and the menu sits 6px below it (43px),
   less the 12px of page padding above the site title. Classic adds the same 0.5em as .tui-menu. */
#site-menu {
	top: 31px;
}

/* Classic: the popups' tops meet the bottom of the header (where the page's first titlebar line starts) instead of floating a
   few pixels below it. The main menu hangs 1em (the header's own bottom padding) below the site title; the account menu
   sits 8px below the corner buttons (13px down, 24px tall), which is the same line. */
.tui-classic-nav #site-menu {
	top: calc(100% + 1em);
}

.tui-classic-nav #account-menu {
	top: calc(100% + 8px);
}

/* Classic desktop: the user menu's top lines up with the top of the content, 0.5em lower. */
@media (min-width: 769px) {
	.tui-classic-nav #account-menu {
		top: calc(100% + 6.5px + 0.5em);
	}
}

/* Mobile classic: the menu popups sit against the screen edges. */
@media (max-width: 768px) {
	/* Against the screen edges: the page's own 1em side padding is cancelled, so the main menu sits flush left and the user
	   menu flush right. (The user menu only — the Mentions popup keeps its own anchor.) */
	.tui-classic-nav #site-menu {
		left: -1em;
		top: calc(100% + 1em - 1px); /* 1px higher than the rule above */
	}

	.tui-classic-nav #account-menu {
		right: -1em;
		top: calc(100% + 8px - 1px);
	}
}

/* Classic profile page has no .tui-window-body around the form to supply padding. */
.tui-classic-profile-body {
	padding: 1em;
}

/* Classic Reports page has no .tui-window-body around it to supply padding. */
.tui-classic-page .tui-reports {
	padding: 1em;
}

/* Classic only; !important because the plugin sets padding-left inline on one of these blocks. */
.tui-classic-page .tui-reports #section-data {
	padding-left: 0 !important;
}

/* Classic mobile: Reports runs edge to edge (cancels the page's side padding). */
@media (max-width: 768px) {
	.tui-classic-page .tui-reports {
		margin-left: -1em;
		margin-right: -1em;
	}
}

/* Classic mobile: the profile, membership and education pages run edge to edge too. */
@media (max-width: 768px) {
	.tui-classic-page[data-content-type="profile"] .tui-classic-profile-body,
	.tui-classic-page[data-content-type="membership"] .tui-classic-profile-body,
	.tui-classic-page[data-content-type="education"] .tui-classic-profile-body {
		margin-left: -1em;
		margin-right: -1em;
	}
}

/* Classic: the Saved tabs (and the member submission form's Project/News/Event tabs) match the Archives ones, flush with the page frame instead of inset by the page's padding.
   Wide: a full-width strip with a line under it. Under 768px: a bordered-cell grid (no top/left border, the last
   cell's right border sits on the frame's own). */
.tui-classic-page .tui-saved-tabs,
.tui-classic-page .tui-submit > .tui-event-filters {
	width: auto;
	max-width: none; /* the shared tab strip rule caps it at 100% of the padded box, which would stop it reaching the frame */
	margin: -1em calc(-1em - 1px) 1em -1em;
	border: none;
	border-bottom: 1px solid var(--linecolor);
}

@media (max-width: 767px) {
	.tui-classic-page .tui-saved-tabs,
	.tui-classic-page .tui-submit > .tui-event-filters {
		border-bottom: none;
	}
}

/* Desktop: a line after the last tab of the member submission form's tabs (Event), the Saved tabs (Tools) and the Archives browser's (Relationships). */
@media (min-width: 768px) {
	.tui-classic-page .tui-submit > .tui-event-filters .tui-event-filter-btn:last-child,
	.tui-classic-page .tui-saved-tabs .tui-saved-tab-btn:last-child,
	.tui-classic-page .tui-archives .can-top-tab:last-child {
		border-right: 1px solid var(--linecolor);
	}
}

/* Classic mobile: the Activity Introduction page runs edge to edge (cancels the page's side padding). */
@media (max-width: 768px) {
	.tui-classic-page .tui-activity-intro-classic {
		margin-left: -1em;
		margin-right: -1em;
	}
}

/* Classic mobile Archives: the placeholder ("Select a term…") gets 1em top and bottom padding and stretches down to the bottom of the
   screen. Each level from <main> down to .can-content grows into the space left under the tabs and list. */
@media (max-width: 768px) {
	.site-main:has(.tui-archives) {
		display: flex;
		flex-direction: column;
	}

	.site-main:has(.tui-archives) > :has(.tui-archives),
	.tui-classic-page .tui-archives,
	.tui-classic-page .tui-archives .can-taxonomy-browser,
	.tui-classic-page .tui-archives .can-layout,
	.tui-classic-page .tui-archives .can-content {
		display: flex;
		flex-direction: column;
		flex: 1 1 auto;
	}

	.tui-classic-page .tui-archives .can-placeholder {
		flex: 1 1 auto;
		padding: 1em 0;
		box-sizing: border-box;
	}
}

/* Classic mobile Archives: the content area gets its left inset back (the stacked layout removes it). */
@media (max-width: 768px) {
	.tui-classic-page .can-taxonomy-browser .can-content {
		padding-left: 1em;
	}
}

/* NFT thumbnails (inc/thumbnail.php): hidden until an image has actually loaded, so a gateway that fails on the way
   (the next one is tried automatically) doesn't flash a broken image, with a small "loading…" label top left of the
   thumbnail's box meanwhile. :where() keeps these at zero specificity, so they never override a wrapper's own rules. */
.tui-nft-img {
	transition: opacity 0.2s ease;
}

.tui-nft-img:not(.is-loaded) {
	opacity: 0;
}

:where(:has(> .tui-nft-img:not(.is-loaded))) {
	position: relative;
}

:where(:has(> .tui-nft-img:not(.is-loaded)))::after {
	content: "loading.";
	position: absolute;
	top: 0;
	left: 0;
	padding: 4px 6px;
	font-size: 0.80em;
	color: var(--bodycolor);
	pointer-events: none;
	animation: tui-loading-dots 1.2s steps(1) infinite;
}

@keyframes tui-loading-dots {
	0% {
		content: "loading.";
	}
	33% {
		content: "loading..";
	}
	66% {
		content: "loading...";
	}
}

/* Classic mode: space under the Featured panel. */
.tui-classic-page .tui-featured-panel {
	padding-bottom: 1em;
}

/* The welcome titlebar sits directly above the next section's titlebar, which has its own top border. */
.tui-welcome-titlebar {
	border-bottom: none;
}

/* Classic archive/listing pages (category, tag, People, Tools, …): the titlebar gets left/right lines like the listing
   under it. The Activity section (one .tui-activity-section wrapper, inc/window-handlers/listing.php) has left, right
   and bottom lines of its own, and its parts sit flush inside it (edge to edge on mobile, as the listing does). */
body.archive .tui-classic-page > .tui-classic-titlebar {
	border-left: 1px solid var(--linecolor);
	border-right: 1px solid var(--linecolor);
}

.tui-classic-page .tui-activity-section {
	border-left: 1px solid var(--linecolor);
	border-right: 1px solid var(--linecolor);
	border-bottom: 1px solid var(--linecolor);
}

.tui-classic-page .tui-activity-section > .tui-window-section-title,
.tui-classic-page .tui-activity-section > .can-activity-log-feed,
.tui-classic-page .tui-activity-section > .tui-activity-comment-wrap {
	margin-left: 0;
	margin-right: 0;
}

@media (max-width: 768px) {
	.tui-classic-page .tui-activity-section {
		margin-left: -1em;
		margin-right: -1em;
	}
}

/* A single's Activity section has no bottom line. */
.single .tui-classic-page .tui-activity-section {
	border-bottom: none;
}

/* As the page's last child, the page's own bottom line (.tui-classic-page) already closes it. */
.tui-classic-page > .tui-activity-section:last-child {
	border-bottom: none;
}

/* Load more, classic mobile, on every listing page (category, tag, People, Tools, Saved, …), not just the front page and the
   Jobs archive: edge to edge like the listing above it. An explicit calc() width, as above — a button doesn't stretch itself. */
@media (max-width: 768px) {
	.tui-classic-page .tui-load-more {
		width: calc(100% + 2em);
		margin-left: -1em;
		margin-right: -1em;
		border-left: 1px solid var(--linecolor);
		border-right: 1px solid var(--linecolor);
	}
}

/* Classic mobile: only the first card spans 2 columns; every 8th is a normal card. */
@media (max-width: 768px) {
	.home .tui-classic-page .tui-listing--grid[data-listing-type="latest"] > .tui-grid-card:nth-child(8n),
	.home .tui-classic-page .tui-listing--grid[data-listing-type="archives"] > .tui-grid-card:nth-child(8n) {
		grid-column: auto;
	}
}

/* Classic Profile, Membership and Education pages: left and right lines, like the other framed classic pages (on the body, which runs edge to edge on mobile). */
.tui-classic-page[data-content-type="profile"] .tui-classic-profile-body,
.tui-classic-page[data-content-type="membership"] .tui-classic-profile-body,
.tui-classic-page[data-content-type="education"] .tui-classic-profile-body {
	border-left: 1px solid var(--linecolor);
	border-right: 1px solid var(--linecolor);
}

/* Classic Reports page: left and right lines too. */
.tui-classic-page .tui-reports {
	border-left: 1px solid var(--linecolor);
	border-right: 1px solid var(--linecolor);
}

/* Classic Admin page: left and right lines too. */
.tui-classic-page .tui-admin {
	border-left: 1px solid var(--linecolor);
	border-right: 1px solid var(--linecolor);
}

/* Classic 404 page: left and right lines too (and, as on the other framed pages, edge to edge on mobile). */
.tui-classic-page .tui-not-found {
	border-left: 1px solid var(--linecolor);
	border-right: 1px solid var(--linecolor);
}

@media (max-width: 768px) {
	.tui-classic-page .tui-not-found {
		margin-left: -1em;
		margin-right: -1em;
	}
}

/* Classic Version History page: left and right lines like the other framed classic pages. */
.tui-classic-page .tui-changelog {
	border-left: 1px solid var(--linecolor);
	border-right: 1px solid var(--linecolor);
}

@media (max-width: 768px) {
	.tui-classic-page .tui-changelog {
		/* The changelog's text is 0.80em, so a plain 1em here would be 20% short of the page's own 1em (a gap at each edge): size
		   these from the base font size instead. */
		margin-left: calc(var(--tui-font-size) * -1);
		margin-right: calc(var(--tui-font-size) * -1);
		padding-left: var(--tui-font-size);
		padding-right: var(--tui-font-size);
	}
}

/* Project articles: an expandable header. A button sits to the left of the title and date, and opens a panel under them
   (template-parts/post/content.php, assets/js/main.js). For now the panel is just a dashed separator. */
.tui-project-header {
	display: grid;
	grid-template-columns: auto 1fr;
	column-gap: 0.75em;
	align-items: start;
}

.tui-project-toggle {
	appearance: none;
	background: none;
	border: none;
	align-self: start; /* on the title's first line, however many lines the title takes */
	display: flex;
	align-items: center;
	height: 1lh; /* one line of the title (same font size as .entry-title), so the arrow is centred on it */
	font-size: 1.05em;
	padding: 0;
	color: var(--midcolor);
	line-height: inherit;
	cursor: pointer;
}

.tui-project-toggle:hover,
.tui-project-toggle:focus-visible {
	color: var(--darkcolor);
	outline: none;
}

.tui-project-toggle .icon {
	width: 1.2em;
	height: 1.2em;
}

/* The text arrows (▶ closed, ▼ open), in the box the icons had. */
.tui-project-toggle-glyph {
	position: relative;
	top: 8px; /* lower, to sit on the middle of the title's first line */
	display: inline-block;
	width: 1.2em;
	text-align: center;
	font-size: 0.8em;
}

.tui-project-toggle .tui-project-toggle-collapse,
.tui-project-toggle[aria-expanded="true"] .tui-project-toggle-expand {
	display: none;
}

.tui-project-toggle[aria-expanded="true"] .tui-project-toggle-collapse {
	display: inline-block;
}

.tui-project-header-main {
	min-width: 0;
}

/* In a grid the date line's own bottom margin no longer merges with the header's (as it does in a normal block), so it
   added a second gap: the header's own bottom margin is the one that stays. */
.tui-project-header-main .entry-meta {
	margin-bottom: 0;
}

.tui-project-panel {
	grid-column: 1 / -1;
	margin-top: 0.5em;
	border-top: 1px dashed var(--linecolor);
}

.tui-project-panel[hidden] {
	display: none;
}

/* Opening the panel: each column fades in, one after the other (the animation runs each time the panel stops being display: none). */
@keyframes tui-project-panel-fade {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

.tui-project-panel:not([hidden]) .tui-project-panel-grid > * {
	animation: tui-project-panel-fade 0.45s ease both;
}

.tui-project-panel:not([hidden]) .tui-project-panel-grid > :nth-child(2) {
	animation-delay: 0.12s;
}

.tui-project-panel:not([hidden]) .tui-project-panel-grid > :nth-child(3) {
	animation-delay: 0.24s;
}

.tui-project-panel:not([hidden]) .tui-project-panel-grid > :nth-child(4) {
	animation-delay: 0.36s;
}

.tui-project-panel:not([hidden]) .tui-project-panel-grid > :nth-child(n+5) {
	animation-delay: 0.48s;
}

@media (prefers-reduced-motion: reduce) {
	.tui-project-panel:not([hidden]) .tui-project-panel-grid > * {
		animation: none;
	}
}

/* Classic: the title is centred, so the button gets a column of its own at the left edge, matched by an empty one at the
   right, which keeps the title centred. The button is centred on the title's first line. */
.tui-classic-page .tui-project-header {
	grid-template-columns: 2em 1fr 2em;
}

.tui-classic-page .tui-project-toggle {
	justify-self: start;
}

/* Classic desktop: the title and date line up with the article content, and the button hangs outside to the left of that
   alignment (a zero-width first column, with the button pulled out of it). */
@media (min-width: 1000px) {
	.tui-classic-page .tui-project-header {
		grid-template-columns: 0 1fr;
		column-gap: 0;
	}

	.tui-classic-page .tui-project-toggle {
		margin-left: -2em;
	}
}

/* The project panel's columns (can_v7_render_project_panel()): Author, Category, People, Tools — each a small label over a list
   of links with their counts. As many columns per row as fit; tidy at any width. */
.tui-project-panel-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(10em, 1fr));
	gap: 1em 1.5em;
	padding: 1em 0 0.5em;
}

.tui-project-panel-col {
	min-width: 0;
}

/* Classic mobile: two columns of different heights left the right one nearly empty. Here the sections (the side column's too) flow
   through two balanced columns instead, each kept whole; a wide People list spans both. */
@media (max-width: 768px) {
	.tui-classic-page .tui-project-panel-grid {
		display: block;
		column-count: 2;
		column-gap: 1.5em;
		column-rule: 1px dashed var(--linecolor);
	}

	.tui-classic-page .tui-project-panel-grid > * + * {
		margin-left: 0;
		padding-left: 0;
		border-left: 0;
	}

	.tui-classic-page .tui-project-panel-grid > *,
	.tui-classic-page .tui-project-panel-side > * {
		break-inside: avoid;
		margin-bottom: 1em;
	}

	.tui-classic-page .tui-project-panel-side:has(*) {
		display: contents;
	}

	.tui-classic-page .tui-project-panel-col--wide {
		column-span: all;
	}
}

/* The side column (Tools, Category, Topic, Activity) when none of those apply, as on a book: nothing to show, so no empty column or line. */
.tui-project-panel-side:not(:has(*)) {
	display: none;
}

/* A dashed line between the columns, in the middle of the gap: each column after the first pulls half the gap (0.75em of the
   1.5em) to its left and pads it back. A column that wraps onto a new row keeps its line at the edge. */
.tui-project-panel-grid > * + * {
	margin-left: -0.75em;
	padding-left: 0.75em;
	border-left: 1px dashed var(--linecolor);
}

.tui-project-panel-label {
	display: block;
	margin-bottom: 0.4em;
	color: var(--midcolor);
	font-size: 0.80em;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.tui-project-panel-list {
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 0.80em;
}

.tui-project-panel-list li {
	margin: 0 0 0.3em;
	overflow-wrap: anywhere;
}

/* The Activity channels, #one, #two on a line like the lists beside them. */
.tui-project-panel-channels {
	font-size: 0.80em;
	overflow-wrap: anywhere;
}

/* The Timeline section (inc/visualiser-timeline.php): the Monitor's sparkline characters, one per year. */
.tui-timeline {
	display: block;
	width: 100%;
	font-family: var(--tui-mono-font);
	font-size: 0.80em;
}

.tui-timeline-bars {
	display: flex;
	white-space: pre;
	line-height: 1.2;
}

.tui-timeline-bar {
	flex: 1 1 0;
	text-align: center;
	color: var(--bodycolor);
}

/* In a listing's intro (the term archives) it doesn't need the whole window's width. */
/* In a term listing's intro the timeline is one cell of a grid with the same columns as the listing's grid below it
   (.tui-listing--grid), so it is as wide as one card and follows the same breakpoints. */
.tui-listing-timeline {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(calc(var(--tui-font-size) * 18.333), 1fr));
	gap: 1em;
	margin-top: 1em;
}

@media (max-width: 500px) {
	.tui-listing-timeline {
		grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	}
}

a.tui-timeline-bar {
	text-decoration: none;
}

/* A bar's tooltip is wider than the standard 200px, so a title fits in a line or two. */
.tui-timeline-tip {
	max-width: 320px;
}

/* One article per line in a bar's tooltip. */
.tui-timeline-tip-row {
	display: block;
}

.tui-timeline-bar.is-empty {
	opacity: 0.5;
}

.tui-timeline-bar.is-current {
	color: var(--darkcolor);
}

.tui-timeline-bar.is-joined {
	color: var(--midcolor);
}

.tui-timeline-axis {
	display: flex;
	justify-content: space-between;
	margin-top: 0.25em;
	color: var(--midcolor);
}

.tui-project-panel-count {
	color: var(--midcolor);
}

/* A person's other projects, quieter than the person's name. */
.tui-project-panel-sublist {
	list-style: none;
	margin: 0.2em 0 0.4em;
	padding: 0;
}

.tui-project-panel-sublist a {
	color: var(--midcolor);
}

.tui-project-panel-sublist a:hover,
.tui-project-panel-sublist a:focus {
	color: var(--darkcolor);
}

/* The other projects under a person: a small square image beside the title, with the date and author on a second line. */
.tui-project-panel-sublist li {
	display: flex;
	align-items: flex-start;
	gap: 0.6em;
	margin: 0 0 0.5em;
}

.tui-project-panel-thumb {
	flex: 0 0 3.5em;
	width: 3.5em;
	aspect-ratio: 1;
	overflow: hidden;
	background: var(--shadecolor);
}

.tui-project-panel-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tui-project-panel-text {
	min-width: 0;
}

.tui-project-panel-meta {
	color: var(--midcolor);
	font-size: 0.90em;
}

.tui-project-panel-meta a {
	color: var(--midcolor);
}

.tui-project-panel-meta a:hover,
.tui-project-panel-meta a:focus {
	color: var(--darkcolor);
}

/* The related projects' titles in the panel: body colour (the date and author line under them stays muted). */
.tui-project-panel-sublist .tui-project-panel-title {
	color: var(--bodycolor);
}

/* Classic: the header's text is centred, but the panel's columns stay left-aligned, as in windows. */
.tui-classic-page .tui-project-panel {
	text-align: left;
}

/* A project with many people: the People column spans two of the panel's columns, and its list is split across two. A person
   (with their other projects) is never split between them. On a panel too narrow for two columns it takes the full width. */
.tui-project-panel {
	container-type: inline-size;
}

.tui-project-panel-col--wide {
	grid-column: span 2;
}

.tui-project-panel-col--wide > .tui-project-panel-list {
	column-count: 2;
	column-gap: 1.5em;
}

.tui-project-panel-col--wide > .tui-project-panel-list > li {
	break-inside: avoid;
}

/* The Timeline under the People list in the first column. */
.tui-project-panel-col > .tui-project-panel-timeline {
	margin-top: 1.5em;
}

/* Tools, Category and Collaborators stacked in the one column beside a long People list (can_v7_render_project_panel()). */
.tui-project-panel-side {
	display: flex;
	flex-direction: column;
	gap: 1em;
	min-width: 0;
}

@container (max-width: 22em) {
	.tui-project-panel-col--wide {
		grid-column: 1 / -1;
	}

	.tui-project-panel-col--wide > .tui-project-panel-list {
		column-count: 1;
	}
}

/* Classic mobile: the title is left-aligned there, so the empty right-hand column that keeps a centred title centred (above)
   isn't needed — and it pushed the Saved and Edit buttons 2em in from the right edge. */
@media (max-width: 768px) {
	.tui-classic-page .tui-project-header {
		grid-template-columns: auto 1fr;
	}
}

/* Classic mobile: windows (Search, Login, …) always open in the middle of the screen. Their starting position comes from
   where the header is, and the classic page scrolls — so it could land off screen. Minimised (docked) windows and widgets
   keep their own placement. */
@media (max-width: 768px) {
	html[data-classic-nav="1"] .tui-window:not(.is-minimized):not(.tui-window--widget):not(.tui-window--moved) {
		left: 50% !important;
		right: auto !important;
		top: 50% !important;
		transform: translate(-50%, -50%);
	}

	/* Windows open at most 90vw wide. */
	html[data-classic-nav="1"] .tui-window:not(.is-minimized):not(.tui-window--widget) {
		max-width: 90vw;
	}
}

/* Classic desktop: only the Login window opens in the middle of the screen (until it is dragged, see tui-window.js). */
html[data-classic-nav="1"] .tui-window[data-content-type="login"]:not(.is-minimized):not(.tui-window--moved) {
	left: 50% !important;
	right: auto !important;
	top: 50% !important;
	transform: translate(-50%, -50%);
}

/* Mobile: anchored from the top in svh (the smallest viewport height) instead of centred, so Safari hiding its address bar
   doesn't make the window jump. */
@media (max-width: 768px) {
	html[data-classic-nav="1"] .tui-window[data-content-type="login"]:not(.is-minimized):not(.tui-window--moved) {
		top: calc(30svh - 1px) !important;
		transform: translateX(-50%);
		max-width: calc(100vw - 2em);
	}

	.tui-window[data-content-type="login"] .tui-window-body {
		max-height: calc(100svh - 30svh - 24px);
	}
}

/* Classic desktop: the NFT embeds (.nft* blocks) span exactly the page frame — which is itself 1em in from the screen edge —
   instead of bleeding 1em past it. On mobile they keep the edge-to-edge treatment above. */
@media (min-width: 769px) {
	.tui-classic-page .entry-content > .nftiframe,
	.tui-classic-page .entry-content > .nftimage,
	.tui-classic-page .entry-content > .nftvideo,
	.tui-classic-page .entry-content > .nftiframeratio1x1,
	.tui-classic-page .entry-content > .nftiframeratio4x3,
	.tui-classic-page .entry-content > .nftiframeratio16x9 {
		width: min(100%, 1600px); /* the page frame's width, but no wider than 1600px (centred, see above) */
		margin-left: 0;
		margin-right: 0;
	}
}

/* Login window: two equal columns — the Activity stream animation on the left, the form on the right. The animation
   takes the height of the form (its stream is out of flow), and goes away when the window is narrow. */
.tui-login-split {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2em; /* 1em each side of the line */
}

.tui-login-split .tui-activity-intro-animation {
	min-height: 0;
	font-size: 0.80em;
	/* No fade at either end. */
	-webkit-mask-image: none;
	mask-image: none;
}

/* The vertical line between the two columns (in the middle of the 2em gap). */
.tui-login-split {
	position: relative;
}

.tui-login-split::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: calc(50% - 0.5px);
	width: 0;
	border-left: 1px dashed var(--linecolor);
}

.tui-window--narrow-640 .tui-login-split::before {
	display: none;
}

.tui-window--narrow-640 .tui-login-split {
	grid-template-columns: 1fr;
}

.tui-window--narrow-640 .tui-login-split .tui-activity-intro-animation {
	display: none;
}

@media (max-width: 768px) {
	.tui-login-split {
		grid-template-columns: 1fr;
	}

	.tui-login-split .tui-activity-intro-animation {
		display: none;
	}

	.tui-login-split::before {
		display: none;
	}
}

.tui-login .tui-login-welcome {
	color: var(--linkcolor);
	font-size: 1.5em;
	margin-top: 0;
}

/* Search box before a search has been run (.tui-window--compact): just the input — no titlebar — on a solid background.
   Escape closes it (main.js). */
.tui-window--compact[data-content-type="search"] {
	background: var(--backgroundcolor);
}

/* The titlebar shrinks to a small close button and a dotted drag grip at the right end of the input row. */
.tui-window--compact[data-content-type="search"] .tui-window-titlebar {
	position: absolute;
	top: 0;
	right: 0;
	/* The height of the input row only, so the buttons stay beside it when quick results make the box taller. */
	height: var(--tui-search-row, calc(24px + 1.6em));
	z-index: 1;
	padding: 0 0.75em;
	gap: 0.75em;
	border-bottom: 0;
	background: transparent;
}

.tui-window--compact[data-content-type="search"] .tui-window-title,
.tui-window--compact[data-content-type="search"] .tui-window-btn:not(.tui-window-btn-close) {
	display: none;
}

.tui-window--compact[data-content-type="search"] .tui-window-btn-close {
	color: var(--bodycolor);
	opacity: 0.5;
}

.tui-window--compact[data-content-type="search"] .tui-window-btn-close:hover {
	color: var(--darkcolor);
	opacity: 1;
}

/* The grip: 2 x 3 dots; the titlebar itself is the drag handle. */
.tui-window--compact[data-content-type="search"] .tui-window-titlebar::after {
	content: "";
	flex: none;
	width: 12px;
	height: 18px;
	opacity: 0.5;
	background: radial-gradient(circle, var(--bodycolor) 1.3px, transparent 1.6px) 0 0 / 6px 6px;
}

/* Room for them, so typed words never run under the buttons. */
.tui-window--compact[data-content-type="search"] .tui-search-bar {
	padding-right: 5.5em;
}

.tui-window--compact[data-content-type="search"] .tui-search-bar {
	background: transparent;
}

.tui-window--compact[data-content-type="search"] .tui-search-bar:focus-within {
	background: color-mix(in srgb, var(--shadecolor) 50%, var(--backgroundcolor));
}

/* The search icon before the input: only in the input-only box. */
.tui-search-bar-icon {
	display: none;
}

.tui-window--compact[data-content-type="search"] .tui-search-bar-icon {
	display: block;
	flex: none;
	width: 1.3em;
	height: 1.3em;
	color: var(--midcolor);
}

/* Login window (signed out): the form column, left-aligned. */
.tui-login--signin {
	text-align: left;
}

.tui-login--signin .login-remember label,
.tui-login--reset .login-remember label {
	justify-content: flex-start;
}

.tui-login--signin input[type="text"],
.tui-login--reset input[type="text"],
.tui-login--signin input[type="password"],
.tui-login--reset input[type="password"] {
	display: block;
	width: 260px;
	max-width: 100%;
	margin: 0;
}

/* The Password Reset view in the Login window: its title is the sign-in view's welcome line, the form fields and the
   button follow the sign-in form (rules above and below), each on its own line. */
.tui-login-reset h2 {
	margin: 0 0 0.5em;
	color: var(--linkcolor);
	font-size: 1.5em;
}

.tui-login-reset p {
	color: var(--bodycolor);
}

.tui-login-reset .swpm-pw-reset-email,
.tui-login-reset .swpm-pw-reset-email-input,
.tui-login-reset .swpm-pw-reset-submit-button {
	display: block;
	margin: 0 0 14px;
}

.tui-login-reset .swpm-pw-reset-widget-form {
	margin-top: 1.5em;
}

.tui-login-reset .swpm-pw-reset-submit-button input[type="submit"] {
	margin-top: 0.5em;
}

/* The same form on the Password Reset page itself (and anywhere else the shortcode is used): fields and button as in the
   Login window. */
.swpm-pw-reset-widget-form label {
	display: block;
	margin-bottom: 6px;
	color: var(--midcolor);
	font-size: 0.80em;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.swpm-pw-reset-widget-form input[type="text"] {
	display: block;
	box-sizing: border-box;
	width: 260px;
	max-width: 100%;
	margin: 0;
	padding: 6px 8px;
	background: transparent;
	border: 1px solid var(--linecolor);
	border-radius: 0;
	color: var(--bodycolor);
	font-family: var(--tui-font);
	font-size: 1em;
	transition: border-color 0.4s ease, background-color 0.4s ease;
}

.swpm-pw-reset-widget-form input[type="text"]:hover {
	border-color: var(--bodycolor);
}

.swpm-pw-reset-widget-form input[type="text"]:focus {
	background: color-mix(in srgb, var(--shadecolor) 50%, transparent);
	outline: none;
}

.swpm-pw-reset-widget-form input[type="submit"] {
	appearance: none;
	box-sizing: border-box;
	padding: 6px 16px;
	background: var(--linkcolor);
	border: 1px solid var(--linkcolor);
	border-radius: 0;
	color: var(--backgroundcolor);
	font-family: var(--tui-font);
	font-size: 0.9em;
	line-height: normal;
	cursor: pointer;
}

.swpm-pw-reset-widget-form input[type="submit"]:hover,
.swpm-pw-reset-widget-form input[type="submit"]:focus {
	opacity: 0.85;
	outline: none;
}

.swpm-pw-reset-widget-form input[type="submit"]:active {
	opacity: 0.7;
	transform: translateY(1px);
}

/* Login window (signed out): no titlebar, a solid background (no transparency, no blur), with just the minimise button in
   the top right corner. */
body:not(.logged-in) .tui-window[data-content-type="login"]:not(.is-minimized) {
	background: var(--backgroundcolor);
}

body:not(.logged-in) .tui-window[data-content-type="login"]:not(.is-minimized) .tui-window-titlebar {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 1;
	padding: 0.5em 0.75em;
	border-bottom: 0;
	background: transparent;
}

body:not(.logged-in) .tui-window[data-content-type="login"]:not(.is-minimized) .tui-window-title,
body:not(.logged-in) .tui-window[data-content-type="login"]:not(.is-minimized) .tui-window-btn:not(.tui-window-btn-minimize) {
	display: none;
}

/* ...and its fields see-through too. */
body:not(.logged-in) .tui-login--signin input[type="text"],
body:not(.logged-in) .tui-login--reset input[type="text"],
body:not(.logged-in) .tui-login--signin input[type="password"],
body:not(.logged-in) .tui-login--reset input[type="password"] {
	background: transparent;
}

body:not(.logged-in) .tui-login--signin input[type="text"]:focus,
body:not(.logged-in) .tui-login--reset input[type="text"]:focus,
body:not(.logged-in) .tui-login--signin input[type="password"]:focus,
body:not(.logged-in) .tui-login--reset input[type="password"]:focus {
	background: color-mix(in srgb, var(--shadecolor) 50%, transparent);
}

/* The Remember Me checkbox too, until it's ticked. */
body:not(.logged-in) .tui-login--signin .login-remember input[type="checkbox"]:not(:checked),
body:not(.logged-in) .tui-login--reset .login-remember input[type="checkbox"]:not(:checked) {
	background: transparent;
}

/* Login window (signed out), minimised: its titlebar pulses to --shadecolor and back, so it is noticed. */
@keyframes tui-login-titlebar-pulse {
	0%, 100% { background-color: var(--backgroundcolor); }
	50% { background-color: var(--shadecolor); }
}

body:not(.logged-in) .tui-window[data-content-type="login"].is-minimized .tui-window-titlebar {
	animation: tui-login-titlebar-pulse 2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
	body:not(.logged-in) .tui-window[data-content-type="login"].is-minimized .tui-window-titlebar {
		animation: none;
	}
}

/* Login window on load: the feed fades in, then each element of the form column fades in one after the other. */
.tui-window[data-content-type="login"]:not(.is-minimized) {
	animation: tui-login-fade-in 0.5s ease backwards;
}

@media (prefers-reduced-motion: reduce) {
	.tui-window[data-content-type="login"]:not(.is-minimized) {
		animation: none;
	}
}

@keyframes tui-login-fade-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

.tui-login-split .tui-activity-intro-animation {
	animation: tui-login-fade-in 0.8s ease backwards;
}

.tui-login--signin > .tui-login-intro,
.tui-login--signin > form > p,
.tui-login--signin > .tui-login-links {
	animation: tui-login-fade-in 0.5s ease backwards;
}

.tui-login--signin > .tui-login-intro {
	animation-delay: 0.8s;
}

.tui-login--signin > form > p:nth-child(1) {
	animation-delay: 1s;
}

.tui-login--signin > form > p:nth-child(2) {
	animation-delay: 1.2s;
}

.tui-login--signin > form > p:nth-child(3) {
	animation-delay: 1.4s;
}

.tui-login--signin > form > p:nth-child(4) {
	animation-delay: 1.6s;
}

.tui-login--signin > .tui-login-links {
	animation-delay: 1.8s;
}

@media (prefers-reduced-motion: reduce) {
	.tui-login-split .tui-activity-intro-animation,
	.tui-login--signin > .tui-login-intro,
	.tui-login--signin > form > p,
	.tui-login--signin > .tui-login-links {
		animation: none;
	}
}

/* Login window: the Sign In and Register buttons are solid (--linkcolor). */
body:not(.logged-in) .tui-login--signin input[type="submit"],
body:not(.logged-in) .tui-login--reset input[type="submit"],
body:not(.logged-in) .tui-login--signin input[type="submit"]:hover,
body:not(.logged-in) .tui-login--reset input[type="submit"]:hover,
body:not(.logged-in) .tui-login--signin input[type="submit"]:focus,
body:not(.logged-in) .tui-login--reset input[type="submit"]:focus,
body:not(.logged-in) .tui-login--signin .tui-login-register,
body:not(.logged-in) .tui-login--reset .tui-login-register,
body:not(.logged-in) .tui-login--signin .tui-login-register:hover,
body:not(.logged-in) .tui-login--reset .tui-login-register:hover,
body:not(.logged-in) .tui-login--signin .tui-login-register:focus,
body:not(.logged-in) .tui-login--reset .tui-login-register:focus {
	background: var(--linkcolor);
	border-color: var(--linkcolor);
	color: var(--backgroundcolor);
}

body:not(.logged-in) .tui-login--signin input[type="submit"]:hover,
body:not(.logged-in) .tui-login--reset input[type="submit"]:hover,
body:not(.logged-in) .tui-login--signin input[type="submit"]:focus,
body:not(.logged-in) .tui-login--reset input[type="submit"]:focus,
body:not(.logged-in) .tui-login--signin .tui-login-register:hover,
body:not(.logged-in) .tui-login--reset .tui-login-register:hover,
body:not(.logged-in) .tui-login--signin .tui-login-register:focus,
body:not(.logged-in) .tui-login--reset .tui-login-register:focus {
	opacity: 0.85;
}

/* Sign In (an input) and Register (a link) the same height: the link otherwise inherits the page's taller line-height. */
.tui-login input[type="submit"],
.tui-login .tui-login-register {
	box-sizing: border-box;
	line-height: normal;
	vertical-align: middle;
}

/* The Login window's feed: what is --darkcolor on the Introduction page is --linkcolor here. */
.tui-login-split .tui-ai-title {
	color: var(--linkcolor);
}

.tui-login-split .tui-ai-caret,
.tui-login-split .tui-typewriter-caret {
	background: var(--linkcolor);
}

@keyframes tui-login-ai-pulse {
	0% {
		transform: scale(1);
	}
	40% {
		transform: scale(1.8);
		color: var(--linkcolor);
	}
	100% {
		transform: scale(1);
	}
}

.tui-login-split .tui-ai-dap.is-pulsing {
	animation-name: tui-login-ai-pulse;
}

/* The Login window's feed as lines instead of text: each word group is drawn as a thin line as long as the text it
   would have been (so they still grow as they are typed, and wrap), the verb in --midcolor and the title in
   --linkcolor. The text itself is transparent. */
.tui-login-split .tui-ai-verb,
.tui-login-split .tui-ai-title {
	color: transparent;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 100% 2px;
}

.tui-login-split .tui-ai-verb {
	background-image: linear-gradient(var(--midcolor), var(--midcolor));
}

.tui-login-split .tui-ai-title {
	background-image: linear-gradient(var(--linkcolor), var(--linkcolor));
}

/* The Remember Me checkbox in --linkcolor as well. */
body:not(.logged-in) .tui-login--signin .login-remember input[type="checkbox"]:checked,
body:not(.logged-in) .tui-login--reset .login-remember input[type="checkbox"]:checked {
	background: var(--linkcolor);
	border-color: var(--linkcolor);
}

body:not(.logged-in) .tui-login--signin .login-remember input[type="checkbox"]:hover,
body:not(.logged-in) .tui-login--reset .login-remember input[type="checkbox"]:hover {
	border-color: var(--linkcolor);
}

body:not(.logged-in) .tui-login--signin .login-remember input[type="checkbox"]:focus-visible,
body:not(.logged-in) .tui-login--reset .login-remember input[type="checkbox"]:focus-visible {
	outline-color: var(--linkcolor);
}

/* The paragraph about CAN under the buttons. */
.tui-login .tui-login-about {
	margin: 1.5em 0 0;
	font-size: 0.80em;
	color: var(--bodycolor);
}

.tui-login--signin > .tui-login-about {
	animation: tui-login-fade-in 0.5s ease backwards;
	animation-delay: 1.8s;
}

.tui-login--signin > .tui-login-links {
	animation-delay: 2s;
}

/* Hidden wherever the animation is (narrow window, mobile). */
.tui-window--narrow-640 .tui-login--signin > .tui-login-about {
	display: none;
}

@media (max-width: 768px) {
	.tui-login--signin > .tui-login-links {
		margin-top: 1em;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tui-login--signin > .tui-login-about {
		animation: none;
	}
}

#section-data h2 {
	margin-top: 0;
}

/* Login Remember Me: a terminal-style box, ticked with a filled square instead of a check mark. */
body:not(.logged-in) .tui-login--signin .login-remember input[type="checkbox"]:checked,
body:not(.logged-in) .tui-login--reset .login-remember input[type="checkbox"]:checked {
	background: transparent;
	border-color: var(--linkcolor);
}

body:not(.logged-in) .tui-login--signin .login-remember input[type="checkbox"]:checked::after,
body:not(.logged-in) .tui-login--reset .login-remember input[type="checkbox"]:checked::after {
	left: 3px;
	top: 3px;
	width: 6px;
	height: 6px;
	border: none;
	background: var(--linkcolor);
	transform: none;
}

/* Login fields: the border turns --linkcolor on hover (eased, so it doesn't snap or flicker over the blurred window). */
.tui-login input[type="text"],
.tui-login input[type="password"] {
	transition: border-color 0.4s ease, background-color 0.4s ease;
}

.tui-login input[type="text"]:hover,
.tui-login input[type="password"]:hover {
	border-color: var(--linkcolor);
}

/* Login buttons: a firmer feel — a stronger hover, and a press that sinks and dims. */
body:not(.logged-in) .tui-login--signin input[type="submit"],
body:not(.logged-in) .tui-login--reset input[type="submit"],
body:not(.logged-in) .tui-login--signin .tui-login-register,
body:not(.logged-in) .tui-login--reset .tui-login-register {
	cursor: pointer;
	transition: opacity 0.12s ease, transform 0.08s ease;
}

body:not(.logged-in) .tui-login--signin input[type="submit"]:hover,
body:not(.logged-in) .tui-login--reset input[type="submit"]:hover,
body:not(.logged-in) .tui-login--signin .tui-login-register:hover,
body:not(.logged-in) .tui-login--reset .tui-login-register:hover {
	opacity: 0.7;
}

body:not(.logged-in) .tui-login--signin input[type="submit"]:active,
body:not(.logged-in) .tui-login--reset input[type="submit"]:active,
body:not(.logged-in) .tui-login--signin .tui-login-register:active,
body:not(.logged-in) .tui-login--reset .tui-login-register:active {
	opacity: 0.55;
	transform: translateY(1px) scale(0.98);
}

/* Funding bar (inc/funding_bar.php): big percentage and counts on the left, the bar and its marker on the right. */
.can-funding-bar {
	padding-top: 1em;
	display: flex;
	flex-wrap: wrap;
	gap: 1em 2em;
	align-items: flex-start;
}

.can-funding-bar-figures {
	flex: 1 1 14em;
}

.can-funding-bar-graph {
	flex: 3 1 20em;
}

.can-funding-bar .can-funding-bar-percent {
	margin: 0 0 0.1em;
	font-size: 5em;
	line-height: 0.8; /* fallback: roughly trims the space above the digits */
	text-box: trim-both cap alphabetic; /* exact: the box starts at the top of the digits, so the bar's top lines up with them */
	color: var(--linkcolor);
}

.can-funding-bar .can-funding-bar-note {
	margin: 0 0 1em;
	font-size: 0.80em;
}

.can-funding-bar-track {
	height: 4em;
	background: var(--shadecolor);
	overflow: hidden;
}

.can-funding-bar-fill {
	height: 100%;
	background: var(--darkcolor);
	/* Fine diagonal hatching over the solid colour. */
	background-image: repeating-linear-gradient(135deg, color-mix(in srgb, var(--backgroundcolor) 35%, transparent) 0 1px, transparent 1px 5px);
}

.can-funding-bar-marker {
	margin-top: 2px;
}

.can-funding-bar-marker span {
	font-size: 0.80em;
}

/* Member map (inc/member-map.php, assets/js/member-map.js). */
.can-member-map {
	position: relative;
	width: 100%;
	margin: 1em 0;
}

.can-member-map-canvas {
	width: 100%;
	aspect-ratio: 5 / 3;
}

.can-member-map-canvas svg {
	display: block;
	width: 100%;
	height: 100%;
	cursor: move;
}

.can-member-map-overlay {
	position: absolute;
	inset: 0;
	z-index: 10;
	cursor: zoom-in;
}

.can-member-map-countries {
	fill: var(--midcolor);
	fill-opacity: 0.25;
	stroke: var(--midcolor);
	stroke-width: 0.5px;
}

.can-member-map-link {
	stroke: var(--darkcolor);
	stroke-width: 1px;
	stroke-dasharray: 4 3;
	opacity: 0.6;
	pointer-events: none;
}

.can-member-map-link-hit {
	stroke: transparent;
	stroke-width: 8px;
	pointer-events: stroke;
}

.can-member-map-dot {
	fill: var(--linkcolor);
	cursor: pointer;
}

/* On the Community page the dots take the member grid's colours (.tui-member-dot): body colour, mid for levels 5 and 6, shade for 10. */
.can-member-map-dot--graded {
	fill: var(--bodycolor);
}

.can-member-map-dot--level-5,
.can-member-map-dot--level-6 {
	fill: var(--midcolor);
}

.can-member-map-dot--level-10 {
	fill: var(--shadecolor);
}

/* The signed-in member's own dot: --darkcolor, with a ring around it. */
.can-member-map-dot.is-you,
.can-member-map-you-ring {
	fill: none;
	stroke: var(--darkcolor);
	stroke-width: 1px;
}

.can-member-map-dot.is-you {
	fill: var(--darkcolor);
	stroke: none;
}

.can-member-map-tooltip {
	position: absolute;
	z-index: 11;
	padding: 3px 8px;
	border-radius: var(--tui-window-radius);
	background: var(--bodycolor);
	color: var(--backgroundcolor);
	font-family: var(--tui-mono-font);
	font-size: calc(var(--tui-font-size) * 0.8);
	line-height: 1.3;
	white-space: normal;
	max-width: 200px;
	pointer-events: none;
}

/* Classic mode: square, like the other tooltips. */
.tui-classic-nav .can-member-map-tooltip {
	border-radius: 0;
}

.can-member-map-tooltip[hidden] {
	display: none;
}

/* Content blocks (pages/posts) given the class "border": 1em padding all round and a border. */
.entry-content .border {
	padding: 1em;
	border: 1px solid var(--linecolor);
}

/* Quick menu results under the input-only search box (main.js): pages from the menus that match what's typed. */
.tui-quick-results {
	margin: 0 -1em;
	border-top: 1px solid var(--linecolor);
}

.tui-quick-results[hidden] {
	display: none;
}

.tui-quick-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1em;
	padding: 0.5em 1em;
	color: var(--bodycolor);
	text-decoration: none;
	cursor: pointer;
}

.tui-quick-row.is-active {
	background: var(--shadecolor);
	box-shadow: inset 3px 0 0 var(--midcolor);
	color: var(--bodycolor);
}

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

.tui-quick-title {
	font-size: 1em;
	line-height: 1.3;
	color: var(--darkcolor);
}

.tui-quick-sub {
	font-size: 0.80em;
	color: var(--midcolor);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tui-quick-tag {
	flex: none;
	font-size: 0.80em;
	color: var(--linkcolor);
}

/* A setting's switch at the right of its quick result row, smaller than in the Settings window. */
.tui-quick-toggle {
	flex: none;
	font-size: 1.5em;
}

/* Page windows: the admin-only edit pencil in the top right corner of the content (template-parts/page/content.php). */
.tui-page-actions {
	position: relative;
	height: 0;
	z-index: 1;
}

.tui-page-actions .tui-entry-edit {
	position: absolute;
	top: 0;
	right: 0;
	font-size: 13.3333px;
	line-height: 1;
}

/* Classic mode: 1em in from the top and right edges of the page. */
.tui-classic-page .tui-page-actions .tui-entry-edit {
	top: 1em;
	right: 1em;
}

.tui-page-actions .tui-entry-edit-icon {
	width: 1em;
	height: 1em;
	vertical-align: baseline;
}

/* Events: .tui-events-full already draws the left and right lines, so its listing doesn't repeat them. */
.tui-classic-page .tui-events-full .tui-listing {
	border-left: none;
	border-right: none;
}

/* Events: Load more sits inside the frame, so no side lines of its own, and a bottom line instead. */
.tui-classic-page .tui-events-full .tui-load-more {
	border-left: none;
	border-right: none;
	border-bottom: 1px solid var(--linecolor);
}

@media (max-width: 768px) {
	.tui-classic-page .tui-events-full .tui-load-more {
		width: 100%;
		margin-left: 0;
		margin-right: 0;
	}
}

/* API docs, classic mobile: edge to edge with left/right lines, like the listings. */
@media (max-width: 768px) {
	.tui-classic-page > .tui-api-docs {
		margin-left: -1em;
		margin-right: -1em;
		border-left: 1px solid var(--linecolor);
		border-right: 1px solid var(--linecolor);
	}
}

/* API docs, classic desktop: the sidebar sits flush on the page's left, top, right and bottom lines. */
@media (min-width: 769px) {
	.tui-classic-page:has(> .tui-api-docs) > .tui-api-docs {
		padding-left: 0;
		padding-top: 0;
		padding-bottom: 0;
		padding-right: 0;
	}
}

/* API docs, classic and windowed: the main content has no right padding. */
.tui-classic-page .tui-api-docs .can-content,
.tui-window .tui-api-docs .can-content {
	padding-right: 0;
}

/* Signed-out front page: numbered newer/older links under Latest, in place of Load more. */
.tui-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 1em;
	padding: 1em;
	border-top: 1px solid var(--linecolor);
	background: var(--backgroundcolor);
}

.tui-pagination .is-disabled {
	opacity: 0.4;
}

.tui-pagination-current {
	color: var(--darkcolor);
}

.tui-classic-page .tui-pagination {
	border-left: 1px solid var(--linecolor);
	border-right: 1px solid var(--linecolor);
}

/* Thumbnails of articles whose link goes to the Redirect URL (can_v7_article_link_attrs()) are dimmed. */
a[data-redirected] img {
	opacity: 0.3;
}

.tui-pagination-total {
	color: var(--bodycolor);
}

/* Signed out: search is off. */
.tui-search-button[aria-disabled="true"] {
	opacity: 0.3;
}

/* News articles: the source URL under the content. */
.tui-news-url {
	margin: 1em 0 0;
	font-size: 1em;
}

.tui-news-url-icon {
	width: 0.9em;
	height: 0.9em;
	margin-right: 4px;
	vertical-align: -0.1em;
}

/* Search People/Tools/Tags rows: the post count stays on the name's own first line at the right (narrow screens wrap rows). */
.tui-search-results .tui-listing-row:has(> .tui-search-count) {
	flex-wrap: nowrap;
	align-items: flex-start;
}

.tui-search-results .tui-listing-row > .tui-search-count {
	align-self: flex-start;
}

/* The classic narrow list rules give .tui-col-name an order and a full-width basis; the count has neither, so it was
   jumping in front of the name. Name first and filling the row, count last at the right. */
.tui-search-results .tui-listing-row:has(> .tui-search-count) > .tui-col-name {
	order: 1;
	flex: 1 1 0;
	min-width: 0;
}

.tui-search-results .tui-listing-row > .tui-search-count {
	order: 2;
	margin-left: auto;
}

/* Classic search results: Load more gets a bottom line, and no left or right line. */
.tui-classic-page .tui-search-results .tui-load-more {
	border-bottom: 1px solid var(--linecolor);
	border-left: none;
	border-right: none;
}

/* Classic search results: the result lists have no left or right line. */
.tui-classic-page .tui-search-results .tui-listing {
	border-left: none;
	border-right: none;
}

/* Classic search results: no line between sections (it showed as a top border above each section title). */
.tui-classic-page .tui-search-results [data-search-section] {
	border-bottom: none;
}

/* Jobs: the last row before a Load more button has no bottom line (the button draws its own). */
.tui-listing:has(+ .tui-load-more) > .tui-job-row:last-child {
	border-bottom: none;
}

/* Search results, classic and windowed: a dashed line under each result, at every width (not under a section's last one). */
.tui-search-results .tui-listing-row:not(.tui-listing-head),
.tui-search-results .tui-job-row {
	border-bottom: 1px dashed var(--linecolor);
}

.tui-search-results .tui-listing-row:last-child,
.tui-search-results .tui-job-row:last-child {
	border-bottom: none;
}

/* Search Members rows: same as the People/Tools/Tags counts — name first and filling the row, level pill last at the right
   on the name's first line, and no wrapping onto its own line on narrow screens. */
.tui-search-results .tui-listing-row:has(> .tui-search-member-level) {
	flex-wrap: nowrap;
	align-items: flex-start;
}

.tui-search-results .tui-listing-row:has(> .tui-search-member-level) > .tui-col-name {
	order: 1;
	flex: 1 1 0;
	min-width: 0;
}

.tui-search-results .tui-listing-row > .tui-search-member-level {
	order: 2;
	margin-left: auto;
	align-self: flex-start;
}

/* Narrow search window: its own list-row rule (a solid line, higher specificity) otherwise beats the dashed lines above,
   including under a section's last result. */
.tui-window--narrow-768:not(.tui-window--mini) .tui-search-results .tui-listing--list .tui-listing-row:not(.tui-listing-head) {
	border-bottom: 1px dashed var(--linecolor);
}

.tui-window--narrow-768:not(.tui-window--mini) .tui-search-results .tui-listing--list .tui-listing-row:last-child {
	border-bottom: none;
}

/* Search results: whatever comes last in a section's list (any result type, any width, classic or windowed) has no line
   under it. !important because several row types and narrow-window rules draw their own lines at higher specificity. */
.tui-search-results .tui-listing > :last-child {
	border-bottom: none !important;
}

/* A note directly under a Settings button row sits close to it. */
.tui-settings-actions:has(+ .tui-settings-note) {
	margin-bottom: 8px;
}

/* Community page (page-templates/community.php). */
/* .entry-content is a centred grid (the reading column, with wide/full side tracks); here the text runs the full width. */
.tui-community-text {
	display: block;
}

/* The first block of columns has no space above it (columns have 1em of margin above, 2 specificity levels in classic). */
.tui-community-text > .wp-block-columns:first-child,
.tui-classic-page .tui-community-text > .wp-block-columns:first-child {
	margin-top: 0;
}

/* The sections fade in one after the other, top to bottom, for everyone (the text, the two rows of numbers, the member
   grid, featured members, the map, the join line). Whatever sections there happen to be: it goes by position. The
   signed-out Archives page reuses this wrapper but has its own sequence (further down), so it is left out here. */
.tui-community:not(:has(.can-stats--open)) > * {
	animation: tui-login-fade-in 0.6s ease backwards;
}

.tui-community:not(:has(.can-stats--open)) > :nth-child(2) {
	animation-delay: 0.3s;
}

.tui-community:not(:has(.can-stats--open)) > :nth-child(3) {
	animation-delay: 0.6s;
}

.tui-community:not(:has(.can-stats--open)) > :nth-child(4) {
	animation-delay: 0.9s;
}

.tui-community:not(:has(.can-stats--open)) > :nth-child(5) {
	animation-delay: 1.2s;
}

.tui-community:not(:has(.can-stats--open)) > :nth-child(6) {
	animation-delay: 1.5s;
}

.tui-community:not(:has(.can-stats--open)) > :nth-child(n + 7) {
	animation-delay: 1.8s;
}

@media (prefers-reduced-motion: reduce) {
	.tui-community:not(:has(.can-stats--open)) > * {
		animation: none;
	}
}

/* The Register page: its sections fade in one after the other, top to bottom, by position (the page's own content blocks,
   then the stats block). Scripts and styles inside it aren't shown, so they take no part. */
[data-register-page] > :not(script, style) {
	animation: tui-login-fade-in 0.6s ease backwards;
}

[data-register-page] > :not(script, style):nth-child(2) {
	animation-delay: 0.3s;
}

[data-register-page] > :not(script, style):nth-child(3) {
	animation-delay: 0.6s;
}

[data-register-page] > :not(script, style):nth-child(4) {
	animation-delay: 0.9s;
}

[data-register-page] > :not(script, style):nth-child(5) {
	animation-delay: 1.2s;
}

[data-register-page] > :not(script, style):nth-child(6) {
	animation-delay: 1.5s;
}

[data-register-page] > :not(script, style):nth-child(n + 7) {
	animation-delay: 1.8s;
}

@media (prefers-reduced-motion: reduce) {
	[data-register-page] > :not(script, style) {
		animation: none;
	}
}

/* The tenure row (5+ / 2+ / 1+ / under 1 years): four across, smaller numbers than the headline three. */
.tui-community-tenure {
	grid-template-columns: repeat(4, 1fr);
}

.tui-community-tenure .tui-activity-stat-number {
	font-size: 2em;
}

.tui-community-tenure .tui-activity-stat-label {
	font-size: 0.80em;
}

/* The Community page's member grid: a row per join year, one small square per member (page-templates/community.php). */
.tui-members-grid {
	margin-top: 1em;
	padding-top: 1em;
	border-top: 1px solid var(--linecolor);
}

.tui-members-grid-caption {
	display: block;
	margin-bottom: 1em;
	font-size: 0.80em;
}

.tui-members-year {
	display: flex;
	align-items: flex-start;
	gap: 1em;
	margin-bottom: 0.5em;
}

.tui-members-year-label {
	flex: 0 0 3.5em;
	color: var(--midcolor);
	font-size: 0.80em;
	line-height: 10px;
}

.tui-members-dots {
	display: flex;
	flex-wrap: wrap;
	gap: 2px;
	min-width: 0;
}

/* Fainter the longer since the member was on the site: longer ago 20%, this month 45%, this week 70%, today 100%. The fade is
   in the colour (--dot mixed with transparent), not the element's opacity — with ~1,700 dots, per-element opacity made the
   window slow to move. */
.tui-member-dot {
	--dot: var(--bodycolor);
	--seen: 20%;
	display: block;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: color-mix(in srgb, var(--dot) var(--seen), transparent);
}

.tui-member-dot--seen-1 {
	--seen: 45%;
}

.tui-member-dot--seen-2 {
	--seen: 70%;
}

.tui-member-dot--seen-3 {
	--seen: 100%;
}

/* Same level colours as CANV6's member chart. */
.tui-member-dot--level-5,
.tui-member-dot--level-6 {
	--dot: var(--midcolor);
}

.tui-member-dot--level-10 {
	--dot: var(--shadecolor);
}

.tui-member-dot:hover,
.tui-member-dot:focus {
	--dot: var(--darkcolor);
	--seen: 100%;
	outline: none;
}

.tui-member-dot.is-you {
	--dot: var(--darkcolor);
	--seen: 100%;
	/* A ring around it, not a border, so the 10px dot doesn't shrink. */
	outline: 1px solid var(--darkcolor);
	outline-offset: 1px;
}

/* Off-screen parts of the Community page aren't drawn until they scroll into view. */
.tui-members-grid,
.tui-members-featured {
	content-visibility: auto;
	contain-intrinsic-size: auto 400px;
}

/* Featured members on the Community page (inc/members-featured.php): round avatars in a fixed number of columns (--tui-featured-columns). */
.tui-members-featured {
	margin-top: 1em;
	padding-top: 1em;
	border-top: 1px solid var(--linecolor);
}

.tui-members-featured-caption {
	display: block;
	margin-bottom: 1em;
	font-size: 0.80em;
}

.tui-members-featured-list {
	display: grid;
	grid-template-columns: repeat(var(--tui-featured-columns, 12), minmax(0, 1fr));
	gap: 0.5em;
}

/* Fewer across on narrower screens and windows, so the circles stay a good size. */
@media (max-width: 768px) {
	.tui-members-featured-list {
		grid-template-columns: repeat(min(var(--tui-featured-columns, 12), 8), minmax(0, 1fr));
	}
}

@media (max-width: 480px) {
	.tui-members-featured-list {
		grid-template-columns: repeat(min(var(--tui-featured-columns, 12), 6), minmax(0, 1fr));
	}
}

.tui-window--narrow-768 .tui-members-featured-list {
	grid-template-columns: repeat(min(var(--tui-featured-columns, 12), 8), minmax(0, 1fr));
}

.tui-window--narrow-640 .tui-members-featured-list {
	grid-template-columns: repeat(min(var(--tui-featured-columns, 12), 6), minmax(0, 1fr));
}

.tui-member-avatar {
	flex: 0 0 auto;
}

.tui-member-avatar {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: 50%;
	overflow: hidden;
	background: var(--linecolor);
}

.tui-member-avatar img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tui-member-avatar.is-you {
	border: 2px solid var(--darkcolor);
}

.tui-member-avatar:hover,
.tui-member-avatar:focus {
	opacity: 0.75;
	outline: none;
}

/* The About / how to join line under the Community map. */
.tui-community-join {
	margin: 1em 0 0;
}

/* Community widget mode: the window collapses to the status sentence (inc/window-handlers/community.php). The full page and
   the sentence are both in the window's content; each is hidden when the other shows. */
.tui-community-widget {
	display: none;
}

.tui-window--widget[data-content-type="community"] {
	width: calc(28em * var(--tui-widget-scale, 1)) !important;
	max-width: calc(100vw - 32px);
}

.tui-window--widget[data-content-type="community"] .tui-community {
	display: none;
}

.tui-window--widget[data-content-type="community"] .tui-community-widget {
	display: block;
	position: relative;
	font-size: 0.80em;
	line-height: 1.5;
}

/* Drag grip in the bottom-right corner: resizes the widget's width (community-widget.js); the text keeps its size and wraps. */
.tui-community-widget-grip {
	position: absolute;
	right: -1em;
	bottom: -1em;
	width: 14px;
	height: 14px;
	cursor: nwse-resize;
	touch-action: none;
	background: linear-gradient(135deg, transparent 50%, var(--linecolor) 50%, var(--linecolor) 58%, transparent 58%, transparent 72%, var(--linecolor) 72%, var(--linecolor) 80%, transparent 80%);
	opacity: 0.6;
}

.tui-community-widget-grip:hover {
	opacity: 1;
}

/* The figures in the Community widget's sentence. */
.tui-community-widget b {
	color: var(--darkcolor);
}

/* The featured members inside the widget: small circles right under the numbers, no divider line. */
.tui-community-widget .tui-members-featured {
	margin-top: 1em;
	padding-top: 0;
	border-top: none;
	content-visibility: visible;
}

/* In the widget they stay on one line, however narrow the window is (the narrow-window caps on columns don't apply here). */
.tui-community-widget .tui-members-featured-list {
	grid-template-columns: repeat(var(--tui-featured-columns, 12), minmax(0, 1fr));
}

/* Its title, the same size as the stat labels (Members, Education, Contributors) above. */
.tui-community-widget .tui-members-featured-caption {
	margin-bottom: 0.5em;
	font-size: 1em;
}

/* Classic Community page: room above and below its content, like the other classic pages (the sides come from .tui-classic-page). */
.tui-community-classic {
	padding-top: 1em;
	padding-bottom: 1em;
}

/* The widget is only a few lines, so its body never needs its own scrollbar (a stray one showed up when a window already open
   was collapsed into widget mode, and went away after a reload). */
.tui-window--widget[data-content-type="community"] .tui-window-body {
	overflow: hidden;
	max-height: none;
}

/* Classic front page: the Featured menu is exactly one column of the grids above and the panel spans the rest (same
   --front-cols tiers, 12px gap and 1em inset). Above 640px only; below that the menu stacks over the content. */
@media (min-width: 641px) {
	.home .tui-classic-page .tui-featured {
		gap: 12px;
	}
	.home .tui-classic-page .tui-featured-menu {
		flex: 0 0 calc((100% - 12px * (var(--front-cols) - 1)) / var(--front-cols));
		min-width: 0;
	}
}

/* From 1440px the menu is two columns wide (the two columns and the gap between them), the panel still the rest, and its text is
   the normal size rather than the small one. */
@media (min-width: 1440px) {
	.home .tui-classic-page .tui-featured-menu {
		flex: 0 0 calc((100% - 12px * (var(--front-cols) - 1)) / var(--front-cols) * 2 + 12px);
		font-size: 1em;
	}
}

/* Profile edit: the author-style header above the form has no divider line under it. */
[data-content-type="profile"] .tui-listing-intro {
	border-bottom: none;
	padding-bottom: 0;
	margin-bottom: 16px;
}

/* Classic mode: the header has no padding or side borders of its own either (it sits inside the page's own). */
.tui-classic-page[data-content-type="profile"] .tui-listing-intro {
	padding: 0;
	border-left: none;
	border-right: none;
}

/* Mobile: the header is pulled out to the screen edges (the classic mobile rule above), so give it the page's side padding back. */
@media (max-width: 768px) {
	.tui-classic-page[data-content-type="profile"] .tui-listing-intro {
		padding-left: 1em;
		padding-right: 1em;
	}
}

/* Classic mode: the Articles list under the form has no side borders or padding either. */
.tui-classic-page[data-content-type="profile"] .tui-listing[data-listing-type="my-articles"] {
	border-left: none;
	border-right: none;
	padding: 0;
}

/* The last article has no line under it, in a window and in classic mode (the narrow-window and classic row rules draw it). */
[data-content-type="profile"] .tui-listing[data-listing-type="my-articles"] .tui-listing-row:last-child {
	border-bottom: none;
}

/* Mobile: the list is pulled out to the screen edges (see above), so give its rows the page's side padding back. */
@media (max-width: 768px) {
	.tui-classic-page[data-content-type="profile"] .tui-listing[data-listing-type="my-articles"] {
		padding: 0 1em;
	}
}

/* Classic mode (desktop and mobile): 1em of space between the last article and Load more, which runs the full width of the page
   (out past the body's 1em padding) with no left, right or bottom line. */
.tui-classic-page[data-content-type="profile"] .tui-load-more {
	margin-top: 1em;
	width: calc(100% + 2em);
	margin-left: -1em;
	margin-right: -1em;
	margin-bottom: -1em;
	border-left: none;
	border-right: none;
	border-bottom: none;
}

/* Profile edit: the bio sits right under the header, set like the bio on the /author/ window (same size, 20% padding right), no border. */
.tui-profile-field--bio .tui-profile-input {
	border: none;
	padding: 0 20% 0 0;
	font-size: 1em;
	outline: none;
}

/* Profile edit: the Skills box has no border, so it lines up with the bio and icon row above it. */
.tui-skills-box {
	border: none;
	padding: 0 1em 0 0;
}

/* Profile edit and Theme Designer: once something is changed, the Update / Save Theme button's background fades to --shadecolor and its border to --bodycolor, and back; the text stays as it is. */
.tui-profile-submit .tui-btn.is-modified,
.tui-theme-designer-actions .tui-btn.is-modified {
	animation: tui-btn-shade 2s linear infinite;
}

@keyframes tui-btn-shade {
	0%, 100% { background-color: var(--backgroundcolor); }
	50% { background-color: var(--shadecolor); border-color: var(--bodycolor); }
}

/* A draft in the Profile window's Articles list: no link and no hover, the whole row at half opacity. */
.tui-listing-row.is-draft {
	opacity: 0.5;
}

.tui-listing-row.is-draft:hover {
	background: none;
}

/* Profile edit: the "# Private" heading inside the form has no divider line above it (the "# Articles" one below the form keeps its own). */
[data-profile-form] .tui-settings-section {
	border-top: none;
	padding-top: 0;
}

/* Profile edit: an icon at the left inside a field. */
.tui-profile-input-wrap {
	position: relative;
	display: block;
}

.tui-profile-input-wrap .icon {
	position: absolute;
	left: 8px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--midcolor);
	pointer-events: none;
}

.tui-profile-input-wrap .tui-profile-input {
	padding-left: 2.2em;
}

/* A fixed URL start shown before the field (CAN People): the prefix and input read as one box. */
.tui-profile-input-wrap--prefix {
	display: flex;
}

.tui-profile-input-prefix {
	flex: none;
	display: flex;
	align-items: center;
	padding: 6px 0 6px 2.2em;
	background: var(--backgroundcolor);
	border: 1px solid var(--linecolor);
	border-right: 0;
	color: var(--midcolor);
	white-space: nowrap;
}

.tui-profile-input-test {
	flex: none;
	display: flex;
	align-items: center;
	padding: 6px 8px;
	background: var(--backgroundcolor);
	border: 1px solid var(--linecolor);
	border-left: 0;
}

.tui-profile-input-test[hidden] {
	display: none;
}

.tui-profile-input-wrap--prefix .tui-profile-input {
	flex: 1;
	min-width: 0;
	width: auto;
	padding-left: 0;
	border-left: 0;
}

/* The Archives page's graph of every article (assets/js/archives-graph.js): a canvas filling this box. */
.can-archives-graph {
	position: relative;
	width: 100%;
	height: 300px;
}

.can-archives-graph canvas {
	display: block;
}

/* The hover card of the graph above: the tooltip look (body colour, page colour text) with the article's thumbnail. */
.can-archives-graph-card {
	position: fixed;
	z-index: 999999;
	display: none;
	max-width: 280px;
	padding: 8px;
	font-size: 0.80em;
	line-height: 1.4;
	color: var(--backgroundcolor);
	background: var(--bodycolor);
	border-radius: var(--tui-window-radius);
	pointer-events: none;
	word-wrap: break-word;
}

.can-archives-graph-card-image {
	margin-top: 6px;
}

.can-archives-graph-card-image img {
	display: block;
	width: 100%;
	height: auto;
}

/* Ad space 1 above the header (header.php), signed-out visitors only: full width. The ad's own rules are ported from
   CANV6 (#preheader, #adA, a max width of 1456px). */
.tui-top {
	position: relative;
}

.tui-adspace {
	display: flow-root; /* CANV6 floated #preheader; this keeps the space it takes in the page without a float */
	text-align: center;
	padding: 1em 1em 0;
	animation: tui-login-fade-in 0.8s ease backwards; /* fades in on load (keyframes: Login window) */
}

/* Ad space 2, between two sections of the front page: on the frame's own background, like the banner in the header, with the
   page's side lines left out around it (a rule closes the section above; the next titlebar draws its own top one). */
.tui-classic-page > .tui-adspace--between {
	padding: 1em;
	background: var(--framecolor);
	border-left: none;
	border-right: none;
	border-top: 1px solid var(--linecolor);
}

/* On an article the page itself draws the side lines: the ad covers them (1px each side) so it sits on the frame as well. */
.single .tui-classic-page > .tui-adspace--between {
	margin-left: -1px;
	margin-right: -1px;
}

/* On a phone it runs edge to edge, as a titlebar does. */
@media (max-width: 768px) {
	.tui-classic-page > .tui-adspace--between {
		margin-left: -1em;
		margin-right: -1em;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tui-adspace {
		animation: none;
	}
}

#preheader {
	width: 100%;
}

@media (max-width: 768px) {
	#preheader {
		margin-bottom: 0;
	}
}

@media (min-width: 768px) {
	#preheader {
		min-height: 90px;
	}
}

#adA {
	display: flex;
	justify-content: center; /* Centers horizontally */
	align-items: center; /* Centers vertically */
	margin: 0 auto;
	max-width: 1456px;
}

/* A banner is always shown whole: it scales down to the width available (up to 1456px) instead of being cut off at the
   sides, and keeps its proportions. */
#adA a {
	display: block;
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	max-width: 100%;
	/* The banners are all 2560x316: the space is reserved at that shape before the image arrives, so the page below
	   doesn't jump when it loads. */
	aspect-ratio: 2560 / 316;
}

div#adA a img {
	display: block; /* Removes unwanted whitespace at the bottom */
	width: 100%;
	max-width: 100%;
	height: auto;
	/* The banner's own shape, set on the image too: the lazy-load script shows a 1x1 placeholder (an SVG) until the real banner arrives,
	   and with only height: auto that is a square as wide as the page, which then shrinks and pulls everything below it up. */
	aspect-ratio: 2560 / 316;
	object-fit: cover;
	outline: 1px solid var(--linecolor); /* the border is around the image itself, drawn inside it so it adds no height */
	outline-offset: -1px;
}

/* The corner buttons (classic mode) sit under the ad, in line with the site title: their top is measured from the bottom of
   the wrapper, which is exactly as tall as the ad (nothing, when there's no ad, so 13px as before). */
.tui-classic-nav .tui-top .tui-corner-buttons {
	top: calc(100% + var(--tui-font-size) * 1.0833);
}

/* Sign-in validation: the missing/wrong field and the message above the form (main.js). */
.tui-login input.is-invalid {
	border-color: var(--linkcolor);
}

.tui-login .tui-login-error {
	color: var(--darkcolor);
}

.tui-login .tui-login-error:empty {
	display: none;
}

/* A Location node in a Layout: the Activity location card's map, the city and its longitude and latitude. */
.tui-node-location.tui-node-viz {
	display: block;
}

.tui-node-map {
	width: 100%;
	aspect-ratio: 16 / 9;
	background: var(--backgroundcoloralt);
	overflow: hidden;
}

.tui-node-map svg {
	display: block;
}

.tui-node-location-title {
	margin-top: 0.5em;
	color: var(--darkcolor);
}

.tui-node-location-meta {
	display: flex;
	gap: 2em;
	list-style: none;
	margin: 0.25em 0 0;
	padding: 0;
	font-size: 0.80em;
}

.tui-node-location-meta .title {
	margin-right: 0.5em;
	opacity: 0.6;
}

/* Buttons: the system corner radius (Settings → corner rounding), the same as windows. The round icon buttons keep their circles. */
.tui-btn,
.tui-theme-designer-actions .tui-btn,
.tui-author-admin-actions .tui-btn,
.entry-content .wp-block-button .wp-block-button__link,
.entry-content .wp-block-button .wp-element-button,
.wp-block-button.highlight .wp-block-button__link,
.wp-block-button.highlight .wp-element-button,
.wpcf7-form input[type="submit"],
.wpcf7-form .wpcf7-submit,
.tui-login .tui-login-register,
.tui-login input[type="submit"],
.tui-login--reset input[type="submit"],
body:not(.logged-in) .tui-login--signin input[type="submit"],
body:not(.logged-in) .tui-login--reset input[type="submit"],
.tui-login-reset .swpm-pw-reset-submit-button input[type="submit"],
.swpm-pw-reset-widget-form input[type="submit"],
.can-comment-btn,
.can-submit-comment,
.can-submit-comment-area button,
.can-cancel-comment,
.tui-submit-file::file-selector-button,
.tui-settings-bg input[type="file"]::file-selector-button {
	border-radius: var(--tui-window-radius) !important;
}

/* The "Reference" title above the Constructor page's Controls table (page-templates/constructor-introduction.php). */
.tui-constructor-intro-title {
	margin: 1em 0 0.5em;
}

/* The big opening line of a page (Register, ...): add class "pageintrotext" to the span, or it is matched by its inline 3em
   size at the top of the Register page. 3em with a tight line height, no margin above and 1em (of the body text) below it, except on mobile (below), where it is
   2em. A span is inline, so it is made a block for the margin to count. (An inline size or line height in the editor, as the
   Constructor page's Reference title has, still wins.) */
@media (min-width: 769px) {
	.pageintrotext,
	.entry-content .pageintrotext { /* (the second: a paragraph in an entry-content has margins of its own, 0.5em of this size) */
		display: block;
		font-size: 3em;
		line-height: 1.1em;
		/* None above, and 1em of the body text below: an em here would be 3 times that, at this size */
		margin-top: 0;
		margin-bottom: var(--tui-font-size);
	}

	/* The Register page's opening line (class "pageintrotext registerintro"): 1em of the body text of padding above it. */
	.pageintrotext.registerintro {
		padding-top: var(--tui-font-size);
	}
}

/* Smaller on mobile (the inline size needs !important to be overridden). */
@media (max-width: 768px) {
	.pageintrotext,
	[data-register-page] > .wp-block-columns:first-child .wp-block-column:first-child span[style*="font-size:3em"] {
		font-size: 2em !important;
		line-height: 1.1em;
	}

	/* 1em of the body text below it (an em would be 2 times that, at this size); a block, for the margin to count. */
	.pageintrotext,
	.entry-content .pageintrotext {
		display: block;
		margin-bottom: var(--tui-font-size);
	}

	/* The Register page's opening line: 1em of the body text of padding above it, as on desktop. */
	.pageintrotext.registerintro {
		padding-top: var(--tui-font-size);
	}
}

/* The Register page's opening line: no margin above it. */
[data-register-page] .pageintrotext {
	display: block;
	margin-top: 0;
}

/* Full Width page template (page-templates/full-width.php): the content runs edge to edge, every block as wide as the page or window, with 1em padding all around. */
.tui-full-width {
	display: block;
	padding: 1em;
}

.tui-full-width > * {
	max-width: none;
}

.tui-full-width > :first-child {
	margin-top: 0;
}

.tui-full-width > :last-child {
	margin-bottom: 0;
}

/* In a window: the window's own padding gives way to the page's. */
.tui-window-body:has(> .tui-full-width) {
	padding: 0;
}

/* Classic desktop: 1em padding all round; the side lines come from the page's own rule for its content (above), like any other page. */
@media (min-width: 769px) {
	.tui-classic-page > .tui-full-width,
	.tui-classic-page > .tui-classic-titlebar + .tui-full-width {
		padding: 1em;
	}
}

/* Classic mobile: cancels the page's side padding, then pads its own. */
@media (max-width: 768px) {
	.tui-classic-page > .tui-full-width {
		margin-left: -1em;
		margin-right: -1em;
		padding: 1em;
	}
}

/* Full Width Notice and Thank You (page-templates/full-width-notice.php, thank-you.php), classic desktop: the page is 60vw wide, centred across the browser window and 15vh from the top. */
@media (min-width: 769px) {
	.tui-classic-page--notice {
		width: 60vw;
		max-width: none;
		margin: 15vh auto 0; /* centred across, 15vh from the top */
	}
}

/* Settings: the Upload button pulses (its background shades in and out) once an image is chosen. */
@keyframes tui-upload-ready {
	50% { background: var(--shadecolor); }
}

[data-upload-bg-image].is-ready {
	animation: tui-upload-ready 1.2s ease-in-out infinite;
}

/* The Discord page (page-templates/discord.php, assets/js/discord.js): the how-to-join text next to who is on the server now. */
.tui-discord-columns {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 20em);
	gap: 2em;
	margin-top: 1em;
}

.tui-discord-heading {
	margin: 0 0 0.75em;
	color: var(--darkcolor);
	font-size: 1em;
}

.tui-discord-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.tui-discord-icon {
	width: 1em;
	height: 1em;
	vertical-align: -0.1em;
}

.tui-discord-members {
	max-height: 30em;
	overflow-y: auto;
}

.tui-discord-member {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 4px 0;
	border-bottom: 1px dashed var(--linecolor);
}

.tui-discord-member:last-child {
	border-bottom: none;
}

.tui-discord-avatar {
	flex: 0 0 auto;
	width: 1.4em;
	height: 1.4em;
	border-radius: 50%;
	background: var(--shadecolor);
}

.tui-discord-member-text {
	min-width: 0;
}

.tui-discord-name {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.tui-discord-dot {
	display: inline-block;
	width: 0.5em;
	height: 0.5em;
	margin-right: 0.5em;
	border-radius: 50%;
	background: var(--linkcolor);
}

.tui-discord-dot.is-idle {
	background: var(--tui-amber);
}

.tui-discord-flags,
.tui-discord-game,
.tui-discord-note {
	color: var(--midcolor);
	font-size: 0.80em;
}

@media (max-width: 768px) {
	.tui-discord-columns {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Dither images (Alt+D, assets/js/dither.js): the holders assets/js/dither.js marks
   (tui-dithered) show their picture as an ordered dither in the theme's two colours, in CSS only. dither.js puts what the holder
   contains into a .tui-dither-group; inside it the picture is grey and halved in brightness and a tiny threshold pattern (::before/::after)
   is ADDED to it (plus-lighter); the group's filter then cuts the sum at the middle, so a pixel is on where the picture is brighter than
   that pixel's threshold: black and white dots, denser where the picture is lighter. The group is multiplied onto the holder's colour and
   a second colour laid over it (lighten), so the dots get exactly two theme colours: the light parts of the picture the lighter of the two,
   the dark parts the darker (--tui-dither-light / --tui-dither-dark, set by assets/js/dither.js from its COLORS setting, which also
   works out which of the two is the lighter, so any pair of theme colours works in any theme). */
.tui-dither-group,
.tui-dither-img {
	display: contents; /* nothing changes while dithering is off */
}

/* The holder dither.js puts around a picture that is a target itself (a node's picture in the Constructor). */
body.can-v7-dither .tui-dither-img {
	display: block;
}

body.can-v7-dither .tui-dithered {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: var(--tui-dither-light, var(--backgroundcolor)) !important;
}

/* The CAN Activity plugin clears the background and the clipping of its picture cards with !important
   (.activity-log-item .gridmedia.insert.website), which left a dithered one white: repeating the class out-ranks it. */
body.can-v7-dither .tui-dithered.tui-dithered.tui-dithered {
	overflow: hidden !important;
	background: var(--tui-dither-light, var(--backgroundcolor)) !important;
}

body.can-v7-dither .tui-dithered::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
	/* The darker colour, held to no more than the lighter one in each of red, green and blue (darken of the two): lighten takes the brighter
	   of each channel, so a dark colour with one channel above the light one's (a pink accent against a grey background) would tint the
	   light parts. The light parts are then always exactly the light colour. */
	background:
		linear-gradient(var(--tui-dither-dark, var(--bodycolor)), var(--tui-dither-dark, var(--bodycolor))),
		linear-gradient(var(--tui-dither-light, var(--backgroundcolor)), var(--tui-dither-light, var(--backgroundcolor)));
	background-blend-mode: darken;
	mix-blend-mode: lighten;
}

body.can-v7-dither .tui-dither-group {
	display: block;
	position: relative;
	isolation: isolate;
	width: 100%;
	height: 100%;
	background: #000;
	filter: contrast(1000%);
	mix-blend-mode: multiply;
	opacity: var(--tui-dither-ink, 1);
}

body.can-v7-dither .tui-dither-group video {
	filter: grayscale(1) invert(var(--tui-dither-invert, 0)) contrast(var(--tui-dither-contrast, 1.15)) brightness(var(--tui-dither-brightness, 0.5));
}

body.can-v7-dither .tui-dither-group img,
body.can-v7-dither .tui-dither-group iframe {
	background: #fff; /* a see-through picture (a construction's map) is light where it has nothing, not black */
	filter: grayscale(1) invert(var(--tui-dither-invert, 0)) contrast(var(--tui-dither-contrast, 1.15)) brightness(var(--tui-dither-brightness, 0.5));
}

/* A Live URL embed card (an iframe) is a square made with padding on a box of no height, its iframe positioned inside it: the group has to
   fill that box the same way, instead of taking 100% of nothing. */
body.can-v7-dither .gridmedia.gridliveurl:not(.gridliveurl-image):not(.gridliveurl-video):not(.gridliveurl-audio) > .tui-dither-group {
	position: absolute;
	inset: 0;
	width: auto;
	height: auto;
}

body.can-v7-dither .tui-dither-group::before,
body.can-v7-dither .tui-dither-group::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	mix-blend-mode: plus-lighter;
	opacity: var(--tui-dither-strength, 1);
}

/* The pattern layers are set by assets/js/dither.js (--tui-dither-a / -b, with their sizes); this is the 2x2 Bayer cell it would
   otherwise give: the thresholds of its four cells, halved (top right, bottom right, bottom left, top left). */
body.can-v7-dither .tui-dither-group::before {
	background: var(--tui-dither-a, repeating-conic-gradient(#505050 0 25%, #303030 0 50%, #707070 0 75%, #101010 0 100%) 0 0 / 2px 2px);
}

body.can-v7-dither .tui-dither-group::after {
	background: var(--tui-dither-b, none);
}

