/*
Theme Name: Pritchard Criteria
Theme URI: https://pritchardcriteria.uk
Author: Forensic Psychiatry Experts
Description: A clean, authoritative theme for a forensic psychiatry expert-witness practice specialising in fitness to plead. Oxford blue and stone palette, Spectral and Public Sans typography.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pritchard-criteria
*/

/* ---------------------------------------------------------------
   0. Fonts — self-hosted, no third-party requests.
   Spectral and Public Sans, both SIL Open Font License 1.1.
   Licences are in assets/fonts/.
   --------------------------------------------------------------- */

@font-face {
	font-family: "Spectral";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("assets/fonts/spectral-latin-400-normal.woff2") format("woff2");
}
@font-face {
	font-family: "Spectral";
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: url("assets/fonts/spectral-latin-400-italic.woff2") format("woff2");
}
@font-face {
	font-family: "Spectral";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("assets/fonts/spectral-latin-500-normal.woff2") format("woff2");
}
@font-face {
	font-family: "Spectral";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("assets/fonts/spectral-latin-600-normal.woff2") format("woff2");
}

@font-face {
	font-family: "Public Sans";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("assets/fonts/public-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
	font-family: "Public Sans";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("assets/fonts/public-sans-latin-500-normal.woff2") format("woff2");
}
@font-face {
	font-family: "Public Sans";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("assets/fonts/public-sans-latin-600-normal.woff2") format("woff2");
}

/* ---------------------------------------------------------------
   1. Tokens
   --------------------------------------------------------------- */

:root {
	--ink:        #12294A;
	--ink-deep:   #0C1C33;
	--ink-soft:   #24406B;
	--stone:      #EEEBE4;
	--stone-dim:  #E4E0D6;
	--paper:      #FFFFFF;
	--steel:      #5A7D9A;
	--steel-deep: #3C6083;
	--text:       #1E232B;
	--text-soft:  #565F6C;
	--text-faint: #7A828E;
	--rule:       #D6D0C4;
	--rule-soft:  #E6E1D7;

	--serif: "Spectral", Georgia, "Times New Roman", serif;
	--sans:  "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	--fs-xs:   0.8125rem;
	--fs-sm:   0.9375rem;
	--fs-base: 1.0625rem;
	--fs-md:   1.1875rem;
	--fs-lg:   1.375rem;
	--fs-xl:   1.75rem;
	--fs-2xl:  2.25rem;
	--fs-3xl:  clamp(2.25rem, 5.2vw, 3.4rem);

	--measure: 34rem;
	--wide:    68rem;
	--pad:     clamp(1.25rem, 5vw, 3rem);
}

/* ---------------------------------------------------------------
   2. Reset and base
   --------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}

body {
	margin: 0;
	background: var(--stone);
	color: var(--text);
	font-family: var(--sans);
	font-size: var(--fs-base);
	line-height: 1.65;
	font-weight: 400;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--steel-deep); text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 0.06em; }
a:hover { color: var(--ink); }

:focus-visible {
	outline: 2px solid var(--steel-deep);
	outline-offset: 3px;
	border-radius: 1px;
}

h1, h2, h3, h4 {
	font-family: var(--serif);
	color: var(--ink);
	font-weight: 500;
	line-height: 1.18;
	letter-spacing: -0.008em;
	margin: 0 0 0.6em;
	text-wrap: balance;
}

h1 { font-size: var(--fs-3xl); line-height: 1.08; letter-spacing: -0.018em; }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

strong { font-weight: 600; color: var(--ink-deep); }

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--ink);
	color: #fff;
	padding: 0.85rem 1.4rem;
	z-index: 999;
	text-decoration: none;
	font-size: var(--fs-sm);
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------------------------------------------------------------
   3. Layout helpers
   --------------------------------------------------------------- */

.wrap {
	width: 100%;
	max-width: var(--wide);
	margin-inline: auto;
	padding-inline: var(--pad);
}

.prose { max-width: var(--measure); }
.prose h2 { margin-top: 2.4em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 2em; margin-bottom: 0.45em; }

.band { padding-block: clamp(3rem, 7vw, 5.25rem); }
.band--paper { background: var(--paper); }
.band--ink { background: var(--ink); color: #D9E1EC; }
.band--ink h2, .band--ink h3 { color: #fff; }
.band--tight { padding-block: clamp(2.25rem, 4.5vw, 3.25rem); }

.band + .band--paper { border-top: 1px solid var(--rule-soft); }

.cols {
	display: grid;
	gap: clamp(1.75rem, 4vw, 3.5rem);
	grid-template-columns: 1fr;
}
@media (min-width: 62rem) {
	.cols--aside { grid-template-columns: minmax(0, 1fr) 19rem; align-items: start; }
}

/* ---------------------------------------------------------------
   4. Header and navigation
   --------------------------------------------------------------- */

.site-header {
	background: var(--ink);
	color: #fff;
	border-bottom: 3px solid var(--steel-deep);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	flex-wrap: wrap;
	padding-block: 1.1rem;
}

.brand { text-decoration: none; color: #fff; display: block; line-height: 1; }
.brand:hover { color: #fff; }
.brand__top {
	font-family: var(--serif);
	font-size: 1.375rem;
	font-weight: 500;
	letter-spacing: 0.17em;
	display: block;
}
.brand__rule {
	display: block;
	height: 1px;
	background: rgba(255,255,255,0.55);
	margin: 0.34rem 0 0.32rem;
	width: 100%;
}
.brand__bottom {
	font-family: var(--sans);
	font-size: 0.6875rem;
	letter-spacing: 0.42em;
	display: block;
	color: #C3D0E0;
	text-indent: 0.42em;
}

.nav-toggle {
	display: none;
	background: none;
	border: 1px solid rgba(255,255,255,0.35);
	color: #fff;
	font-family: var(--sans);
	font-size: var(--fs-sm);
	padding: 0.5rem 0.9rem;
	cursor: pointer;
	border-radius: 2px;
}

.site-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 1.6rem;
	flex-wrap: wrap;
}
.site-nav a {
	color: #CFDAE8;
	text-decoration: none;
	font-size: var(--fs-sm);
	padding-block: 0.35rem;
	border-bottom: 2px solid transparent;
	display: block;
}
.site-nav a:hover { color: #fff; border-bottom-color: var(--steel); }
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a {
	color: #fff;
	border-bottom-color: #fff;
}

@media (max-width: 54rem) {
	.nav-toggle { display: block; }
	.site-nav { flex-basis: 100%; display: none; }
	.site-nav.is-open { display: block; }
	.site-nav ul { flex-direction: column; gap: 0; padding-top: 0.5rem; }
	.site-nav li { border-top: 1px solid rgba(255,255,255,0.14); }
	.site-nav a { padding-block: 0.75rem; border-bottom: none; }
}

/* ---------------------------------------------------------------
   5. Hero
   --------------------------------------------------------------- */

.hero { padding-block: clamp(2.75rem, 6.5vw, 4.75rem) clamp(2.5rem, 5vw, 3.5rem); }

.hero__lede {
	font-family: var(--serif);
	font-size: clamp(1.1875rem, 2.1vw, 1.5rem);
	line-height: 1.45;
	color: var(--ink-soft);
	max-width: 36rem;
	margin-bottom: 1.4rem;
	text-wrap: balance;
}

.citation {
	font-family: var(--serif);
	font-size: var(--fs-sm);
	font-style: italic;
	color: var(--steel-deep);
	margin: 0;
}
.citation span { font-style: normal; }

/* ---------------------------------------------------------------
   6. The limbs panel — the one bold element
   --------------------------------------------------------------- */

.limbs {
	background: var(--paper);
	border: 1px solid var(--rule);
	border-top: 3px solid var(--ink);
}

.limbs__head {
	padding: 1.15rem var(--pad) 1rem;
	border-bottom: 1px solid var(--rule);
	background: #FBFAF7;
}
.limbs__head p {
	margin: 0;
	font-size: var(--fs-sm);
	color: var(--text-soft);
	max-width: 44rem;
}

.limbs__list {
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: limb;
}

.limbs__list li {
	counter-increment: limb;
	display: grid;
	grid-template-columns: 3.25rem 1fr;
	gap: 0.25rem 0.5rem;
	padding: 1.05rem var(--pad);
	border-bottom: 1px solid var(--rule-soft);
	align-items: baseline;
}
.limbs__list li:last-child { border-bottom: none; }

.limbs__list li::before {
	content: counter(limb);
	font-family: var(--serif);
	font-size: 1.5rem;
	color: var(--steel);
	line-height: 1;
	font-weight: 400;
	grid-row: span 2;
	align-self: start;
	padding-top: 0.1rem;
}

.limbs__what {
	font-family: var(--serif);
	font-size: var(--fs-md);
	color: var(--ink);
	line-height: 1.3;
}
.limbs__gloss {
	font-size: var(--fs-sm);
	color: var(--text-soft);
	grid-column: 2;
	line-height: 1.55;
}

.limbs__foot {
	padding: 1rem var(--pad) 1.15rem;
	background: var(--ink);
	color: #CBD7E6;
	font-size: var(--fs-sm);
	line-height: 1.55;
}
.limbs__foot strong { color: #fff; font-weight: 600; }

/* ---------------------------------------------------------------
   7. Components
   --------------------------------------------------------------- */

.btn {
	display: inline-block;
	background: var(--ink);
	color: #fff;
	text-decoration: none;
	font-family: var(--sans);
	font-size: var(--fs-sm);
	font-weight: 500;
	letter-spacing: 0.01em;
	padding: 0.8rem 1.6rem;
	border: 1px solid var(--ink);
	border-radius: 2px;
	transition: background 140ms ease, border-color 140ms ease;
}
.btn:hover { background: var(--ink-deep); border-color: var(--ink-deep); color: #fff; }

.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }

.btn--light { background: #fff; color: var(--ink); border-color: #fff; }
.btn--light:hover { background: #E7EDF5; border-color: #E7EDF5; color: var(--ink); }

.note {
	border-left: 3px solid var(--steel);
	background: #F7F5F1;
	padding: 1.1rem 1.35rem;
	font-size: var(--fs-sm);
	line-height: 1.6;
	color: var(--text-soft);
	margin: 1.9rem 0;
	border-radius: 0;
}
.note strong { color: var(--ink); }
.band--paper .note { background: #F9F8F4; }

.aside-card {
	background: #F8F6F2;
	border: 1px solid var(--rule);
	padding: 1.4rem 1.5rem;
	font-size: var(--fs-sm);
	line-height: 1.6;
}
.band--paper .aside-card { background: #FAF9F5; }
.aside-card h3 {
	font-size: var(--fs-md);
	margin-bottom: 0.6rem;
	margin-top: 0;
}
.aside-card dl { margin: 0; }
.aside-card dt {
	font-weight: 600;
	color: var(--ink);
	font-size: var(--fs-xs);
	letter-spacing: 0.02em;
	margin-top: 0.9rem;
}
.aside-card dt:first-of-type { margin-top: 0; }
.aside-card dd { margin: 0.1rem 0 0; color: var(--text-soft); }

.deck { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 48rem) { .deck--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 42rem) { .deck--2 { grid-template-columns: repeat(2, 1fr); } }

.entry {
	border-top: 2px solid var(--ink);
	padding-top: 1.1rem;
}
.entry h3 { margin-bottom: 0.45rem; }
.entry p { font-size: var(--fs-sm); color: var(--text-soft); line-height: 1.6; }
.entry a { font-size: var(--fs-sm); }

.band--ink .entry { border-top-color: var(--steel); }
.band--ink .entry p { color: #B8C6D8; }
.band--ink a { color: #fff; }

/* Buttons keep their own colours inside the dark band.
   These must stay after `.band--ink a`, which would otherwise win. */
.band--ink a.btn { color: #fff; }
.band--ink a.btn--light,
.band--ink a.btn--light:hover { color: var(--ink); }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li {
	counter-increment: step;
	display: grid;
	grid-template-columns: 3.25rem 1fr;
	gap: 0.2rem 0.5rem;
	align-items: baseline;
	border-top: 1px solid var(--rule);
	padding: 1.25rem 0;
}
.steps li:last-child { border-bottom: 1px solid var(--rule); }
.steps li::before {
	content: counter(step);
	font-family: var(--serif);
	font-size: 1.25rem;
	color: var(--steel);
	line-height: 1;
	grid-row: span 2;
	align-self: start;
	padding-top: 0.15rem;
}
.steps h3 { font-size: var(--fs-md); margin: 0 0 0.15rem; }
.steps p { font-size: var(--fs-sm); color: var(--text-soft); margin-bottom: 0; grid-column: 2; }

.checklist { padding-left: 1.15rem; margin: 0 0 1.15em; }
.checklist li { margin-bottom: 0.55rem; }
.checklist li::marker { color: var(--steel); }

.faq { border-top: 1px solid var(--rule); margin-top: 2rem; }
.faq details {
	border-bottom: 1px solid var(--rule);
	padding: 0;
}
.faq summary {
	cursor: pointer;
	list-style: none;
	padding: 1.15rem 2.5rem 1.15rem 0;
	font-family: var(--serif);
	font-size: var(--fs-md);
	color: var(--ink);
	position: relative;
	line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
	content: "+";
	position: absolute;
	right: 0.35rem;
	top: 1rem;
	font-family: var(--sans);
	font-size: 1.4rem;
	color: var(--steel);
	line-height: 1;
	font-weight: 300;
}
.faq details[open] summary::after { content: "\2013"; }
.faq summary:hover { color: var(--steel-deep); }
.faq__body { padding: 0 0 1.35rem; max-width: var(--measure); }
.faq__body p { font-size: var(--fs-sm); color: var(--text-soft); }

.contact-line {
	font-family: var(--serif);
	font-size: clamp(1.25rem, 3vw, 1.875rem);
	line-height: 1.3;
	margin: 0 0 0.5rem;
	word-break: break-word;
}
.contact-line a { color: #fff; text-decoration-thickness: 0.055em; text-underline-offset: 0.16em; }
.contact-line a:hover { color: #C9D8EA; }

.meta-list { list-style: none; margin: 0; padding: 0; }
.meta-list li {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.1rem;
	padding: 0.9rem 0;
	border-bottom: 1px solid var(--rule-soft);
}
@media (min-width: 38rem) {
	.meta-list li { grid-template-columns: 11rem 1fr; gap: 1.25rem; align-items: baseline; }
}
.meta-list dt, .meta-list__k {
	font-weight: 600;
	color: var(--ink);
	font-size: var(--fs-sm);
}
.meta-list__v { color: var(--text-soft); font-size: var(--fs-sm); }

/* ---------------------------------------------------------------
   8. Footer
   --------------------------------------------------------------- */

.site-footer {
	background: var(--ink-deep);
	color: #9FB0C6;
	font-size: var(--fs-sm);
	padding-block: clamp(2.5rem, 5vw, 3.5rem) 2rem;
}
.site-footer a { color: #CFDAE8; }
.site-footer a:hover { color: #fff; }
.site-footer h4 { color: #fff; font-size: var(--fs-md); margin-bottom: 0.7rem; }

.site-footer__grid {
	display: grid;
	gap: 2rem;
	grid-template-columns: 1fr;
	padding-bottom: 2rem;
	border-bottom: 1px solid rgba(255,255,255,0.14);
}
@media (min-width: 48rem) {
	.site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 3rem; }
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.5rem; }

.site-footer__legal {
	padding-top: 1.5rem;
	font-size: var(--fs-xs);
	color: #7E90A8;
	line-height: 1.6;
	max-width: 52rem;
}
.site-footer__legal p { margin-bottom: 0.7rem; }

/* ---------------------------------------------------------------
   9. Fallback WordPress content styling
   --------------------------------------------------------------- */

.entry-content ul, .entry-content ol { padding-left: 1.2rem; }
.entry-content li { margin-bottom: 0.5rem; }
.entry-content blockquote {
	margin: 1.8rem 0;
	padding-left: 1.25rem;
	border-left: 3px solid var(--steel);
	font-family: var(--serif);
	color: var(--ink-soft);
}
.entry-content table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.entry-content th, .entry-content td {
	text-align: left;
	padding: 0.6rem 0.75rem;
	border-bottom: 1px solid var(--rule);
}
.entry-content th { color: var(--ink); font-weight: 600; }
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { margin-inline: auto; }
.screen-reader-text {
	position: absolute;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
