/*
Theme Name: Tendarix Resources
Theme URI: https://tendarix.ca/resources
Author: Tendarix Canada
Author URI: https://tendarix.ca
Description: Classic theme for the Tendarix.ca Resources hub (served at tendarix.ca/resources). Reproduces the look of the main app's Laravel/React resources pages: hub, category, article, header and footer.
Version: 1.0.0
Requires at least: 6.3
Requires PHP: 7.4
Text Domain: tendarix
*/

/* ==========================================================================
   Tokens (mirrors resources/js/lib/site.ts — the `C` and `FONT` objects)
   ========================================================================== */
:root {
	--tdx-red: #f70000;
	--tdx-red-hover: #d10000;
	--tdx-red-soft: #fce9e9;
	--tdx-navy: #1e2c49;
	--tdx-navy-2: #243452;
	--tdx-navy-deep: #16233f;
	--tdx-ink: #0e1a33;
	--tdx-text: #101728;
	--tdx-slate: #3c4557;
	--tdx-muted: #55617a;
	--tdx-muted-2: #8891a1;
	--tdx-faint: #98a1b2;
	--tdx-line: #e4e7ec;
	--tdx-line-2: #eceff4;
	--tdx-bg: #fafbfe;
	--tdx-bg-2: #f3f6fb;
	--tdx-green: #1f8a5b;

	--tdx-font-display: 'Satoshi', ui-sans-serif, system-ui, sans-serif;
	--tdx-font-body: 'Satoshi', ui-sans-serif, system-ui, sans-serif;
	--tdx-font-mono: ui-monospace, 'Cascadia Code', 'Segoe UI Mono', Menlo, Consolas, monospace;
}

/* ==========================================================================
   Satoshi (self-hosted) — same four weights as resources/css/app.css
   ========================================================================== */
@font-face {
	font-family: 'Satoshi';
	src: url('assets/fonts/Satoshi-Regular.woff2') format('woff2');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Satoshi';
	src: url('assets/fonts/Satoshi-Medium.woff2') format('woff2');
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Satoshi';
	src: url('assets/fonts/Satoshi-Bold.woff2') format('woff2');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Satoshi';
	src: url('assets/fonts/Satoshi-Black.woff2') format('woff2');
	font-weight: 800 900;
	font-style: normal;
	font-display: swap;
}

/* ==========================================================================
   Base — the subset of Tailwind v4 preflight the React pages rely on
   (zeroed margins, unstyled links/lists/buttons, block images).
   ========================================================================== */
*,
::before,
::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	border: 0 solid var(--tdx-line);
}
html {
	line-height: 1.5;
	-webkit-text-size-adjust: 100%;
	tab-size: 4;
	font-family: 'Satoshi', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
	scroll-behavior: smooth;
}
body {
	line-height: inherit;
	background: #fff;
	color: var(--tdx-text);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
h1,
h2,
h3,
h4,
h5,
h6 {
	font-size: inherit;
	font-weight: inherit;
}
a {
	color: inherit;
	text-decoration: inherit;
}
b,
strong {
	font-weight: bolder;
}
code,
kbd,
samp,
pre {
	font-family: var(--tdx-font-mono);
	font-size: 1em;
}
small {
	font-size: 80%;
}
hr {
	height: 0;
	color: inherit;
	border-top-width: 1px;
}
table {
	text-indent: 0;
	border-color: inherit;
	border-collapse: collapse;
}
ol,
ul,
menu {
	list-style: none;
}
img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
	display: block;
	vertical-align: middle;
}
img,
video {
	max-width: 100%;
	height: auto;
}
button,
input,
select,
optgroup,
textarea {
	font: inherit;
	letter-spacing: inherit;
	color: inherit;
	border-radius: 0;
	background-color: transparent;
	opacity: 1;
}
button {
	cursor: pointer;
}
[hidden]:where(:not([hidden='until-found'])) {
	display: none !important;
}

/* WordPress-required helpers */
.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;
}
.tdx-skip:focus {
	clip: auto;
	clip-path: none;
	height: auto;
	width: auto;
	margin: 0;
	left: 12px;
	top: 12px;
	z-index: 100000;
	background: #fff;
	color: var(--tdx-ink);
	padding: 10px 16px;
	font-weight: 600;
	box-shadow: 0 8px 30px rgba(16, 23, 40, 0.28);
}
.alignleft {
	float: left;
	margin: 0 1.5em 1em 0;
}
.alignright {
	float: right;
	margin: 0 0 1em 1.5em;
}
.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}
.wp-caption {
	max-width: 100%;
}
.sticky,
.bypostauthor,
.gallery-caption {
	/* required by the theme review checklist; intentionally unstyled */
}

/* ==========================================================================
   Page shell (PublicLayout wrapper)
   ========================================================================== */
.tdx-page {
	width: 100%;
	/* `clip` (not `hidden`) contains overflow without creating a scroll
	   container — so descendant `position: sticky` still works. */
	overflow-x: clip;
	background: linear-gradient(180deg, #fcfdff 0%, #f4f7fc 100%);
	font-family: var(--tdx-font-body);
	color: var(--tdx-text);
}
.tdx-wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 32px;
}
.tdx-outer {
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 clamp(20px, 5vw, 48px);
}

/* ==========================================================================
   Announcement bar (static fallback of the news ticker)
   ========================================================================== */
.tdx-announce {
	background: var(--tdx-navy);
	color: #c4ccdb;
	overflow: hidden;
}
.tdx-announce-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 9px 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	flex-wrap: wrap;
}
.tdx-announce-spinner {
	width: 11px;
	height: 11px;
	border-radius: 50%;
	border: 1.5px solid rgba(255, 255, 255, 0.22);
	border-top-color: var(--tdx-green);
	display: inline-block;
	animation: tdxspin 1.1s linear infinite;
}
.tdx-announce-text {
	font-family: var(--tdx-font-mono);
	font-size: 12px;
	letter-spacing: 0.04em;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.tdx-nav {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255, 255, 255, 0.9);
	-webkit-backdrop-filter: saturate(1.4) blur(10px);
	backdrop-filter: saturate(1.4) blur(10px);
	border-bottom: 1px solid var(--tdx-line);
}
.admin-bar .tdx-nav {
	top: 32px;
}
.tdx-nav-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 32px;
	height: 70px;
	display: flex;
	align-items: center;
	gap: 32px;
}
.tdx-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--tdx-ink);
}
.tdx-brand img {
	display: block;
	width: 30px;
	height: 30px;
}
.tdx-brand-word {
	font-family: var(--tdx-font-display);
	font-weight: 800;
	font-size: 20px;
	letter-spacing: -0.01em;
	color: var(--tdx-ink);
}
.tdx-brand-word span,
.tdx-foot-word span,
.tdx-rail-cta-word span {
	color: var(--tdx-red);
}
.tdx-navlinks {
	display: flex;
	gap: 28px;
	margin-left: 14px;
}
.tdx-navlinks a,
.tdx-login {
	color: var(--tdx-slate);
	font-size: 14.5px;
	font-weight: 500;
}
.tdx-nav-right {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 18px;
}
.tdx-lang {
	display: flex;
	gap: 2px;
	background: #eef0f3;
	padding: 3px;
}
.tdx-lang a {
	font-family: var(--tdx-font-body);
	font-weight: 600;
	font-size: 12px;
	letter-spacing: 0.08em;
	padding: 5px 11px;
	transition: all 0.15s;
	color: #8b97ae;
	background: transparent;
}
.tdx-lang a.is-active {
	color: #fff;
	background: var(--tdx-red);
}

/* ---- Buttons: animated hover (app.css .tdx-btn / .tdx-btn-red) ---- */
.tdx-btn {
	position: relative;
	display: inline-block;
	transition:
		background-color 0.24s ease,
		color 0.24s ease,
		transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1),
		box-shadow 0.24s ease,
		border-color 0.24s ease;
	will-change: transform;
}
.tdx-btn:hover {
	transform: translateY(-2px);
}
.tdx-btn:active {
	transform: translateY(0);
	transition-duration: 0.08s;
}
.tdx-btn-red {
	background: var(--tdx-red);
	color: #fff;
	font-size: 14.5px;
	font-weight: 600;
	padding: 9px 18px;
}
.tdx-btn-red:hover {
	background: var(--tdx-red-hover);
	box-shadow: 0 16px 34px -14px rgba(247, 0, 0, 0.65);
}

/* ==========================================================================
   Page bands (hub + category headers and bodies)
   ========================================================================== */
.tdx-band {
	background: linear-gradient(180deg, #fcfdff 0%, #f3f6fb 100%);
	border-bottom: 1px solid var(--tdx-line);
	padding: 48px 0 36px;
}
.tdx-band--cat {
	padding: 40px 0 32px;
}
.tdx-kicker {
	font-family: var(--tdx-font-mono);
	font-size: 12px;
	letter-spacing: 0.16em;
	color: var(--tdx-red);
	text-transform: uppercase;
	margin-bottom: 10px;
}
.tdx-h1 {
	font-family: var(--tdx-font-display);
	font-weight: 800;
	font-size: clamp(28px, 3.6vw, 42px);
	letter-spacing: -0.02em;
	color: var(--tdx-ink);
}
.tdx-h1--cat {
	margin-top: 12px;
	font-size: clamp(26px, 3.4vw, 40px);
}
.tdx-sub {
	margin-top: 14px;
	font-size: 16px;
	line-height: 1.6;
	color: var(--tdx-muted);
	max-width: 62ch;
}
.tdx-sub--cat {
	margin-top: 12px;
	max-width: 64ch;
}
.tdx-back {
	font-family: var(--tdx-font-mono);
	font-size: 11.5px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--tdx-muted-2);
}
.tdx-count {
	margin-top: 12px;
	font-family: var(--tdx-font-mono);
	font-size: 12px;
	letter-spacing: 0.06em;
	color: var(--tdx-muted-2);
}
.tdx-body-band {
	background: linear-gradient(180deg, #fafbfe, #f3f6fb);
	padding: 40px 0 72px;
	min-height: 40vh;
}
.tdx-body-band--cat {
	padding: 36px 0 72px;
}

/* Hub sections */
.tdx-section {
	margin-bottom: 44px;
}
.tdx-section-head {
	display: flex;
	align-items: flex-end;
	gap: 16px;
	margin-bottom: 18px;
	flex-wrap: wrap;
}
.tdx-section-intro {
	flex-grow: 1;
	min-width: 240px;
}
.tdx-h2 {
	font-family: var(--tdx-font-display);
	font-weight: 700;
	font-size: clamp(20px, 2.2vw, 26px);
	letter-spacing: -0.01em;
	color: var(--tdx-ink);
}
.tdx-section-blurb {
	margin-top: 6px;
	font-size: 14.5px;
	line-height: 1.55;
	color: var(--tdx-muted);
	max-width: 64ch;
}
.tdx-browse {
	font-family: var(--tdx-font-mono);
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--tdx-red);
	font-weight: 600;
	white-space: nowrap;
}
.tdx-empty {
	background: #fff;
	border: 1px solid var(--tdx-line-2);
	padding: 28px;
	font-size: 14.5px;
	color: var(--tdx-muted-2);
}
.tdx-empty--center {
	padding: 40px;
	text-align: center;
	font-size: 15px;
}
.tdx-grid {
	display: grid;
	/* min() keeps a 320px card from overflowing phones narrower than 384px */
	grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
	gap: 18px;
}

/* ==========================================================================
   Article card (resources/js/components/article-card.tsx)
   ========================================================================== */
.tdx-card {
	background: #fff;
	border: 1px solid var(--tdx-line-2);
	display: flex;
	flex-direction: column;
	color: inherit;
	height: 100%;
	overflow: hidden;
	transition:
		transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
		box-shadow 0.28s ease,
		border-color 0.28s ease;
	will-change: transform;
}
.tdx-card:hover {
	transform: translateY(-6px);
	border-color: var(--tdx-red);
	box-shadow: 0 24px 46px -24px rgba(20, 40, 80, 0.4);
}
.tdx-card-media {
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--tdx-bg-2);
}
.tdx-card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.tdx-card-body {
	padding: 22px 22px 20px;
	display: flex;
	flex-direction: column;
	gap: 11px;
	flex-grow: 1;
}
.tdx-card-meta {
	display: flex;
	align-items: center;
	gap: 10px;
}
.tdx-card-kicker {
	font-family: var(--tdx-font-mono);
	font-size: 10.5px;
	letter-spacing: 0.11em;
	text-transform: uppercase;
	color: var(--tdx-red);
}
.tdx-card-time {
	font-family: var(--tdx-font-mono);
	font-size: 10.5px;
	letter-spacing: 0.06em;
	color: var(--tdx-muted-2);
}
.tdx-card-title {
	font-family: var(--tdx-font-display);
	font-weight: 700;
	font-size: 18px;
	line-height: 1.28;
	letter-spacing: -0.01em;
	color: var(--tdx-ink);
}
.tdx-card-summary {
	font-size: 14px;
	line-height: 1.58;
	color: var(--tdx-muted);
	flex-grow: 1;
}
.tdx-card-foot {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 2px;
}
.tdx-card-date {
	font-size: 12.5px;
	color: var(--tdx-muted-2);
}
.tdx-card-cta {
	margin-left: auto;
	font-size: 13px;
	font-weight: 600;
	color: var(--tdx-red);
}

/* Archive pagination (fallback template only) */
.tdx-pagination {
	margin-top: 36px;
}
.tdx-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.tdx-pagination .page-numbers {
	display: inline-block;
	min-width: 38px;
	padding: 8px 12px;
	text-align: center;
	background: #fff;
	border: 1px solid var(--tdx-line);
	font-family: var(--tdx-font-mono);
	font-size: 12.5px;
	color: var(--tdx-slate);
}
.tdx-pagination .page-numbers.current,
.tdx-pagination a.page-numbers:hover {
	background: var(--tdx-red);
	border-color: var(--tdx-red);
	color: #fff;
}

/* ==========================================================================
   Article page (resources/js/pages/resources/show.tsx)
   ========================================================================== */
.tdx-article {
	background: linear-gradient(180deg, #fcfdff 0%, #f6f8fc 100%);
	padding-bottom: 8px;
}
.tdx-masthead {
	padding: 44px 0 0;
}
.tdx-crumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-family: var(--tdx-font-mono);
	font-size: 11.5px;
	letter-spacing: 0.06em;
	color: var(--tdx-muted-2);
	margin-bottom: 24px;
}
.tdx-crumbs a {
	color: var(--tdx-muted-2);
}
.tdx-crumbs a.is-cat {
	color: var(--tdx-red);
}
.tdx-tab {
	display: inline-flex;
	align-items: center;
	gap: 11px;
	margin-bottom: 20px;
}
.tdx-tab-bar {
	width: 6px;
	height: 22px;
	background: var(--tdx-red);
	display: block;
}
.tdx-tab-cat {
	font-family: var(--tdx-font-mono);
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--tdx-ink);
}
.tdx-tab-time {
	font-family: var(--tdx-font-mono);
	font-size: 11.5px;
	letter-spacing: 0.04em;
	color: var(--tdx-muted-2);
}
.tdx-article-title {
	font-family: var(--tdx-font-display);
	font-weight: 800;
	font-size: clamp(32px, 5.4vw, 60px);
	line-height: 1.04;
	letter-spacing: -0.028em;
	color: var(--tdx-ink);
	max-width: 920px;
}
.tdx-article-summary {
	margin-top: 20px;
	font-size: clamp(17px, 2vw, 20px);
	line-height: 1.55;
	color: var(--tdx-muted);
	max-width: 700px;
	font-style: italic;
}
.tdx-byline {
	margin-top: 28px;
	padding-bottom: 26px;
	border-bottom: 1px solid var(--tdx-line);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
	font-size: 13.5px;
	color: var(--tdx-muted-2);
}
.tdx-byline-author {
	font-weight: 700;
	color: var(--tdx-slate);
}

/* Hero image + credit */
.tdx-hero {
	position: relative;
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 clamp(0px, 3vw, 24px);
}
.tdx-hero img {
	width: 100%;
	height: clamp(260px, 44vw, 500px);
	object-fit: cover;
	display: block;
}
.tdx-hero-credit {
	position: absolute;
	right: clamp(0px, 3vw, 24px);
	bottom: 0;
	background: rgba(14, 26, 51, 0.74);
	color: #eaedf4;
	font-family: var(--tdx-font-mono);
	font-size: 10.5px;
	letter-spacing: 0.03em;
	padding: 6px 11px;
}

/* Body: sticky rail + prose column (app.css .tdx-article-layout) */
.tdx-article-body {
	padding: 52px 0 8px;
}
.tdx-article-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 40px;
}
.tdx-article-rail {
	order: 2;
}
@media (min-width: 1024px) {
	.tdx-article-layout {
		grid-template-columns: 220px minmax(0, 720px) 1fr;
		gap: 56px;
		align-items: start;
	}
	.tdx-article-rail {
		order: 0;
		position: sticky;
		top: 96px;
	}
	.admin-bar .tdx-article-rail {
		top: 128px;
	}
}
.tdx-rail-label {
	font-family: var(--tdx-font-mono);
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--tdx-muted-2);
	margin-bottom: 12px;
	display: flex;
	align-items: center;
	gap: 7px;
}
.tdx-share {
	display: flex;
	gap: 8px;
	margin-bottom: 30px;
}
.tdx-share-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border: 1px solid var(--tdx-line);
	color: var(--tdx-slate);
	background: #fff;
	cursor: pointer;
	transition:
		background-color 0.16s ease,
		border-color 0.16s ease,
		color 0.16s ease;
}
.tdx-share-btn:hover,
.tdx-share-btn.is-copied {
	background: var(--tdx-red);
	border-color: var(--tdx-red);
	color: #fff;
}
.tdx-share-btn .tdx-icon-done,
.tdx-share-btn.is-copied .tdx-icon-idle {
	display: none;
}
.tdx-share-btn.is-copied .tdx-icon-done {
	display: block;
}
.tdx-toc {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.tdx-toc a {
	display: block;
	width: 100%;
	text-align: left;
	border-left: 2px solid var(--tdx-line);
	padding: 6px 0 6px 12px;
	font-size: 13px;
	line-height: 1.35;
	font-weight: 400;
	color: var(--tdx-muted);
}
.tdx-toc a.is-active {
	border-left-color: var(--tdx-red);
	font-weight: 700;
	color: var(--tdx-red);
}
.tdx-toc a:hover {
	color: var(--tdx-red);
	border-left-color: var(--tdx-red);
}
.tdx-rail-cta {
	margin-top: 32px;
	background: var(--tdx-navy-deep);
	padding: 20px 18px;
}
.tdx-rail-cta-word {
	font-family: var(--tdx-font-display);
	font-weight: 800;
	font-size: 15px;
	color: #fff;
	margin-bottom: 6px;
}
.tdx-rail-cta p {
	font-size: 12.5px;
	line-height: 1.55;
	color: #b7c0d4;
	margin-bottom: 14px;
}
.tdx-rail-cta a {
	display: inline-block;
	font-family: var(--tdx-font-mono);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: #fff;
	border-bottom: 1.5px solid var(--tdx-red);
	padding-bottom: 2px;
}

/* Related */
.tdx-related {
	background: linear-gradient(180deg, #fafbfe, #f3f6fb);
	border-top: 1px solid var(--tdx-line);
	padding: 52px 0 76px;
}
.tdx-related-head {
	display: flex;
	align-items: center;
	gap: 11px;
	margin-bottom: 22px;
}
.tdx-related-bar {
	width: 6px;
	height: 20px;
	background: var(--tdx-red);
	display: block;
}
.tdx-related-title {
	font-family: var(--tdx-font-display);
	font-weight: 800;
	font-size: 21px;
	letter-spacing: -0.01em;
	color: var(--tdx-ink);
}

/* Simple page (page.php) + 404 */
.tdx-page-body {
	padding: 44px 0 76px;
	background: linear-gradient(180deg, #fafbfe, #f3f6fb);
	min-height: 40vh;
}
.tdx-page-column {
	max-width: 720px;
}
.tdx-404-actions {
	margin-top: 24px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 18px;
}

/* ==========================================================================
   Article prose — ported from resources/css/app.css `.tdx-prose`
   (plus list markers, which Tailwind preflight hides on the Laravel site,
   and overrides for WordPress block/caption markup).
   ========================================================================== */
.tdx-prose {
	font-family: 'Satoshi', ui-sans-serif, system-ui, sans-serif;
	font-size: 17.5px;
	line-height: 1.72;
	color: #101728;
	counter-reset: tdx-section;
	/* Stop scroll-anchoring from fighting the TOC scroll when lazy images resize. */
	overflow-anchor: none;
	min-width: 0;
}
.tdx-prose > *:first-child {
	margin-top: 0;
}
/* Oversized drop cap on the opening paragraph, editorial-style */
.tdx-prose > p:first-child::first-letter {
	font-family: 'Satoshi', ui-sans-serif, system-ui, sans-serif;
	font-weight: 800;
	font-size: 4.6em;
	line-height: 0.78;
	float: left;
	color: #f70000;
	padding: 0.03em 0.09em 0 0;
}
.tdx-prose p,
.tdx-prose ul,
.tdx-prose ol,
.tdx-prose blockquote,
.tdx-prose table,
.tdx-prose pre {
	margin: 0 0 1.25em;
}
.tdx-prose h2 {
	counter-increment: tdx-section;
	font-weight: 800;
	font-size: clamp(22px, 2.4vw, 28px);
	letter-spacing: -0.02em;
	line-height: 1.22;
	color: #0e1a33;
	margin: 2.1em 0 0.6em;
	/* Land TOC jumps below the 70px sticky nav, like scrollToId() in show.tsx */
	scroll-margin-top: 96px;
}
.admin-bar .tdx-prose h2 {
	scroll-margin-top: 128px;
}
.tdx-prose h2::before {
	content: counter(tdx-section, decimal-leading-zero);
	display: block;
	font-family: ui-monospace, 'Cascadia Code', 'Segoe UI Mono', Menlo, Consolas, monospace;
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: 0.14em;
	color: #f70000;
	margin-bottom: 8px;
}
.tdx-prose h3 {
	font-weight: 700;
	font-size: clamp(18px, 1.9vw, 21px);
	letter-spacing: -0.01em;
	line-height: 1.3;
	color: #0e1a33;
	margin: 1.6em 0 0.5em;
}
.tdx-prose h4 {
	font-weight: 700;
	font-size: 17px;
	color: #16233f;
	margin: 1.4em 0 0.4em;
}
.tdx-prose a {
	color: #f70000;
	text-decoration: underline;
	text-underline-offset: 2px;
	text-decoration-thickness: 1px;
}
.tdx-prose a:hover {
	color: #d10000;
}
.tdx-prose strong {
	font-weight: 700;
	color: #0e1a33;
}
.tdx-prose ul,
.tdx-prose ol {
	padding-left: 1.35em;
}
/* Restore list markers (the Laravel site loses these to Tailwind preflight). */
.tdx-prose ul {
	list-style: disc outside;
}
.tdx-prose ol {
	list-style: decimal outside;
}
.tdx-prose ul ul,
.tdx-prose ol ul {
	list-style-type: circle;
}
.tdx-prose ol ol {
	list-style-type: lower-alpha;
}
.tdx-prose li > ul,
.tdx-prose li > ol {
	margin: 0.4em 0 0;
}
.tdx-prose li {
	margin: 0.4em 0;
	padding-left: 0.2em;
}
.tdx-prose li::marker {
	color: #8891a1;
}
.tdx-prose blockquote {
	position: relative;
	background: #fbf4f4;
	border-left: 4px solid #f70000;
	padding: 0.9em 1.5em 0.9em 2.4em;
	margin: 1.8em 0;
	color: #16233f;
	font-weight: 600;
	font-size: 1.12em;
	line-height: 1.5;
}
.tdx-prose blockquote::before {
	content: '\201C';
	position: absolute;
	left: 0.32em;
	top: 0.08em;
	font-family: Georgia, 'Times New Roman', serif;
	font-size: 2.4em;
	font-weight: 700;
	color: #f70000;
	opacity: 0.55;
	line-height: 1;
}
.tdx-prose blockquote p {
	margin-bottom: 0;
}
.tdx-prose blockquote cite {
	display: block;
	margin-top: 0.5em;
	font-size: 0.8em;
	font-style: normal;
	font-weight: 500;
	color: #55617a;
}
.tdx-prose code {
	font-family: ui-monospace, 'Cascadia Code', 'Segoe UI Mono', Menlo, Consolas, monospace;
	font-size: 0.88em;
	background: #f3f6fb;
	border: 1px solid #e4e7ec;
	border-radius: 4px;
	padding: 0.12em 0.4em;
}
.tdx-prose pre {
	background: #16233f;
	color: #e8edf6;
	padding: 18px 20px;
	border-radius: 8px;
	overflow-x: auto;
	font-size: 14px;
	line-height: 1.6;
}
.tdx-prose pre code {
	background: none;
	border: 0;
	padding: 0;
	color: inherit;
}
.tdx-prose hr {
	border: 0;
	border-top: 1px solid #e4e7ec;
	margin: 2.2em 0;
}
.tdx-prose table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
	display: block;
	overflow-x: auto;
}
.tdx-prose th,
.tdx-prose td,
.tdx-prose .wp-block-table th,
.tdx-prose .wp-block-table td {
	border: 1px solid #e4e7ec;
	padding: 9px 12px;
	text-align: left;
	vertical-align: top;
}
.tdx-prose th,
.tdx-prose .wp-block-table th {
	background: #f3f6fb;
	font-weight: 700;
	color: #16233f;
}
/* Block-editor tables: drop core's 3px header/footer rules and caption spacing */
.tdx-prose .wp-block-table thead,
.tdx-prose .wp-block-table tfoot {
	border: 0;
}
.tdx-prose .wp-block-table table {
	margin-bottom: 0;
}
.tdx-prose .wp-block-table figcaption {
	margin-top: 0.6em;
}
.tdx-prose img {
	max-width: 100%;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 8px;
	margin: 1.4em 0;
	display: block;
	background: #eceff4;
}
.tdx-prose figure {
	margin: 1.8em 0;
}
.tdx-prose figure img {
	margin: 0 0 0.6em;
}
.tdx-prose figcaption,
.tdx-prose .wp-element-caption,
.tdx-prose .wp-caption-text {
	font-family: ui-monospace, 'Cascadia Code', 'Segoe UI Mono', Menlo, Consolas, monospace;
	font-size: 12px;
	letter-spacing: 0.02em;
	color: #8891a1;
	margin: 0;
	text-align: left;
}
/* Core block/caption markup: keep figures full-width blocks like the Markdown ones */
.tdx-prose .wp-block-image,
.tdx-prose .wp-caption,
.tdx-prose figure.aligncenter,
.tdx-prose .wp-block-image.aligncenter {
	display: block;
	width: auto !important;
	max-width: 100%;
	float: none;
}
.tdx-prose .wp-block-image.aligncenter > figcaption,
.tdx-prose .wp-block-image .aligncenter > figcaption {
	display: block;
	caption-side: initial;
}
.tdx-prose iframe,
.tdx-prose video,
.tdx-prose embed,
.tdx-prose object {
	max-width: 100%;
}
.tdx-prose .wp-block-embed {
	margin: 1.8em 0;
}
/* Simple pages reuse the prose type but skip the article-only flourishes */
.tdx-prose--plain > p:first-child::first-letter {
	font: inherit;
	float: none;
	color: inherit;
	padding: 0;
	line-height: inherit;
}
.tdx-prose--plain h2::before {
	content: none;
}
.page-links {
	margin-top: 2em;
	font-family: var(--tdx-font-mono);
	font-size: 12.5px;
	color: #8891a1;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.tdx-footer {
	background: var(--tdx-navy-deep);
	color: #b8c1d4;
	padding: 60px 0 32px;
}
.tdx-footgrid {
	display: grid;
	grid-template-columns: 1.6fr repeat(4, 1fr);
	gap: 36px;
}
.tdx-foot-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 16px;
}
.tdx-foot-brand img {
	display: block;
	width: 28px;
	height: 28px;
}
.tdx-foot-word {
	font-family: var(--tdx-font-display);
	font-weight: 800;
	font-size: 19px;
	color: #fff;
}
.tdx-foot-blurb {
	font-size: 13.5px;
	line-height: 1.6;
	color: #8b97ae;
	max-width: 34ch;
}
.tdx-foot-tagline {
	font-family: var(--tdx-font-display);
	font-weight: 700;
	font-size: 15px;
	color: #fff;
	margin-top: 18px;
}
.tdx-foot-title {
	font-family: var(--tdx-font-mono);
	font-size: 11px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #6b7793;
	margin-bottom: 14px;
}
.tdx-foot-links {
	display: flex;
	flex-direction: column;
	gap: 10px;
	align-items: flex-start;
}
.tdx-foot-links a,
.tdx-foot-links button {
	font-family: var(--tdx-font-body);
	font-size: 13.5px;
	color: #b8c1d4;
	text-align: left;
	background: none;
	border: none;
	padding: 0;
}
.tdx-foot-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	margin-top: 44px;
	padding-top: 22px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 14px;
}
.tdx-foot-copy {
	font-size: 12.5px;
	color: #6b7793;
}
.tdx-foot-copy a {
	color: #9aa6bc;
	font-weight: 600;
}
.tdx-foot-legal {
	display: flex;
	gap: 18px;
	flex-wrap: wrap;
}
.tdx-foot-legal button {
	background: none;
	border: none;
	padding: 0;
	font-family: var(--tdx-font-mono);
	font-size: 11.5px;
	letter-spacing: 0.04em;
	color: #8b97ae;
}
.tdx-foot-levels {
	font-family: var(--tdx-font-mono);
	font-size: 11px;
	letter-spacing: 0.08em;
	color: #6b7793;
}

/* ==========================================================================
   Legal modals + cookie banner / settings (legal-modal.tsx, cookie-consent.tsx)
   ========================================================================== */
html.tdx-modal-open {
	overflow: hidden;
}
.tdx-modal {
	position: fixed;
	inset: 0;
	z-index: 100;
	background: rgba(14, 26, 51, 0.55);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	animation: tdxfade 0.16s ease-out;
}
.tdx-modal-panel {
	background: #fff;
	width: min(720px, 100%);
	max-height: 86vh;
	display: flex;
	flex-direction: column;
	box-shadow: 0 40px 120px -40px rgba(14, 26, 51, 0.6);
	animation: tdxpanel 0.2s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.tdx-modal-panel--narrow {
	width: min(560px, 100%);
}
.tdx-modal-bar {
	height: 4px;
	background: var(--tdx-red);
	flex: none;
}
.tdx-modal-head {
	padding: 22px 28px 16px;
	border-bottom: 1px solid var(--tdx-line-2);
	display: flex;
	align-items: flex-start;
	gap: 16px;
	flex: none;
}
.tdx-modal-head > div {
	flex: 1;
}
.tdx-modal-title {
	font-family: var(--tdx-font-display);
	font-weight: 800;
	font-size: 24px;
	letter-spacing: -0.02em;
	color: var(--tdx-ink);
}
.tdx-modal-updated {
	font-family: var(--tdx-font-mono);
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--tdx-muted-2);
	margin-top: 6px;
}
.tdx-modal-x {
	flex: none;
	width: 34px;
	height: 34px;
	border: 1px solid var(--tdx-line);
	background: #fff;
	color: var(--tdx-slate);
	font-size: 18px;
	line-height: 1;
}
.tdx-modal-body {
	padding: 20px 28px 8px;
	overflow-y: auto;
}
.tdx-modal-body section {
	margin-bottom: 20px;
}
.tdx-modal-body h3 {
	font-family: var(--tdx-font-display);
	font-weight: 700;
	font-size: 15.5px;
	color: var(--tdx-ink);
	margin-bottom: 6px;
}
.tdx-modal-body p {
	font-size: 14.5px;
	line-height: 1.65;
	color: var(--tdx-muted);
}
.tdx-modal-foot {
	padding: 14px 28px;
	border-top: 1px solid var(--tdx-line-2);
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	flex: none;
}
.tdx-modal-close {
	background: var(--tdx-ink);
	color: #fff;
	font-family: var(--tdx-font-body);
	font-weight: 600;
	font-size: 14px;
	padding: 10px 22px;
	border: none;
}

/* Cookie banner */
.tdx-cookie {
	position: fixed;
	left: 20px;
	right: 20px;
	bottom: 20px;
	z-index: 90;
	display: flex;
	justify-content: center;
	pointer-events: none;
	animation: tdxcookie 0.3s ease-out;
}
.tdx-cookie-panel {
	pointer-events: auto;
	background: #fff;
	border-left: 4px solid var(--tdx-red);
	box-shadow: 0 24px 70px -30px rgba(14, 26, 51, 0.5);
	max-width: 860px;
	width: 100%;
	padding: 18px 22px;
	display: flex;
	gap: 18px;
	align-items: center;
	flex-wrap: wrap;
}
.tdx-cookie-text {
	flex: 1 1 300px;
	font-size: 13.5px;
	line-height: 1.55;
	color: var(--tdx-muted);
	margin: 0;
}
.tdx-cookie-actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}
.tdx-cbtn {
	font-family: var(--tdx-font-body);
	font-weight: 600;
	font-size: 13.5px;
	padding: 9px 16px;
	white-space: nowrap;
	border: none;
}
.tdx-cbtn--link {
	background: transparent;
	color: var(--tdx-red);
	padding: 0;
	text-decoration: underline;
	display: inline;
}
.tdx-cbtn--settings {
	background: transparent;
	color: var(--tdx-slate);
	border: 1.5px solid var(--tdx-line);
}
.tdx-cbtn--reject {
	background: #fff;
	color: var(--tdx-ink);
	border: 1.5px solid #d5dae3;
}
.tdx-cbtn--accept {
	background: var(--tdx-red);
	color: #fff;
}

/* Cookie settings modal */
.tdx-cset-head {
	padding: 22px 26px 6px;
}
.tdx-cset-title {
	font-family: var(--tdx-font-display);
	font-weight: 800;
	font-size: 21px;
	letter-spacing: -0.02em;
	color: var(--tdx-ink);
}
.tdx-cset-intro {
	font-size: 13.5px;
	line-height: 1.6;
	color: var(--tdx-muted);
	margin: 8px 0 4px;
}
.tdx-cset-rows {
	padding: 10px 26px;
}
.tdx-cset-row {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 14px 0;
	border-top: 1px solid var(--tdx-line-2);
}
.tdx-cset-row > div:first-child {
	flex: 1;
}
.tdx-cset-name {
	font-family: var(--tdx-font-display);
	font-weight: 700;
	font-size: 14.5px;
	color: var(--tdx-ink);
}
.tdx-cset-desc {
	font-size: 12.5px;
	line-height: 1.5;
	color: var(--tdx-muted-2);
	margin-top: 2px;
}
.tdx-cset-state {
	flex: none;
	font-family: var(--tdx-font-mono);
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--tdx-green);
}
.tdx-switch {
	flex: none;
	width: 46px;
	height: 26px;
	border-radius: 999px;
	border: none;
	position: relative;
	background: #cbd2dd;
	transition: background 0.15s;
}
.tdx-switch::after {
	content: '';
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	transition: left 0.15s;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.tdx-switch[aria-checked='true'] {
	background: var(--tdx-green);
}
.tdx-switch[aria-checked='true']::after {
	left: 23px;
}
.tdx-cset-foot {
	padding: 14px 26px;
}

/* ==========================================================================
   Keyframes
   ========================================================================== */
@keyframes tdxspin {
	to {
		transform: rotate(360deg);
	}
}
@keyframes tdxfade {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}
@keyframes tdxpanel {
	from {
		opacity: 0;
		transform: translateY(12px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: none;
	}
}
@keyframes tdxcookie {
	from {
		opacity: 0;
		transform: translateY(16px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

/* ==========================================================================
   Responsive — same breakpoints as app.css
   ========================================================================== */
@media (max-width: 900px) {
	.tdx-footgrid {
		grid-template-columns: 1fr 1fr;
		gap: 28px;
	}
}
@media (max-width: 782px) {
	.admin-bar .tdx-nav {
		top: 46px;
	}
}
@media (max-width: 720px) {
	.tdx-navlinks {
		display: none;
	}
}
@media (max-width: 600px) {
	/* the admin bar stops being fixed below 600px */
	.admin-bar .tdx-nav {
		top: 0;
	}
}
@media (max-width: 560px) {
	.tdx-hide-sm {
		display: none;
	}
	.tdx-footgrid {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	.tdx-announce-spinner,
	.tdx-modal,
	.tdx-modal-panel,
	.tdx-cookie {
		animation: none !important;
	}
	.tdx-card {
		transition: none !important;
	}
	.tdx-card:hover {
		transform: none !important;
	}
}
