/*
 * base.css — Workstream D: header, menu panel, footer, toasts, reading pages,
 * lists, search, comments. Tokens only (assets/css/tokens.css); light + dark.
 */

/* ==========================================================================
   0. Local tokens (derived from foundation tokens only)
   ========================================================================== */

:root {
	--tpb-header-side: 96px;     /* space reserved on each side of the centred title */
	--tpb-read-bg: var(--tpb-surface);
	--tpb-ring: 0 0 0 4px rgba(0, 113, 227, 0.18);
	--tpb-adminbar-h: 0px;
	--tpb-adminbar-top: 0px;
}
:root[data-theme="dark"] {
	--tpb-read-bg: var(--tpb-bg);
	--tpb-ring: 0 0 0 4px rgba(41, 151, 255, 0.24);
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
	:root,
	:root[data-theme="dark"] {
		--tpb-ring: 0 0 0 4px color-mix(in srgb, var(--tpb-accent) 22%, transparent);
	}
}
@media (min-width: 768px) {
	:root { --tpb-header-side: 160px; }
}

/* Feed views: footer collapses into the menu on mobile, a slim bar on larger screens. */
body.tpb-feed-view { --tpb-footer-h: 0px; }
@media (min-width: 768px) {
	body.tpb-feed-view { --tpb-footer-h: 40px; }
}

/* WordPress admin bar offsets (logged-in users). */
body.admin-bar { --tpb-adminbar-h: 32px; --tpb-adminbar-top: 32px; }
@media (max-width: 782px) {
	body.admin-bar { --tpb-adminbar-h: 46px; --tpb-adminbar-top: 46px; }
}
@media (max-width: 600px) {
	body.admin-bar { --tpb-adminbar-top: 0px; }
}

/* ==========================================================================
   1. Page basics
   ========================================================================== */

body.tpb {
	overflow-x: clip; /* never a horizontal scrollbar; `clip` keeps position: sticky working */
	font-feature-settings: "kern", "liga";
}
/* Reading views: footer sits at the bottom even on short pages. (Feed layout is A's.) */
body.tpb-reading-view {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100dvh;
	background: var(--tpb-read-bg);
}
body.tpb-reading-view > .tpb-main { flex: 1 0 auto; width: 100%; }

html.tpb-menu-open,
html.tpb-menu-open body {
	overflow: hidden;
}
html.tpb-menu-open body { padding-right: var(--tpb-scrollbar, 0px); }

.tpb-main:focus { outline: none; }

.tpb-skip:focus {
	position: fixed !important;
	z-index: calc(var(--tpb-z-toast) + 1);
}

.tpb-icon {
	width: 20px;
	height: 20px;
	flex: none;
}

a { text-decoration-thickness: 1px; text-underline-offset: 0.18em; }

/* ==========================================================================
   2. Header
   ========================================================================== */

.tpb-header {
	position: relative;
	z-index: var(--tpb-z-header);
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: var(--tpb-header-h);
	padding-inline: max(var(--tpb-gutter), env(safe-area-inset-left, 0px)) max(var(--tpb-gutter), env(safe-area-inset-right, 0px));
	background: var(--tpb-glass);
	-webkit-backdrop-filter: var(--tpb-blur);
	backdrop-filter: var(--tpb-blur);
	border-bottom: 1px solid transparent;
	transition:
		transform var(--tpb-dur) var(--tpb-ease-spring),
		border-color var(--tpb-dur) var(--tpb-ease-out),
		background-color var(--tpb-dur) var(--tpb-ease-out);
}
.tpb-header-sticky .tpb-header,
.tpb-feed-view .tpb-header {
	position: sticky;
	top: var(--tpb-adminbar-top);
}
.tpb-header.is-scrolled,
.tpb-feed-view .tpb-header {
	border-bottom-color: var(--tpb-hairline);
}
.tpb-header.is-hidden {
	transform: translateY(calc(-100% - var(--tpb-adminbar-top) - 2px));
}

.tpb-header__left,
.tpb-header__right {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	gap: var(--tpb-space-1);
	min-width: 0;
	max-width: var(--tpb-header-side);
}
.tpb-header__left { justify-content: flex-start; margin-left: -8px; }
.tpb-header__right { justify-content: flex-end; margin-right: -8px; }

/* Title is centred on the bar itself, whatever sits left or right of it. */
.tpb-header__title {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	max-width: calc(100% - 2 * var(--tpb-header-side));
	text-align: center;
	line-height: 1.1;
}
.tpb-brand {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	max-width: 100%;
	color: var(--tpb-text);
	text-decoration: none;
	transition: transform var(--tpb-dur) var(--tpb-ease-spring), opacity var(--tpb-dur-fast) var(--tpb-ease-out);
}
.tpb-brand:hover { opacity: 0.78; }
.tpb-header.is-scrolled .tpb-brand { transform: scale(0.965); }
.tpb-brand__title {
	max-width: 100%;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	font-family: var(--tpb-font-display);
	font-size: 1.0625rem;
	font-weight: 600;
	letter-spacing: -0.012em;
}
.tpb-brand__tagline {
	max-width: 100%;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	margin-top: 2px;
	font-size: 0.6875rem;
	letter-spacing: 0.01em;
	color: var(--tpb-muted);
}
.tpb-brand__logo {
	width: auto;
	max-height: 30px;
	max-width: 100%;
}
.tpb-brand__logo + .screen-reader-text + .tpb-brand__tagline { margin-top: 1px; }

/* Reading progress (single posts) */
.tpb-progress {
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 2px;
	overflow: hidden;
	pointer-events: none;
}
.tpb-progress__bar {
	display: block;
	height: 100%;
	background: var(--tpb-accent);
	transform: scaleX(0);
	transform-origin: 0 50%;
	will-change: transform;
}
[dir="rtl"] .tpb-progress__bar { transform-origin: 100% 50%; }

/* ==========================================================================
   3. Icon buttons, menu icon, sun/moon
   ========================================================================== */

.tpb-iconbtn {
	position: relative;
	display: inline-grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: var(--tpb-radius-pill);
	background: transparent;
	color: var(--tpb-text);
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: background-color var(--tpb-dur-fast) var(--tpb-ease-out), transform var(--tpb-dur-fast) var(--tpb-ease-out);
}
.tpb-iconbtn:hover { background: var(--tpb-tag-bg); }
.tpb-iconbtn:active { transform: scale(0.92); }
.tpb-iconbtn .tpb-icon { width: 22px; height: 22px; }

/* Hide the header sun/moon on the narrowest phones; it is always in the menu. */
@media (max-width: 359.98px) {
	.tpb-header .tpb-themebtn { display: none; }
}

/* Two lines → × */
.tpb-menubtn__lines {
	position: relative;
	display: block;
	width: 20px;
	height: 14px;
}
.tpb-menubtn__lines span {
	position: absolute;
	left: 0;
	right: 0;
	height: 1.6px;
	border-radius: 2px;
	background: currentColor;
	transition: transform var(--tpb-dur) var(--tpb-ease-spring);
}
.tpb-menubtn__lines span:first-child { top: 3px; }
.tpb-menubtn__lines span:last-child {
	top: 9.4px;
	transform: scaleX(0.66);
	transform-origin: 100% 50%;
}
.tpb-menubtn:hover .tpb-menubtn__lines span:last-child { transform: scaleX(1); }
.tpb-menubtn.is-active .tpb-menubtn__lines span:first-child,
.tpb-menubtn[aria-expanded="true"] .tpb-menubtn__lines span:first-child {
	transform: translateY(3.2px) rotate(45deg);
}
.tpb-menubtn.is-active .tpb-menubtn__lines span:last-child,
.tpb-menubtn[aria-expanded="true"] .tpb-menubtn__lines span:last-child {
	transform: translateY(-3.2px) rotate(-45deg);
	transform-origin: 50% 50%;
}

/* Sun ↔ moon morph, driven by the active theme */
.tpb-sunmoon { overflow: visible; }
.tpb-sunmoon__core {
	transform-box: fill-box;
	transform-origin: center;
	transition: transform var(--tpb-dur-slow) var(--tpb-ease-spring);
}
.tpb-sunmoon__cut {
	transition: transform var(--tpb-dur-slow) var(--tpb-ease-spring);
}
.tpb-sunmoon__rays {
	transform-origin: 12px 12px;
	transition: transform var(--tpb-dur-slow) var(--tpb-ease-spring), opacity var(--tpb-dur) var(--tpb-ease-out);
}
:root[data-theme="dark"] .tpb-sunmoon__core { transform: scale(1.7); }
:root[data-theme="dark"] .tpb-sunmoon__cut { transform: translate(-12px, 6.5px); }
:root[data-theme="dark"] .tpb-sunmoon__rays { transform: rotate(-45deg) scale(0.5); opacity: 0; }

/* ==========================================================================
   4. Menu panel
   ========================================================================== */

.tpb-menu {
	position: fixed;
	inset: 0;
	z-index: var(--tpb-z-menu);
}
.tpb-menu[hidden] { display: none; }

.tpb-menu__backdrop {
	position: absolute;
	inset: 0;
	background: var(--tpb-overlay);
	-webkit-backdrop-filter: blur(10px) saturate(120%);
	backdrop-filter: blur(10px) saturate(120%);
	opacity: 0;
	transition: opacity var(--tpb-dur) var(--tpb-ease-out);
}
.tpb-menu.is-open .tpb-menu__backdrop { opacity: 1; }

.tpb-menu__panel {
	position: absolute;
	top: var(--tpb-adminbar-top);
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	width: min(420px, 100%);
	background: var(--tpb-surface);
	box-shadow: var(--tpb-shadow-lift);
	transform: translateX(104%);
	transition: transform var(--tpb-dur-slow) var(--tpb-ease-spring);
	will-change: transform;
	outline: none;
}
.tpb-menu.is-open .tpb-menu__panel { transform: none; }
.tpb-menu.is-closing .tpb-menu__panel {
	transition-duration: var(--tpb-dur);
	transition-timing-function: var(--tpb-ease-in-out);
}
@media (min-width: 768px) {
	.tpb-menu__panel {
		border-top-left-radius: var(--tpb-radius);
		border-bottom-left-radius: var(--tpb-radius);
	}
}

.tpb-menu__top {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: space-between;
	gap: var(--tpb-space-3);
	height: var(--tpb-header-h);
	padding: 0 max(var(--tpb-gutter), env(safe-area-inset-right, 0px)) 0 var(--tpb-space-5);
	border-bottom: 1px solid var(--tpb-hairline);
}
.tpb-menu__top .tpb-menubtn { margin-right: -8px; }
.tpb-menu__heading {
	min-width: 0;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	font-size: var(--tpb-fs-eyebrow);
	font-weight: 600;
	letter-spacing: var(--tpb-tracking-eyebrow);
	text-transform: uppercase;
	color: var(--tpb-muted);
}

.tpb-menu__scroll {
	flex: 1 1 auto;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	padding: var(--tpb-space-5) var(--tpb-space-5) calc(var(--tpb-space-7) + env(safe-area-inset-bottom, 0px));
}

/* Staggered entrance */
.tpb-menu__section {
	opacity: 0;
	transform: translateX(28px);
	transition:
		opacity var(--tpb-dur) var(--tpb-ease-out),
		transform var(--tpb-dur-slow) var(--tpb-ease-spring);
	transition-delay: calc(80ms + var(--i, 0) * 60ms);
}
.tpb-menu.is-open .tpb-menu__section { opacity: 1; transform: none; }
.tpb-menu.is-closing .tpb-menu__section { transition-delay: 0s; }
.tpb-menu__section + .tpb-menu__section { margin-top: var(--tpb-space-6); }

/* Nav items stagger individually instead of as one block */
.tpb-menu__section.tpb-menu__nav { opacity: 1; transform: none; }
.tpb-menu .tpb-nav > li {
	opacity: 0;
	transform: translateX(32px);
	transition:
		opacity var(--tpb-dur) var(--tpb-ease-out),
		transform var(--tpb-dur-slow) var(--tpb-ease-spring);
}
.tpb-menu.is-open .tpb-nav > li { opacity: 1; transform: none; }
.tpb-menu.is-closing .tpb-nav > li { transition-delay: 0s !important; }
.tpb-menu .tpb-nav > li:nth-child(1) { transition-delay: 120ms; }
.tpb-menu .tpb-nav > li:nth-child(2) { transition-delay: 150ms; }
.tpb-menu .tpb-nav > li:nth-child(3) { transition-delay: 180ms; }
.tpb-menu .tpb-nav > li:nth-child(4) { transition-delay: 210ms; }
.tpb-menu .tpb-nav > li:nth-child(5) { transition-delay: 240ms; }
.tpb-menu .tpb-nav > li:nth-child(6) { transition-delay: 270ms; }
.tpb-menu .tpb-nav > li:nth-child(7) { transition-delay: 300ms; }
.tpb-menu .tpb-nav > li:nth-child(8) { transition-delay: 330ms; }
.tpb-menu .tpb-nav > li:nth-child(n+9) { transition-delay: 360ms; }

.tpb-nav,
.tpb-nav .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}
.tpb-nav > li > a {
	display: block;
	padding: 7px 0;
	font-family: var(--tpb-font-display);
	font-size: clamp(1.625rem, 1.4rem + 0.8vw, 2rem);
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: var(--tpb-tracking-title);
	color: var(--tpb-text);
	text-decoration: none;
	transition: color var(--tpb-dur-fast) var(--tpb-ease-out), transform var(--tpb-dur) var(--tpb-ease-spring);
}
.tpb-nav > li > a:hover { color: var(--tpb-muted); }
.tpb-nav > li > a:active { transform: scale(0.98); transform-origin: 0 50%; }
.tpb-nav .current-menu-item > a,
.tpb-nav .current-menu-ancestor > a { color: var(--tpb-accent); }
.tpb-nav .sub-menu { margin: 2px 0 10px; }
.tpb-nav .sub-menu a {
	display: block;
	padding: 5px 0;
	font-size: 1rem;
	color: var(--tpb-text-2);
	text-decoration: none;
}
.tpb-nav .sub-menu a:hover { color: var(--tpb-text); }

.tpb-menu__label {
	margin: 0 0 var(--tpb-space-2) var(--tpb-space-4);
	font-size: var(--tpb-fs-eyebrow);
	font-weight: 600;
	letter-spacing: var(--tpb-tracking-eyebrow);
	text-transform: uppercase;
	color: var(--tpb-muted);
}

/* Grouped list (iOS settings feel) */
.tpb-group {
	overflow: hidden;
	border-radius: var(--tpb-radius);
	background: var(--tpb-tag-bg);
}
.tpb-switch-row {
	position: relative;
	display: grid;
	grid-template-columns: 28px 1fr auto;
	align-items: center;
	gap: var(--tpb-space-3);
	width: 100%;
	min-height: 52px;
	padding: 10px var(--tpb-space-4);
	border: 0;
	background: transparent;
	color: var(--tpb-text);
	font-size: 1rem;
	text-align: left;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: background-color var(--tpb-dur-fast) var(--tpb-ease-out);
}
.tpb-switch-row:hover { background: var(--tpb-tag-bg); }
.tpb-switch-row + .tpb-switch-row::before {
	content: "";
	position: absolute;
	top: 0;
	left: 56px;
	right: 0;
	height: 1px;
	background: var(--tpb-hairline);
}
.tpb-switch-row:focus-visible { outline-offset: -3px; }
.tpb-switch-row__icon { display: grid; place-items: center; color: var(--tpb-text-2); }
.tpb-switch-row__icon .tpb-icon { width: 22px; height: 22px; }
.tpb-switch-row__label { min-width: 0; }

.tpb-switch {
	position: relative;
	display: block;
	width: 46px;
	height: 28px;
	border-radius: var(--tpb-radius-pill);
	background: var(--tpb-hairline-strong);
	transition: background-color var(--tpb-dur) var(--tpb-ease-out);
}
.tpb-switch__knob {
	position: absolute;
	top: 2px;
	left: 2px;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--tpb-accent-contrast);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18), 0 0 0 0.5px rgba(0, 0, 0, 0.06);
	transition: transform var(--tpb-dur) var(--tpb-ease-spring), width var(--tpb-dur-fast) var(--tpb-ease-out);
}
.tpb-switch-row:active .tpb-switch__knob { width: 28px; }
.tpb-switch-row[aria-pressed="true"] .tpb-switch { background: var(--tpb-accent); }
.tpb-switch-row[aria-pressed="true"] .tpb-switch__knob { transform: translateX(18px); }
.tpb-switch-row[aria-pressed="true"]:active .tpb-switch__knob { transform: translateX(14px); }

/* Sound icon: waves dim when muted, breathe while playing */
.tpb-icon-sound__wave { opacity: 0.25; transition: opacity var(--tpb-dur) var(--tpb-ease-out); }
.tpb-switch-row.is-on .tpb-icon-sound__wave { opacity: 1; }
.tpb-switch-row.is-playing .tpb-icon-sound__wave { animation: tpb-breathe 1.6s var(--tpb-ease-in-out) infinite; }
@keyframes tpb-breathe {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.45; }
}

/* Footer content inside the menu: phones only (the feed is full-screen there). */
.tpb-menu__footer {
	display: none;
	padding-top: var(--tpb-space-5);
	border-top: 1px solid var(--tpb-hairline);
	font-size: var(--tpb-fs-meta);
	color: var(--tpb-muted);
}
@media (max-width: 767.98px) {
	.tpb-menu__footer { display: block; }
}
.tpb-menu__footer .tpb-footer-links { margin-bottom: var(--tpb-space-4); }
.tpb-menu__footer .tpb-footer-meta { flex-direction: column; align-items: flex-start; }

/* ==========================================================================
   5. Search form
   ========================================================================== */

.tpb-search {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
}
.tpb-search__icon {
	position: absolute;
	left: 14px;
	width: 18px;
	height: 18px;
	color: var(--tpb-muted);
	pointer-events: none;
}
.tpb-search__input {
	width: 100%;
	height: 46px;
	padding: 0 16px 0 42px;
	border: 1px solid transparent;
	border-radius: var(--tpb-radius-sm);
	background: var(--tpb-tag-bg);
	color: var(--tpb-text);
	font: inherit;
	font-size: 1rem; /* ≥16px: no iOS zoom on focus */
	-webkit-appearance: none;
	appearance: none;
	transition: background-color var(--tpb-dur-fast) var(--tpb-ease-out), border-color var(--tpb-dur-fast) var(--tpb-ease-out), box-shadow var(--tpb-dur-fast) var(--tpb-ease-out);
}
.tpb-search__input::placeholder { color: var(--tpb-muted); opacity: 1; }
.tpb-search__input:focus {
	outline: none;
	background: var(--tpb-surface);
	border-color: var(--tpb-accent);
	box-shadow: var(--tpb-ring);
}

/* ==========================================================================
   6. Footer
   ========================================================================== */

.tpb-footer {
	margin-top: var(--tpb-space-8);
	padding: var(--tpb-space-7) max(var(--tpb-gutter), env(safe-area-inset-right, 0px)) calc(var(--tpb-space-7) + env(safe-area-inset-bottom, 0px)) max(var(--tpb-gutter), env(safe-area-inset-left, 0px));
	border-top: 1px solid var(--tpb-hairline);
	background: var(--tpb-bg);
	color: var(--tpb-muted);
	font-size: var(--tpb-fs-meta);
	line-height: 1.5;
}
.tpb-footer__inner {
	display: grid;
	gap: var(--tpb-space-5);
	max-width: var(--tpb-max-w);
	margin: 0 auto;
}
@media (min-width: 768px) {
	.tpb-footer { padding-inline: 32px; }
	.tpb-footer__inner { grid-template-columns: 1fr auto; align-items: center; }
	.tpb-footer__inner > .tpb-footer-meta { grid-column: 1 / -1; }
}
.tpb-footer__brand a {
	font-family: var(--tpb-font-display);
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: -0.01em;
	color: var(--tpb-text);
	text-decoration: none;
}

.tpb-footer-links {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.tpb-footer-links a {
	color: var(--tpb-text-2);
	text-decoration: none;
	transition: color var(--tpb-dur-fast) var(--tpb-ease-out);
}
.tpb-footer-links a:hover { color: var(--tpb-text); text-decoration: underline; }

.tpb-footer-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--tpb-space-3) var(--tpb-space-5);
	padding-top: var(--tpb-space-5);
	border-top: 1px solid var(--tpb-hairline);
}
.tpb-menu__footer .tpb-footer-meta { padding-top: 0; border-top: 0; }
.tpb-footer-meta__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--tpb-space-2) var(--tpb-space-3);
}
.tpb-footer__text { margin: 0; }
.tpb-footer__text a,
.tpb-footer__note a { color: inherit; }
.tpb-footer__note {
	order: 3;
	flex-basis: 100%;
	max-width: 72ch;
	margin: 0;
	font-size: 0.75rem;
	line-height: 1.55;
}

.tpb-social {
	display: flex;
	gap: 2px;
	margin: 0 -8px 0 0;
	padding: 0;
	list-style: none;
}
.tpb-social a {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: var(--tpb-radius-pill);
	color: var(--tpb-muted);
	transition: color var(--tpb-dur-fast) var(--tpb-ease-out), background-color var(--tpb-dur-fast) var(--tpb-ease-out), transform var(--tpb-dur-fast) var(--tpb-ease-out);
}
.tpb-social a:hover { color: var(--tpb-text); background: var(--tpb-tag-bg); }
.tpb-social a:active { transform: scale(0.92); }
.tpb-social .tpb-icon { width: 18px; height: 18px; }
.tpb-menu__footer .tpb-social { margin: 0 0 0 -8px; }

.tpb-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 22px;
	padding: 0 10px;
	border: 1px solid var(--tpb-hairline);
	border-radius: var(--tpb-radius-pill);
	background: var(--tpb-tag-bg);
	color: var(--tpb-text-2);
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	white-space: nowrap;
}
.tpb-badge__dot {
	position: relative;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--tpb-accent);
}
.tpb-badge__dot::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: var(--tpb-accent);
	animation: tpb-ping 2.4s var(--tpb-ease-out) infinite;
}
@keyframes tpb-ping {
	0% { transform: scale(1); opacity: 0.6; }
	70%, 100% { transform: scale(2.8); opacity: 0; }
}

/* Feed views: hidden on phones (content is in the menu), a slim glass bar ≥768px. */
.tpb-footer--compact { display: none; }
@media (min-width: 768px) {
	.tpb-footer--compact {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: var(--tpb-z-controls);
		display: block;
		height: var(--tpb-footer-h);
		margin: 0;
		padding: 0 max(var(--tpb-gutter), env(safe-area-inset-right, 0px)) 0 max(var(--tpb-gutter), env(safe-area-inset-left, 0px));
		background: var(--tpb-glass);
		-webkit-backdrop-filter: var(--tpb-blur);
		backdrop-filter: var(--tpb-blur);
		font-size: 0.75rem;
	}
	.tpb-footer--compact .tpb-footer__inner {
		display: flex;
		align-items: center;
		gap: var(--tpb-space-5);
		height: 100%;
		max-width: none;
	}
	.tpb-footer--compact .tpb-footer-meta {
		order: 1;
		flex: 1 1 auto;
		flex-wrap: nowrap;
		min-width: 0;
		padding: 0;
		border: 0;
		justify-content: flex-start;
	}
	.tpb-footer--compact .tpb-footer-meta__row { flex-wrap: nowrap; flex: none; }
	.tpb-footer--compact .tpb-footer__text { white-space: nowrap; }
	.tpb-footer--compact .tpb-footer__note {
		order: 0;
		flex: 1 1 auto;
		min-width: 0;
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
		font-size: inherit;
	}
	.tpb-footer--compact .tpb-social { margin-left: auto; }
	.tpb-footer--compact .tpb-social a { width: 30px; height: 30px; }
	.tpb-footer--compact .tpb-social .tpb-icon { width: 15px; height: 15px; }
	.tpb-footer--compact .tpb-footer-links { order: 2; flex: none; flex-wrap: nowrap; gap: 16px; }
	.tpb-footer--compact .tpb-badge { height: 20px; }
}

/* ==========================================================================
   7. Toasts
   ========================================================================== */

.tpb-toast-region {
	position: fixed;
	top: calc(var(--tpb-adminbar-top) + var(--tpb-header-h) + 12px);
	left: 50%;
	z-index: var(--tpb-z-toast);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--tpb-space-2);
	width: min(440px, calc(100% - 2 * var(--tpb-gutter)));
	transform: translateX(-50%);
	pointer-events: none;
}
.tpb-toast {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	max-width: 100%;
	padding: 11px 18px 11px 14px;
	border: 1px solid var(--tpb-hairline);
	border-radius: var(--tpb-radius-pill);
	background: var(--tpb-glass);
	-webkit-backdrop-filter: var(--tpb-blur);
	backdrop-filter: var(--tpb-blur);
	box-shadow: var(--tpb-shadow-lift);
	color: var(--tpb-text);
	font-size: 0.9375rem;
	font-weight: 500;
	line-height: 1.35;
	pointer-events: auto;
	cursor: default;
	opacity: 0;
	transform: translateY(-14px) scale(0.94);
	transition:
		opacity var(--tpb-dur) var(--tpb-ease-out),
		transform var(--tpb-dur-slow) var(--tpb-ease-spring);
}
.tpb-toast.is-in { opacity: 1; transform: none; }
.tpb-toast.is-leaving {
	opacity: 0;
	transform: translateY(-8px) scale(0.97);
	transition-duration: var(--tpb-dur), var(--tpb-dur);
	transition-timing-function: var(--tpb-ease-in-out), var(--tpb-ease-in-out);
}
.tpb-toast__dot {
	flex: none;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--tpb-muted);
}
.tpb-toast--success .tpb-toast__dot { background: var(--tpb-positive); }
.tpb-toast--error .tpb-toast__dot { background: var(--tpb-negative); }
.tpb-toast__text { min-width: 0; overflow-wrap: anywhere; }

/* ==========================================================================
   8. Buttons, pills, tags, eyebrow, meta
   ========================================================================== */

.tpb-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--tpb-space-2);
	height: 40px;
	padding: 0 18px;
	border: 1px solid var(--tpb-hairline-strong);
	border-radius: var(--tpb-radius-pill);
	background: transparent;
	color: var(--tpb-text);
	font-size: 0.9375rem;
	font-weight: 500;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: background-color var(--tpb-dur-fast) var(--tpb-ease-out), transform var(--tpb-dur-fast) var(--tpb-ease-out), filter var(--tpb-dur-fast) var(--tpb-ease-out);
}
.tpb-pill:hover { background: var(--tpb-tag-bg); }
.tpb-pill:active { transform: scale(0.97); }
.tpb-pill .tpb-icon { width: 16px; height: 16px; }
.tpb-pill--quiet {
	height: 34px;
	padding: 0 14px;
	border-color: transparent;
	background: var(--tpb-tag-bg);
	font-size: var(--tpb-fs-meta);
}
.tpb-pill--quiet:hover { background: var(--tpb-hairline-strong); }
.tpb-pill--solid,
input.tpb-pill--solid {
	border-color: transparent;
	background: var(--tpb-accent);
	color: var(--tpb-accent-contrast);
}
.tpb-pill--solid:hover { background: var(--tpb-accent); filter: brightness(1.08); }

.tpb-eyebrow {
	display: inline-block;
	margin: 0 0 var(--tpb-space-3);
	font-size: var(--tpb-fs-eyebrow);
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: var(--tpb-tracking-eyebrow);
	text-transform: uppercase;
	color: var(--tpb-accent);
}
.tpb-eyebrow a { color: inherit; text-decoration: none; }
.tpb-eyebrow a:hover { text-decoration: underline; }

.tpb-meta {
	margin: 0;
	font-size: var(--tpb-fs-meta);
	color: var(--tpb-muted);
	font-variant-numeric: tabular-nums;
}
.tpb-meta__sep { margin: 0 var(--tpb-space-2); }

.tpb-tags {
	display: flex;
	flex-wrap: wrap;
	gap: var(--tpb-space-2);
	margin: 0;
	padding: 0;
	list-style: none;
}
.tpb-tag {
	display: inline-flex;
	align-items: center;
	height: 32px;
	padding: 0 14px;
	border-radius: var(--tpb-radius-pill);
	background: var(--tpb-tag-bg);
	color: var(--tpb-text-2);
	font-size: var(--tpb-fs-meta);
	font-weight: 500;
	text-decoration: none;
	transition: background-color var(--tpb-dur-fast) var(--tpb-ease-out), color var(--tpb-dur-fast) var(--tpb-ease-out);
}
.tpb-tag:hover { background: var(--tpb-hairline-strong); color: var(--tpb-text); }

/* ==========================================================================
   9. Containers
   ========================================================================== */

.tpb-container {
	--tpb-pad: var(--tpb-gutter);
	--tpb-w: var(--tpb-max-w);
	width: 100%;
	max-width: calc(var(--tpb-w) + 2 * var(--tpb-pad));
	margin-inline: auto;
	padding-inline: max(var(--tpb-pad), env(safe-area-inset-left, 0px)) max(var(--tpb-pad), env(safe-area-inset-right, 0px));
}
.tpb-container--text { --tpb-w: 680px; }
.tpb-container--list { --tpb-w: 840px; }
.tpb-container--wide { --tpb-w: 1040px; }
@media (min-width: 768px) {
	.tpb-container { --tpb-pad: 32px; }
}

/* ==========================================================================
   10. Article (single + page)
   ========================================================================== */

.tpb-main--article {
	padding: var(--tpb-space-6) 0 var(--tpb-space-7);
}
@media (min-width: 768px) {
	.tpb-main--article { padding-top: var(--tpb-space-7); }
}

.tpb-back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 var(--tpb-space-6) -2px;
	color: var(--tpb-muted);
	font-size: var(--tpb-fs-meta);
	font-weight: 500;
	text-decoration: none;
	transition: color var(--tpb-dur-fast) var(--tpb-ease-out);
}
.tpb-back .tpb-icon {
	width: 16px;
	height: 16px;
	transition: transform var(--tpb-dur) var(--tpb-ease-spring);
}
.tpb-back:hover { color: var(--tpb-text); }
.tpb-back:hover .tpb-icon { transform: translateX(-3px); }

.tpb-article__header .tpb-eyebrow { display: block; }
.tpb-article__title {
	margin: 0 0 var(--tpb-space-4);
	font-family: var(--tpb-font-display);
	font-size: clamp(2rem, 1.35rem + 2.9vw, 3.5rem);
	font-weight: 700;
	line-height: var(--tpb-lh-tight);
	letter-spacing: var(--tpb-tracking-title);
	color: var(--tpb-text);
	text-wrap: balance;
	overflow-wrap: break-word;
}
.tpb-article__dek {
	margin: 0 0 var(--tpb-space-5);
	font-size: clamp(1.1875rem, 1.05rem + 0.55vw, 1.4375rem);
	line-height: 1.42;
	letter-spacing: -0.006em;
	color: var(--tpb-text-2);
	text-wrap: pretty;
}
.tpb-article__byline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--tpb-space-3);
	margin-bottom: var(--tpb-space-6);
	padding-block: var(--tpb-space-3);
	border-block: 1px solid var(--tpb-hairline);
}
.tpb-article--page .tpb-article__header { margin-bottom: var(--tpb-space-6); }

.tpb-article__hero {
	margin: 0 auto var(--tpb-space-6);
}
.tpb-article__hero img {
	width: 100%;
	height: auto;
	border-radius: var(--tpb-radius);
	background: var(--tpb-tag-bg);
}
.tpb-article__hero figcaption,
.tpb-prose figcaption,
.tpb-prose .wp-element-caption {
	margin-top: 10px;
	font-size: var(--tpb-fs-meta);
	line-height: 1.45;
	color: var(--tpb-muted);
	text-align: left;
}

.tpb-article__footer { margin-top: var(--tpb-space-6); }

/* Long-form typography */
.tpb-prose {
	font-size: 1.0625rem;
	line-height: 1.65;
	color: var(--tpb-text);
	overflow-wrap: break-word;
	hanging-punctuation: first;
}
@media (min-width: 768px) {
	.tpb-prose { font-size: 1.1875rem; line-height: 1.68; }
}
.tpb-prose > * { margin-top: 0; margin-bottom: 1.3em; }
.tpb-prose > *:last-child { margin-bottom: 0; }
.tpb-prose p { text-wrap: pretty; }
.tpb-prose h2,
.tpb-prose h3,
.tpb-prose h4 {
	font-family: var(--tpb-font-display);
	color: var(--tpb-text);
	text-wrap: balance;
}
.tpb-prose h2 {
	margin: 2em 0 0.6em;
	font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.016em;
}
.tpb-prose h3 {
	margin: 1.8em 0 0.5em;
	font-size: 1.25em;
	font-weight: 650;
	line-height: 1.3;
	letter-spacing: -0.01em;
}
.tpb-prose h4 {
	margin: 1.6em 0 0.4em;
	font-size: 1em;
	font-weight: 650;
}
.tpb-prose a {
	color: var(--tpb-accent);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
	transition: text-decoration-thickness var(--tpb-dur-fast) var(--tpb-ease-out);
}
.tpb-prose a:hover { text-decoration-thickness: 2px; }
.tpb-prose strong { font-weight: 650; }
.tpb-prose ul,
.tpb-prose ol { padding-left: 1.3em; }
.tpb-prose li { margin: 0.4em 0; padding-left: 0.2em; }
.tpb-prose li::marker { color: var(--tpb-muted); }
.tpb-prose blockquote,
.tpb-prose .wp-block-quote {
	margin: 2em 0;
	padding: 0 0 0 1.1em;
	border-left: 3px solid var(--tpb-accent);
	font-family: var(--tpb-font-display);
	font-size: 1.25em;
	font-weight: 500;
	line-height: 1.42;
	letter-spacing: -0.01em;
	color: var(--tpb-text);
}
.tpb-prose blockquote p { margin: 0 0 0.6em; }
.tpb-prose blockquote cite {
	display: block;
	margin-top: 0.6em;
	font-family: var(--tpb-font);
	font-size: var(--tpb-fs-meta);
	font-style: normal;
	font-weight: 500;
	color: var(--tpb-muted);
}
.tpb-prose .wp-block-pullquote {
	margin: 2.4em 0;
	padding: 1.4em 0;
	border-block: 1px solid var(--tpb-hairline-strong);
	text-align: center;
}
.tpb-prose .wp-block-pullquote blockquote { margin: 0; padding: 0; border: 0; font-size: 1.5em; }
.tpb-prose img,
.tpb-prose video {
	height: auto;
	border-radius: var(--tpb-radius-sm);
}
.tpb-prose figure { margin-inline: 0; }
.tpb-prose iframe,
.tpb-prose embed,
.tpb-prose object { max-width: 100%; }
.tpb-prose .alignwide {
	width: min(1040px, 100vw - 2 * var(--tpb-gutter));
	max-width: none;
	margin-inline: calc((100% - min(1040px, 100vw - 2 * var(--tpb-gutter))) / 2);
}
.tpb-prose .alignfull {
	width: 100vw;
	max-width: none;
	margin-inline: calc(50% - 50vw);
}
.tpb-prose .alignfull img { border-radius: 0; }
.tpb-prose .alignleft { float: left; margin: 0.3em 1.4em 1em 0; max-width: 50%; }
.tpb-prose .alignright { float: right; margin: 0.3em 0 1em 1.4em; max-width: 50%; }
.tpb-prose .aligncenter { margin-inline: auto; }
.tpb-prose::after { content: ""; display: table; clear: both; }
.tpb-prose hr,
.tpb-prose .wp-block-separator {
	height: 1px;
	margin: 2.6em 0;
	border: 0;
	background: var(--tpb-hairline-strong);
}
.tpb-prose code,
.tpb-prose kbd {
	padding: 0.12em 0.36em;
	border-radius: 6px;
	background: var(--tpb-tag-bg);
	font-family: var(--tpb-font-mono);
	font-size: 0.86em;
}
.tpb-prose pre {
	overflow-x: auto;
	padding: 16px 20px;
	border-radius: var(--tpb-radius-sm);
	background: var(--tpb-tag-bg);
	font-family: var(--tpb-font-mono);
	font-size: 0.875rem;
	line-height: 1.55;
}
.tpb-prose pre code { padding: 0; background: none; font-size: inherit; }
.tpb-prose .wp-block-table { overflow-x: auto; }
.tpb-prose table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9375rem;
	font-variant-numeric: tabular-nums;
}
.tpb-prose th,
.tpb-prose td {
	padding: 10px 12px 10px 0;
	border-bottom: 1px solid var(--tpb-hairline);
	text-align: left;
	vertical-align: top;
}
.tpb-prose th {
	border-bottom-color: var(--tpb-hairline-strong);
	font-weight: 600;
	color: var(--tpb-text);
}
.tpb-prose mark { padding: 0 0.15em; border-radius: 3px; }

.tpb-pagelinks {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--tpb-space-2);
	margin-top: 2em;
	font-size: var(--tpb-fs-meta);
	color: var(--tpb-muted);
}
.tpb-pagelinks a,
.tpb-pagelinks .post-page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 32px;
	height: 32px;
	border-radius: var(--tpb-radius-pill);
	text-decoration: none;
}
.tpb-pagelinks a { background: var(--tpb-tag-bg); color: var(--tpb-text); }
.tpb-pagelinks .current { background: var(--tpb-text); color: var(--tpb-read-bg); }

/* Previous / next */
.tpb-postnav {
	display: grid;
	gap: var(--tpb-space-3);
	margin-top: var(--tpb-space-7);
}
@media (min-width: 600px) {
	.tpb-postnav { grid-template-columns: 1fr 1fr; }
}
.tpb-postnav__item {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: var(--tpb-space-5);
	border: 1px solid var(--tpb-hairline);
	border-radius: var(--tpb-radius);
	background: var(--tpb-surface-2);
	color: var(--tpb-text);
	text-decoration: none;
	transition: transform var(--tpb-dur) var(--tpb-ease-spring), box-shadow var(--tpb-dur) var(--tpb-ease-out), border-color var(--tpb-dur-fast) var(--tpb-ease-out);
}
.tpb-postnav__item:hover {
	transform: translateY(-2px);
	border-color: var(--tpb-hairline-strong);
	box-shadow: var(--tpb-shadow-card);
}
.tpb-postnav__item--next { align-items: flex-end; text-align: right; }
.tpb-postnav__dir {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: var(--tpb-fs-eyebrow);
	font-weight: 600;
	letter-spacing: var(--tpb-tracking-eyebrow);
	text-transform: uppercase;
	color: var(--tpb-muted);
}
.tpb-postnav__dir .tpb-icon { width: 14px; height: 14px; }
.tpb-postnav__cat { font-size: var(--tpb-fs-eyebrow); font-weight: 600; color: var(--tpb-accent); }
.tpb-postnav__title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
	font-family: var(--tpb-font-display);
	font-size: 1.0625rem;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: -0.01em;
}
.tpb-postnav__spacer { display: none; }
@media (min-width: 600px) {
	.tpb-postnav__spacer { display: block; }
}

/* ==========================================================================
   11. Lists (index, search, 404)
   ========================================================================== */

.tpb-main--list { padding: var(--tpb-space-7) 0 var(--tpb-space-8); }

.tpb-listhead { margin-bottom: var(--tpb-space-6); }
.tpb-listhead__title {
	margin: 0;
	font-family: var(--tpb-font-display);
	font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem);
	font-weight: 700;
	line-height: var(--tpb-lh-tight);
	letter-spacing: var(--tpb-tracking-title);
	text-wrap: balance;
	overflow-wrap: break-word;
}
.tpb-listhead__sub {
	margin: var(--tpb-space-2) 0 0;
	font-size: 1.0625rem;
	color: var(--tpb-muted);
}
.tpb-listhead__sub p { margin: 0; }
.tpb-listhead__search { max-width: 480px; margin-top: var(--tpb-space-5); }

.tpb-list { border-top: 1px solid var(--tpb-hairline); }
.tpb-list__item { border-bottom: 1px solid var(--tpb-hairline); }
.tpb-list__link {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: start;
	gap: var(--tpb-space-4);
	padding: var(--tpb-space-5) 0;
	color: inherit;
	text-decoration: none;
}
.tpb-list__body { min-width: 0; }
.tpb-list__body .tpb-eyebrow { margin-bottom: 6px; }
.tpb-list__title {
	margin: 0 0 6px;
	font-family: var(--tpb-font-display);
	font-size: 1.1875rem;
	font-weight: 650;
	line-height: 1.25;
	letter-spacing: -0.012em;
	text-wrap: balance;
	transition: color var(--tpb-dur-fast) var(--tpb-ease-out);
}
.tpb-list__link:hover .tpb-list__title { color: var(--tpb-accent); }
.tpb-list__excerpt {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	margin: 0 0 var(--tpb-space-2);
	font-size: 0.9375rem;
	line-height: 1.5;
	color: var(--tpb-text-2);
}
.tpb-list__thumb {
	width: 88px;
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: var(--tpb-radius-sm);
	background: var(--tpb-tag-bg);
}
.tpb-list__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--tpb-dur-slow) var(--tpb-ease-out);
}
.tpb-list__link:hover .tpb-list__thumb img { transform: scale(1.04); }
@media (min-width: 768px) {
	.tpb-list__link { gap: var(--tpb-space-6); padding: var(--tpb-space-6) 0; }
	.tpb-list__title { font-size: 1.4375rem; }
	.tpb-list__excerpt { -webkit-line-clamp: 3; font-size: 1rem; }
	.tpb-list__thumb { width: 176px; aspect-ratio: 4 / 3; }
}

.tpb-pagination { margin-top: var(--tpb-space-6); }
.tpb-pagination ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.tpb-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 10px;
	border-radius: var(--tpb-radius-pill);
	color: var(--tpb-text);
	font-size: 0.9375rem;
	font-variant-numeric: tabular-nums;
	text-decoration: none;
	transition: background-color var(--tpb-dur-fast) var(--tpb-ease-out);
}
.tpb-pagination a.page-numbers:hover { background: var(--tpb-tag-bg); }
.tpb-pagination .page-numbers.current { background: var(--tpb-text); color: var(--tpb-read-bg); }
.tpb-pagination .page-numbers.dots { color: var(--tpb-muted); }
.tpb-pagination .tpb-icon { width: 18px; height: 18px; }

.tpb-empty {
	padding: var(--tpb-space-7) 0;
	color: var(--tpb-muted);
}
.tpb-empty p { margin: 0 0 var(--tpb-space-4); font-size: 1.0625rem; }

/* 404 */
.tpb-notfound {
	padding-block: 6vh 4vh;
	text-align: center;
}
.tpb-notfound__code {
	margin: 0 0 var(--tpb-space-3);
	font-family: var(--tpb-font-display);
	font-size: clamp(5.5rem, 3rem + 11vw, 11rem);
	font-weight: 700;
	line-height: 0.9;
	letter-spacing: -0.06em;
	color: var(--tpb-text);
	background: linear-gradient(180deg, var(--tpb-text) 20%, var(--tpb-muted));
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}
.tpb-notfound .tpb-listhead__sub { max-width: 46ch; margin-inline: auto; }
.tpb-notfound .tpb-listhead__search { margin: var(--tpb-space-6) auto var(--tpb-space-5); text-align: left; }

/* ==========================================================================
   12. Comments
   ========================================================================== */

.tpb-comments {
	margin-top: var(--tpb-space-8);
}
.tpb-comments > :first-child {
	padding-top: var(--tpb-space-6);
	border-top: 1px solid var(--tpb-hairline);
}
.tpb-comments__title {
	margin: 0 0 var(--tpb-space-5);
	font-family: var(--tpb-font-display);
	font-size: 1.375rem;
	font-weight: 700;
	letter-spacing: -0.012em;
}
.tpb-comments__title small { margin-left: var(--tpb-space-3); font-size: var(--tpb-fs-meta); font-weight: 500; }
.tpb-comments__list,
.tpb-comments__list .children {
	margin: 0;
	padding: 0;
	list-style: none;
}
.tpb-comments__list .children {
	margin-left: var(--tpb-space-3);
	padding-left: var(--tpb-space-4);
	border-left: 1px solid var(--tpb-hairline);
}
.tpb-comments .comment-body {
	padding: var(--tpb-space-4) 0;
	border-bottom: 1px solid var(--tpb-hairline);
	font-size: 0.9375rem;
}
.tpb-comments .comment-author {
	display: flex;
	align-items: center;
	gap: 10px;
}
.tpb-comments .comment-author .avatar { border-radius: 50%; }
.tpb-comments .comment-author .fn { font-style: normal; font-weight: 600; }
.tpb-comments .comment-author .fn a { text-decoration: none; }
.tpb-comments .says { display: none; }
.tpb-comments .comment-metadata { margin: 2px 0 0 46px; font-size: var(--tpb-fs-meta); }
.tpb-comments .comment-metadata a { color: var(--tpb-muted); text-decoration: none; }
.tpb-comments .comment-content { margin: var(--tpb-space-2) 0 0 46px; line-height: 1.55; }
.tpb-comments .comment-content p { margin: 0 0 0.7em; }
.tpb-comments .reply { margin-left: 46px; }
.tpb-comments .reply a,
.tpb-comments #cancel-comment-reply-link {
	font-size: var(--tpb-fs-meta);
	font-weight: 500;
	color: var(--tpb-accent);
	text-decoration: none;
}
.tpb-comments .pingback .comment-body { margin: 0; }
.tpb-comments .comment-awaiting-moderation { display: block; margin-top: 4px; font-size: var(--tpb-fs-meta); color: var(--tpb-muted); }
.tpb-comments .nav-links { display: flex; justify-content: space-between; gap: var(--tpb-space-4); margin: var(--tpb-space-4) 0; font-size: var(--tpb-fs-meta); }
.tpb-comments__closed { color: var(--tpb-muted); font-size: var(--tpb-fs-meta); }

.tpb-comments .comment-respond { margin-top: var(--tpb-space-6); }
.tpb-comment-form p { margin: 0 0 var(--tpb-space-4); }
.tpb-comment-form .comment-notes,
.tpb-comment-form .logged-in-as { font-size: var(--tpb-fs-meta); color: var(--tpb-muted); }
.tpb-comment-form label {
	display: block;
	margin-bottom: 6px;
	font-size: var(--tpb-fs-meta);
	font-weight: 500;
	color: var(--tpb-text-2);
}
.tpb-comment-form input[type="text"],
.tpb-comment-form input[type="email"],
.tpb-comment-form input[type="url"],
.tpb-comment-form textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--tpb-hairline-strong);
	border-radius: var(--tpb-radius-sm);
	background: var(--tpb-surface);
	color: var(--tpb-text);
	font: inherit;
	font-size: 1rem;
	transition: border-color var(--tpb-dur-fast) var(--tpb-ease-out), box-shadow var(--tpb-dur-fast) var(--tpb-ease-out);
}
.tpb-comment-form textarea { min-height: 140px; resize: vertical; }
.tpb-comment-form input:focus,
.tpb-comment-form textarea:focus {
	outline: none;
	border-color: var(--tpb-accent);
	box-shadow: var(--tpb-ring);
}
.tpb-comment-form .comment-form-cookies-consent {
	display: flex;
	align-items: flex-start;
	gap: var(--tpb-space-2);
}
.tpb-comment-form .comment-form-cookies-consent label { margin: 0; font-weight: 400; }
.tpb-comment-form .comment-form-cookies-consent input { margin-top: 3px; accent-color: var(--tpb-accent); }
.tpb-comment-form .form-submit { margin-top: var(--tpb-space-5); }

/* ==========================================================================
   13. Theme switching
   ========================================================================== */

/* Fallback cross-fade (no View Transitions): every colour eases for one beat. */
.tpb-theme-switching,
.tpb-theme-switching *,
.tpb-theme-switching *::before,
.tpb-theme-switching *::after {
	transition:
		background-color var(--tpb-dur) var(--tpb-ease-out),
		color var(--tpb-dur) var(--tpb-ease-out),
		border-color var(--tpb-dur) var(--tpb-ease-out),
		fill var(--tpb-dur) var(--tpb-ease-out),
		stroke var(--tpb-dur) var(--tpb-ease-out),
		box-shadow var(--tpb-dur) var(--tpb-ease-out),
		opacity var(--tpb-dur) var(--tpb-ease-out),
		transform var(--tpb-dur-slow) var(--tpb-ease-spring) !important;
}

/* View Transitions: ui.js animates a circular reveal from the toggle. */
:root.tpb-vt-theme::view-transition-old(root),
:root.tpb-vt-theme::view-transition-new(root) {
	animation: none;
	mix-blend-mode: normal;
}

/* ==========================================================================
   14. Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	.tpb-menu__section,
	.tpb-menu .tpb-nav > li {
		transform: none !important;
		transition-delay: 0s !important;
	}
	.tpb-badge__dot::after,
	.tpb-switch-row.is-playing .tpb-icon-sound__wave { animation: none; }
	.tpb-header.is-hidden { transform: none; }
	.tpb-postnav__item:hover,
	.tpb-list__link:hover .tpb-list__thumb img { transform: none; }
}

/* ==========================================================================
   15. Print
   ========================================================================== */

@media print {
	.tpb-header,
	.tpb-menu,
	.tpb-footer,
	.tpb-toast-region,
	.tpb-back,
	.tpb-postnav,
	.tpb-comments,
	.tpb-article__byline .tpb-pill { display: none !important; }
	body.tpb { background: none; color: #000; }
}
