/**
 * Styling for the standard WordPress pages (blog, single page, post, 404, search),
 * built on the design tokens already declared in anyphd.css.
 */

.page-head {
	background: linear-gradient(160deg, var(--secondary), var(--blue-2));
	color: #fff;
	padding: 76px 0 68px;
}

.page-head h1 {
	color: #fff;
	font-size: var(--h2);
	margin: 0 0 10px;
}

.page-head p {
	color: rgba(255, 255, 255, .78);
	margin: 0;
	max-width: 64ch;
}

.page-head .crumbs {
	font-family: 'Libre Franklin', sans-serif;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--accent);
	margin-bottom: 14px;
	display: block;
}

.content-area {
	padding: 72px 0 90px;
}

.content-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 40px;
	max-width: 820px;
	margin-inline: auto;
}

.entry {
	background: #fff;
	border: 1px solid var(--border);
	border-radius: var(--r-card);
	padding: 40px;
}

.entry + .entry {
	margin-top: 26px;
}

.entry h1,
.entry h2,
.entry h3,
.entry h4 {
	color: var(--primary);
	font-family: 'Libre Franklin', sans-serif;
	letter-spacing: -.5px;
	line-height: 1.25;
	margin: 32px 0 12px;
}

.entry > *:first-child {
	margin-top: 0;
}

.entry h2 { font-size: var(--h3); }
.entry h3 { font-size: var(--h4); }

.entry p,
.entry li {
	font-size: var(--body);
	line-height: 1.72;
	color: var(--text);
}

.entry p { margin: 0 0 18px; }

.entry ul,
.entry ol { margin: 0 0 18px; padding-left: 22px; }

.entry li { margin-bottom: 8px; }

.entry a { color: var(--blue-1); text-decoration: underline; text-underline-offset: 3px; }
.entry a:hover { color: var(--accent-2); }

.entry img,
.entry iframe { max-width: 100%; height: auto; border-radius: var(--r-card); }

.entry blockquote {
	border-left: 4px solid var(--accent);
	background: var(--bg-light);
	border-radius: 0 var(--r-card) var(--r-card) 0;
	margin: 26px 0;
	padding: 20px 24px;
	color: var(--primary);
	font-style: italic;
}

.entry code,
.entry pre {
	background: var(--bg-light);
	border-radius: var(--r);
	font-family: ui-monospace, Consolas, monospace;
	font-size: .92em;
	color: var(--blue-2);
}

.entry code { padding: 2px 7px; }
.entry pre { padding: 18px 20px; overflow-x: auto; }

.entry table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 22px;
	font-size: var(--body);
}

.entry th,
.entry td { padding: 11px 14px; border-bottom: 1px solid var(--border); text-align: left; }
.entry th { background: var(--bg-light); color: var(--primary); font-family: 'Libre Franklin', sans-serif; }

.entry-meta {
	font-family: 'Libre Franklin', sans-serif;
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: .05em;
	text-transform: uppercase;
	color: var(--blue-1);
	margin-bottom: 12px;
	display: block;
}

.entry-title {
	font-size: var(--h3);
	margin: 0 0 14px;
}

.entry-title a { color: var(--primary); text-decoration: none; }
.entry-title a:hover { color: var(--blue-1); }

.entry-thumb {
	display: block;
	margin: -40px -40px 28px;
	border-radius: var(--r-card) var(--r-card) 0 0;
	overflow: hidden;
}

.entry-thumb img { width: 100%; display: block; border-radius: 0; }

.pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin-top: 34px;
}

.pagination .page-numbers {
	display: grid;
	place-items: center;
	min-width: 42px;
	height: 42px;
	padding: 0 12px;
	border: 1px solid var(--border);
	border-radius: var(--r);
	background: #fff;
	color: var(--primary);
	text-decoration: none;
	font-family: 'Libre Franklin', sans-serif;
	font-weight: 600;
	transition: .3s var(--ease);
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
	background: var(--secondary);
	border-color: var(--secondary);
	color: #fff;
}

.no-results {
	text-align: center;
	padding: 40px 0;
}

/* 404 */
.err {
	text-align: center;
	padding: 110px 0 120px;
}

.err-code {
	font-family: 'Libre Franklin', sans-serif;
	font-size: clamp(5rem, 3rem + 9vw, 10rem);
	font-weight: 700;
	line-height: 1;
	letter-spacing: -4px;
	background: linear-gradient(135deg, var(--secondary), var(--blue-3));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	margin-bottom: 10px;
}

.err h1 { font-size: var(--h2); margin: 0 0 12px; }
.err p { max-width: 52ch; margin: 0 auto 26px; }

.search-form {
	display: flex;
	gap: 10px;
	max-width: 460px;
	margin: 0 auto;
}

.search-form input[type="search"] {
	flex: 1;
	min-width: 0;
	border: 1px solid var(--border);
	border-radius: var(--r);
	padding: 13px 16px;
	font-family: Manrope, sans-serif;
	font-size: var(--body);
	color: var(--primary);
	background: #fff;
}

.search-form input[type="search"]:focus {
	outline: 2px solid var(--accent);
	outline-offset: 1px;
}

@media (max-width: 640px) {
	.entry { padding: 28px 22px; }
	.entry-thumb { margin: -28px -22px 22px; }
	.content-area { padding: 52px 0 66px; }
}

/* ============================================================
   RESEARCH PAPERS PAGE TEMPLATE
   ============================================================ */
.rp-ready {
	padding: 90px 0;
}

.rp-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 60px;
	align-items: start;
}

.rp-grid h2 {
	text-transform: none;
	letter-spacing: -1.2px;
	margin: 14px 0 16px;
}

.rp-lead {
	font-size: var(--medium);
}

.rp-list li {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	font-size: var(--small);
}

.rp-list li + li {
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid var(--bg-light);
}

.rp-list svg {
	width: 16px;
	height: 16px;
	flex: none;
	margin-top: 3px;
	color: var(--accent-2);
}

.rp-standards {
	margin-top: 32px;
	padding-top: 26px;
	border-top: 1px solid var(--border);
}

.rp-standards h5 {
	margin-bottom: 6px;
}

.rp-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
	margin-top: 16px;
}

.rp-chips span {
	padding: 8px 16px;
	border-radius: 99px;
	border: 1px solid var(--border);
	background: var(--bg-light);
	font-family: 'Libre Franklin', sans-serif;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--secondary);
}

/* ---------- abstract keyword reactor ---------- */
.reactor {
	background: var(--bg-light);
	padding: 90px 0;
}

.reactor-in {
	max-width: 800px;
	margin: 0 auto;
	text-align: center;
}

.reactor-field {
	width: 100%;
	min-height: 96px;
	resize: vertical;
	display: block;
	margin: 0 0 24px;
	padding: 18px 22px;
	border: 1px solid var(--border);
	border-radius: var(--r);
	background: #fff;
	color: var(--primary);
	font-family: Manrope, system-ui, sans-serif;
	font-size: var(--body);
	line-height: 1.6;
	transition: border-color .3s, box-shadow .3s;
}

.reactor-field::placeholder { color: #9AA7B0; }

.reactor-field:focus {
	outline: none;
	border-color: var(--secondary);
	box-shadow: 0 0 0 3px rgba(8, 59, 92, .12);
}

.reactor-cloud {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 12px;
	min-height: 230px;
	padding: 34px 30px;
	background: #fff;
	border: 1px solid var(--border);
	border-radius: var(--r-card);
	box-shadow: var(--shadow-card);
}

.reactor-empty {
	font-size: var(--small);
	color: var(--text);
	max-width: 34ch;
	margin: 0 auto;
}

.cloud-word {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	padding: 13px 22px;
	border-radius: 99px;
	background: var(--bg-light);
	opacity: 0;
	transform: scale(.7);
	transition: opacity .45s var(--ease), transform .45s var(--ease);
}

.cloud-word.visible {
	opacity: 1;
	transform: none;
}

.cloud-word b {
	font-family: 'Libre Franklin', sans-serif;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -.5px;
}

.cloud-word i {
	font-style: normal;
	font-size: 11px;
	color: var(--text);
}

.cloud-word.tier-0 b { font-size: 1.35rem; color: var(--secondary); }
.cloud-word.tier-1 b { font-size: 1.12rem; color: var(--accent-2); }
.cloud-word.tier-2 b { font-size: 1.28rem; color: var(--blue-1); }
.cloud-word.tier-3 b { font-size: 1.05rem; color: var(--primary); }

.reactor-foot {
	margin-top: 18px;
	font-size: 12.5px;
	color: var(--text);
}

@media (max-width: 900px) {
	.rp-grid { grid-template-columns: 1fr; gap: 40px; }
	.rp-ready, .reactor { padding: 64px 0; }
}

/* ============================================================
   RESEARCH AND ACADEMIC SUPPORT PAGE TEMPLATE
   ============================================================ */
/* Everything else on that page borrows a component from the front page. These are the two it
   needed of its own, plus one override: the front page shows six practices in a row of three, and
   this page shows four, which only reads as deliberate in a two-by-two block. */
.svcs-4 { grid-template-columns: repeat(2, 1fr); }

/* Twice the width needs less height, or the four faces read as mostly empty paper. */
.svcs-4 .svc { height: 366px; }

/* The reveal panel is two tiles wide. In a row of three that means the third one has to open
   leftwards; in a row of two it is the second and the fourth. */
@media (min-width: 861px) {
	.svcs-4 .svc:nth-child(3n) .svc-panel { left: 0; right: auto; }
	.svcs-4 .svc:nth-child(2n) .svc-panel { left: auto; right: 0; }
}

.aud {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}

.aud-card {
	background: #fff;
	border: 1px solid var(--border);
	border-radius: var(--r-card);
	padding: 32px 26px 30px;
	transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
}

.aud-card:hover {
	transform: translateY(-5px);
	box-shadow: var(--shadow-lift);
	border-color: transparent;
}

.aud-ico {
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	margin-bottom: 20px;
	border-radius: var(--r);
	background: var(--bg-light);
	color: var(--blue-1);
	transition: .3s var(--ease);
}

.aud-card:hover .aud-ico {
	background: var(--secondary);
	color: var(--accent);
}

.aud-ico svg { width: 22px; height: 22px; }

.aud-card h4 { margin-bottom: 10px; }
.aud-card p { font-size: var(--small); }

/* The sentences people actually arrive with, answered one for one. A left rule rather than a box,
   because six boxed rows in a column start to look like a price list. */
.stuck {
	display: grid;
	gap: 18px;
	max-width: 980px;
	margin-inline: auto;
}

.stuck-row {
	display: grid;
	grid-template-columns: 1fr 1.25fr;
	gap: 32px;
	align-items: start;
	padding: 26px 30px;
	background: var(--bg-light);
	border-left: 3px solid var(--accent);
	border-radius: 0 var(--r-card) var(--r-card) 0;
	transition: transform .4s var(--ease), box-shadow .4s var(--ease), background .4s var(--ease);
}

.stuck-row:hover {
	transform: translateX(4px);
	background: #fff;
	box-shadow: var(--shadow-lift);
}

.stuck-said {
	margin: 0;
	font-family: 'Libre Franklin', sans-serif;
	font-size: var(--medium);
	font-weight: 600;
	line-height: 1.45;
	letter-spacing: -.3px;
	color: var(--primary);
}

.stuck-do {
	margin: 0;
	font-size: var(--small);
	line-height: 1.75;
}

@media (max-width: 1024px) {
	.aud { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
	.svcs-4 { grid-template-columns: 1fr; }
	.stuck-row { grid-template-columns: 1fr; gap: 12px; padding: 24px 22px; }
}

@media (max-width: 620px) {
	.aud { grid-template-columns: 1fr; }
}
