/* Phoenichera frontend CSS — only what theme.json cannot express.
   Editorial/Magazine register: drop cap, pull quotes, print-style tables,
   a persistent sidebar table of contents — this site's actual navigation,
   not a decorative panel. */

/* Dark mode: overrides the same CSS custom properties theme.json already
   generates on :root. 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. */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--wp--preset--color--background: #14100D;
		--wp--preset--color--surface: #211A15;
		--wp--preset--color--text: #F1ECE4;
		--wp--preset--color--muted: #B3A99C;
		--wp--preset--color--border: #3A2F27;
		--wp--preset--color--accent: #E06A82;
	}
}
:root[data-theme="dark"] {
	--wp--preset--color--background: #14100D;
	--wp--preset--color--surface: #211A15;
	--wp--preset--color--text: #F1ECE4;
	--wp--preset--color--muted: #B3A99C;
	--wp--preset--color--border: #3A2F27;
	--wp--preset--color--accent: #E06A82;
}

:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

.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;
}

.phx-last-updated {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-top: -8px;
	margin-bottom: 4px;
}
.phx-checked-line {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
	margin-bottom: var(--wp--preset--spacing--30);
}
.phx-checked-line a {
	color: var(--wp--preset--color--accent);
}

.entry-content a,
.wp-block-post-content a {
	text-decoration-color: var(--wp--preset--color--accent);
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}
.entry-content a:hover,
.wp-block-post-content a:hover {
	text-decoration-thickness: 2px;
}

/* --- Drop cap: the article's first paragraph, marked with has-drop-cap
   directly in the content pack's own HTML. Overrides WordPress core's
   default drop-cap styling to use the site's own display serif + accent
   colour. --- */
.entry-content p.has-drop-cap:first-letter,
.wp-block-post-content p.has-drop-cap:first-letter {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 400;
	font-size: 4.2em;
	line-height: 0.86;
	color: var(--wp--preset--color--accent);
	float: left;
	margin: 0.02em 0.08em 0 0;
}

/* --- Pull quotes: real sentences already in the article body, rendered as
   a core/quote block. Large display-serif type, thin accent rules top and
   bottom, no background fill — a quiet editorial callout, not a boxed
   card. --- */
.entry-content blockquote,
.wp-block-post-content blockquote {
	font-style: italic;
	margin: var(--wp--preset--spacing--50) 0;
}
.entry-content blockquote p,
.wp-block-post-content blockquote p {
	margin: 0;
}

/* --- Print/journal tables: bold rule above the header, thin rule below
   it, thin rule at the bottom, no vertical or inter-row rules at all. --- */
.entry-content table,
.wp-block-post-content table {
	width: 100%;
	margin: var(--wp--preset--spacing--40) 0;
	border-collapse: collapse;
	border-top: 2px solid var(--wp--preset--color--ink, var(--wp--preset--color--text));
	border-bottom: 1px solid var(--wp--preset--color--border);
	font-variant-numeric: tabular-nums;
}
.entry-content th,
.wp-block-post-content th {
	border-bottom: 1px solid var(--wp--preset--color--text);
	text-align: left;
	padding: var(--wp--preset--spacing--10) var(--wp--preset--spacing--20) var(--wp--preset--spacing--10) 0;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 400;
}
.entry-content td,
.wp-block-post-content td {
	padding: var(--wp--preset--spacing--10) var(--wp--preset--spacing--20) var(--wp--preset--spacing--10) 0;
	vertical-align: top;
}
.entry-content .wp-block-table,
.wp-block-post-content .wp-block-table {
	overflow-x: auto;
}

/* --- Ordered-list steps: large display-serif numerals instead of default
   browser markers. --- */
.entry-content ol,
.wp-block-post-content ol {
	list-style: none;
	counter-reset: phx-step;
	padding-left: 0;
}
.entry-content ol > li,
.wp-block-post-content ol > li {
	counter-increment: phx-step;
	position: relative;
	padding-left: 2.4rem;
	margin-bottom: var(--wp--preset--spacing--20);
}
.entry-content ol > li::before,
.wp-block-post-content ol > li::before {
	content: counter(phx-step);
	position: absolute;
	left: 0;
	top: -0.15em;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.5em;
	color: var(--wp--preset--color--accent);
	line-height: 1;
}

/* --- Article images --- */
.entry-content figure.wp-block-image img,
.wp-block-post-content figure.wp-block-image img {
	width: 100%;
	height: auto;
	border: 1px 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--30) 0;
}
.wp-block-post-featured-image img {
	border: 1px solid var(--wp--preset--color--border);
}

/* --- Visible FAQ list --- */
.phx-faq-list {
	margin: var(--wp--preset--spacing--30) 0;
}
.phx-faq-item {
	padding: var(--wp--preset--spacing--20) 0;
	border-top: 1px solid var(--wp--preset--color--border);
}
.phx-faq-item:last-child {
	border-bottom: 1px solid var(--wp--preset--color--border);
}
.phx-faq-question {
	margin: 0 0 var(--wp--preset--spacing--10) 0;
	font-size: var(--wp--preset--font-size--large);
}
.phx-faq-answer {
	margin: 0;
	color: var(--wp--preset--color--muted);
}

/* --- Layout skeleton: persistent sidebar table of contents on desktop,
   collapsible <details> disclosure on mobile — this site's actual
   navigation, replacing the primary nav every prior site had. See
   05-design-system.md §3a. --- */
.phx-layout {
	display: block;
}
.phx-sidebar {
	margin-bottom: var(--wp--preset--spacing--40);
}
.phx-toc-wrap summary {
	cursor: pointer;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--large);
	padding: var(--wp--preset--spacing--10) 0;
	border-top: 1px solid var(--wp--preset--color--border);
	border-bottom: 1px solid var(--wp--preset--color--border);
}
.phx-toc ul {
	list-style: none;
	margin: var(--wp--preset--spacing--20) 0 0;
	padding: 0;
}
.phx-toc li {
	margin-bottom: var(--wp--preset--spacing--10);
}
.phx-toc a {
	color: var(--wp--preset--color--text);
	text-decoration: none;
	font-size: var(--wp--preset--font-size--small);
	border-left: 2px solid var(--wp--preset--color--border);
	padding-left: var(--wp--preset--spacing--10);
	display: block;
}
.phx-toc a:hover,
.phx-toc a:focus-visible {
	border-left-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent);
}

@media (min-width: 1000px) {
	.phx-layout {
		display: grid;
		grid-template-columns: 260px 1fr;
		gap: var(--wp--preset--spacing--60);
		align-items: start;
	}
	.phx-sidebar {
		position: sticky;
		top: var(--wp--preset--spacing--30);
		margin-bottom: 0;
	}
	.phx-toc-wrap summary {
		display: none;
	}
	.phx-toc-wrap {
		display: block;
	}
}

/* Respect reduced motion. */
@media (prefers-reduced-motion: reduce) {
	* {
		animation-duration: 0.001ms !important;
		transition-duration: 0.001ms !important;
	}
}
