/*
 * Poldot — editorial detail layer.
 * Tokens come from theme.json; this file adds the components and
 * astronomy-inspired details that block supports cannot express.
 */

/* ---------- Wordmark: POLD•T ---------------------------------------- */
/* The site title is rendered (functions.php) as POLD●T: white bold caps */
/* with the second "O" replaced by an amber celestial point. Matches the */
/* brand logo; the tagline sits below in small, tracked stardust caps.   */

.poldot-wordmark .wp-block-site-title {
	line-height: 1;
	margin: 0;
}

.poldot-wordmark .wp-block-site-title a {
	text-decoration: none;
	color: var(--wp--preset--color--paper);
	display: inline-block;
}

.poldot-mark {
	display: inline-flex;
	align-items: center;
	gap: 0.25em;
	letter-spacing: 0;
	font-weight: 800;
	line-height: 1;
}

.poldot-mark__l {
	display: block;
}

.poldot-mark__dot {
	display: block;
	flex: none;
	width: 0.52em;
	height: 0.52em;
	margin: 0 -0.14em 0 0.12em;
	border-radius: 50%;
	background: var(--wp--preset--color--starlight);
	/* centre on the cap height, not the line box */
	transform: translateY(-0.01em);
}

.poldot-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.poldot-header .poldot-wordmark {
	gap: 0.42rem !important;
}

.poldot-header .poldot-wordmark .wp-block-site-title {
	font-size: 1.6rem !important;
}

/* ---------- Header ---------------------------------------------------- */

.poldot-header {
	border-bottom: 1px solid var(--wp--preset--color--hairline-dark);
}

.poldot-tagline {
	color: var(--wp--preset--color--stardust);
	font-size: 0.6875rem;
	font-weight: 500;
	letter-spacing: 0.24em;
	line-height: 1;
	text-transform: uppercase;
	margin: 0;
}

.poldot-header .wp-block-navigation a:hover,
.poldot-header .wp-block-navigation a:focus {
	color: var(--wp--preset--color--starlight);
}

.poldot-header .wp-block-search__button {
	background: transparent;
	color: var(--wp--preset--color--paper);
	border: 1px solid var(--wp--preset--color--hairline-dark);
	border-radius: 999px;
	padding: 0.45rem 0.65rem;
}

.poldot-header .wp-block-search__button:hover,
.poldot-header .wp-block-search__button:focus {
	border-color: var(--wp--preset--color--starlight);
	color: var(--wp--preset--color--starlight);
}

/* ---------- Category markers: " • CATEGORY " ------------------------- */

.poldot-kicker,
.wp-block-post-terms.poldot-kicker {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
}

.poldot-kicker::before {
	content: "";
	width: 0.4em;
	height: 0.4em;
	border-radius: 50%;
	background: var(--wp--preset--color--starlight);
	flex: none;
}

.wp-block-post-terms.poldot-kicker a {
	text-decoration: none;
}

.wp-block-post-terms.poldot-kicker a:hover,
.wp-block-post-terms.poldot-kicker a:focus {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ---------- Section headings with celestial index -------------------- */

.poldot-section-head {
	display: flex;
	align-items: baseline;
	gap: 1rem;
	border-top: 1px solid var(--wp--preset--color--body-text);
	padding-top: 0.85rem;
}

.poldot-section-head .poldot-index {
	font-family: var(--wp--preset--font-family--sans);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	color: var(--wp--preset--color--starlight-deep);
	font-variant-numeric: tabular-nums;
}

/* ---------- Cards ----------------------------------------------------- */

.poldot-card .wp-block-post-featured-image img {
	transition: transform 0.45s cubic-bezier(0.2, 0.6, 0.2, 1);
}

@media (prefers-reduced-motion: no-preference) {
	.poldot-card:hover .wp-block-post-featured-image img,
	.poldot-card:focus-within .wp-block-post-featured-image img {
		transform: scale(1.025);
	}
}

.poldot-card .wp-block-post-title a {
	text-decoration: none;
}

.poldot-card .wp-block-post-title a:hover,
.poldot-card .wp-block-post-title a:focus {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
	color: inherit;
}

/* Hairline-ruled list rows (Latest Discoveries) */
.poldot-row-list > .wp-block-post {
	border-bottom: 1px solid var(--wp--preset--color--hairline);
	padding-bottom: var(--wp--preset--spacing--30);
}

.poldot-row-list > .wp-block-post:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

/* Numbered trending list */
.poldot-trending {
	counter-reset: poldot-trend;
}

.poldot-trending > .wp-block-post {
	counter-increment: poldot-trend;
	position: relative;
	padding-left: 3.25rem;
	border-bottom: 1px solid var(--wp--preset--color--hairline-dark);
	padding-bottom: var(--wp--preset--spacing--30);
}

.poldot-trending > .wp-block-post:last-child {
	border-bottom: none;
}

.poldot-trending > .wp-block-post::before {
	content: counter(poldot-trend, decimal-leading-zero);
	position: absolute;
	left: 0;
	top: -0.2rem;
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.6rem;
	font-weight: 600;
	color: var(--wp--preset--color--starlight);
	font-variant-numeric: tabular-nums;
}

/* ---------- Block styles ---------------------------------------------- */

/* Separator: a single centered celestial point */
.wp-block-separator.is-style-orbit {
	border: none;
	background: none !important;
	height: auto;
	text-align: center;
}

.wp-block-separator.is-style-orbit::before {
	content: "";
	display: inline-block;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--wp--preset--color--starlight);
	box-shadow: -1.5rem 0 0 -1px var(--wp--preset--color--hairline), 1.5rem 0 0 -1px var(--wp--preset--color--hairline);
}

/* Observation note: for scientific asides and context boxes */
.wp-block-group.is-style-observation {
	background: var(--wp--preset--color--paper-deep);
	border-left: 2px solid var(--wp--preset--color--starlight);
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
}

/* Cosmic fact quote */
.wp-block-quote.is-style-cosmic-fact {
	border-left: none;
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
	padding: var(--wp--preset--spacing--40);
	font-style: normal;
}

.wp-block-quote.is-style-cosmic-fact cite {
	color: var(--wp--preset--color--stardust);
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--xs);
	font-style: normal;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

/* Labeled ad slot: reserves space only when editors place one. */
.wp-block-group.is-style-ad-slot {
	border-top: 1px solid var(--wp--preset--color--hairline);
	border-bottom: 1px solid var(--wp--preset--color--hairline);
	padding: var(--wp--preset--spacing--30) 0;
	min-height: 120px;
	contain: layout;
}

.wp-block-group.is-style-ad-slot::before {
	content: "Advertisement";
	display: block;
	font-size: 0.625rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--wp--preset--color--text-muted);
	margin-bottom: 0.5rem;
}

/* ---------- Article body ---------------------------------------------- */

.poldot-article-body > p:first-of-type::first-letter {
	font-family: var(--wp--preset--font-family--display);
	font-size: 3.1em;
	line-height: 0.82;
	float: left;
	padding-right: 0.09em;
	font-weight: 600;
}

.poldot-article-body figure figcaption {
	border-left: 2px solid var(--wp--preset--color--starlight);
	padding-left: 0.75rem;
	margin-top: 0.6rem;
	text-align: left;
}

.poldot-article-body table {
	border-collapse: collapse;
	width: 100%;
}

.poldot-article-body table td,
.poldot-article-body table th {
	border: none;
	border-bottom: 1px solid var(--wp--preset--color--hairline);
	padding: 0.6rem 0.75rem;
}

.poldot-article-body table thead th {
	border-bottom: 2px solid var(--wp--preset--color--body-text);
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.poldot-article-body sup,
.poldot-article-body sub {
	line-height: 0;
}

/* ---------- Reading progress (JS, single posts only) ------------------ */

.poldot-progress {
	position: fixed;
	top: 0;
	left: 0;
	height: 2px;
	width: 100%;
	transform: scaleX(0);
	transform-origin: 0 50%;
	background: var(--wp--preset--color--starlight);
	z-index: 90;
	pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
	.poldot-progress {
		display: none;
	}
}

/* ---------- Share row -------------------------------------------------- */

.poldot-share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.625rem 0.875rem;
	margin-top: var(--wp--preset--spacing--20);
}

.poldot-share__label {
	font: 700 0.6875rem/1 var(--wp--preset--font-family--sans);
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wp--preset--color--starlight-deep);
}

.poldot-share__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.poldot-share__list li {
	margin: 0;
	position: relative;
}

.poldot-share__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-width: 40px;
	min-height: 40px;
	padding: 0 0.75rem;
	box-sizing: border-box;
	cursor: pointer;
	background: transparent;
	color: var(--wp--preset--color--ink);
	border: 1px solid var(--wp--preset--color--hairline);
	border-radius: 999px;
	font: 700 0.6875rem/1 var(--wp--preset--font-family--sans);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-decoration: none;
	transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

a.poldot-share__btn {
	width: 40px;
	padding: 0;
}

.poldot-share__btn svg {
	flex: none;
	color: currentColor;
}

.poldot-share__btn:hover,
.poldot-share__btn:focus-visible {
	color: var(--wp--preset--color--starlight);
	background: var(--wp--preset--color--ink);
	border-color: var(--wp--preset--color--ink);
}

.poldot-share__btn:active {
	color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--starlight);
	border-color: var(--wp--preset--color--starlight);
}

.poldot-share__btn:focus-visible {
	outline: 2px solid var(--wp--preset--color--starlight-deep);
	outline-offset: 3px;
}

.poldot-share__btn.is-copied {
	color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--starlight);
	border-color: var(--wp--preset--color--starlight);
}

@media (max-width: 479px) {
	.poldot-share__label {
		flex-basis: 100%;
	}
}

@media print {
	.poldot-share {
		display: none;
	}
}

/* ---------- Accessibility & polish ------------------------------------ */

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

.wp-site-blocks {
	overflow-x: clip;
}

img {
	height: auto;
}

/* Keep long headlines intact — never clamp article titles. */
.wp-block-post-title {
	overflow-wrap: break-word;
}

/* Pagination */
.wp-block-query-pagination a,
.wp-block-query-pagination .wp-block-query-pagination-numbers .page-numbers {
	text-decoration: none;
	font-weight: 600;
	font-size: var(--wp--preset--font-size--small);
	padding: 0.4rem 0.7rem;
	border-radius: 999px;
}

.wp-block-query-pagination .page-numbers.current {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
}

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

/* ---------- 1.0.2 fixes ------------------------------------------------ */

/* Header, main and footer sit flush (no root block-gap strip). */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* Standalone index labels (archive "SECTION", "THE DEEP DIVE"). */
.poldot-index {
	font-family: var(--wp--preset--font-family--sans);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--wp--preset--color--starlight-deep);
}
.has-ink-background-color .poldot-index {
	color: var(--wp--preset--color--starlight);
}

/* Footer lists: plain, no bullets or underlines. */
footer .wp-block-categories {
	list-style: none;
	padding-left: 0;
	margin: 0;
}
footer .wp-block-categories li {
	margin: 0 0 0.6rem;
}
footer a {
	text-decoration: none;
}
footer a:hover,
footer a:focus {
	text-decoration: underline;
}

/* ---------- 1.0.6 Latest Discoveries row alignment ------------------- */

/* Rows: equal space above/below each hairline divider. */
.poldot-row-list > .wp-block-post {
	margin-block-start: 0;
	padding-block: var(--wp--preset--spacing--30);
}
.poldot-row-list > .wp-block-post:first-child {
	padding-top: 0;
}
.poldot-row-list > .wp-block-post:last-child {
	padding-bottom: 0;
}

.poldot-row.wp-block-columns {
	align-items: center;
	margin: 0;
}
.poldot-row .wp-block-post-featured-image {
	margin: 0;
}
.poldot-row .wp-block-post-featured-image img {
	display: block;
	width: 100%;
}

/* Text block: flush left, no constrained-layout centring/indent. */
.poldot-row-body > * {
	max-width: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}
.poldot-row-body > * + * {
	margin-block-start: 0.5rem;
}
.poldot-row-body > .wp-block-post-title {
	margin-block-start: 0.6rem;
}
.poldot-row-body .wp-block-post-excerpt,
.poldot-row-body .wp-block-post-excerpt__excerpt {
	margin: 0;
}
.poldot-row-body .wp-block-post-excerpt__excerpt {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.poldot-row-body > .wp-block-post-date {
	margin-block-start: 0.65rem;
}
.poldot-row-body > .wp-block-post-title {
	font-size: clamp(1.3rem, 1.1rem + 0.6vw, 1.55rem) !important;
}
.poldot-row-body > .wp-block-post-excerpt {
	margin-block-start: 0.7rem;
}

/* ---- Newsletter: MailerLite signup (1.0.7) ---- */
.poldot-ml { width: 100%; max-width: 520px; margin: var(--wp--preset--spacing--40, 1.5rem) auto 0; }
.poldot-ml__form { display: flex; gap: 10px; align-items: stretch; margin: 0; }
.poldot-ml__form input[type="email"] {
	flex: 1 1 auto; min-width: 0; height: 50px; margin: 0; padding: 0 16px;
	font: inherit; font-size: 1rem; color: var(--wp--preset--color--paper);
	background: rgba(247,245,239,.04); border: 1px solid var(--wp--preset--color--hairline-dark); border-radius: 2px;
	-webkit-appearance: none; appearance: none;
}
.poldot-ml__form input[type="email"]::placeholder { color: var(--wp--preset--color--stardust); opacity: .6; }
.poldot-ml__form input[type="email"]:focus { outline: none; border-color: var(--wp--preset--color--starlight); box-shadow: 0 0 0 2px rgba(217,161,59,.25); }
.poldot-ml__form button {
	flex: 0 0 auto; height: 50px; margin: 0; padding: 0 24px; cursor: pointer;
	font: inherit; font-size: .8125rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
	color: var(--wp--preset--color--ink); background: var(--wp--preset--color--starlight); border: 0; border-radius: 2px;
	transition: background-color .15s ease;
}
.poldot-ml__form button:hover, .poldot-ml__form button:focus-visible { background: var(--wp--preset--color--paper); }
.poldot-ml__form button:disabled { opacity: .7; cursor: wait; }
.poldot-ml__status { margin: 12px 0 0; text-align: center; font-size: .9375rem; color: var(--wp--preset--color--starlight); }
.poldot-ml__status:empty { display: none; }
.poldot-ml__status[data-ml-state="error"] { color: #f2a99c; }
.poldot-ml__note { margin: 14px 0 0; text-align: center; font-size: .8125rem; color: var(--wp--preset--color--stardust); }
.poldot-ml__note a { color: var(--wp--preset--color--starlight); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 480px) {
	.poldot-ml__form { flex-direction: column; }
	.poldot-ml__form button { width: 100%; }
}
.poldot-ml .screen-reader-text { border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; word-wrap: normal !important; }
