/* Cherrytokenada frontend CSS — only what theme.json cannot express.
   Brutalist/Raw register: exposed 2px solid borders, no rounded corners,
   no shadows, no gradients anywhere (05-design-system.md §3). */

/* Dark mode: overrides the same CSS custom properties theme.json already
   generates on :root, so every block/component that reads
   var(--wp--preset--color--*) picks up the dark palette automatically.
   Every value below was checked against WCAG AA (4.5:1 text) before use —
   see 05-design-system.md §1. Light values are NOT redeclared here;
   theme.json is the single source of truth for those. */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--wp--preset--color--background: #0D0D0D;
		--wp--preset--color--surface: #1A1A1A;
		--wp--preset--color--text: #F2F2F2;
		--wp--preset--color--muted: #A6A6A6;
		--wp--preset--color--border: #F2F2F2;
		--wp--preset--color--accent: #FF8A3D;
	}
}
:root[data-theme="dark"] {
	--wp--preset--color--background: #0D0D0D;
	--wp--preset--color--surface: #1A1A1A;
	--wp--preset--color--text: #F2F2F2;
	--wp--preset--color--muted: #A6A6A6;
	--wp--preset--color--border: #F2F2F2;
	--wp--preset--color--accent: #FF8A3D;
}

/* Visible focus ring everywhere (reference 02 §19 accessibility) — solid
   2px, matching the exposed-border component language rather than a soft
   glow. */
:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

/* Skip link */
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--wp--preset--color--text);
	color: var(--wp--preset--color--background);
	padding: 12px 16px;
	z-index: 100;
}
.skip-link:focus {
	left: 16px;
	top: 16px;
}

/* Breadcrumbs (two-level: Home / Page — no hub level, see functions.php). */
.ctd-breadcrumbs {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin-bottom: var(--wp--preset--spacing--20);
}
.ctd-breadcrumbs a {
	color: var(--wp--preset--color--muted);
	text-decoration: underline;
}
.ctd-breadcrumbs [aria-current="page"] {
	color: var(--wp--preset--color--text);
}

/* Last-updated freshness line. */
.ctd-last-updated {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
	margin-top: -8px;
	margin-bottom: var(--wp--preset--spacing--10);
}

/* "Checked against primary sources" line — this site's authorship treatment
   in place of a named byline (05-design-system.md §3). */
.ctd-checked-line {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
	margin-bottom: var(--wp--preset--spacing--30);
}
.ctd-checked-line a {
	color: var(--wp--preset--color--accent);
}

/* Body links: plain underline, thickens on hover/focus rather than a
   colour-only hover state (05-design-system.md §3). */
.entry-content a,
.wp-block-post-content a {
	text-decoration-color: var(--wp--preset--color--accent);
	text-underline-offset: 3px;
	text-decoration-thickness: 2px;
}
.entry-content a:hover,
.wp-block-post-content a:hover {
	text-decoration-thickness: 4px;
}

/* Article images: solid 2px exposed border, no radius, no shadow —
   structure visible, not a soft card treatment. */
.entry-content figure.wp-block-image img,
.wp-block-post-content figure.wp-block-image img {
	width: 100%;
	height: auto;
	border-radius: 0;
	border: 2px solid var(--wp--preset--color--border);
}
.entry-content figcaption,
.wp-block-post-content figcaption {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
	margin-top: 8px;
}
.entry-content figure.wp-block-image,
.wp-block-post-content figure.wp-block-image {
	margin: var(--wp--preset--spacing--40) 0;
}

.wp-block-post-featured-image img {
	border-radius: 0;
	border: 2px solid var(--wp--preset--color--border);
}

/* Tables: this site's actual primary content on 3 of 4 substantial pages
   (05-design-system.md §3) — solid exposed 2px borders on every cell, no
   hairlines, no box-shadow, tabular numerals where numeric. */
.entry-content table,
.wp-block-post-content table {
	border-collapse: collapse;
	width: 100%;
	margin: var(--wp--preset--spacing--30) 0;
	border: 2px solid var(--wp--preset--color--border);
	font-variant-numeric: tabular-nums;
}
.entry-content th,
.entry-content td,
.wp-block-post-content th,
.wp-block-post-content td {
	border: 2px solid var(--wp--preset--color--border);
	padding: var(--wp--preset--spacing--10) var(--wp--preset--spacing--20);
	text-align: left;
	vertical-align: top;
}
.entry-content thead th,
.wp-block-post-content thead th {
	background: var(--wp--preset--color--surface);
	font-family: var(--wp--preset--font-family--heading);
	text-transform: uppercase;
	letter-spacing: 0.03em;
	font-size: var(--wp--preset--font-size--small);
}

/* Wide tables must scroll inside their own container on narrow viewports
   rather than forcing the page to scroll horizontally. */
.entry-content .wp-block-table,
.wp-block-post-content .wp-block-table {
	overflow-x: auto;
}

/* Risk/warning row flag — left 4px accent stripe *plus* the row's own text
   label, never colour alone (05-design-system.md §3/§6). Applied via a
   `ctd-risk-row` class on the relevant <tr>, set at authoring time in the
   content pack where a row genuinely represents added risk. */
tr.ctd-risk-row td:first-child {
	border-left: 4px solid var(--wp--preset--color--accent);
}

/* Visible FAQ list — see functions.php ctd_faq_list_shortcode(). Solid 2px
   top border per item, matching the exposed-structure register rather than
   a soft card treatment. */
.ctd-faq-list {
	margin: var(--wp--preset--spacing--30) 0;
}
.ctd-faq-item {
	padding: var(--wp--preset--spacing--20) 0;
	border-top: 2px solid var(--wp--preset--color--border);
}
.ctd-faq-item:last-child {
	border-bottom: 2px solid var(--wp--preset--color--border);
}
.ctd-faq-question {
	margin: 0 0 var(--wp--preset--spacing--10) 0;
	font-size: var(--wp--preset--font-size--large);
}
.ctd-faq-answer {
	margin: 0;
	color: var(--wp--preset--color--muted);
}

/* Small decorative footer mark — a purely visual domain-name wink, kept
   deliberately low-key (reduced opacity, small, positioned away from the
   site title) so it cannot read as a brand/token logo — see functions.php
   ctd_footer_mark_shortcode() for the full rationale. */
.ctd-footer-mark {
	width: 48px;
	height: 40px;
	opacity: 0.55;
	align-self: flex-end;
}

/* Mobile navigation is the core Navigation block's own overlay menu
   (overlayMenu:"mobile" in parts/header.html) — no custom toggle CSS/JS
   needed. Only re-skin its colors to match the palette. */
.wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--background);
}

/* Respect reduced motion. This design has minimal motion by philosophy
   already (Brutalist: none, or instant state changes), so this mainly
   guards against browser-default transitions on interactive elements. */
@media (prefers-reduced-motion: reduce) {
	* {
		animation-duration: 0.001ms !important;
		transition-duration: 0.001ms !important;
	}
}
