/*
Theme Name: PChat
Theme URI: https://pchat-irc.org
Author: ZachBacon
Author URI: https://pchat-irc.org
Description: A three-pane theme modelled on the PChat IRC client. Navigation lives in the channel list on the left, posts read like a channel log in the middle, and widgets (RSS feeds, recent posts, categories, block widgets) fill the user list on the right. Behaves like an adaptive libadwaita app: collapsing split views, swipe gestures, popovers, dialogs and toasts. Works on WordPress and ClassicPress.
Version: 1.1.0
Requires at least: 4.9
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pchat
Tags: dark, three-columns, left-sidebar, right-sidebar, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready, blog
*/

/* ==========================================================================
   Tokens
   ========================================================================== */

:root {
	color-scheme: dark;

	--pc-desktop: #141416;
	--pc-window: #1e1e20;
	--pc-pane: #28282b;
	--pc-nav: #2b2b2e;
	--pc-header: #222225;
	--pc-row-hover: #333337;
	--pc-row-active: #3d3d41;
	--pc-border: #333336;
	--pc-input: #2e2e32;
	--pc-input-border: #45454a;
	--pc-button: #35353a;
	--pc-button-hover: #414146;
	--pc-popover: #36363a;
	--pc-dialog: #36363a;
	--pc-card: rgba(255, 255, 255, 0.08);
	--pc-card-shadow: none;
	--pc-card-sep: rgba(0, 0, 0, 0.36);
	--pc-shade: rgba(0, 0, 0, 0.36);
	--pc-dim: rgba(0, 0, 0, 0.36);
	--pc-osd: rgba(0, 0, 0, 0.7);
	--pc-popover-shadow: 0 1px 5px 1px rgba(0, 0, 0, 0.25), 0 2px 14px 3px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.5);

	--pc-text: #e8e8e8;
	--pc-text-strong: #ffffff;
	--pc-muted: #9a9a9e;
	--pc-faint: #6c6c70;

	--pc-green: #3fb34f;
	--pc-magenta: #e040e0;
	--pc-blue: #62a0ea;
	--pc-orange: #e5a50a;
	--pc-red: #ed333b;

	/* Accent: libadwaita blue unless the Customizer or the system says otherwise. */
	--pc-accent-bg: #3584e4;
	--pc-accent: color-mix(in oklab, var(--pc-accent-bg) 62%, #ffffff);
	--pc-focus-ring: color-mix(in srgb, var(--pc-accent) 50%, transparent);
	--pc-focus: var(--pc-focus-ring);

	--pc-font-ui: "Adwaita Sans", "Cantarell", "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
	--pc-font-mono: "Adwaita Mono", "DejaVu Sans Mono", "Source Code Pro", "Cascadia Mono", Consolas, "Liberation Mono", monospace;

	--pc-radius: 6px;
	--pc-radius-window: 12px;
	--pc-nav-size: 280px;
	--pc-aside-size: 280px;
	--pc-header-height: 46px;
	--pc-gutter: 90px;
	--pc-clamp: 860px;

	--pc-dur: 250ms;
	--pc-ease: cubic-bezier(0.25, 0.9, 0.3, 1);
}

/* Light palette: data-scheme="light", or "auto" on a light system. */
:root[data-scheme="light"] {
	color-scheme: light;
	--pc-desktop: #d8d8dc;
	--pc-window: #ffffff;
	--pc-pane: #f6f6f7;
	--pc-nav: #ebebed;
	--pc-header: #f4f4f5;
	--pc-row-hover: #dedee1;
	--pc-row-active: #d2d2d6;
	--pc-border: #d6d6da;
	--pc-input: #ebebed;
	--pc-input-border: #c4c4c9;
	--pc-button: #e2e2e5;
	--pc-button-hover: #d6d6da;
	--pc-popover: #ffffff;
	--pc-dialog: #fafafb;
	--pc-card: #ffffff;
	--pc-card-shadow: 0 0 0 1px rgba(0, 0, 0, 0.03), 0 1px 3px 1px rgba(0, 0, 0, 0.07), 0 2px 6px 2px rgba(0, 0, 0, 0.03);
	--pc-card-sep: rgba(0, 0, 0, 0.07);
	--pc-shade: rgba(0, 0, 0, 0.07);
	--pc-dim: rgba(0, 0, 0, 0.12);
	--pc-popover-shadow: 0 1px 5px 1px rgba(0, 0, 0, 0.09), 0 2px 14px 3px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.1);
	--pc-text: #26262a;
	--pc-text-strong: #000000;
	--pc-muted: #636369;
	--pc-faint: #8e8e94;
	--pc-green: #1f8a32;
	--pc-magenta: #b01eb0;
	--pc-blue: #1c71d8;
	--pc-accent: color-mix(in oklab, var(--pc-accent-bg) 82%, #000000);
}

@media (prefers-color-scheme: light) {
	:root[data-scheme="auto"] {
		color-scheme: light;
		--pc-desktop: #d8d8dc;
		--pc-window: #ffffff;
		--pc-pane: #f6f6f7;
		--pc-nav: #ebebed;
		--pc-header: #f4f4f5;
		--pc-row-hover: #dedee1;
		--pc-row-active: #d2d2d6;
		--pc-border: #d6d6da;
		--pc-input: #ebebed;
		--pc-input-border: #c4c4c9;
		--pc-button: #e2e2e5;
		--pc-button-hover: #d6d6da;
		--pc-popover: #ffffff;
		--pc-dialog: #fafafb;
		--pc-card: #ffffff;
		--pc-card-shadow: 0 0 0 1px rgba(0, 0, 0, 0.03), 0 1px 3px 1px rgba(0, 0, 0, 0.07), 0 2px 6px 2px rgba(0, 0, 0, 0.03);
		--pc-card-sep: rgba(0, 0, 0, 0.07);
		--pc-shade: rgba(0, 0, 0, 0.07);
		--pc-dim: rgba(0, 0, 0, 0.12);
		--pc-popover-shadow: 0 1px 5px 1px rgba(0, 0, 0, 0.09), 0 2px 14px 3px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.1);
		--pc-text: #26262a;
		--pc-text-strong: #000000;
		--pc-muted: #636369;
		--pc-faint: #8e8e94;
		--pc-green: #1f8a32;
		--pc-magenta: #b01eb0;
		--pc-blue: #1c71d8;
		--pc-accent: color-mix(in oklab, var(--pc-accent-bg) 82%, #000000);
	}
}

/* libadwaita accent colours. */
:root[data-accent="blue"] { --pc-accent-bg: #3584e4; }
:root[data-accent="teal"] { --pc-accent-bg: #2190a4; }
:root[data-accent="green"] { --pc-accent-bg: #3a944a; }
:root[data-accent="yellow"] { --pc-accent-bg: #c88800; }
:root[data-accent="orange"] { --pc-accent-bg: #ed5b00; }
:root[data-accent="red"] { --pc-accent-bg: #e62d42; }
:root[data-accent="pink"] { --pc-accent-bg: #d56199; }
:root[data-accent="purple"] { --pc-accent-bg: #9141ac; }
:root[data-accent="slate"] { --pc-accent-bg: #6f8396; }

/* Firefox on GNOME and Safari expose the desktop accent colour. */
@supports (color: AccentColor) {
	:root[data-accent="system"] {
		--pc-accent-bg: AccentColor;
	}
}

@media (prefers-contrast: more) {
	:root {
		--pc-border: color-mix(in srgb, var(--pc-text) 50%, transparent);
		--pc-card-sep: color-mix(in srgb, var(--pc-text) 50%, transparent);
		--pc-muted: var(--pc-text);
		--pc-faint: var(--pc-muted);
	}
}

@media (prefers-reduced-motion: reduce) {
	:root {
		--pc-dur: 1ms;
	}
}

/* ==========================================================================
   Base
   ========================================================================== */

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

html {
	height: 100%;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	min-height: 100%;
	background: var(--pc-desktop);
	color: var(--pc-text);
	font-family: var(--pc-font-ui);
	font-size: 14px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

a {
	color: var(--pc-accent);
}

a:hover,
a:focus {
	color: var(--pc-text-strong);
}

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

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

/* Overlay-style scrollbars: thin, and only drawn while the pointer is over the pane. */
.pc-main,
.pc-nav-body,
.pc-aside-body,
.pc-dialog {
	scrollbar-width: thin;
	scrollbar-color: transparent transparent;
}

.pc-main:hover,
.pc-nav-body:hover,
.pc-aside-body:hover,
.pc-dialog:hover,
.pc-main:focus-within,
.pc-nav-body:focus-within,
.pc-aside-body:focus-within {
	scrollbar-color: color-mix(in srgb, var(--pc-text) 30%, transparent) transparent;
}

img,
video,
iframe,
embed,
object {
	max-width: 100%;
	height: auto;
}

hr {
	border: 0;
	border-top: 1px solid var(--pc-border);
	margin: 1.5em 0;
}

code,
kbd,
pre,
samp,
tt {
	font-family: var(--pc-font-mono);
	font-size: 0.92em;
}

code,
kbd {
	background: var(--pc-input);
	border-radius: 4px;
	padding: 0.1em 0.35em;
}

pre {
	background: var(--pc-pane);
	border: 1px solid var(--pc-border);
	border-radius: var(--pc-radius);
	overflow: auto;
	padding: 12px 14px;
	line-height: 1.5;
}

pre code {
	background: none;
	padding: 0;
}

blockquote {
	margin: 1em 0;
	padding: 0.25em 0 0.25em 14px;
	border-left: 3px solid var(--pc-magenta);
	color: var(--pc-muted);
}

table {
	border-collapse: collapse;
	width: 100%;
	margin: 1em 0;
}

th,
td {
	border: 1px solid var(--pc-border);
	padding: 6px 10px;
	text-align: left;
}

th {
	background: var(--pc-pane);
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background: var(--pc-window);
	border-radius: var(--pc-radius);
	clip: auto !important;
	clip-path: none;
	color: var(--pc-text-strong);
	display: block;
	height: auto;
	left: 8px;
	padding: 12px 20px;
	top: 8px;
	width: auto;
	z-index: 100000;
}

/* ==========================================================================
   Window frame
   ========================================================================== */

.pc-window {
	--pc-nav-track: var(--pc-nav-size);
	position: relative;
	display: grid;
	grid-template-columns: var(--pc-nav-track) minmax(0, 1fr);
	height: calc(100vh - 52px);
	height: calc(100dvh - 52px);
	min-height: 420px;
	margin: 26px;
	background: var(--pc-window);
	border: 1px solid var(--pc-border);
	border-radius: var(--pc-radius-window);
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
	overflow: hidden;
}

.admin-bar .pc-window {
	height: calc(100vh - 84px);
	height: calc(100dvh - 84px);
}

/* "Maximise" button — drop the desktop margin. */
.pc-maximized .pc-window {
	margin: 0;
	height: 100vh;
	height: 100dvh;
	border-radius: 0;
	border: 0;
}

.pc-maximized .admin-bar .pc-window {
	height: calc(100vh - 32px);
	height: calc(100dvh - 32px);
}

/* The content side of the split view: header bar, log, entry bar, user list. */
.pc-stage {
	--pc-aside-track: var(--pc-aside-size);
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--pc-aside-track);
	grid-template-rows: var(--pc-header-height) minmax(0, 1fr) auto;
	grid-template-areas:
		"header header"
		"main   aside"
		"entry  aside";
	min-width: 0;
	min-height: 0;
	background: var(--pc-window);
}

/* Pane state lives on <html> so it applies before first paint. */
.pc-nav-hidden .pc-window {
	--pc-nav-track: 0px;
}

.pc-aside-hidden .pc-stage {
	--pc-aside-track: 0px;
}

/* Collapsing panes slide rather than squash: the track animates while the contents keep their width.
   Only while a pane is being toggled, never when a breakpoint is crossed. */
.pc-animating .pc-window,
.pc-animating .pc-stage {
	transition: grid-template-columns var(--pc-dur) var(--pc-ease);
}

.pc-nav,
.pc-aside {
	transition: visibility 0s;
}

.pc-nav-hidden .pc-nav,
.pc-aside-hidden .pc-aside {
	visibility: hidden;
	transition: visibility 0s var(--pc-dur);
}

/* Flat header bar button. */
.pc-icon-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: var(--pc-radius);
	color: var(--pc-text);
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.15s;
}

.pc-icon-button:hover {
	background: color-mix(in srgb, currentColor 7%, transparent);
	color: var(--pc-text);
}

.pc-icon-button[aria-pressed="true"],
.pc-icon-button[aria-expanded="true"] {
	background: color-mix(in srgb, currentColor 10%, transparent);
}

.pc-icon-button[aria-pressed="true"]:hover,
.pc-icon-button[aria-expanded="true"]:hover {
	background: color-mix(in srgb, currentColor 13%, transparent);
}

.pc-icon-button:active {
	background: color-mix(in srgb, currentColor 16%, transparent);
}

.pc-icon-button svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
}

/* Round window controls (minimise / maximise / close). */
.pc-window-controls {
	display: flex;
	gap: 10px;
	margin-left: 8px;
}

.pc-window-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	padding: 0;
	background: color-mix(in srgb, currentColor 10%, transparent);
	border: 0;
	border-radius: 50%;
	color: var(--pc-text);
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.15s;
}

.pc-window-button:hover {
	background: color-mix(in srgb, currentColor 15%, transparent);
	color: var(--pc-text);
}

.pc-window-button:active {
	background: color-mix(in srgb, currentColor 30%, transparent);
}

.pc-window-button svg {
	width: 10px;
	height: 10px;
	fill: currentColor;
}

/* ==========================================================================
   Left pane — channel list / navigation
   ========================================================================== */

.pc-nav {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	min-width: 0;
	min-height: 0;
	overflow: hidden;
	background: var(--pc-nav);
	border-right: 1px solid var(--pc-border);
}

/* Fixed-width contents pinned to the outer edge, so collapsing slides the pane away. */
.pc-nav > * {
	width: var(--pc-nav-size);
}

.pc-nav-header {
	display: grid;
	grid-template-columns: 34px 1fr 34px;
	align-items: center;
	height: var(--pc-header-height);
	padding: 0 8px;
	flex-shrink: 0;
}

.pc-nav-title {
	margin: 0;
	text-align: center;
	font-size: 13px;
	font-weight: 700;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pc-nav-title a {
	color: var(--pc-text-strong);
	text-decoration: none;
}

.pc-nav-title .custom-logo {
	display: block;
	max-height: 26px;
	width: auto;
	margin: 0 auto;
}

.pc-nav-body {
	flex: 1;
	overflow-y: auto;
	padding: 6px 6px 16px;
}

.pc-channels,
.pc-channels ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Top-level items read like network headers ("ZNC"). */
.pc-channels > li {
	margin-top: 4px;
}

.pc-channels > li > a {
	font-weight: 700;
	color: var(--pc-text-strong);
}

.pc-channels a {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 38px;
	padding: 6px 26px 6px 8px;
	border-radius: var(--pc-radius);
	color: var(--pc-text);
	font-size: 13px;
	text-decoration: none;
	overflow-wrap: anywhere;
}

/* Child items read like channels. */
.pc-channels ul a {
	padding-left: 28px;
	font-weight: 400;
}

.pc-channels ul a::before {
	content: "#";
}

.pc-channels ul ul a {
	padding-left: 44px;
}

.pc-channels a:hover,
.pc-channels a:focus-visible {
	background: var(--pc-row-hover);
	color: var(--pc-text-strong);
}

.pc-channels .current-menu-item > a,
.pc-channels .current_page_item > a,
.pc-channels .current-cat > a,
.pc-channels .is-current > a {
	background: var(--pc-row-active);
	color: var(--pc-text-strong);
}

/* "Unread" dot — categories with recent posts, or menu items given the "pc-unread" CSS class. */
.pc-channels .pc-unread > a::after,
.pc-channels .current-menu-ancestor > a::after,
.pc-channels .current-page-ancestor > a::after,
.pc-channels .current-cat-parent > a::after {
	content: "";
	position: absolute;
	right: 10px;
	top: 50%;
	width: 5px;
	height: 5px;
	margin-top: -2.5px;
	border-radius: 50%;
	background: var(--pc-muted);
}

.pc-channels .pc-unread > a::after {
	background: var(--pc-text);
}

.pc-nav-footer {
	flex-shrink: 0;
	padding: 8px 14px 12px;
	border-top: 1px solid var(--pc-border);
	color: var(--pc-faint);
	font-size: 11px;
}

.pc-nav-footer a {
	color: var(--pc-muted);
}

/* ==========================================================================
   Header bar
   ========================================================================== */

.pc-headerbar {
	grid-area: header;
	position: relative;
	z-index: 35;
	display: grid;
	grid-template-columns: 1fr minmax(0, auto) 1fr;
	align-items: center;
	gap: 12px;
	padding: 0 14px;
	background: var(--pc-header);
	transition: box-shadow 0.2s;
}

/* Raised once the log scrolls under it, like AdwToolbarView. */
.pc-stage.is-scrolled .pc-headerbar {
	box-shadow: 0 1px var(--pc-shade);
}

.pc-headerbar-start {
	display: flex;
	align-items: center;
}

.pc-headerbar-end {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 6px;
}

.pc-headerbar-title {
	min-width: 0;
	text-align: center;
	line-height: 1.25;
}

.pc-headerbar-title h1,
.pc-headerbar-title .pc-title {
	margin: 0;
	font-size: 13px;
	font-weight: 700;
	color: var(--pc-text-strong);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pc-headerbar-title p {
	margin: 1px 0 0;
	font-size: 10px;
	color: var(--pc-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Only shown when the split view is collapsed. */
.pc-back {
	display: none;
}

/* GTK popover menus. */
.pc-menu {
	position: relative;
}

.pc-popover {
	position: absolute;
	right: -4px;
	top: calc(100% + 10px);
	z-index: 60;
	min-width: 220px;
	max-width: min(320px, calc(100vw - 16px));
	padding: 6px;
	background: var(--pc-popover);
	border-radius: 12px;
	box-shadow: var(--pc-popover-shadow);
	color: var(--pc-text);
	transform-origin: calc(100% - 21px) -10px;
	animation: pc-pop 0.15s ease-out;
}

.pc-popover::before {
	content: "";
	position: absolute;
	top: -6px;
	right: 15px;
	width: 12px;
	height: 12px;
	background: inherit;
	border-radius: 3px 0 0 0;
	transform: rotate(45deg);
	box-shadow: -1px -1px 0 rgba(0, 0, 0, 0.12);
}

.pc-popover--start {
	right: auto;
	left: -4px;
	transform-origin: 21px -10px;
}

.pc-popover--start::before {
	right: auto;
	left: 15px;
}

.pc-popover[hidden] {
	display: none;
}

.pc-popover ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.pc-popover a,
.pc-popover .pc-menu-item {
	display: flex;
	align-items: center;
	width: 100%;
	min-height: 34px;
	padding: 0 12px;
	background: transparent;
	border: 0;
	border-radius: var(--pc-radius);
	color: var(--pc-text);
	font: inherit;
	font-size: 13px;
	font-weight: 400;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
}

.pc-popover a:hover,
.pc-popover a:focus-visible,
.pc-popover .pc-menu-item:hover,
.pc-popover .pc-menu-item:focus-visible {
	background: color-mix(in srgb, currentColor 7%, transparent);
	color: var(--pc-text);
}

.pc-popover a:active,
.pc-popover .pc-menu-item:active {
	background: color-mix(in srgb, currentColor 16%, transparent);
}

.pc-popover hr {
	margin: 6px 0;
	border-top-color: color-mix(in srgb, currentColor 15%, transparent);
}

@keyframes pc-pop {
	from {
		opacity: 0;
		transform: scale(0.94);
	}
}

/* Follow system / light / dark — the GNOME style switcher. */
.pc-style-switcher {
	display: flex;
	justify-content: center;
	gap: 18px;
	padding: 6px 12px 12px;
}

.pc-style-switcher button {
	position: relative;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid color-mix(in srgb, var(--pc-text) 15%, transparent);
	border-radius: 50%;
	cursor: pointer;
}

.pc-style-switcher [data-pc-scheme="auto"],
.pc-style-switcher [data-pc-scheme="auto"]:hover {
	background: linear-gradient(-45deg, #222226 49.5%, #ffffff 50.5%);
}

.pc-style-switcher [data-pc-scheme="light"],
.pc-style-switcher [data-pc-scheme="light"]:hover {
	background: #ffffff;
}

.pc-style-switcher [data-pc-scheme="dark"],
.pc-style-switcher [data-pc-scheme="dark"]:hover {
	background: #222226;
}

.pc-style-switcher [aria-checked="true"] {
	box-shadow: 0 0 0 2px var(--pc-accent-bg);
	border-color: transparent;
}

.pc-style-switcher [aria-checked="true"]::after {
	content: "";
	position: absolute;
	right: -4px;
	bottom: -4px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--pc-accent-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23fff' d='M6.5 12 2.5 8l1.4-1.4 2.6 2.6 5.6-5.6L13.5 5z'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* ==========================================================================
   Centre pane — the channel log
   ========================================================================== */

.pc-main {
	grid-area: main;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 6px 24px 28px;
}

.pc-log {
	max-width: var(--pc-clamp);
	margin: 0 auto;
}

/* A log line: gutter (time) + text. */
.pc-line {
	display: grid;
	grid-template-columns: var(--pc-gutter) minmax(0, 1fr);
	align-items: baseline;
	font-family: var(--pc-font-mono);
	font-size: 12.5px;
	line-height: 1.4;
	margin: 0;
}

.pc-stamp {
	color: var(--pc-faint);
	font-size: 11px;
	text-align: right;
	padding-right: 14px;
	white-space: nowrap;
}

.pc-stamp a {
	color: inherit;
	text-decoration: none;
}

.pc-stamp a:hover {
	color: var(--pc-muted);
}

.pc-line-text {
	position: relative;
	min-width: 0;
	padding-left: 1.6em;
	overflow-wrap: anywhere;
}

/* The "*" hangs in its own column so wrapped lines stay aligned. */
.pc-line-text::before {
	content: "*";
	position: absolute;
	left: 0;
}

.pc-line--join {
	color: var(--pc-green);
}

.pc-line--topic {
	color: var(--pc-magenta);
}

.pc-line--info {
	color: var(--pc-muted);
}

.pc-line a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.pc-line a:hover,
.pc-line a:focus-visible {
	color: var(--pc-text-strong);
}

.pc-line .pc-stamp a {
	text-decoration: none;
}

/* A post entry in the log. */
.pc-entry {
	padding: 4px 0 18px;
}

.pc-entry + .pc-entry {
	border-top: 1px solid transparent;
	margin-top: 10px;
}

.pc-entry-title {
	display: inline;
	font: inherit;
	margin: 0;
}

.pc-entry.sticky .pc-line--topic .pc-line-text::before {
	content: "\2605";
	color: var(--pc-orange);
}

/* Post body sits under the text column, past the gutter. */
.pc-entry-body {
	margin: 10px 0 0 calc(var(--pc-gutter) + 1.6em * 0.893);
	font-size: 15px;
	line-height: 1.65;
}

.pc-entry-body > :first-child {
	margin-top: 0;
}

.pc-entry-body > :last-child {
	margin-bottom: 0;
}

.pc-entry-body h1,
.pc-entry-body h2,
.pc-entry-body h3,
.pc-entry-body h4,
.pc-entry-body h5,
.pc-entry-body h6 {
	color: var(--pc-text-strong);
	line-height: 1.3;
	margin: 1.5em 0 0.5em;
}

.pc-entry-body h1 { font-size: 1.6em; }
.pc-entry-body h2 { font-size: 1.35em; }
.pc-entry-body h3 { font-size: 1.15em; }
.pc-entry-body h4,
.pc-entry-body h5,
.pc-entry-body h6 { font-size: 1em; }

.pc-thumb {
	display: block;
	margin: 0 0 14px;
	border-radius: var(--pc-radius);
	overflow: hidden;
	border: 1px solid var(--pc-border);
}

.pc-thumb img {
	display: block;
	width: 100%;
	height: auto;
}

.pc-more {
	display: inline-block;
	margin-top: 8px;
	font-family: var(--pc-font-mono);
	font-size: 12.5px;
	color: var(--pc-green);
}

.pc-tags {
	margin-top: 14px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.pc-tags a {
	display: inline-block;
	padding: 2px 9px;
	border-radius: 999px;
	background: var(--pc-input);
	color: var(--pc-muted);
	font-family: var(--pc-font-mono);
	font-size: 11.5px;
	text-decoration: none;
}

.pc-tags a::before {
	content: "#";
}

.pc-tags a:hover {
	background: var(--pc-row-active);
	color: var(--pc-text-strong);
}

.page-links {
	margin-top: 14px;
	font-family: var(--pc-font-mono);
	font-size: 12.5px;
	color: var(--pc-muted);
}

.page-links a,
.page-links > span:not(.page-links-title) {
	display: inline-block;
	min-width: 26px;
	padding: 2px 6px;
	margin-left: 4px;
	text-align: center;
	border-radius: 4px;
	background: var(--pc-input);
}

/* Pagination between pages of the log ("scrollback"). */
.pc-main .navigation {
	margin-top: 26px;
}

.pc-main .navigation .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-left: var(--pc-gutter);
	font-family: var(--pc-font-mono);
	font-size: 12.5px;
}

.pc-main .navigation .page-numbers,
.pc-main .navigation .nav-previous a,
.pc-main .navigation .nav-next a {
	display: inline-block;
	padding: 4px 10px;
	border-radius: var(--pc-radius);
	background: var(--pc-input);
	color: var(--pc-text);
	text-decoration: none;
}

.pc-main .navigation .page-numbers.current {
	background: var(--pc-row-active);
	color: var(--pc-text-strong);
}

.pc-main .navigation a:hover {
	background: var(--pc-row-hover);
	color: var(--pc-text-strong);
}

/* Archive / search headers. */
.pc-archive-head {
	padding: 4px 0 18px;
}

.pc-archive-head .archive-description {
	margin: 8px 0 0 var(--pc-gutter);
	color: var(--pc-muted);
}

.pc-empty .pc-entry-body .search-form {
	max-width: 420px;
}

/* ==========================================================================
   Comments — rendered as channel messages
   ========================================================================== */

.pc-comments {
	margin-top: 26px;
}

.pc-comment-list,
.pc-comment-list .children {
	list-style: none;
	margin: 0;
	padding: 0;
}

.pc-comment-list .children {
	margin-left: calc(var(--pc-gutter) + 20px);
	border-left: 1px solid var(--pc-border);
	padding-left: 10px;
}

.pc-msg {
	display: grid;
	grid-template-columns: var(--pc-gutter) minmax(0, 1fr);
	padding: 3px 0;
	font-size: 14px;
}

.pc-msg-stamp {
	font-family: var(--pc-font-mono);
	font-size: 11px;
	color: var(--pc-faint);
	text-align: right;
	padding: 3px 14px 0 0;
	white-space: nowrap;
}

.pc-msg-stamp a {
	color: inherit;
	text-decoration: none;
}

.pc-msg-nick {
	font-family: var(--pc-font-mono);
	font-size: 12.5px;
	font-weight: 700;
	margin-right: 8px;
}

.pc-msg-nick::before {
	content: "<";
	color: var(--pc-faint);
	font-weight: 400;
}

.pc-msg-nick::after {
	content: ">";
	color: var(--pc-faint);
	font-weight: 400;
}

.pc-msg-nick a {
	color: inherit;
	text-decoration: none;
}

.bypostauthor > .pc-msg .pc-msg-nick .pc-nick-mode {
	color: var(--pc-green);
}

.pc-msg-text > p:first-of-type {
	display: inline;
}

.pc-msg-text p {
	margin: 0.35em 0;
}

.pc-msg-avatar {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	vertical-align: -4px;
	margin-right: 6px;
}

.pc-msg-actions {
	display: inline-flex;
	gap: 10px;
	margin-left: 8px;
	font-size: 11.5px;
	opacity: 0;
	transition: opacity 0.12s;
}

.pc-msg:hover .pc-msg-actions,
.pc-msg:focus-within .pc-msg-actions {
	opacity: 1;
}

.pc-msg-actions a {
	color: var(--pc-muted);
}

.pc-msg-pending {
	color: var(--pc-orange);
	font-style: italic;
	font-size: 12px;
}

/* Nick colours, hashed from the author name like an IRC client. */
.pc-nick-0 { color: #62a0ea; }
.pc-nick-1 { color: #57e389; }
.pc-nick-2 { color: #f8e45c; }
.pc-nick-3 { color: #ffa348; }
.pc-nick-4 { color: #f66151; }
.pc-nick-5 { color: #dc8add; }
.pc-nick-6 { color: #99c1f1; }
.pc-nick-7 { color: #8ff0a4; }
.pc-nick-8 { color: #cdab8f; }
.pc-nick-9 { color: #5bc8af; }

:root[data-scheme="light"] .pc-nick-0 { color: #1a5fb4; }
:root[data-scheme="light"] .pc-nick-1 { color: #26a269; }
:root[data-scheme="light"] .pc-nick-2 { color: #9c6e03; }
:root[data-scheme="light"] .pc-nick-3 { color: #c64600; }
:root[data-scheme="light"] .pc-nick-4 { color: #c01c28; }
:root[data-scheme="light"] .pc-nick-5 { color: #813d9c; }
:root[data-scheme="light"] .pc-nick-6 { color: #1c71d8; }
:root[data-scheme="light"] .pc-nick-7 { color: #2ec27e; }
:root[data-scheme="light"] .pc-nick-8 { color: #865e3c; }
:root[data-scheme="light"] .pc-nick-9 { color: #0f7a68; }

.pc-comments-closed {
	margin-top: 16px;
}

/* Comment form — the message entry. */
.comment-respond {
	margin: 22px 0 0 var(--pc-gutter);
	padding: 14px;
	background: var(--pc-pane);
	border: 1px solid var(--pc-border);
	border-radius: 10px;
}

.comment-reply-title {
	margin: 0 0 10px;
	font-family: var(--pc-font-mono);
	font-size: 12.5px;
	font-weight: 400;
	color: var(--pc-green);
}

.comment-reply-title small {
	margin-left: 8px;
	font-size: inherit;
}

.comment-respond p {
	margin: 0 0 10px;
}

.comment-respond label {
	display: block;
	margin-bottom: 3px;
	font-size: 12px;
	color: var(--pc-muted);
}

.comment-respond .comment-form-cookies-consent label {
	display: inline;
}

.comment-notes,
.logged-in-as {
	font-size: 12px;
	color: var(--pc-muted);
}

.logged-in-as a {
	color: var(--pc-muted);
}

/* ==========================================================================
   Forms
   ========================================================================== */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="date"],
select,
textarea {
	width: 100%;
	padding: 7px 9px;
	background: var(--pc-input);
	border: 0;
	border-radius: var(--pc-radius);
	outline: 2px solid transparent;
	outline-offset: -2px;
	color: var(--pc-text);
	font: inherit;
	font-size: 13px;
	transition: outline-color 0.2s;
}

textarea {
	min-height: 90px;
	resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
	outline-color: var(--pc-focus-ring);
}

::placeholder {
	color: var(--pc-faint);
	opacity: 1;
}

button,
input[type="submit"],
input[type="button"],
input[type="reset"],
.wp-block-button__link,
.wp-element-button {
	display: inline-block;
	padding: 7px 14px;
	background: var(--pc-button);
	border: 0;
	border-radius: var(--pc-radius);
	color: var(--pc-text-strong);
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
.wp-block-button__link:hover,
.wp-element-button:hover {
	background: var(--pc-button-hover);
	color: var(--pc-text-strong);
}

.comment-respond input[type="submit"],
.post-password-form input[type="submit"] {
	background: var(--pc-accent-bg);
	color: #fff;
}

.search-form {
	display: flex;
	gap: 6px;
}

.search-form label {
	flex: 1;
	margin: 0;
}

.post-password-form {
	margin-left: var(--pc-gutter);
}

/* ==========================================================================
   Bottom entry bar — nick + search ("Message")
   ========================================================================== */

.pc-entrybar {
	grid-area: entry;
	position: relative;
	z-index: 2;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 14px;
	padding: 6px 12px 6px 24px;
	background: var(--pc-header);
	transition: box-shadow 0.2s;
}

/* Shade only while there is more log below, like a bottom bar in AdwToolbarView. */
.pc-stage.has-more .pc-entrybar {
	box-shadow: 0 -1px var(--pc-shade);
}

.pc-entrybar-nick {
	font-size: 12px;
	font-weight: 700;
	color: var(--pc-text-strong);
	white-space: nowrap;
	max-width: 120px;
	overflow: hidden;
	text-overflow: ellipsis;
	text-decoration: none;
}

.pc-entrybar form {
	margin: 0;
}

.pc-entrybar input[type="search"] {
	height: 34px;
	padding: 0 9px;
	font-size: 12.5px;
	-webkit-appearance: none;
	appearance: none;
}

.pc-lag {
	font-size: 10px;
	color: var(--pc-muted);
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Right pane — the user list, home to widgets
   ========================================================================== */

.pc-aside {
	grid-area: aside;
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
	overflow: hidden;
	background: var(--pc-pane);
	border-left: 1px solid var(--pc-border);
}

/* Fixed-width contents, so collapsing slides the pane away instead of squashing it. */
.pc-aside > * {
	width: var(--pc-aside-size);
}

.pc-aside-count {
	flex-shrink: 0;
	margin: 0;
	padding: 12px 10px 6px;
	text-align: center;
	font-size: 10px;
	color: var(--pc-muted);
}

.pc-aside-body {
	flex: 1;
	overflow-y: auto;
	padding: 4px 6px 20px;
}

.pc-aside .widget {
	margin: 0 0 16px;
	font-size: 12.5px;
}

.pc-aside .widget-title,
.pc-aside .widget h2,
.pc-aside .wp-block-heading {
	margin: 6px 8px 6px;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--pc-muted);
}

.pc-aside .widget-title a,
.pc-aside .widget h2 a {
	color: inherit;
	text-decoration: none;
}

/* RSS icon in the classic RSS widget title. */
.pc-aside .widget_rss .widget-title .rsswidget:first-child {
	display: inline-block;
	margin-right: 4px;
}

.pc-aside .widget_rss .widget-title img.rss-widget-icon {
	vertical-align: -1px;
	filter: grayscale(1) brightness(1.4);
}

/* Lists inside widgets look like the nick list. */
.pc-aside .widget ul,
.pc-aside .widget ol {
	list-style: none;
	margin: 0;
	padding: 0;
}

.pc-aside .widget li {
	position: relative;
	padding: 5px 8px 5px 28px;
	border-radius: var(--pc-radius);
	color: var(--pc-text);
	line-height: 1.4;
	overflow-wrap: anywhere;
}

.pc-aside .widget li::before {
	content: "\2022";
	position: absolute;
	left: 12px;
	top: 5px;
	color: var(--pc-faint);
	font-size: 11px;
}

.pc-aside .widget li:hover {
	background: var(--pc-row-hover);
}

.pc-aside .widget li a {
	color: var(--pc-text);
	text-decoration: none;
}

.pc-aside .widget li a:hover,
.pc-aside .widget li a:focus-visible {
	color: var(--pc-text-strong);
	text-decoration: underline;
}

.pc-aside .widget li ul {
	margin-top: 4px;
}

/* Mode prefixes, the way the nick list shows "@" and "+". */
.pc-aside .widget_recent_entries li::before,
.pc-aside .wp-block-latest-posts li::before {
	content: "@";
	color: var(--pc-green);
}

.pc-aside .widget_rss li::before,
.pc-aside .wp-block-rss li::before {
	content: "+";
	color: var(--pc-blue);
	font-size: 12px;
}

.pc-aside .widget_recent_comments li::before,
.pc-aside .wp-block-latest-comments li::before {
	content: "~";
	color: var(--pc-magenta);
	font-size: 12px;
}

.pc-aside .widget_categories li::before,
.pc-aside .wp-block-categories li::before,
.pc-aside .widget_tag_cloud a::before {
	content: "#";
	color: var(--pc-muted);
	font-size: 12px;
}

.pc-aside .widget_archive li::before,
.pc-aside .wp-block-archives li::before {
	content: "%";
	color: var(--pc-orange);
	font-size: 12px;
}

.pc-aside .widget_meta li::before,
.pc-aside .widget_pages li::before,
.pc-aside .widget_nav_menu li::before,
.pc-aside .wp-block-page-list li::before {
	content: ">";
	color: var(--pc-faint);
	font-size: 12px;
}

/* RSS widget detail. */
.pc-aside .widget_rss .rss-date,
.pc-aside .wp-block-rss__item-publish-date,
.pc-aside .wp-block-latest-posts__post-date,
.pc-aside .post-date {
	display: block;
	margin-top: 1px;
	font-family: var(--pc-font-mono);
	font-size: 10.5px;
	color: var(--pc-faint);
}

.pc-aside .widget_rss .rssSummary,
.pc-aside .wp-block-rss__item-excerpt,
.pc-aside .wp-block-latest-posts__post-excerpt {
	margin-top: 3px;
	color: var(--pc-muted);
	font-size: 12px;
}

.pc-aside .widget_rss cite,
.pc-aside .wp-block-rss__item-author {
	display: block;
	font-style: normal;
	font-size: 11px;
	color: var(--pc-faint);
}

.pc-aside .wp-block-rss {
	padding: 0;
}

/* Tag cloud. */
.pc-aside .tagcloud,
.pc-aside .wp-block-tag-cloud {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	padding: 0 8px;
}

.pc-aside .tagcloud a,
.pc-aside .wp-block-tag-cloud a {
	display: inline-block;
	padding: 2px 8px;
	background: var(--pc-input);
	border-radius: 999px;
	color: var(--pc-text);
	font-family: var(--pc-font-mono);
	font-size: 11px !important;
	text-decoration: none;
}

.pc-aside .tagcloud a:hover,
.pc-aside .wp-block-tag-cloud a:hover {
	background: var(--pc-row-active);
	color: var(--pc-text-strong);
}

/* Calendar. */
.pc-aside .calendar_wrap,
.pc-aside .wp-block-calendar {
	padding: 0 8px;
}

.pc-aside .wp-calendar-table,
.pc-aside #wp-calendar {
	font-family: var(--pc-font-mono);
	font-size: 11px;
	margin: 0;
}

.pc-aside .wp-calendar-table caption,
.pc-aside #wp-calendar caption {
	padding-bottom: 6px;
	color: var(--pc-muted);
}

.pc-aside .wp-calendar-table th,
.pc-aside .wp-calendar-table td,
.pc-aside #wp-calendar th,
.pc-aside #wp-calendar td {
	border: 0;
	padding: 3px 0;
	text-align: center;
	background: none;
}

.pc-aside .wp-calendar-table td a,
.pc-aside #wp-calendar td a {
	color: var(--pc-green);
	font-weight: 700;
}

.pc-aside .wp-calendar-table #today,
.pc-aside #wp-calendar #today {
	background: var(--pc-row-active);
	border-radius: 4px;
}

.pc-aside .wp-calendar-nav {
	display: flex;
	justify-content: space-between;
	font-size: 11px;
	margin-top: 4px;
}

/* Text / custom HTML / search / select widgets. */
.pc-aside .textwidget,
.pc-aside .widget_block > p,
.pc-aside .widget_block .wp-block-group,
.pc-aside .widget select,
.pc-aside .widget .search-form,
.pc-aside .wp-block-search {
	padding: 0 8px;
}

.pc-aside .textwidget p {
	margin: 0 0 0.6em;
}

.pc-aside .widget select {
	width: calc(100% - 16px);
	margin: 0 8px;
}

.pc-aside .wp-block-search__inside-wrapper {
	display: flex;
	gap: 6px;
}

.pc-aside .wp-block-search__label {
	display: block;
	margin-bottom: 4px;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--pc-muted);
}

/* ==========================================================================
   Dialogs
   ========================================================================== */

/* AdwDialog: floating on wide windows, a bottom sheet on narrow ones. */
.pc-dialog {
	width: min(360px, calc(100vw - 24px));
	max-height: min(680px, calc(100dvh - 48px));
	padding: 0;
	background: var(--pc-dialog);
	border: 0;
	border-radius: 14px;
	box-shadow: 0 2px 14px 3px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.2);
	color: var(--pc-text);
	overflow: auto;
	overscroll-behavior: contain;
}

.pc-dialog--wide {
	width: min(480px, calc(100vw - 24px));
}

.pc-dialog::backdrop {
	background: rgba(0, 0, 0, 0.3);
}

.pc-dialog[open] {
	animation: pc-dialog-in var(--pc-dur) var(--pc-ease);
}

.pc-dialog[open]::backdrop {
	animation: pc-fade-in var(--pc-dur) ease-out;
}

.pc-dialog.is-closing {
	animation: pc-dialog-out 0.15s ease-in forwards;
}

.pc-dialog.is-closing::backdrop {
	animation: pc-fade-out 0.15s ease-in forwards;
}

@keyframes pc-dialog-in {
	from {
		opacity: 0;
		transform: scale(0.92);
	}
}

@keyframes pc-dialog-out {
	to {
		opacity: 0;
		transform: scale(0.92);
	}
}

@keyframes pc-fade-in {
	from {
		opacity: 0;
	}
}

@keyframes pc-fade-out {
	to {
		opacity: 0;
	}
}

.pc-dialog-header {
	position: sticky;
	top: 0;
	z-index: 1;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	min-height: 46px;
	padding: 0 11px;
	background: var(--pc-dialog);
}

.pc-dialog-header .pc-window-button {
	grid-column: 3;
	justify-self: end;
}

.pc-dialog-title {
	grid-column: 2;
	margin: 0;
	font-size: 13px;
	font-weight: 700;
}

.pc-dialog-body {
	padding: 0 16px 24px;
}

.pc-section-title {
	margin: 18px 2px 8px;
	font-size: 13px;
	font-weight: 700;
}

.pc-section-title:first-child {
	margin-top: 6px;
}

/* Boxed list rows. */
.pc-boxed-list {
	list-style: none;
	margin: 0;
	padding: 0;
	background: var(--pc-card);
	border-radius: 12px;
	box-shadow: var(--pc-card-shadow);
	text-align: left;
	overflow: hidden;
}

.pc-boxed-list + .pc-boxed-list {
	margin-top: 18px;
}

.pc-boxed-list > li + li {
	border-top: 1px solid var(--pc-card-sep);
}

.pc-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 50px;
	padding: 8px 12px;
	color: var(--pc-text);
	font-size: 13.5px;
	text-decoration: none;
}

a.pc-row:hover,
a.pc-row:focus-visible {
	background: color-mix(in srgb, currentColor 3%, transparent);
	color: var(--pc-text);
}

a.pc-row:active {
	background: color-mix(in srgb, currentColor 8%, transparent);
}

.pc-row svg {
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	fill: currentColor;
	opacity: 0.6;
}

.pc-row-value {
	color: var(--pc-muted);
}

.pc-keys {
	display: flex;
	gap: 4px;
	flex-shrink: 0;
}

.pc-keys kbd {
	min-width: 28px;
	padding: 3px 8px;
	background: color-mix(in srgb, currentColor 10%, transparent);
	border-radius: 6px;
	box-shadow: inset 0 -2px color-mix(in srgb, currentColor 15%, transparent);
	font-family: var(--pc-font-ui);
	font-size: 12px;
	font-weight: 700;
	text-align: center;
}

/* About dialog. */
.pc-about-body {
	padding: 0 16px 24px;
	text-align: center;
}

.pc-about-icon {
	display: block;
	width: 128px;
	height: 128px;
	margin: 0 auto 12px;
	border-radius: 28px;
	object-fit: cover;
}

.pc-about-icon--fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(160deg, color-mix(in oklab, var(--pc-accent-bg) 75%, #fff), var(--pc-accent-bg));
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25), inset 0 -4px color-mix(in oklab, var(--pc-accent-bg) 70%, #000);
}

.pc-about-icon--fallback svg {
	width: 64px;
	height: 64px;
	fill: #ffffff;
}

.pc-about-name {
	margin: 0;
	font-size: 24px;
	font-weight: 800;
	color: var(--pc-text-strong);
	line-height: 1.2;
}

.pc-about-tagline {
	margin: 4px 0 12px;
	color: var(--pc-muted);
}

.pc-pill {
	display: inline-block;
	margin-bottom: 24px;
	padding: 4px 14px;
	background: color-mix(in srgb, var(--pc-accent-bg) 15%, transparent);
	border-radius: 999px;
	color: var(--pc-accent);
	font-size: 12.5px;
	font-weight: 700;
	text-decoration: none;
}

.pc-pill:hover {
	background: color-mix(in srgb, var(--pc-accent-bg) 22%, transparent);
	color: var(--pc-accent);
}

.pc-about-legal {
	margin: 18px 0 0;
	font-size: 11.5px;
	color: var(--pc-muted);
}

/* ==========================================================================
   Toasts
   ========================================================================== */

.pc-toast-overlay {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 64px;
	z-index: 40;
	display: flex;
	justify-content: center;
	padding: 0 12px;
	pointer-events: none;
}

.pc-toast {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 38px;
	max-width: 100%;
	padding: 4px 6px 4px 18px;
	background: var(--pc-osd);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	border-radius: 999px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
	color: #ffffff;
	font-size: 13px;
	pointer-events: auto;
	animation: pc-toast-in var(--pc-dur) var(--pc-ease);
}

.pc-toast.is-leaving {
	animation: pc-toast-out 0.2s ease-in forwards;
}

.pc-toast-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 50%;
	color: #ffffff;
	cursor: pointer;
}

.pc-toast-close:hover {
	background: rgba(255, 255, 255, 0.15);
	color: #ffffff;
}

.pc-toast-close svg {
	width: 12px;
	height: 12px;
	fill: currentColor;
}

@keyframes pc-toast-in {
	from {
		opacity: 0;
		transform: translateY(16px) scale(0.96);
	}
}

@keyframes pc-toast-out {
	to {
		opacity: 0;
		transform: scale(0.96);
	}
}

/* ==========================================================================
   WordPress core classes
   ========================================================================== */

.alignleft {
	float: left;
	margin: 0.3em 1.4em 0.8em 0;
}

.alignright {
	float: right;
	margin: 0.3em 0 0.8em 1.4em;
}

.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.alignwide,
.alignfull {
	clear: both;
}

.pc-entry-body::after {
	content: "";
	display: table;
	clear: both;
}

.wp-caption {
	max-width: 100%;
	margin-bottom: 1.2em;
}

.wp-caption img {
	display: block;
}

.wp-caption-text,
.wp-element-caption,
figcaption {
	margin-top: 6px;
	color: var(--pc-muted);
	font-size: 12px;
	text-align: center;
}

.gallery {
	display: grid;
	grid-template-columns: repeat(var(--pc-gallery-cols, 3), minmax(0, 1fr));
	gap: 8px;
	margin-bottom: 1.2em;
}

.gallery-columns-1 { --pc-gallery-cols: 1; }
.gallery-columns-2 { --pc-gallery-cols: 2; }
.gallery-columns-4 { --pc-gallery-cols: 4; }
.gallery-columns-5 { --pc-gallery-cols: 5; }
.gallery-columns-6 { --pc-gallery-cols: 6; }
.gallery-columns-7 { --pc-gallery-cols: 7; }
.gallery-columns-8 { --pc-gallery-cols: 8; }
.gallery-columns-9 { --pc-gallery-cols: 9; }

.gallery-item {
	margin: 0;
}

.gallery-item img {
	display: block;
	width: 100%;
	border-radius: 4px;
}

.wp-video,
.wp-audio-shortcode,
.wp-block-embed {
	margin-bottom: 1.2em;
}

/* Block editor output (WordPress). ClassicPress simply never emits these. */
.wp-block-image img {
	border-radius: var(--pc-radius);
}

.wp-block-quote {
	border-left-color: var(--pc-magenta);
}

.wp-block-quote cite,
.wp-block-pullquote cite {
	color: var(--pc-faint);
	font-size: 12px;
	font-style: normal;
}

.wp-block-pullquote {
	border-top: 2px solid var(--pc-border);
	border-bottom: 2px solid var(--pc-border);
	color: var(--pc-text-strong);
}

.wp-block-code {
	background: var(--pc-pane);
	border-color: var(--pc-border);
	color: var(--pc-text);
}

.wp-block-separator {
	border: 0;
	border-top: 1px solid var(--pc-border);
}

.wp-block-table td,
.wp-block-table th {
	border-color: var(--pc-border);
}

.wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
	background: var(--pc-pane);
}

.wp-block-cover,
.wp-block-group.has-background {
	border-radius: var(--pc-radius);
}

.wp-block-file {
	display: flex;
	align-items: center;
	gap: 10px;
}

.wp-block-file .wp-block-file__button {
	background: var(--pc-button);
	border-radius: var(--pc-radius);
	color: var(--pc-text-strong);
	font-size: 12px;
}

.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	border: 1px solid var(--pc-input-border);
}

.wp-block-latest-posts.is-grid {
	gap: 12px;
}

.has-text-align-center { text-align: center; }
.has-text-align-right { text-align: right; }

/* Editor palette registered in functions.php. */
.has-pc-text-color { color: var(--pc-text); }
.has-pc-muted-color { color: var(--pc-muted); }
.has-pc-green-color { color: var(--pc-green); }
.has-pc-magenta-color { color: var(--pc-magenta); }
.has-pc-blue-color { color: var(--pc-blue); }
.has-pc-orange-color { color: var(--pc-orange); }
.has-pc-window-background-color { background-color: var(--pc-window); }
.has-pc-pane-background-color { background-color: var(--pc-pane); }
.has-pc-green-background-color { background-color: var(--pc-green); }
.has-pc-magenta-background-color { background-color: var(--pc-magenta); }
.has-pc-blue-background-color { background-color: var(--pc-blue); }

/* ==========================================================================
   Responsive — adaptive layout
   ========================================================================== */

/* Scrim behind the overlaid user list. */
.pc-scrim {
	position: absolute;
	inset: var(--pc-header-height) 0 0 0;
	z-index: 20;
	background: var(--pc-dim);
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--pc-dur) var(--pc-ease), visibility 0s var(--pc-dur);
}

@media (max-width: 1180px) {
	:root {
		--pc-nav-size: 240px;
		--pc-aside-size: 240px;
	}
}

/* Overlay split view collapses: the user list slides over the log. */
@media (max-width: 960px) {
	.pc-stage,
	.pc-aside-hidden .pc-stage {
		--pc-aside-track: 0px;
	}

	.pc-aside,
	.pc-aside-hidden .pc-aside {
		/* Out of the grid, so it is positioned against the whole stage. */
		grid-area: auto;
		position: absolute;
		top: var(--pc-header-height);
		right: 0;
		bottom: 0;
		z-index: 30;
		width: min(calc(var(--pc-aside-size) + 20px), 86%);
		visibility: hidden;
		transform: translateX(100%);
		box-shadow: -1px 0 var(--pc-shade), -4px 0 16px rgba(0, 0, 0, 0.18);
		transition: transform var(--pc-dur) var(--pc-ease), visibility 0s var(--pc-dur);
	}

	.pc-aside > * {
		width: auto;
	}

	.pc-aside-open .pc-aside {
		visibility: visible;
		transform: none;
		transition: transform var(--pc-dur) var(--pc-ease), visibility 0s;
	}

	.pc-aside-open .pc-scrim {
		opacity: 1;
		visibility: visible;
		transition: opacity var(--pc-dur) var(--pc-ease), visibility 0s;
	}
}

/* Navigation split view collapses: the channel list becomes the page underneath. */
@media (max-width: 720px) {
	:root {
		--pc-gutter: 52px;
	}

	.pc-window,
	.pc-maximized .pc-window,
	.pc-nav-hidden .pc-window {
		grid-template-columns: minmax(0, 1fr);
		margin: 0;
		height: 100vh;
		height: 100dvh;
		border: 0;
		border-radius: 0;
		box-shadow: none;
	}

	.admin-bar .pc-window,
	.pc-maximized .admin-bar .pc-window {
		height: calc(100vh - 46px);
		height: calc(100dvh - 46px);
	}

	.pc-nav,
	.pc-stage {
		grid-row: 1;
		grid-column: 1;
	}

	.pc-nav,
	.pc-nav-hidden .pc-nav {
		z-index: 1;
		align-items: stretch;
		border-right: 0;
		visibility: hidden;
		transition: visibility 0s var(--pc-dur);
	}

	.pc-nav > * {
		width: auto;
	}

	/* Dimming on the page underneath, lifted as the content slides away. */
	.pc-nav::after {
		content: "";
		position: absolute;
		inset: 0;
		background: var(--pc-dim);
		opacity: var(--pc-shade-o, 1);
		pointer-events: none;
		transition: opacity var(--pc-dur) var(--pc-ease);
	}

	.pc-stage {
		z-index: 2;
		box-shadow: -1px 0 var(--pc-shade), -6px 0 18px rgba(0, 0, 0, 0.2);
		transition: transform var(--pc-dur) var(--pc-ease), visibility 0s;
	}

	.pc-nav-open .pc-nav {
		visibility: visible;
		transition: visibility 0s;
	}

	.pc-nav-open .pc-nav::after {
		opacity: var(--pc-shade-o, 0);
	}

	.pc-nav-open .pc-stage {
		visibility: hidden;
		transform: translateX(100%);
		transition: transform var(--pc-dur) var(--pc-ease), visibility 0s var(--pc-dur);
	}

	/* Arriving from the channel list: the new page slides in over it. */
	.pc-forward .pc-stage {
		animation: pc-push var(--pc-dur) var(--pc-ease);
	}

	.pc-forward .pc-nav {
		animation: pc-keep-visible var(--pc-dur) step-end;
	}

	.pc-forward .pc-nav::after {
		animation: pc-fade-in var(--pc-dur) var(--pc-ease);
	}

	.pc-back {
		display: inline-flex;
	}

	.pc-headerbar {
		padding: 0 6px;
		gap: 4px;
	}

	.pc-window-controls {
		display: none;
	}

	.pc-main {
		padding: 6px 12px 24px;
	}

	.pc-stamp {
		padding-right: 8px;
		font-size: 10px;
	}

	.pc-entry-body {
		margin-left: 0;
	}

	.comment-respond,
	.post-password-form,
	.pc-archive-head .archive-description,
	.pc-main .navigation .nav-links {
		margin-left: 0;
	}

	.pc-comment-list .children {
		margin-left: 14px;
	}

	.pc-entrybar {
		padding: 6px 10px;
		gap: 8px;
	}

	.pc-entrybar-nick {
		max-width: 80px;
	}

	.pc-lag {
		display: none;
	}
}

@keyframes pc-push {
	from {
		transform: translateX(100%);
	}
}

@keyframes pc-keep-visible {
	from {
		visibility: visible;
	}
}

/* Dialogs turn into bottom sheets. */
@media (max-width: 450px) {
	.pc-dialog,
	.pc-dialog--wide {
		width: 100%;
		max-width: none;
		max-height: calc(100dvh - 40px);
		margin: auto 0 0;
		border-radius: 14px 14px 0 0;
	}

	.pc-dialog::before {
		content: "";
		display: block;
		width: 40px;
		height: 4px;
		margin: 6px auto -4px;
		border-radius: 2px;
		background: color-mix(in srgb, currentColor 25%, transparent);
	}

	.pc-dialog[open] {
		animation-name: pc-sheet-in;
	}

	.pc-dialog.is-closing {
		animation-name: pc-sheet-out;
	}
}

@keyframes pc-sheet-in {
	from {
		transform: translateY(100%);
	}
}

@keyframes pc-sheet-out {
	to {
		transform: translateY(100%);
	}
}

/* Fingers on the glass: follow them, no easing. */
.pc-dragging .pc-stage,
.pc-dragging .pc-nav,
.pc-dragging .pc-nav::after,
.pc-dragging .pc-aside,
.pc-dragging .pc-scrim {
	transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
	.pc-forward .pc-stage,
	.pc-forward .pc-nav,
	.pc-forward .pc-nav::after,
	.pc-dialog[open],
	.pc-dialog[open]::backdrop,
	.pc-popover,
	.pc-toast {
		animation: none;
	}

	.pc-msg-actions {
		transition: none;
	}
}

@media print {
	body {
		background: #fff;
		color: #000;
	}

	.pc-window,
	.pc-stage {
		display: block;
		height: auto;
		margin: 0;
		border: 0;
		box-shadow: none;
	}

	.pc-nav,
	.pc-aside,
	.pc-headerbar-start,
	.pc-headerbar-end,
	.pc-entrybar,
	.pc-toast-overlay,
	.comment-respond,
	.pc-main .navigation {
		display: none !important;
	}

	.pc-main {
		overflow: visible;
	}
}
