/*
Theme Name: Heliostat
Theme URI: https://heliost.at
Author: klynton
Author URI: https://heliost.at
Description: A quiet, reading-first theme modelled on the HEY World design — centred profile header, generous system type, and four selectable post-listing styles (Cards, Stream, Index, Journal). Built for microblogs where most posts have no title.
Version: 1.1.0
Requires at least: 6.6
Tested up to: 7.0
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: heliostat
Tags: blog, one-column, custom-logo, custom-menu, editor-style, block-styles, wide-blocks, accessibility-ready, translation-ready
*/

/* ==========================================================================
   1. Design tokens
   Ported from the HEY World design system — its 11px-rem type scale rebased
   onto a 16px root, 1.4 line-height, ink #231C33, hairlines at 15% ink.

   Every text/background pairing meets WCAG 2.2 AA (4.5:1) in both colour
   schemes; focus rings and form-control borders meet 3:1. HEY's #0074E4 blue
   is nudged to #006EDC, which holds 4.5:1 on the off-white code background.
   ========================================================================== */

:root {
	/* Ink, expressed as channels so we can vary alpha. */
	--hs-rgb-ink: 35, 28, 51;
	--hs-rgb-paper: 255, 255, 255;

	--hs-color-txt: rgb(var(--hs-rgb-ink));
	--hs-color-txt-subtle: rgba(var(--hs-rgb-ink), 0.66);
	/* Decoration only (separators, hairline hovers). Never for text: 2:1. */
	--hs-color-txt-very-subtle: rgba(var(--hs-rgb-ink), 0.33);
	--hs-color-action: rgb(0, 110, 220);

	--hs-color-bg: rgb(var(--hs-rgb-paper));
	--hs-color-bg-surface: rgba(226, 221, 215, 0.15);
	--hs-color-bg-surface-solid: #fbfaf9;

	--hs-color-border: rgba(var(--hs-rgb-ink), 0.15);
	--hs-color-border-light: rgba(var(--hs-rgb-ink), 0.05);
	--hs-color-border-solid: rgb(var(--hs-rgb-ink));
	/* Boundaries a user must perceive to operate something (inputs): 3:1+. */
	--hs-color-border-control: rgba(var(--hs-rgb-ink), 0.55);
	--hs-color-shadow: rgba(226, 221, 215, 0.5);
	--hs-color-highlight: rgba(255, 214, 10, 0.35);
	--hs-color-focus: var(--hs-color-action);

	/* Type */
	--hs-font-family: -apple-system, BlinkMacSystemFont, "system-ui", Aptos, Roboto,
		"Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji",
		"Segoe UI Emoji", "Segoe UI Symbol";
	--hs-font-family-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo,
		Courier, monospace;

	/* Small-screen scale. Bumped one notch at 40em — see §2. */
	--hs-fs-xx-small: 0.7563rem;
	--hs-fs-x-small: 0.825rem;
	--hs-fs-small: 0.9625rem;
	--hs-fs-medium: 1.1rem;
	--hs-fs-large: 1.2375rem;
	--hs-fs-x-large: 1.65rem;
	--hs-fs-xx-large: 1.925rem;

	--hs-line-height: 1.4;

	/* Space — em-relative, so blocks scale with their own type size. */
	--hs-space-quarter: calc(1.25em / 4);
	--hs-space-half: calc(1.25em / 2);
	--hs-space: 1.25em;
	--hs-space-double: calc(1.25em * 2);

	/* Layout */
	--hs-page-padding: 1.1rem;
	--hs-body-padding: 2.2rem;
	--hs-content-width: 67.375rem; /* outer page   — 1078px */
	--hs-reading-width: 51.5625rem; /* reading rail — 825px */
}

@media (min-width: 40em) {
	:root {
		--hs-fs-xx-small: 0.825rem;
		--hs-fs-x-small: 0.9625rem;
		--hs-fs-small: 1.1rem;
		--hs-fs-medium: 1.2375rem;
		--hs-fs-large: 1.5125rem;
		--hs-fs-x-large: 1.925rem;
		--hs-fs-xx-large: 2.3375rem;

		--hs-body-padding: 4.4rem;
	}
}

@media (prefers-color-scheme: dark) {
	:root {
		--hs-rgb-ink: 236, 233, 230;
		--hs-rgb-paper: 23, 22, 29;

		--hs-color-action: rgb(110, 174, 255);
		--hs-color-focus: rgb(110, 174, 255);
		--hs-color-bg-surface: rgba(var(--hs-rgb-ink), 0.04);
		--hs-color-bg-surface-solid: #1e1d26;
		--hs-color-border: rgba(var(--hs-rgb-ink), 0.18);
		--hs-color-border-light: rgba(var(--hs-rgb-ink), 0.07);
		--hs-color-shadow: rgba(0, 0, 0, 0.4);
		--hs-color-highlight: rgba(255, 214, 10, 0.22);
	}
}

/* Readers who ask their OS for more contrast get solid ink and firm edges. */
@media (prefers-contrast: more) {
	:root {
		--hs-color-txt-subtle: var(--hs-color-txt);
		--hs-color-border: rgba(var(--hs-rgb-ink), 0.55);
		--hs-color-border-light: rgba(var(--hs-rgb-ink), 0.35);
	}
}

/* Block-editor colour presets follow the live tokens, so a paragraph set to
   "Ink" in the editor stays readable in dark and high-contrast modes instead
   of keeping theme.json's fixed light-mode value. `html:root` outranks the
   `:root` rule WordPress prints for global styles, whatever the load order. */
html:root {
	--wp--preset--color--ink: var(--hs-color-txt);
	--wp--preset--color--ink-subtle: var(--hs-color-txt-subtle);
	--wp--preset--color--paper: var(--hs-color-bg);
	--wp--preset--color--surface: var(--hs-color-bg-surface-solid);
	--wp--preset--color--action: var(--hs-color-action);
}

/* ==========================================================================
   2. Reset & base
   ========================================================================== */

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

html {
	/* The browser's own root size, untouched. HEY uses an 11px root; every rem
	   here is that value rebased onto 16px, so the pixels match exactly while
	   plugin and core styles that use rem aren't shrunk to 69% as a side effect,
	   and a reader's font-size preference scales everything uniformly. */
	background-color: var(--hs-color-bg);
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	padding: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	font-family: var(--hs-font-family);
	font-size: var(--hs-fs-medium);
	line-height: var(--hs-line-height);
	color: var(--hs-color-txt);
	background-color: var(--hs-color-bg);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	/* Long unbroken strings (pasted URLs) wrap instead of forcing a sideways
	   scroll at narrow widths. */
	overflow-wrap: break-word;
}

img,
svg,
video,
iframe,
embed,
object {
	max-width: 100%;
	height: auto;
}

img {
	border-radius: 0.2em;
}

a {
	color: var(--hs-color-action);
	text-decoration: underline;
	text-underline-offset: 0.15em;
	text-decoration-thickness: from-font;
}

a:hover {
	text-decoration-thickness: 0.1em;
}

:focus-visible {
	outline: 2px solid var(--hs-color-focus);
	outline-offset: 2px;
	border-radius: 2px;
}

/* Skip-link target: focused programmatically, never by Tab, so no ring. */
.hs-main:focus {
	outline: none;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 var(--hs-space-half);
	font-weight: 700;
	line-height: 1;
	text-wrap: balance;
}

@supports (text-wrap: pretty) {
	h1, h2, h3, h4, h5, h6 {
		text-wrap: pretty;
	}
}

h1 { font-size: var(--hs-fs-xx-large); }
h2 { font-size: var(--hs-fs-x-large); }
h3 { font-size: var(--hs-fs-large); }
h4 { font-size: var(--hs-fs-medium); }
h5 { font-size: var(--hs-fs-small); }
h6 { font-size: var(--hs-fs-x-small); }

p, ul, ol, dl, blockquote, pre, figure, table {
	margin: 0 0 var(--hs-space);
}

hr {
	height: 0;
	margin: var(--hs-space-double) auto;
	border: 0;
	border-top: 1px solid var(--hs-color-border);
}

mark {
	background-color: var(--hs-color-highlight);
	color: inherit;
}

code, kbd, samp, pre {
	font-family: var(--hs-font-family-mono);
	font-size: 0.875em;
}

code {
	padding: 0.15em 0.35em;
	background-color: var(--hs-color-bg-surface);
	border-radius: 0.25em;
}

pre {
	padding: var(--hs-space);
	overflow-x: auto;
	background-color: var(--hs-color-bg-surface-solid);
	border: 1px solid var(--hs-color-border);
	border-radius: 0.3em;
	line-height: 1.5;
}

pre code {
	padding: 0;
	background: none;
	border-radius: 0;
}

blockquote {
	padding-left: var(--hs-space);
	border-left: 2px solid var(--hs-color-border);
	color: var(--hs-color-txt-subtle);
}

blockquote > :last-child {
	margin-bottom: 0;
}

table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--hs-fs-small);
}

th, td {
	padding: 0.5em 0.75em;
	text-align: left;
	border-bottom: 1px solid var(--hs-color-border);
}

th {
	font-weight: 700;
}

figure {
	margin-inline: 0;
}

figcaption {
	margin-top: var(--hs-space-half);
	font-size: var(--hs-fs-small);
	color: var(--hs-color-txt-subtle);
	text-align: center;
}

/* ==========================================================================
   3. Utilities
   ========================================================================== */

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

.hs-skip-link:focus {
	position: fixed !important; /* beats .hs-screen-reader-text */
	top: 0.6875rem;
	left: 0.6875rem;
	z-index: 100;
	width: auto;
	height: auto;
	padding: 0.75em 1.25em;
	margin: 0;
	overflow: visible;
	clip-path: none;
	white-space: normal;
	color: var(--hs-color-txt);
	background-color: var(--hs-color-bg);
	border: 1px solid var(--hs-color-border-solid);
	border-radius: 0.3em;
	font-size: var(--hs-fs-small);
}

.hs-subtle { color: var(--hs-color-txt-subtle); }
.hs-center { text-align: center; }

.hs-meta {
	font-size: var(--hs-fs-x-small);
	color: var(--hs-color-txt-subtle);
	line-height: 1.4;
}

.hs-eyebrow {
	font-size: var(--hs-fs-xx-small);
	font-weight: 400;
	line-height: 1.4;
	text-transform: uppercase;
	letter-spacing: 0.1719rem;
	color: var(--hs-color-txt-subtle);
}

/* A HEY-style pill button. */
.hs-btn {
	display: inline-block;
	padding: 0.3em 0.8em;
	font-size: var(--hs-fs-x-small);
	font-weight: 500;
	line-height: 1.4;
	white-space: nowrap;
	color: var(--hs-color-txt-subtle);
	text-decoration: none;
	background-color: transparent;
	border: 1px solid var(--hs-color-border);
	border-radius: 2.0625rem;
	cursor: pointer;
}

.hs-btn:hover {
	color: var(--hs-color-txt);
	border-color: var(--hs-color-border-solid);
}

/* ==========================================================================
   4. Page shell
   ========================================================================== */

.hs-page {
	flex: 1 0 auto;
	width: 100%;
	max-width: var(--hs-content-width);
	padding: var(--hs-page-padding);
	margin: 0 auto;
	position: relative;
}

.hs-page__content {
	max-width: var(--hs-reading-width);
	margin: 0 auto;
}

/* ==========================================================================
   5. Profile header
   ========================================================================== */

.hs-profile {
	padding-block: var(--hs-space-double);
	text-align: center;
}

.hs-profile__identity {
	display: inline-block;
	text-decoration: none;
	color: inherit;
}

.hs-profile__identity:hover .hs-profile__name {
	color: var(--hs-color-txt);
}

.hs-avatar {
	display: block;
	width: 2.625em;
	height: 2.625em;
	margin: 0 auto var(--hs-space-half);
	border-radius: 100%;
	background-color: var(--hs-color-bg-surface-solid);
	object-fit: cover;
}

.hs-profile__name {
	margin: 0;
	text-wrap: wrap;
	font-size: var(--hs-fs-xx-small);
	font-weight: 400;
	line-height: 1.4;
	text-transform: uppercase;
	letter-spacing: 0.1719rem;
	color: var(--hs-color-txt-subtle);
}

.hs-profile__bio {
	max-width: 35.75rem;
	margin: var(--hs-space) auto 0;
	font-size: var(--hs-fs-small);
	color: var(--hs-color-txt-subtle);
	text-wrap: pretty;
}

.hs-profile__bio > :last-child {
	margin-bottom: 0;
}

/* Navigation, set as quietly as the subscribe row so the header still reads
   as a profile rather than a site chrome bar. Underline on hover only, which
   keeps it distinct from links inside your writing. */
.hs-profile__nav ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0 var(--hs-space);
	margin: var(--hs-space) 0 0;
	padding: 0;
	list-style: none;
	font-size: var(--hs-fs-x-small);
}

.hs-profile__nav a {
	display: inline-block;
	padding-block: 0.25em; /* 24px+ target (WCAG 2.5.8) */
	color: var(--hs-color-txt-subtle);
	text-decoration: none;
}

.hs-profile__nav a:hover {
	color: var(--hs-color-txt);
	text-decoration: underline;
}

.hs-profile__nav .current-menu-item > a,
.hs-profile__nav .current_page_item > a,
.hs-profile__nav .current-menu-ancestor > a {
	color: var(--hs-color-txt);
	/* Not colour alone (WCAG 1.4.1): the current page is also underlined. */
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.3em;
}

.hs-profile__links {
	margin-top: var(--hs-space);
	font-size: var(--hs-fs-x-small);
}

/* Two rows of small links would read as a block; tuck the second one up. */
.hs-profile__nav + .hs-profile__links {
	margin-top: var(--hs-space-quarter);
}

.hs-profile__links a {
	display: inline-block;
	padding-block: 0.25em;
	color: var(--hs-color-txt-subtle);
	text-decoration: underline;
}

.hs-profile__links a:hover {
	color: var(--hs-color-txt);
}

.hs-profile__links span[aria-hidden] {
	margin-inline: 0.5em;
	color: var(--hs-color-txt-very-subtle);
}

/* ==========================================================================
   6. Listing — shared
   ========================================================================== */

.hs-listing {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* An untitled note's date doubles as its heading, so screen-reader users
   navigating by heading reach every post, not just the titled ones. These
   reset the h2 so it still looks like the small date it was. */
.hs-card__date,
.hs-entry__date,
.hs-single__date {
	font-weight: 400;
	line-height: 1.4;
	text-wrap: wrap;
}

/* Titles come first in the markup so a heading jump lands on the title and
   the date is read next; CSS puts the date back above it visually. */
.hs-card__header,
.hs-entry__header,
.hs-single__header {
	display: flex;
	flex-direction: column;
}

.hs-card__header > .hs-card__date,
.hs-entry__header > .hs-entry__date,
.hs-single__header > .hs-single__date {
	order: -1;
}

/* Inline body copy shown for titleless (status) posts. */
.hs-inline-content > :last-child {
	margin-bottom: 0;
}

.hs-inline-content img {
	border-radius: 0.2em;
}

/* --- 6a. Listing: Cards (faithful HEY World) --- */

.hs-cards .hs-card {
	--hs-card-pad: 1.5em;

	position: relative;
	min-height: 10em;
	padding: var(--hs-card-pad);
	margin-bottom: var(--hs-space);
	overflow: hidden;
	color: var(--hs-color-txt);
	background-color: var(--hs-color-bg);
	border: 1px solid var(--hs-color-border);
	border-radius: 0.2em;
	box-shadow: 5px 5px 7px var(--hs-color-shadow);
}

@media (min-width: 40em) {
	.hs-cards .hs-card {
		--hs-card-pad: 2em;
	}
}

/* Only truncating cards need room for the pinned footer. */
.hs-cards .hs-card--truncated {
	padding-bottom: 4em;
}

@media (min-width: 40em) {
	.hs-cards .hs-card--truncated {
		padding-bottom: 5em;
	}
}

.hs-card__header {
	text-align: center;
}

.hs-card__date {
	display: flex;
	align-items: center;
	justify-content: center;
	column-gap: 0.3ch;
	margin-bottom: var(--hs-space-quarter);
	font-size: var(--hs-fs-x-small);
	color: var(--hs-color-txt-subtle);
}

.hs-card__title {
	margin: 0 0 var(--hs-space);
	font-size: var(--hs-fs-x-large);
}

.hs-card__title a {
	color: inherit;
	text-decoration: none;
}

/* The title link is stretched over the whole card, so the card is one big
   target but the link keeps its real, visible name and sits inside the
   heading — no separate hidden overlay link duplicating it. */
.hs-card__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.hs-card__content {
	hyphens: auto;
	text-wrap: pretty;
}

.hs-card__content > :last-child {
	margin-bottom: 0;
}

.hs-card__more {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 0;
	padding: 1.5em;
	text-align: center;
	font-size: var(--hs-fs-x-small);
	background-color: var(--hs-color-bg);
}

@media (min-width: 40em) {
	.hs-card__more {
		padding: 1.75em;
	}
}

/* Untitled notes are shown whole, so they get a plain permalink instead of
   the truncation footer. Its gap matches the card's own padding, so the pill
   sits uniformly inset — the same generosity the "Read more" bar gets. */
.hs-card__permalink {
	margin: var(--hs-card-pad, 2em) 0 0;
	text-align: center;
}

.hs-cards .hs-card:hover {
	border-color: var(--hs-color-txt-very-subtle);
}

/* Ring the whole card when its link has focus — it's the card that acts.
   Browsers without :has() keep the ring on the title link itself. */
@supports selector(:has(*)) {
	.hs-card__link:focus-visible {
		outline: none;
	}

	.hs-cards .hs-card:has(.hs-card__link:focus-visible) {
		outline: 2px solid var(--hs-color-focus);
		outline-offset: 2px;
	}
}

/* --- 6b. Listing: Stream (microblog default) --- */

.hs-stream .hs-entry {
	padding-block: var(--hs-space-double);
	border-bottom: 1px solid var(--hs-color-border);
}

.hs-stream .hs-entry:first-child {
	padding-top: 0;
}

.hs-stream .hs-entry:last-child {
	border-bottom: 0;
}

.hs-entry__date {
	margin: 0 0 var(--hs-space-half);
	font-size: var(--hs-fs-x-small);
	color: var(--hs-color-txt-subtle);
}

.hs-entry__date a {
	display: inline-block;
	padding-block: 0.15em;
	color: inherit;
	text-decoration: none;
}

.hs-entry__date a:hover {
	color: var(--hs-color-txt);
	text-decoration: underline;
}

.hs-entry__title {
	margin: 0 0 var(--hs-space-half);
	font-size: var(--hs-fs-x-large);
}

.hs-entry__title a {
	color: inherit;
	text-decoration: none;
}

.hs-entry__title a:hover {
	text-decoration: underline;
}

.hs-entry__content > :last-child {
	margin-bottom: 0;
}

.hs-entry__more {
	margin-top: var(--hs-space);
	font-size: var(--hs-fs-x-small);
}

/* Small marker distinguishing a full inline status post from a teaser. */
.hs-entry--status .hs-entry__date::after {
	content: "";
	display: inline-block;
	width: 0.3em;
	height: 0.3em;
	margin-left: 0.6em;
	vertical-align: 0.25em;
	border-radius: 100%;
	background-color: var(--hs-color-txt-subtle);
}

/* --- 6c. Listing: Index (compact archive) --- */

.hs-index__year {
	margin: var(--hs-space-double) 0 var(--hs-space-half);
	font-size: var(--hs-fs-x-small);
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 0.1719rem;
	color: var(--hs-color-txt-subtle);
	border-bottom: 1px solid var(--hs-color-border);
	padding-bottom: var(--hs-space-half);
}

.hs-index__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.hs-index__year:first-child {
	margin-top: 0;
}

.hs-index__row {
	display: grid;
	grid-template-columns: 7em 1fr;
	gap: 0 1.5em;
	align-items: baseline;
	padding-block: 0.6em;
	border-bottom: 1px solid var(--hs-color-border-light);
	text-decoration: none;
	color: inherit;
}

.hs-index__row:hover .hs-index__label {
	text-decoration: underline;
}

.hs-index__date {
	font-size: var(--hs-fs-x-small);
	color: var(--hs-color-txt-subtle);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.hs-index__label {
	font-size: var(--hs-fs-medium);
	text-wrap: pretty;
}

.hs-index__row--untitled .hs-index__label {
	color: var(--hs-color-txt-subtle);
}

@media (max-width: 39.99em) {
	.hs-index__row {
		grid-template-columns: 1fr;
		gap: 0.2em;
	}
}

/* --- 6d. Listing: Journal (everything, in full) --- */

.hs-journal .hs-entry {
	padding-block: var(--hs-space-double);
}

.hs-journal .hs-entry + .hs-entry {
	border-top: 1px solid var(--hs-color-border);
}

.hs-journal .hs-entry__date {
	text-align: center;
	margin-bottom: var(--hs-space);
}

.hs-journal .hs-entry__title {
	text-align: center;
	font-size: var(--hs-fs-x-large);
	margin-bottom: var(--hs-space);
}

/* ==========================================================================
   7. Single post & page
   ========================================================================== */

.hs-single__header {
	margin-bottom: var(--hs-space-double);
	text-align: center;
}

.hs-single__header > .hs-search-form,
.hs-single__header > .hs-profile__bio {
	align-self: stretch;
}

.hs-single__date {
	margin: 0 0 var(--hs-space-half);
	font-size: var(--hs-fs-x-small);
	color: var(--hs-color-txt-subtle);
}

.hs-single__title {
	margin: 0;
	font-size: var(--hs-fs-xx-large);
	overflow-wrap: break-word;
}

.hs-entry-content {
	padding-bottom: var(--hs-space-double);
}

.hs-entry-content > :last-child {
	margin-bottom: 0;
}

.hs-entry-content h1,
.hs-entry-content h2,
.hs-entry-content h3,
.hs-entry-content h4 {
	margin-top: var(--hs-space-double);
}

.hs-entry-content ul,
.hs-entry-content ol {
	padding-left: 1.4em;
}

.hs-entry-content li {
	margin-bottom: var(--hs-space-quarter);
}

/* Blocks */
.hs-entry-content .wp-block-table,
.hs-inline-content .wp-block-table {
	overflow-x: auto;
}

.hs-entry-content .alignwide {
	width: min(var(--hs-content-width), 100vw - (var(--hs-page-padding) * 2));
	max-width: none;
	margin-inline: auto;
}

.hs-entry-content .alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-inline: calc(50% - 50vw);
}

.hs-entry-content .aligncenter {
	margin-inline: auto;
	text-align: center;
}

.hs-entry-content .alignleft {
	float: left;
	margin: 0 var(--hs-space) var(--hs-space) 0;
}

.hs-entry-content .alignright {
	float: right;
	margin: 0 0 var(--hs-space) var(--hs-space);
}

.hs-entry-footer {
	padding-block: var(--hs-space);
	border-top: 1px solid var(--hs-color-border);
	font-size: var(--hs-fs-x-small);
	color: var(--hs-color-txt-subtle);
	text-align: center;
}

.hs-entry-footer a {
	color: var(--hs-color-txt-subtle);
}

.hs-entry-footer a:hover {
	color: var(--hs-color-txt);
}

/* ==========================================================================
   8. Navigation between posts / pages
   ========================================================================== */

.hs-pagination {
	padding-block: var(--hs-space-double);
	text-align: center;
	font-size: var(--hs-fs-x-small);
}

.hs-pagination a {
	display: inline-block;
	padding-block: 0.25em;
	color: var(--hs-color-txt-subtle);
	text-decoration: underline;
}

.hs-pagination a:hover {
	color: var(--hs-color-txt);
}

.hs-pagination__links {
	display: flex;
	justify-content: space-between;
	gap: var(--hs-space);
}

.hs-pagination__links > * {
	flex: 1;
}

.hs-pagination__prev { text-align: left; }
.hs-pagination__next { text-align: right; }

.hs-post-nav {
	display: flex;
	justify-content: space-between;
	gap: var(--hs-space);
	padding-block: var(--hs-space-double);
	font-size: var(--hs-fs-x-small);
}

.hs-post-nav a {
	display: inline-block;
	padding-block: 0.25em;
	color: var(--hs-color-txt-subtle);
	text-decoration: none;
	text-wrap: pretty;
}

.hs-post-nav a:hover {
	color: var(--hs-color-txt);
	text-decoration: underline;
}

.hs-post-nav__prev { flex: 1; text-align: left; }
.hs-post-nav__next { flex: 1; text-align: right; }

/* ==========================================================================
   9. Site footer
   ========================================================================== */

.hs-footer {
	flex-shrink: 0;
	padding: var(--hs-space-double) var(--hs-page-padding);
	text-align: center;
	font-size: var(--hs-fs-xx-small);
	color: var(--hs-color-txt-subtle);
}

/* Links in running footer text stay underlined — they'd otherwise be the
   same colour as the words around them. Only lists of links drop it. */
.hs-footer a {
	color: var(--hs-color-txt-subtle);
}

.hs-footer :is(nav, ul, ol) a {
	text-decoration: none;
}

.hs-footer a:hover {
	color: var(--hs-color-txt);
	text-decoration: underline;
}

.hs-footer__widgets {
	max-width: var(--hs-reading-width);
	margin: 0 auto var(--hs-space-double);
	font-size: var(--hs-fs-x-small);
	color: var(--hs-color-txt-subtle);
}

/* Classic widget titles and block-widget headings look the same. */
.hs-widget__title,
.hs-footer__widgets :is(h2, h3, h4, .wp-block-heading) {
	margin: 0 0 var(--hs-space-half);
	font-size: var(--hs-fs-xx-small);
	font-weight: 400;
	line-height: 1.4;
	text-transform: uppercase;
	letter-spacing: 0.1719rem;
	color: var(--hs-color-txt-subtle);
}

.hs-footer__widgets ul,
.hs-footer__widgets ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Stacked widget lists (archives, categories, recent posts) are tap targets
   packed vertically; give each one 24px+ of height. */
.hs-footer__widgets li a {
	display: inline-block;
	padding-block: 0.25em;
}

.hs-footer__widgets > .hs-widget {
	margin-bottom: var(--hs-space);
}

.hs-footer__nav ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0 var(--hs-space);
	margin: 0 0 var(--hs-space);
	padding: 0;
	list-style: none;
	font-size: var(--hs-fs-x-small);
}

.hs-footer__nav a {
	display: inline-block;
	padding-block: 0.25em;
}

.hs-footer__colophon {
	margin: 0;
}

/* ==========================================================================
   10. Forms, search, 404
   ========================================================================== */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="password"],
textarea {
	width: 100%;
	padding: 0.5em 0.75em;
	font: inherit;
	font-size: var(--hs-fs-small);
	color: var(--hs-color-txt);
	background-color: var(--hs-color-bg);
	border: 1px solid var(--hs-color-border-control);
	border-radius: 0.3em;
}

::placeholder {
	color: var(--hs-color-txt-subtle);
	opacity: 1;
}

input[type="submit"],
button {
	font: inherit;
}

.hs-search-form {
	display: flex;
	gap: 0.5em;
	max-width: 22rem;
	margin: var(--hs-space) auto 0;
}

.hs-search-form label {
	flex: 1;
}

.hs-no-results {
	padding-block: var(--hs-space-double);
	text-align: center;
	color: var(--hs-color-txt-subtle);
}

.hs-404 {
	padding-block: calc(var(--hs-space-double) * 2);
	text-align: center;
}

.hs-404__code {
	font-size: var(--hs-fs-xx-large);
	color: var(--hs-color-txt-subtle);
	margin-bottom: var(--hs-space-half);
}

/* ==========================================================================
   11. Comments (off by default, styled if enabled)
   ========================================================================== */

.hs-comments {
	padding-block: var(--hs-space-double);
	border-top: 1px solid var(--hs-color-border);
}

.hs-comments__title {
	font-size: var(--hs-fs-large);
	text-align: center;
	margin-bottom: var(--hs-space-double);
}

.hs-comments .comment-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.hs-comments .comment-list ol {
	list-style: none;
	padding-left: var(--hs-space);
}

.hs-comments .comment-body {
	padding-block: var(--hs-space);
	border-bottom: 1px solid var(--hs-color-border-light);
	font-size: var(--hs-fs-small);
}

.hs-comments .comment-meta {
	font-size: var(--hs-fs-x-small);
	color: var(--hs-color-txt-subtle);
	margin-bottom: var(--hs-space-half);
}

.hs-comments .comment-form p {
	margin-bottom: var(--hs-space-half);
}

/* ==========================================================================
   12. Print
   ========================================================================== */

@media print {
	:root {
		--hs-color-bg: #fff;
		--hs-color-txt: #000;
	}

	.hs-profile__links,
	.hs-post-nav,
	.hs-pagination,
	.hs-footer__nav,
	.hs-card__more,
	.hs-card__link::after,
	.hs-skip-link {
		display: none !important;
	}

	.hs-page,
	.hs-page__content {
		max-width: none;
		padding: 0;
		margin: 0;
	}

	.hs-cards .hs-card {
		box-shadow: none;
		padding-bottom: 1.5em;
		min-height: 0;
		overflow: visible;
		break-inside: avoid;
	}

	a {
		color: #000;
	}
}

/* Windows High Contrast and other forced palettes: shadows and backgrounds
   are stripped, so make sure edges and markers are drawn in system colours. */
@media (forced-colors: active) {
	.hs-cards .hs-card,
	.hs-btn,
	input,
	textarea {
		border-color: CanvasText;
	}

	.hs-entry--status .hs-entry__date::after {
		forced-color-adjust: none;
		background-color: CanvasText;
	}

	:focus-visible,
	.hs-cards .hs-card:has(.hs-card__link:focus-visible) {
		outline-color: Highlight;
	}
}

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