/*
 * PromptRang front-end styles. One file, no framework, mobile-first.
 * Tokens mirror theme.json; dark mode is automatic (prefers-color-scheme).
 * Budget: page-spec §15 (CSS ≤20 KB compressed); target ≤30 KB unminified.
 */

/* ---------- Tokens ---------- */
:root {
	--pr-paper: #fff;
	--pr-surface: #f6f6f9;
	--pr-ink: #17171c;
	--pr-muted: #55566a;
	--pr-line: #dcdce4;
	--pr-line-strong: #8a8a9a;
	--pr-tint: #f3f0fc;
	--pr-brand: #6d28d9;
	--pr-brand-ink: #fff;
	--pr-accent: #9a4a07;
	--pr-accent-bg: #fff7ed;
	--pr-mark: #fde68a;
	--pr-mark-ink: #17171c;
	--pr-font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
	--pr-radius: 10px;
	--pr-gap: 16px;
	--pr-content: 720px;
	--pr-wide: 1100px;
	color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
	:root {
		--pr-paper: #121216;
		--pr-surface: #1c1c23;
		--pr-ink: #ececf1;
		--pr-muted: #a9a9b8;
		--pr-line: #2e2e39;
		--pr-line-strong: #6e6e80;
		--pr-tint: #1f1a2e;
		--pr-brand: #c4b5fd;
		--pr-brand-ink: #15112a;
		--pr-accent: #f5b35a;
		--pr-accent-bg: #241a0d;
		--pr-mark: #4a3a08;
		--pr-mark-ink: #fde68a;
	}

	/* Block content uses theme.json presets; switch them too. html:root beats
	   the :root rule in core's global-styles output, whatever the order. */
	html:root {
		--wp--preset--color--paper: #121216;
		--wp--preset--color--surface: #1c1c23;
		--wp--preset--color--ink: #ececf1;
		--wp--preset--color--muted: #a9a9b8;
		--wp--preset--color--line: #2e2e39;
		--wp--preset--color--tint: #1f1a2e;
		--wp--preset--color--brand: #c4b5fd;
		--wp--preset--color--accent: #f5b35a;
	}
}

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

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

body {
	margin: 0;
	background: var(--pr-paper);
	color: var(--pr-ink);
	font: 1rem/1.6 var(--pr-font);
	overflow-wrap: break-word;
}

h1, h2, h3, h4 {
	line-height: 1.25;
	margin: 0 0 .5em;
	font-weight: 700;
}
h1 { font-size: clamp(1.625rem, 1.3rem + 1.6vw, 2.25rem); }
h2 { font-size: clamp(1.3rem, 1.15rem + .8vw, 1.6rem); margin-top: 0; }
h3 { font-size: 1.125rem; }
p, ul, ol, table, figure { margin: 0 0 1rem; }
ul, ol { padding-left: 1.25rem; }

a { color: var(--pr-brand); text-underline-offset: .15em; }
a:hover { text-decoration-thickness: 2px; }

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

mark {
	background: var(--pr-mark);
	color: var(--pr-mark-ink);
	padding: 0 .15em;
	border-radius: 3px;
}

:focus-visible {
	outline: 3px solid var(--pr-brand);
	outline-offset: 2px;
	border-radius: 4px;
}
.pr-main:focus { outline: none; }

.screen-reader-text,
.pr-tabpanel__title {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.pr-offscreen {
	position: fixed;
	top: 0;
	left: -9999px;
	opacity: 0;
}

.pr-skip {
	position: absolute;
	left: 8px;
	top: -100px;
	z-index: 100;
	padding: 12px 16px;
	background: var(--pr-brand);
	color: var(--pr-brand-ink);
	border-radius: 8px;
	font-weight: 600;
}
.pr-skip:focus { top: 8px; }

/* JS-only controls (copy, "Show full prompt") carry `hidden` until app.js
   runs. Keep their box so revealing them shifts nothing; the <noscript>
   style in <head> removes them entirely without JS. */
[data-pr-copy][hidden],
[data-pr-more][hidden] { display: inline-flex; visibility: hidden; }

/* ---------- Layout ---------- */
.pr-wrap {
	width: 100%;
	max-width: var(--pr-wide);
	margin-inline: auto;
	padding-inline: 16px;
}

.pr-main { display: block; padding-block: 16px 48px; }

.pr-page .pr-article,
.pr-single .pr-article,
.pr-content,
.pr-intro { max-width: var(--pr-content); }

/* Hubs: text stays at reading width, the card grid uses the full width. */
.pr-hub .pr-content { max-width: none; }

.pr-section { margin-block: 40px; }

.pr-single { display: block; }
.pr-rail { display: none; }

@media (min-width: 1024px) {
	.pr-single {
		display: grid;
		grid-template-columns: minmax(0, var(--pr-content)) 300px;
		justify-content: space-between;
		gap: 48px;
		align-items: start;
	}
	.pr-rail {
		display: block;
		position: sticky;
		top: 16px;
	}
}

/* ---------- Header and nav ---------- */
.pr-header {
	border-bottom: 1px solid var(--pr-line);
	background: var(--pr-paper);
}

.pr-header__in {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 56px;
}

.pr-logo {
	font-weight: 800;
	font-size: 1.25rem;
	color: var(--pr-ink);
	text-decoration: none;
	padding-block: 10px;
}

.pr-nav { position: relative; }
.pr-nav__list { list-style: none; margin: 0; padding: 0; }
.pr-nav__list a {
	display: flex;
	align-items: center;
	min-height: 44px;
	padding-inline: 12px;
	color: var(--pr-ink);
	text-decoration: none;
	font-weight: 600;
	border-radius: 8px;
}
.pr-nav__list a:hover { background: var(--pr-surface); }
.pr-nav__list a[aria-current="page"] { color: var(--pr-brand); text-decoration: underline; text-underline-offset: .3em; }

.pr-nav__btn {
	display: flex;
	align-items: center;
	min-height: 44px;
	padding-inline: 14px;
	border: 1px solid var(--pr-line-strong);
	border-radius: 8px;
	cursor: pointer;
	font-weight: 600;
	list-style: none;
}
.pr-nav__btn::-webkit-details-marker { display: none; }
.pr-nav__btn::after { content: "▾"; margin-left: 6px; font-size: .8em; }
.pr-nav__m[open] .pr-nav__btn::after { content: "▴"; }

.pr-nav__list--m {
	position: absolute;
	right: 0;
	top: calc(100% + 8px);
	z-index: 20;
	min-width: 220px;
	padding: 8px;
	background: var(--pr-paper);
	border: 1px solid var(--pr-line);
	border-radius: var(--pr-radius);
	box-shadow: 0 8px 24px rgb(0 0 0 / .12);
}

.pr-nav__list--d { display: none; }

@media (min-width: 900px) {
	.pr-nav__m { display: none; }
	.pr-nav__list--d { display: flex; flex-wrap: wrap; gap: 4px; }
}

/* ---------- Breadcrumbs ---------- */
.pr-crumbs { font-size: .875rem; color: var(--pr-muted); margin-bottom: 12px; }
.pr-crumbs ol, .pr-crumbs p { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.pr-crumbs li + li::before { content: "›"; margin-inline: 8px; color: var(--pr-muted); }
.pr-crumbs a { color: var(--pr-muted); display: inline-block; padding-block: 6px; }
.pr-crumbs .separator { margin-inline: 6px; }

/* ---------- Intro / byline ---------- */
.pr-title { margin-bottom: 8px; }
.pr-byline { color: var(--pr-muted); font-size: .9375rem; margin-bottom: 16px; }
.pr-byline a { color: inherit; }
.pr-summary { font-size: 1.0625rem; margin-block: 16px; }
.pr-facts { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pr-facts li, .pr-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 10px;
	border: 1px solid var(--pr-line);
	border-radius: 999px;
	background: var(--pr-surface);
	font-size: .875rem;
}
.pr-facts__k { color: var(--pr-muted); }
.pr-facts__k::after { content: ":"; }
.pr-chip--link {
	min-height: 44px;
	padding-inline: 14px;
	color: var(--pr-ink);
	text-decoration: none;
	font-weight: 600;
}
.pr-chip--link:hover { border-color: var(--pr-brand); }
.pr-chip__tag { color: var(--pr-accent); font-weight: 600; font-size: .8125rem; }
.pr-also { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .9375rem; }

/* ---------- Badges ---------- */
.pr-badge {
	display: inline-block;
	padding: 1px 8px;
	border-radius: 999px;
	border: 1px solid var(--pr-line-strong);
	background: var(--pr-paper);
	color: var(--pr-ink);
	font-size: .75rem;
	font-weight: 700;
	line-height: 1.6;
	white-space: nowrap;
}
.pr-badge--ai { border-color: var(--pr-brand); color: var(--pr-brand); }

/* ---------- Preview (LCP) and figures ---------- */
.pr-preview {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-block: 16px;
}
.pr-preview--single { display: block; }
.pr-preview__item { margin: 0; }
/* Two 8:9 boxes = one 16:9 preview. contain, never cover: the burned-in
   label sits bottom-left and must never be cropped. */
.pr-preview__media {
	aspect-ratio: 8 / 9;
	background: var(--pr-surface);
	border-radius: var(--pr-radius) var(--pr-radius) 0 0;
	overflow: hidden;
}
.pr-preview__media img { width: 100%; height: 100%; object-fit: contain; }
.pr-preview figcaption { font-size: .8125rem; color: var(--pr-muted); padding-top: 6px; }

.pr-fig { margin: 0 0 16px; }
.pr-fig__media { position: relative; }
.pr-fig img { width: 100%; border-radius: var(--pr-radius); background: var(--pr-surface); }
.pr-fig__badge { position: absolute; top: 8px; left: 8px; }
.pr-fig__link { display: block; }
.pr-fig__cap { font-size: .8125rem; color: var(--pr-muted); padding-top: 6px; }
.pr-fig--inline, .pr-fig--example { max-width: 360px; }

.pr-results {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
}
@media (min-width: 752px) {
	.pr-results { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.pr-results .pr-fig { margin: 0; }
.pr-results__none {
	display: grid;
	place-items: center;
	min-height: 160px;
	padding: 16px;
	border: 1px dashed var(--pr-line-strong);
	border-radius: var(--pr-radius);
	color: var(--pr-muted);
	text-align: center;
}
.pr-disclosure {
	font-size: .9375rem;
	padding: 10px 14px;
	border-left: 4px solid var(--pr-brand);
	background: var(--pr-tint);
	border-radius: 0 8px 8px 0;
}
.pr-verdicts { list-style: none; padding: 0; margin-top: 16px; }
.pr-verdict { font-size: 1.0625rem; }

/* ---------- Tabs and prompt box ---------- */
.pr-tablist {
	display: flex;
	gap: 4px;
	border-bottom: 1px solid var(--pr-line);
	margin-bottom: 12px;
}
.pr-tab {
	min-height: 44px;
	min-width: 44px;
	padding: 8px 18px;
	background: none;
	border: 0;
	border-bottom: 3px solid transparent;
	margin-bottom: -1px;
	color: var(--pr-muted);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}
.pr-tab[aria-selected="true"] { color: var(--pr-ink); border-bottom-color: var(--pr-brand); }
.pr-tab:hover { color: var(--pr-ink); }

.pr-prompt {
	position: relative;
	background: var(--pr-tint);
	border: 1px solid var(--pr-line);
	border-radius: var(--pr-radius);
	padding: 14px 16px;
	margin-bottom: 12px;
}
.pr-prompt__text {
	margin: 0;
	white-space: pre-line;
	font-size: 1rem;
	line-height: 1.5;
	overflow-wrap: anywhere;
}
/* Clamp to ~6 lines; the toggle lives in reserved bottom padding. */
.pr-prompt--clamp { padding-bottom: 52px; }
.pr-prompt--clamp .pr-prompt__text {
	max-height: 9em;
	overflow: hidden;
	-webkit-mask-image: linear-gradient(#000 65%, transparent);
	mask-image: linear-gradient(#000 65%, transparent);
}
/* Hub cards (core markup): 3 lines from first paint; app.js adds the fade
   and an overlay toggle only where the text overflows (no shift). */
.pr-card__body > .pr-prompt > .pr-prompt__text { max-height: 4.5em; overflow: hidden; }
.pr-prompt--cut > .pr-prompt__text {
	-webkit-mask-image: linear-gradient(#000 55%, transparent);
	mask-image: linear-gradient(#000 55%, transparent);
}
.pr-prompt--open .pr-prompt__text,
.pr-card__body > .pr-prompt--open > .pr-prompt__text {
	max-height: none;
	-webkit-mask-image: none;
	mask-image: none;
}
.pr-prompt__more {
	position: absolute;
	right: 8px;
	bottom: 4px;
	min-height: 44px;
	padding: 8px 12px;
	background: none;
	border: 0;
	color: var(--pr-brand);
	font: inherit;
	font-weight: 700;
	text-decoration: underline;
	cursor: pointer;
}
.pr-prompt__more--overlay {
	top: calc(14px + 4.5em - 44px);
	bottom: auto;
	background: var(--pr-tint);
	border-radius: 8px;
}
.pr-prompt--open > .pr-prompt__more--overlay { position: static; padding-inline: 0; }
.pr-js .pr-prompt--fits .pr-prompt__more { visibility: hidden; }
.pr-js .pr-prompt--fits .pr-prompt__text { -webkit-mask-image: none; mask-image: none; }

.pr-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 20px;
	min-height: 44px;
	margin-bottom: 12px;
}
.pr-open { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.pr-note, .pr-tip { color: var(--pr-muted); font-size: .9375rem; }
.pr-tip strong { color: var(--pr-ink); }
.pr-refused {
	padding: 10px 14px;
	border-left: 4px solid var(--pr-accent);
	background: var(--pr-accent-bg);
	border-radius: 0 8px 8px 0;
}

/* ---------- Buttons ---------- */
.pr-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	min-width: 44px;
	padding: 10px 18px;
	border: 2px solid var(--pr-brand);
	border-radius: 8px;
	background: var(--pr-brand);
	color: var(--pr-brand-ink);
	font: inherit;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
}
.pr-btn:hover { filter: brightness(1.08); }
.pr-btn--ghost { background: transparent; color: var(--pr-brand); }

/* Copy buttons: the theme's and core's hub-card ones share this class. */
.pr-copy {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	min-width: 9.5em;
	padding: 10px 18px;
	border: 0;
	border-radius: 8px;
	background: var(--pr-brand);
	color: var(--pr-brand-ink);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}
.pr-copy:hover { filter: brightness(1.08); }
.pr-prompt > .pr-copy { margin-top: 12px; }

/* ---------- Upload guide, items, FAQs ---------- */
.pr-dodont { display: grid; gap: 16px; }
@media (min-width: 640px) { .pr-dodont { grid-template-columns: 1fr 1fr; } }
.pr-dodont__col {
	padding: 14px 16px;
	border: 1px solid var(--pr-line);
	border-radius: var(--pr-radius);
}
.pr-dodont__col ul { margin: 0; }
.pr-dodont__col--do h3::before { content: "✓ "; color: var(--pr-brand); }
.pr-dodont__col--dont h3::before { content: "✕ "; color: var(--pr-accent); }

.pr-item, .pr-faq { padding-block: 16px; border-top: 1px solid var(--pr-line); }
.pr-item:first-of-type, .pr-faq:first-of-type { border-top: 0; padding-top: 0; }

/* ---------- Test log ---------- */
.pr-table-wrap {
	overflow-x: auto;
	border: 1px solid var(--pr-line);
	border-radius: var(--pr-radius);
	margin-bottom: 12px;
}
.pr-log { border-collapse: collapse; width: 100%; min-width: 640px; margin: 0; font-size: .875rem; }
.pr-log th, .pr-log td { padding: 8px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--pr-line); }
.pr-log th { background: var(--pr-surface); font-weight: 700; white-space: nowrap; }
.pr-log tr:last-child td { border-bottom: 0; }
.pr-result { font-weight: 700; }
.pr-result--fail, .pr-result--refused { color: var(--pr-accent); }
.pr-log-more summary, .pr-card__details summary {
	display: flex;
	align-items: center;
	min-height: 44px;
	cursor: pointer;
	font-weight: 600;
	color: var(--pr-brand);
}

/* ---------- Cards (core's prompt-list markup; theme fallback uses the same) ---------- */
.pr-prompt-list {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
	margin-block: 24px;
}
@media (min-width: 700px) { .pr-prompt-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .pr-prompt-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pr-prompt-list__empty { color: var(--pr-muted); }

.pr-card {
	position: relative;
	display: flex;
	flex-direction: column;
	border: 1px solid var(--pr-line);
	border-radius: 12px;
	overflow: hidden;
	background: var(--pr-paper);
	scroll-margin-top: 16px;
}
.pr-card:target { outline: 3px solid var(--pr-brand); outline-offset: 2px; }
/* Natural image ratio (width/height attributes reserve the space), never a
   crop: the burned-in label sits at the bottom-left of every AI image. The
   inline aspect-ratio core sets from pr_aspect is overridden because the
   figure also holds the caption. */
.pr-card__media {
	display: block;
	margin: 0;
	background: var(--pr-surface);
	aspect-ratio: auto !important;
}
.pr-card__media img { width: 100%; height: auto; }
.pr-card__caption { font-size: .75rem; color: var(--pr-muted); padding: 6px 12px 0; }
.pr-card__body { padding: 12px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.pr-card__title { font-size: 1.125rem; margin-bottom: 6px; }
.pr-card__badges { margin-bottom: 10px; }
.pr-card__more { font-weight: 600; font-size: .9375rem; margin: 4px 0 0; }
.pr-card__more a { display: inline-flex; align-items: center; min-height: 44px; }
.pr-card__details { margin-top: 8px; border-top: 1px solid var(--pr-line); padding-top: 4px; }
.pr-card__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-block: 8px; }
.pr-card__pair figure { margin: 0; }
.pr-card__pair figcaption, .pr-card__pair .pr-fig__cap { font-size: .75rem; color: var(--pr-muted); padding-top: 4px; }
.pr-card__tests { font-size: .875rem; margin: 8px 0 0; }
.pr-prompt__label { font-weight: 700; margin: 0 0 6px; }
.pr-badge--best { border-color: var(--pr-line-strong); }
.pr-badge--draft { border-color: var(--pr-accent); color: var(--pr-accent); }

/* Cross-listed prompt on a hub: the whole card is one link. */
.pr-card--link .pr-card__link { display: flex; flex-direction: column; flex: 1; gap: 8px; padding-bottom: 14px; color: var(--pr-ink); text-decoration: none; }
.pr-card--link .pr-card__title, .pr-card--link .pr-badge { margin-inline: 16px; }
.pr-card--link .pr-badge { align-self: flex-start; }
.pr-card--link:hover { border-color: var(--pr-brand); }
.pr-card__link:focus-visible { outline-offset: -3px; }

/* Link cards (related, archive, home). Whole card clickable via the title link. */
.pr-lcards { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 700px) { .pr-lcards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .pr-lcards--archive { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pr-lcard {
	position: relative;
	display: grid;
	grid-template-columns: 96px 1fr;
	gap: 12px;
	align-items: center;
	padding: 8px;
	border: 1px solid var(--pr-line);
	border-radius: 12px;
	background: var(--pr-paper);
}
@media (min-width: 700px) { .pr-lcard { grid-template-columns: 120px 1fr; } }
.pr-lcard:hover { border-color: var(--pr-brand); }
.pr-lcard__media { aspect-ratio: 4 / 5; background: var(--pr-surface); border-radius: 8px; overflow: hidden; }
.pr-lcard__media img { width: 100%; height: 100%; object-fit: contain; }
.pr-lcard__title { font-size: 1rem; margin: 0 0 4px; }
.pr-lcard__a { color: var(--pr-ink); text-decoration: none; }
.pr-lcard__a::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
.pr-lcard__a:focus-visible { outline: none; }
.pr-lcard__a:focus-visible::after { outline: 3px solid var(--pr-brand); outline-offset: 2px; }
.pr-lcard__meta { margin: 0; color: var(--pr-muted); font-size: .875rem; }

.pr-morelinks { list-style: none; padding: 0; margin-top: 16px; }
.pr-morelinks a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

/* ---------- Hubs ---------- */
.pr-hero-img img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; }
.pr-collage { margin-block: 16px 24px; }
.pr-collage__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 6px;
	aspect-ratio: 16 / 9;
	max-height: 520px;
}
.pr-collage--1 .pr-collage__grid { grid-template-columns: 1fr; }
.pr-collage--2 .pr-collage__grid { grid-template-columns: 1fr 1fr; }
.pr-collage__item { background: var(--pr-surface); border-radius: 8px; overflow: hidden; min-height: 0; }
.pr-collage__item img { width: 100%; height: 100%; object-fit: contain; }
.pr-collage__cap { font-size: .8125rem; color: var(--pr-muted); margin-top: 6px; }

.pr-datebox {
	max-width: var(--pr-content);
	margin-block: 24px;
	padding: 14px 16px;
	border: 1px solid var(--pr-accent);
	border-radius: var(--pr-radius);
	background: var(--pr-accent-bg);
}
.pr-datebox__title { font-size: 1.0625rem; color: var(--pr-accent); }
.pr-datebox__lines { margin-bottom: 8px; }
.pr-datebox__src { font-size: .875rem; color: var(--pr-muted); margin: 0; }
.pr-next { max-width: var(--pr-content); color: var(--pr-muted); }

.pr-hublinks, .pr-fest { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pr-fest { flex-direction: column; gap: 4px; }
.pr-fest li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.pr-fest a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.pr-fest__date { color: var(--pr-muted); font-size: .9375rem; }

.pr-hubs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 700px) { .pr-hubs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .pr-hubs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pr-hubcard {
	position: relative;
	border: 1px solid var(--pr-line);
	border-radius: 12px;
	overflow: hidden;
	background: var(--pr-paper);
}
.pr-hubcard:hover { border-color: var(--pr-brand); }
.pr-hubcard__media { aspect-ratio: 4 / 5; background: var(--pr-surface); }
.pr-hubcard__media img { width: 100%; height: 100%; object-fit: contain; }
.pr-hubcard__body { padding: 10px 12px; }
.pr-hubcard__title { font-size: 1rem; margin: 0; }
.pr-hubcard__a { color: var(--pr-ink); text-decoration: none; display: block; min-height: 24px; }
.pr-hubcard__a::after { content: ""; position: absolute; inset: 0; }
.pr-hubcard__a:focus-visible { outline: none; }
.pr-hubcard__a:focus-visible::after { outline: 3px solid var(--pr-brand); outline-offset: -3px; border-radius: 12px; }
.pr-hubcard__meta { margin: 2px 0 0; color: var(--pr-muted); font-size: .875rem; }

/* ---------- Home ---------- */
.pr-hero { max-width: var(--pr-content); padding-block: 16px 8px; }
.pr-hero__lede { font-size: 1.125rem; color: var(--pr-muted); }
.pr-hero__links { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Block content (hub intro, guidance, legal pages) ---------- */
.pr-content > * { max-width: var(--pr-content); }
.pr-content > :is(.alignwide, .alignfull, .wp-block-promptrang-prompt-list, .pr-prompt-list, .pr-lcards) { max-width: none; }
.pr-content h2 { margin-top: 40px; }
.pr-content h3 { margin-top: 24px; }
.pr-content table { border-collapse: collapse; width: 100%; }
.pr-content th, .pr-content td { border: 1px solid var(--pr-line); padding: 8px; text-align: left; }
.pr-content details { border: 1px solid var(--pr-line); border-radius: var(--pr-radius); padding: 8px 14px; margin-bottom: 12px; }
.pr-content summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 600; }
.pr-content :where(h2, h3)[id] { scroll-margin-top: 16px; }
/* Unfilled "Hub starter" slots save as empty elements: never show an empty
   heading or bullet (an empty heading is also an a11y error). */
.pr-content :is(h2, h3, h4, p, li):empty { display: none; }

/* ---------- About box ---------- */
.pr-about {
	max-width: var(--pr-content);
	margin-top: 48px;
	padding: 18px 20px;
	border: 1px solid var(--pr-line);
	border-radius: 12px;
	background: var(--pr-surface);
	font-size: .9375rem;
}
.pr-about h2 { font-size: 1.125rem; }
.pr-about__author { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 12px; }
.pr-about__author p { margin: 0 0 4px; }
.pr-about__photo {
	flex: none;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	object-fit: cover;
}
.pr-about__initial {
	display: grid;
	place-items: center;
	background: var(--pr-tint);
	color: var(--pr-brand);
	font-weight: 800;
	font-size: 1.5rem;
}
.pr-about__name { font-weight: 700; }
.pr-about__role { color: var(--pr-muted); }
.pr-about__dates { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--pr-muted); }
.pr-about__disclosure { color: var(--pr-muted); }

/* ---------- Rail ---------- */
.pr-toc { border-left: 3px solid var(--pr-line); padding-left: 14px; }
.pr-toc__title { font-weight: 700; margin-bottom: 6px; }
.pr-toc ul { list-style: none; padding: 0; margin: 0; }
.pr-toc a { display: block; padding-block: 6px; color: var(--pr-muted); text-decoration: none; }
.pr-toc a:hover { color: var(--pr-brand); }

/* ---------- Future ad slots (not rendered before AdSense) ---------- */
.pr-ad {
	display: grid;
	place-items: start center;
	min-height: 280px;
	margin-block: 40px;
	background: var(--pr-surface);
	border-radius: 8px;
}
.pr-ad--r1 { min-height: 600px; margin-top: 24px; }
.pr-ad__label { font-size: .75rem; color: var(--pr-muted); margin: 4px 0; }

/* ---------- Pagination, lists, footer ---------- */
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 24px; }
.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	min-width: 44px;
	padding-inline: 12px;
	border: 1px solid var(--pr-line);
	border-radius: 8px;
	text-decoration: none;
}
.pagination .current { background: var(--pr-brand); color: var(--pr-brand-ink); border-color: var(--pr-brand); }

.pr-list li { margin-bottom: 8px; }

.pr-footer {
	border-top: 1px solid var(--pr-line);
	background: var(--pr-surface);
	padding-block: 24px 32px;
	font-size: .9375rem;
}
.pr-footer ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0 16px; margin-bottom: 12px; }
.pr-footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--pr-ink); }
.pr-footer__title { font-weight: 700; margin-bottom: 0; }
.pr-footer__note { color: var(--pr-muted); margin-bottom: 6px; }
/* Rows 3-4 (legal-pages §5.3): trademark and copyright fine print, kept to a readable measure. */
.pr-footer__legal { font-size: .875rem; max-width: var(--pr-content); }

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

/* ---------- Print ---------- */
@media print {
	.pr-header, .pr-footer, .pr-rail, .pr-copy, .pr-prompt__more, .pr-tablist { display: none !important; }
	.pr-tabpanel[hidden] { display: block; }
	.pr-prompt--clamp .pr-prompt__text,
	.pr-card__body > .pr-prompt > .pr-prompt__text { max-height: none; -webkit-mask-image: none; mask-image: none; }
}
