/*
Theme Name: Inkwell
Theme URI: https://wordpress.org/
Author: Inkwell
Description: A plain, finished block theme for personal blogs. Literata for reading, the system font for the interface, white and greys for most of the page, and one colour style on top: a full-width hero band in the lead colour, an About band in the second colour, and one highlight colour for the main button and badge. Four colour styles included: Orchid, Breeze, Lagoon and Harbour.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.5.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: inkwell
Tags: blog, one-column, three-columns, block-patterns, block-styles, custom-colors, custom-logo, editor-style, featured-images, full-site-editing, style-variations, threaded-comments, translation-ready, wide-blocks
*/

/*
 * Colour roles (theme.json; each colour style in /styles swaps the values, never the roles):
 * neutrals (base, line, contrast) do most of the work.
 * accent = the lead colour, flooded behind the homepage hero; on-accent = text on it.
 * support = the second colour, the About band; on-support = text on it.
 * pop = one button and one badge per screen; on-pop = text on it.  link = links in text.
 * Fonts: Literata for reading, the system font for the interface.
 */

html {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	scroll-padding-top: 6rem;
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

body {
	caret-color: var(--wp--preset--color--link);
}

::selection {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--on-accent);
}

/* Interface in the system font; reading text stays in Literata. */
button,
input,
select,
textarea,
.wp-element-button,
.wp-block-button__link,
.wp-block-search,
.wp-block-post-comments-form,
.wp-block-navigation,
.inkwell-ui {
	font-family: var(--wp--preset--font-family--sans);
}

.wp-block-post-date,
.wp-block-post-time-to-read,
.wp-block-comment-date,
.wp-block-query-pagination {
	font-variant-numeric: tabular-nums;
}

:where(.wp-block-post-content, .entry-content) a:where(:not(.wp-element-button)) {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

/* The focus outline lives in theme.json (styles.css) so it loads with the page itself. */

h1, h2, h3, h4,
.wp-block-post-title,
.wp-block-site-tagline,
.wp-block-query-title {
	font-optical-sizing: auto;
	text-wrap: balance;
}

p {
	text-wrap: pretty;
}

/* Plain text styles kept for any saved templates that still use these classes. */
.inkwell-eyebrow,
.inkwell-footer-heading {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

/* ---------- Buttons ---------- */

.wp-block-button__link,
.wp-element-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	transition: background-color 0.15s ease-out, color 0.15s ease-out, border-color 0.15s ease-out, transform 0.1s ease-out;
}

.wp-block-button__link:hover,
.wp-element-button:hover {
	background-color: var(--wp--custom--button-hover);
}

.wp-block-button__link:active,
.wp-element-button:active {
	transform: scale(0.97);
}

.wp-block-button__link[aria-disabled="true"],
.wp-element-button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
}

.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--contrast);
	border: 1px solid currentColor;
	padding: calc(0.75rem - 1px) calc(1.5rem - 1px);
}

.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--base-2);
}

/* The one coloured action on a screen. */
.wp-block-button.is-style-accent > .wp-block-button__link {
	background: var(--wp--preset--color--pop);
	color: var(--wp--preset--color--on-pop);
}

.wp-block-button.is-style-accent > .wp-block-button__link:hover {
	background: color-mix(in srgb, var(--wp--preset--color--pop) 86%, #000);
}

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

.inkwell-header {
	position: sticky;
	top: 0;
	z-index: 20;
}

/* The translucent background sits on a pseudo-element: backdrop-filter on the header
   itself would trap the mobile menu overlay (position: fixed) inside the header. */
.inkwell-header::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: color-mix(in srgb, var(--wp--preset--color--base) 92%, transparent);
	backdrop-filter: saturate(1.2) blur(12px);
	-webkit-backdrop-filter: saturate(1.2) blur(12px);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
	.inkwell-header::before {
		background: var(--wp--preset--color--base);
	}
}

@media (prefers-reduced-transparency: reduce) {
	.inkwell-header::before {
		background: var(--wp--preset--color--base);
		backdrop-filter: none;
		-webkit-backdrop-filter: none;
	}
}

.admin-bar .inkwell-header {
	top: var(--wp-admin--admin-bar--height, 32px);
}

@media (max-width: 600px) {
	.admin-bar .inkwell-header {
		top: 0;
	}
}

.inkwell-header .wp-block-site-logo img {
	display: block;
}

.inkwell-logo-mark {
	display: block;
	color: var(--wp--preset--color--accent);
}

.inkwell-header .wp-block-navigation-item__content {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
}

/* Current page: underlined, not just coloured. */
.wp-block-navigation .current-menu-item > .wp-block-navigation-item__content,
.wp-block-navigation .wp-block-navigation-item__content[aria-current="page"] {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.4em;
}

.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
}

.inkwell-header .wp-block-search__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	margin: 0;
	padding: 0;
	background: transparent;
	color: var(--wp--preset--color--contrast);
	border-radius: var(--wp--custom--radius--control);
}

.inkwell-header .wp-block-search__button:hover {
	background: var(--wp--preset--color--base-2);
}

/* Collapsed header search shouldn't reserve space for the hidden field. */
.inkwell-header .wp-block-search__searchfield-hidden .wp-block-search__inside-wrapper {
	width: auto !important;
}

/* Core animates the field's width as it opens; show it at once instead. */
.inkwell-header .wp-block-search__inside-wrapper,
.inkwell-header .wp-block-search__input {
	transition: none !important;
}

/* Mobile menu overlay. */
.wp-block-navigation__responsive-container.is-menu-open {
	--navigation-layout-justification-setting: flex-start;
	--navigation-layout-justify: flex-start;
	padding: var(--wp--preset--spacing--40) clamp(1rem, 4vw, 2rem);
	text-align: left;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	align-items: flex-start;
	padding-top: var(--wp--preset--spacing--60);
}

/* Core's "justified right" rules win on specificity, hence !important. */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	align-items: flex-start !important;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	gap: var(--wp--preset--spacing--20);
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 600;
}

/* ---------- Search and form fields ---------- */

.wp-block-search__input,
.wp-block-post-comments-form input:not([type="submit"]):not([type="checkbox"]),
.wp-block-post-comments-form textarea {
	min-height: 44px;
	padding: 0.625rem 0.875rem;
	border: 1px solid var(--wp--custom--input-border);
	border-radius: var(--wp--custom--radius--control);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--sans);
	font-size: max(16px, 1rem); /* 16px or more, or phones zoom in on focus */
}

.wp-block-search__input:focus,
.wp-block-post-comments-form input:focus,
.wp-block-post-comments-form textarea:focus {
	border-color: var(--wp--preset--color--link);
}

.wp-block-search__button {
	min-height: 44px;
	border-radius: var(--wp--custom--radius--control);
}

.wp-block-post-comments-form label {
	display: block;
	margin-bottom: 0.25rem;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

.wp-block-post-comments-form .comment-notes,
.wp-block-post-comments-form .logged-in-as,
.wp-block-post-comments-form .comment-form-cookies-consent label {
	color: var(--wp--preset--color--contrast-2);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 400;
}

.wp-block-post-comments-form .comment-form-cookies-consent {
	display: flex;
	gap: 0.5rem;
	align-items: flex-start;
}

.wp-block-post-comments-form .comment-reply-title {
	font-family: var(--wp--preset--font-family--serif);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 600;
}

/* ---------- Story cards and meta ---------- */

.inkwell-meta {
	color: var(--wp--preset--color--contrast-2);
}

.inkwell-meta > * + *::before {
	content: "·";
	margin-right: 0.5rem;
	color: var(--wp--preset--color--contrast-2);
}

.inkwell-meta > .wp-block-avatar + *::before {
	content: none;
}

/* On narrow screens the meta line wraps; drop the dots so no line starts with one. */
@media (max-width: 480px) {
	.inkwell-meta {
		column-gap: 0.75rem !important;
	}

	.inkwell-meta > * + *::before {
		content: none;
	}
}

.inkwell-meta .wp-block-avatar img,
.inkwell-author-box .wp-block-avatar img {
	display: block;
}

img.avatar {
	object-fit: cover;
}

/* "Featured" or "Latest": the one badge on the screen, in the pop colour. */
.inkwell-badge,
.inkwell-feature-badge {
	display: inline-block;
	margin: 0;
	padding: 0.125rem 0.5rem;
	border-radius: var(--wp--custom--radius--control);
	background: var(--wp--preset--color--pop);
	color: var(--wp--preset--color--on-pop);
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
}

.wp-block-read-more {
	text-decoration: none;
}

.wp-block-read-more:hover {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.inkwell-view-all a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--sans);
	font-weight: 600;
	text-decoration: none;
}

.inkwell-view-all a:hover {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

/* ---------- Topic chips (Categories block, "Pills" style) ---------- */

.wp-block-categories.is-style-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.wp-block-categories.is-style-pills li {
	margin: 0;
}

.wp-block-categories.is-style-pills a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 1rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--control);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	text-decoration: none;
	transition: border-color 0.15s ease-out;
}

.wp-block-categories.is-style-pills a:hover {
	border-color: currentColor;
}

/* Topics band (Inkwell pattern "Browse by topic"): sits on the support colour. */
.inkwell-topics,
.inkwell-topics :where(h1, h2, h3, p) {
	color: var(--wp--preset--color--on-support);
}

.inkwell-topics .wp-block-categories.is-style-pills a {
	border-color: transparent;
}

.inkwell-topics :focus-visible {
	outline-color: var(--wp--preset--color--on-support);
}

/* ---------- Homepage hero band (lead colour) ---------- */

.inkwell-hero-band,
.inkwell-hero-band :where(h1, h2, h3, p) {
	color: var(--wp--preset--color--on-accent);
}

.inkwell-hero-band a:where(:not(.wp-element-button)) {
	color: inherit;
}

.inkwell-hero-band :focus-visible {
	outline-color: var(--wp--preset--color--on-accent);
}

.inkwell-hero-band .wp-block-post-terms,
.inkwell-hero-band .wp-block-post-terms a,
.inkwell-hero-band .wp-block-post-date,
.inkwell-hero-band .wp-block-post-time-to-read,
.inkwell-hero-band .wp-block-post-excerpt,
.inkwell-hero-band .inkwell-meta,
.inkwell-hero-band .inkwell-meta > * + *::before {
	color: var(--wp--preset--color--on-accent);
}

.inkwell-hero-band .wp-block-button.is-style-outline > .wp-block-button__link {
	color: var(--wp--preset--color--on-accent);
	border-color: currentColor;
}

.inkwell-hero-band .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: color-mix(in srgb, var(--wp--preset--color--on-accent) 14%, transparent);
}

.inkwell-hero-band .wp-block-post-featured-image img {
	box-shadow: 0 24px 48px -24px color-mix(in srgb, #000 55%, transparent);
}

.inkwell-hero-band .inkwell-empty {
	background: color-mix(in srgb, var(--wp--preset--color--on-accent) 8%, transparent);
}

.inkwell-hero-band .inkwell-empty :where(h2, p) {
	color: var(--wp--preset--color--on-accent);
}

/* ---------- About band (support colour) ---------- */

.inkwell-about,
.inkwell-about :where(h1, h2, h3, p) {
	color: var(--wp--preset--color--on-support);
}

.inkwell-about a:where(:not(.wp-element-button)) {
	color: inherit;
}

.inkwell-about :focus-visible {
	outline-color: var(--wp--preset--color--on-support);
}

/* Buttons flip the band's colours, so they read on any support colour. */
.inkwell-about .wp-block-button__link {
	background: var(--wp--preset--color--on-support);
	color: var(--wp--preset--color--support);
}

.inkwell-about .wp-block-button__link:hover {
	background: color-mix(in srgb, var(--wp--preset--color--on-support) 86%, var(--wp--preset--color--support));
}

.inkwell-about .wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--on-support);
	border-color: currentColor;
}

.inkwell-about .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: color-mix(in srgb, var(--wp--preset--color--on-support) 12%, transparent);
}

.inkwell-about-avatar img {
	display: block;
	box-shadow: 0 0 0 6px color-mix(in srgb, var(--wp--preset--color--on-support) 18%, transparent);
}

/* Card without a picture: a tinted block with the site mark. */
.inkwell-image-placeholder {
	align-self: stretch;
	width: 100%;
	margin: 0;
	border-radius: var(--wp--custom--radius--surface);
	background: var(--wp--preset--color--accent-2);
	overflow: hidden;
}

.inkwell-image-placeholder a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}

.inkwell-image-placeholder .inkwell-logo-mark {
	opacity: 0.35;
}

/* ---------- Homepage: menu over the hero picture ---------- */

body.home .inkwell-header {
	position: absolute;
	left: 0;
	right: 0;
	border-bottom-color: color-mix(in srgb, var(--wp--preset--color--on-accent) 18%, transparent) !important;
}

body.home.admin-bar .inkwell-header {
	top: var(--wp-admin--admin-bar--height, 32px);
}

body.home .inkwell-header::before {
	background: transparent;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
}

body.home .inkwell-header .wp-block-site-title a,
body.home .inkwell-header .inkwell-logo-mark,
body.home .inkwell-header .wp-block-search__button,
body.home .inkwell-header .wp-block-navigation__responsive-container-open,
body.home .inkwell-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation-item__content {
	color: var(--wp--preset--color--on-accent);
}

body.home .inkwell-header .wp-block-search__button:hover {
	background: color-mix(in srgb, var(--wp--preset--color--on-accent) 14%, transparent);
}

body.home .inkwell-header :focus-visible {
	outline-color: var(--wp--preset--color--on-accent);
}

/* ---------- Homepage hero (picture under the lead colour) ---------- */

.inkwell-hero-cover {
	min-height: min(92svh, 880px) !important;
	padding-top: calc(var(--wp--preset--spacing--80) + 4rem) !important;
	/* Room for the topics card that overlaps the bottom of the hero. */
	padding-bottom: calc(var(--wp--preset--spacing--80) + 3.5rem) !important;
}

.inkwell-hero-cover .inkwell-hero-title {
	font-size: clamp(2.75rem, 7vw, 5.5rem) !important;
}

.inkwell-hero-cover a:where(:not(.wp-element-button)) {
	color: inherit;
}

.inkwell-hero-cover :focus-visible {
	outline-color: var(--wp--preset--color--on-accent);
}

.inkwell-hero-cover .wp-block-button.is-style-outline > .wp-block-button__link {
	color: var(--wp--preset--color--on-accent);
	border-color: currentColor;
}

.inkwell-hero-cover .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: color-mix(in srgb, var(--wp--preset--color--on-accent) 14%, transparent);
}

/* ---------- Topics card (overlaps the hero) ---------- */

.inkwell-topics-card {
	position: relative;
	z-index: 2;
	box-shadow: 0 24px 60px -28px color-mix(in srgb, #000 35%, transparent);
	text-align: center;
}

.inkwell-topics-card .wp-block-term-template {
	gap: 0 !important;
	margin: 0;
	padding: 0;
	list-style: none;
}

.inkwell-topics-card .wp-block-term {
	padding: var(--wp--preset--spacing--40);
}

.inkwell-topic {
	align-items: center !important;
}

.inkwell-topic .wp-block-term-name a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

/* The whole topic block is one tap target (the topic name's link). */
.inkwell-topics-card .wp-block-term {
	position: relative;
}

.inkwell-topic .wp-block-term-name a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.inkwell-topic .wp-block-term-name a:hover {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.inkwell-topic .wp-block-term-description,
.inkwell-topic .wp-block-term-description p {
	margin: 0;
	color: var(--wp--preset--color--contrast-2);
}

.inkwell-term-count {
	color: var(--wp--preset--color--link);
	font-family: var(--wp--preset--font-family--sans);
	font-weight: 600;
}

@media (min-width: 782px) {
	.inkwell-topics-card .wp-block-term:not(:nth-child(3n+1)) {
		border-left: 1px solid var(--wp--preset--color--line);
	}

	.inkwell-topics-card .wp-block-term:nth-child(n+4) {
		border-top: 1px solid var(--wp--preset--color--line);
	}
}

@media (max-width: 781px) {
	.inkwell-topics-card {
		margin-top: -3rem !important;
	}

	.inkwell-topics-card .wp-block-term + .wp-block-term {
		border-top: 1px solid var(--wp--preset--color--line);
	}
}

/* ---------- About the author: picture half, panel half ---------- */

.inkwell-split .wp-block-column:first-child {
	display: flex;
}

.inkwell-split-image {
	flex: 1;
	margin: 0;
	min-height: 320px;
}

.inkwell-split-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 0 !important;
}

/* The soft panel fills the full height beside the picture; its content sits in the middle. */
.inkwell-split-panel {
	align-self: stretch !important;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.inkwell-split-panel .wp-block-heading {
	margin-bottom: 0;
}

/* Bands that touch the footer shouldn't leave a white strip above it. */
.wp-site-blocks > footer.wp-block-template-part {
	margin-block-start: 0;
}

/* ---------- Reader comments as quote cards ---------- */

.wp-block-latest-comments.inkwell-quote-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr));
	gap: var(--wp--preset--spacing--40);
	margin: 0;
	padding: 0;
	list-style: none;
}

.inkwell-quote-cards .wp-block-latest-comments__comment {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
	margin: 0;
	padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);
	border-radius: var(--wp--custom--radius--surface);
	background: var(--wp--preset--color--accent-2);
	text-align: center;
	line-height: 1.6;
}

.inkwell-quote-cards .wp-block-latest-comments__comment article {
	display: contents;
}

.inkwell-quote-cards .wp-block-latest-comments__comment-excerpt {
	order: 1;
	margin: 0;
}

.inkwell-quote-cards .wp-block-latest-comments__comment-excerpt p {
	margin: 0;
	font-size: var(--wp--preset--font-size--medium);
}

.inkwell-quote-cards .avatar {
	order: 2;
	float: none;
	margin: var(--wp--preset--spacing--20) 0 0 !important;
	width: 48px;
	height: 48px;
	border-radius: 50%;
}

.inkwell-quote-cards .wp-block-latest-comments__comment-meta {
	order: 3;
	margin: 0;
	color: var(--wp--preset--color--contrast-2);
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--x-small);
}

.inkwell-quote-cards .wp-block-latest-comments__comment-author {
	display: block;
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	text-decoration: none;
}

.inkwell-quote-cards .wp-block-latest-comments__comment-link {
	color: var(--wp--preset--color--link);
}

/* ---------- Blog in numbers ---------- */

.inkwell-stats a:where(:not(.wp-element-button)) {
	color: inherit;
}

.inkwell-stat-figure {
	margin: 0;
	font-family: var(--wp--preset--font-family--serif);
	font-size: clamp(2.5rem, 5vw, 3.75rem);
	font-weight: 700;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.inkwell-stat-label {
	margin-top: 0.5rem !important;
}

@media (max-width: 781px) {
	.inkwell-stats .wp-block-columns {
		display: grid !important;
		grid-template-columns: 1fr 1fr;
	}

	.inkwell-split-image {
		min-height: 280px;
		max-height: 420px;
	}
}

/* ---------- Empty state and illustration ---------- */

.inkwell-empty {
	background: var(--wp--preset--color--base-2);
	border-radius: var(--wp--custom--radius--surface);
	padding: var(--wp--preset--spacing--50);
}

.inkwell-arch {
	margin: 0;
}

.inkwell-arch img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	border-radius: 999px 999px var(--wp--custom--radius--surface) var(--wp--custom--radius--surface);
}

@media (max-width: 781px) {
	.inkwell-arch {
		max-width: 280px;
	}
}

/* ---------- Single post ---------- */

.inkwell-article .wp-block-post-content > p:first-child {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.5;
}

.wp-block-post-content :where(h2, h3) {
	margin-top: var(--wp--preset--spacing--60);
}

.wp-block-post-content :where(h2, h3) + * {
	margin-top: 0.75rem;
}

.wp-block-post-content li + li {
	margin-top: 0.4rem;
}

.wp-block-post-content li::marker {
	color: var(--wp--preset--color--contrast-2);
}

.wp-block-pullquote blockquote p {
	font-size: inherit;
}

.wp-block-pullquote cite,
.wp-block-quote cite {
	display: block;
	margin-top: 1rem;
	color: var(--wp--preset--color--contrast-2);
}

.inkwell-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.inkwell-tags a {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	padding: 0 0.75rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--control);
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
	transition: border-color 0.15s ease-out;
}

.inkwell-tags a:hover {
	border-color: currentColor;
}

.inkwell-tags .wp-block-post-terms__separator {
	display: none;
}

.wp-block-post-navigation-link .post-navigation-link__label {
	display: block;
	margin-bottom: 0.25rem;
	color: var(--wp--preset--color--contrast-2);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 500;
}

.wp-block-post-navigation-link .post-navigation-link__title {
	font-family: var(--wp--preset--font-family--serif);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 600;
	line-height: 1.3;
}

.wp-block-post-navigation-link a {
	display: block;
	padding-block: 0.5rem;
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.wp-block-post-navigation-link a:hover .post-navigation-link__title {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.inkwell-post-nav > * {
	flex: 1 1 0;
	min-width: 0;
}

@media (max-width: 781px) {
	.inkwell-post-nav {
		flex-direction: column;
	}

	.inkwell-post-nav .post-navigation-link-next {
		text-align: left;
	}
}

/* ---------- Comments ---------- */

.wp-block-comment-template {
	padding-left: 0;
	list-style: none;
}

.wp-block-comment-template ol {
	padding-left: clamp(1rem, 5vw, 2.5rem);
	list-style: none;
}

.inkwell-comment {
	border-top: 1px solid var(--wp--preset--color--line);
}

.wp-block-comment-reply-link a {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
}

/* ---------- Callout and checklist (writing styles) ---------- */

.wp-block-group.is-style-callout,
.wp-block-column.is-style-callout {
	background: var(--wp--preset--color--base-2);
	border-radius: var(--wp--custom--radius--surface);
	padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
}

.wp-block-group.is-style-callout > *,
.wp-block-column.is-style-callout > * {
	margin-block: 0;
}

.wp-block-group.is-style-callout > * + *,
.wp-block-column.is-style-callout > * + * {
	margin-top: 0.5rem;
}

.wp-block-list.is-style-checklist {
	list-style: none;
	padding-left: 0;
}

.wp-block-list.is-style-checklist li {
	position: relative;
	padding-left: 1.9rem;
}

.wp-block-list.is-style-checklist li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.4em;
	width: 1.1rem;
	height: 1.1rem;
	border-radius: 50%;
	background: var(--wp--preset--color--accent-2);
}

.wp-block-list.is-style-checklist li::after {
	content: "";
	position: absolute;
	left: 0;
	top: 0.4em;
	width: 1.1rem;
	height: 1.1rem;
	background: var(--wp--preset--color--link);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 75% no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 75% no-repeat;
}

/* ---------- Pagination ---------- */

.wp-block-query-pagination a,
.wp-block-query-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 0.5rem;
	border-radius: var(--wp--custom--radius--control);
	transition: background-color 0.15s ease-out;
}

.wp-block-query-pagination a:hover {
	background: var(--wp--preset--color--base-2);
}

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

/* ---------- Footer ---------- */

.inkwell-footer a:where(:not(.wp-element-button)) {
	color: inherit;
	text-decoration: none;
}

.inkwell-footer a:where(:not(.wp-element-button)):hover {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.inkwell-footer :focus-visible {
	outline-color: var(--wp--preset--color--on-footer);
}

.inkwell-footer ul {
	list-style: none;
	padding-left: 0;
	margin: 0;
}

.inkwell-footer li a {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
}

.inkwell-footer .inkwell-muted,
.inkwell-footer .inkwell-footer-heading {
	color: color-mix(in srgb, var(--wp--preset--color--on-footer) 70%, var(--wp--preset--color--footer));
}

.inkwell-footer .wp-block-social-links {
	margin-top: var(--wp--preset--spacing--30);
}

.inkwell-footer .wp-block-social-links.is-style-logos-only .wp-social-link {
	color: var(--wp--preset--color--on-footer);
}

.inkwell-footer .wp-social-link a {
	min-width: 44px;
	min-height: 44px;
	justify-content: center;
}

.inkwell-footer-bottom {
	border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--on-footer) 16%, transparent);
}

/* ---------- Touch: every target at least 44px ---------- */

/* The whole story card is one big link (the title's); the category keeps its own link
   on top, with a taller tap area that doesn't change the layout. */
.inkwell-card,
.inkwell-feature {
	position: relative;
}

.inkwell-card .wp-block-post-title a::after,
.inkwell-feature .wp-block-post-title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.inkwell-card .wp-block-post-terms a,
.inkwell-feature .wp-block-post-terms a {
	position: relative;
	z-index: 1;
	display: inline-block;
	padding-block: 0.875rem;
	margin-block: -0.875rem;
}

.inkwell-header .wp-block-site-logo a,
.inkwell-header .wp-block-site-title a,
.inkwell-footer .wp-block-site-title a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
}

@media (pointer: coarse) {
	.inkwell-tags a,
	.inkwell-footer li a,
	.wp-block-comment-reply-link a {
		min-height: 44px;
	}
}

/* ---------- Accessibility settings ---------- */

@media (prefers-contrast: more) {
	.wp-block-categories.is-style-pills a,
	.inkwell-tags a,
	.wp-block-search__input {
		border-color: currentColor;
	}
}

/* Reduced motion keeps colour feedback, drops movement. */
@media (prefers-reduced-motion: reduce) {
	.wp-block-button__link:active,
	.wp-element-button:active {
		transform: none;
	}
}

/* ---------- Theme artwork: thorned vine turning into a network ---------- */

/* Two masked layers, so the artwork takes each colour scheme's colours:
   faint lines in the text colour, bright hubs in the highlight colour. */
.inkwell-hero-art {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background-image: radial-gradient(ellipse at 50% 38%, color-mix(in srgb, var(--wp--preset--color--on-accent) 9%, transparent), transparent 62%);
}

.inkwell-hero-art::before,
.inkwell-hero-art::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
}

.inkwell-hero-art::before {
	background: var(--wp--preset--color--on-accent);
	opacity: 0.5;
	-webkit-mask: url("assets/images/hero-lines.svg") center / cover no-repeat;
	mask: url("assets/images/hero-lines.svg") center / cover no-repeat;
}

.inkwell-hero-art::after {
	background: var(--wp--preset--color--pop);
	-webkit-mask: url("assets/images/hero-glow.svg") center / cover no-repeat;
	mask: url("assets/images/hero-glow.svg") center / cover no-repeat;
}

/* In the Cover block the colour layer is its own element; the artwork sits above it. */
.wp-block-cover.inkwell-hero-art::before,
.wp-block-cover.inkwell-hero-art::after {
	z-index: 1;
}

.wp-block-cover.inkwell-hero-art .wp-block-cover__inner-container {
	z-index: 2;
}

/* "Just published": three newest stories inside the hero. */
.inkwell-hero-latest > p {
	color: color-mix(in srgb, var(--wp--preset--color--on-accent) 85%, var(--wp--preset--color--accent));
	font-weight: 600;
}

.inkwell-hero-latest .wp-block-post-template {
	margin: 0;
	padding: 0;
	list-style: none;
}

.inkwell-hero-latest-item {
	position: relative;
	height: 100%;
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--on-accent) 18%, transparent);
	border-radius: var(--wp--custom--radius--surface);
	background: color-mix(in srgb, var(--wp--preset--color--on-accent) 7%, var(--wp--preset--color--accent));
	text-align: left;
	transition: background-color 0.15s ease-out, border-color 0.15s ease-out;
}

.inkwell-hero-latest-item:hover {
	background: color-mix(in srgb, var(--wp--preset--color--on-accent) 12%, var(--wp--preset--color--accent));
	border-color: color-mix(in srgb, var(--wp--preset--color--on-accent) 32%, transparent);
}

.inkwell-hero-latest-item .wp-block-post-title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.inkwell-hero-latest-item,
.inkwell-hero-latest-item :where(h2, a, .wp-block-post-terms, .wp-block-post-terms a, .wp-block-post-date) {
	color: var(--wp--preset--color--on-accent);
}

.inkwell-hero-latest-item .wp-block-post-terms a {
	position: relative;
	z-index: 1;
	display: inline-block;
	padding-block: 0.875rem;
	margin-block: -0.875rem;
}

/* ---------- Page header band ---------- */

.inkwell-page-hero,
.inkwell-page-hero :where(h1, p, .wp-block-post-date, .wp-block-post-date time) {
	color: var(--wp--preset--color--on-accent);
}

.inkwell-page-hero .inkwell-ui p,
.inkwell-page-hero .wp-block-post-date {
	margin: 0;
	color: color-mix(in srgb, var(--wp--preset--color--on-accent) 85%, var(--wp--preset--color--accent));
}

/* ---------- Contact page ---------- */

.inkwell-contact-card {
	position: sticky;
	top: 6rem;
}

.inkwell-contact-card .wp-block-separator {
	margin-block: var(--wp--preset--spacing--40);
	border-color: color-mix(in srgb, var(--wp--preset--color--contrast) 14%, transparent);
}

.inkwell-contact-form form {
	display: grid;
	gap: var(--wp--preset--spacing--30);
}

.inkwell-contact-form .inkwell-field {
	margin: 0;
}

.inkwell-contact-form label {
	display: block;
	margin-bottom: 0.375rem;
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

.inkwell-contact-form input[type="text"],
.inkwell-contact-form input[type="email"],
.inkwell-contact-form select,
.inkwell-contact-form textarea {
	box-sizing: border-box;
	width: 100%;
	min-height: 44px;
	padding: 0.625rem 0.875rem;
	border: 1px solid var(--wp--custom--input-border);
	border-radius: var(--wp--custom--radius--control);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--sans);
	font-size: max(16px, 1rem);
}

.inkwell-contact-form textarea {
	resize: vertical;
	line-height: 1.5;
}

.inkwell-contact-form :is(input, select, textarea):focus {
	border-color: var(--wp--preset--color--link);
}

.inkwell-contact-form [aria-invalid="true"] {
	border-color: #B42318;
}

.inkwell-field-error {
	margin: 0.375rem 0 0;
	color: #B42318;
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
}

.inkwell-form-alert {
	margin: 0 0 var(--wp--preset--spacing--30);
	padding: 0.75rem 1rem;
	border-radius: var(--wp--custom--radius--control);
	background: #FEF3F2;
	color: #B42318;
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

.inkwell-form-success {
	margin: 0 0 var(--wp--preset--spacing--30);
	padding: 1rem 1.25rem;
	border-radius: var(--wp--custom--radius--control);
	background: #ECFDF3;
	color: #05603A;
	font-family: var(--wp--preset--font-family--sans);
}

.inkwell-form-success p {
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
}

.inkwell-form-success .inkwell-form-success-title {
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 600;
}

.inkwell-form-actions {
	margin: 0;
}

.inkwell-form-actions .wp-element-button {
	width: 100%;
	border: 0;
	cursor: pointer;
}

.inkwell-form-note {
	margin: 0;
	color: var(--wp--preset--color--contrast-2);
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--x-small);
}

/* Hidden from people, visible to bots. */
.inkwell-honeypot {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

@media (max-width: 781px) {
	.inkwell-contact-card {
		position: static;
	}
}

/* ---------- Legal pages ---------- */

.inkwell-legal .wp-block-post-content h2 {
	font-size: var(--wp--preset--font-size--large);
}

.inkwell-legal .wp-block-post-content h3 {
	font-size: var(--wp--preset--font-size--medium);
}

.inkwell-legal .wp-block-post-content :where(p, li) {
	font-size: 1.0625rem;
}
