/* Foxlet frontend CSS — only what theme.json cannot express. */

/* 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 —
   no per-component dark-mode rules needed. Not a simple inversion: this
   uses a deep plum-black ink (matching the "field guide" concept) rather
   than pure black, and a warm off-white rather than pure white text.
   Every value below was checked against WCAG AA (4.5:1 text / 3:1
   non-text) before use — see 05-design-system.md §7. Responds to the
   system-level prefers-color-scheme; [data-theme="dark"] is also
   supported for a future manual toggle. Light values are NOT redeclared
   here — theme.json is the single source of truth for those; this file
   only ever overrides. */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--wp--preset--color--background: #1E1420;
		--wp--preset--color--surface: #2A1D2C;
		--wp--preset--color--text: #F5ECE8;
		--wp--preset--color--muted: #B9A7B8;
		--wp--preset--color--border: #E8749C;
		--wp--preset--color--accent: #F0975A;
		--wp--preset--color--accent-secondary: #E8749C;
	}
}
:root[data-theme="dark"] {
	--wp--preset--color--background: #1E1420;
	--wp--preset--color--surface: #2A1D2C;
	--wp--preset--color--text: #F5ECE8;
	--wp--preset--color--muted: #B9A7B8;
	--wp--preset--color--border: #E8749C;
	--wp--preset--color--accent: #F0975A;
	--wp--preset--color--accent-secondary: #E8749C;
}

/* Visible focus ring everywhere (reference 02 §19 accessibility). */
: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;
	border-radius: 999px;
	z-index: 100;
}
.skip-link:focus {
	left: 16px;
	top: 16px;
}

/* Breadcrumbs */
.foxlet-breadcrumbs {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
	margin-bottom: var(--wp--preset--spacing--20);
}
.foxlet-breadcrumbs a {
	color: var(--wp--preset--color--muted);
	text-decoration: underline;
}
.foxlet-breadcrumbs [aria-current="page"] {
	color: var(--wp--preset--color--text);
}

/* Last-updated freshness line. */
.foxlet-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);
}

/* "Fact-checked against our editorial guidelines" line — this site's
   authorship treatment in place of a named byline (05-design-system.md §4). */
.foxlet-factcheck-line {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
	margin-bottom: var(--wp--preset--spacing--30);
}
.foxlet-factcheck-line a {
	color: var(--wp--preset--color--accent);
}

/* Article images: rounded, warm figure/figcaption rhythm. */
.entry-content figure.wp-block-image {
	margin: var(--wp--preset--spacing--40) 0;
}
.entry-content figure.wp-block-image img {
	width: 100%;
	height: auto;
	border-radius: 16px;
	border: 1px solid var(--wp--preset--color--border);
}
.entry-content figcaption {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
	margin-top: 8px;
}

/* Featured image (LCP) is not lazy-loaded; core only lazy-loads images
   inserted after the first ~3 content elements — the post-featured-image
   block is excluded by core. */
.wp-block-post-featured-image img {
	border-radius: 16px;
}

/* Warm bordered tables with rounded corners — distinct from etherpos.io's
   monospace hairline ledger-grid tables. This site's comparison-heavy
   content (AMM vs. order book, custody-adjacent trade-offs) leans on real
   <table> markup, not styled <div>s. */
.entry-content table {
	border-collapse: separate;
	border-spacing: 0;
	width: 100%;
	margin: var(--wp--preset--spacing--30) 0;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 12px;
	overflow: hidden;
}
.entry-content th,
.entry-content td {
	padding: var(--wp--preset--spacing--10) var(--wp--preset--spacing--20);
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid var(--wp--preset--color--border);
}
.entry-content tbody tr:last-child td {
	border-bottom: none;
}
.entry-content thead th {
	background: var(--wp--preset--color--surface);
	font-family: var(--wp--preset--font-family--heading);
}

/* Risk/disclaimer callout — left-border accent, not a filled colored box
   (05-design-system.md §4: signals "pay attention" without being
   alarmist). */
.foxlet-callout {
	background: var(--wp--preset--color--surface);
	border-left: 3px solid var(--wp--preset--color--accent-secondary);
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
	border-radius: 12px;
}

/* Guides-hub thumbnail cards. */
.guide-index {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: var(--wp--preset--spacing--30);
	margin: var(--wp--preset--spacing--30) 0;
}
.guide-card {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 16px;
	padding: var(--wp--preset--spacing--20);
	background: var(--wp--preset--color--surface);
}
.guide-card img {
	width: 100%;
	height: auto;
	border-radius: 12px;
	margin-bottom: var(--wp--preset--spacing--10);
}
.guide-card h3 {
	margin-top: 0;
}

/* 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. */
@media (prefers-reduced-motion: reduce) {
	* {
		animation-duration: 0.001ms !important;
		transition-duration: 0.001ms !important;
	}
}
