/*
Theme Name: Starling Gate
Theme URI: https://starlinggatepress.com
Author: Starling Gate Press
Description: Imprint theme for StarlingGatePress.com. Navy and gold, Georgia headings, system fonts only (no remote requests). Designed to pair with the Starling Gate Press Core plugin, which provides the book catalog, inquiry form and launch controls.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: starling-gate
*/

/* ==========================================================================
   Tokens
   ========================================================================== */

:root {
	--sgp-navy: var(--wp--preset--color--navy, #0B2747);
	--sgp-navy-deep: var(--wp--preset--color--navy-deep, #071A30);
	--sgp-gold: var(--wp--preset--color--gold, #C99732);
	--sgp-paper: var(--wp--preset--color--paper, #FAF7F0);
	--sgp-white: var(--wp--preset--color--white, #FFFFFF);
	--sgp-ink: var(--wp--preset--color--ink, #20262D);
	--sgp-muted: var(--wp--preset--color--muted, #59616A);
	--sgp-divider: var(--wp--preset--color--divider, #DAD4C8);
	--sgp-tint: #F3EEE3;
	--sgp-on-navy: #DCE3EC;
	--sgp-on-navy-muted: #B9C5D4;
	--sgp-error: #A12A2A;
	--sgp-success: #2E6B3F;
	--sgp-font-heading: var(--wp--preset--font-family--heading, Georgia, "Times New Roman", Times, serif);
	--sgp-font-body: var(--wp--preset--font-family--body, Arial, Helvetica, sans-serif);
	--sgp-gutter: clamp(1rem, 4vw, 2.5rem);
	--sgp-content: var(--wp--style--global--content-size, 46rem);
	--sgp-wide: var(--wp--style--global--wide-size, 72rem);
	--sgp-radius: 4px;
}

/* ==========================================================================
   Base
   ========================================================================== */

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

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

body {
	background: var(--sgp-paper);
	color: var(--sgp-ink);
	font-family: var(--sgp-font-body);
	font-size: 1.0625rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

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

::selection {
	background: #F1DDB0;
	color: var(--sgp-ink);
}

h1, h2, h3, h4,
.wp-block-post-title {
	font-family: var(--sgp-font-heading);
	font-weight: 400;
	color: var(--sgp-navy);
	line-height: 1.2;
	text-wrap: balance;
}

h1, .wp-block-post-title { font-size: clamp(2.1rem, 1.5rem + 2.4vw, 3.25rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.125rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

p, li { text-wrap: pretty; }

a {
	color: var(--sgp-navy);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

a:hover {
	color: var(--sgp-navy-deep);
	text-decoration-thickness: 2px;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--sgp-navy);
	outline-offset: 2px;
	border-radius: 2px;
}

strong { font-weight: 700; }

/* ==========================================================================
   Header and navigation
   ========================================================================== */

.sgp-header {
	background: var(--sgp-white);
	border-top: 4px solid var(--sgp-navy);
	border-bottom: 1px solid var(--sgp-divider);
	padding-inline: var(--sgp-gutter);
}

.sgp-header__inner {
	display: flex;
	flex-wrap: nowrap;
	justify-content: space-between;
	align-items: center;
	gap: 1.5rem;
	max-width: var(--sgp-wide);
	min-height: 5rem;
	margin-inline: auto;
}

.sgp-brand.is-layout-flex,
.sgp-brand {
	display: flex;
	flex-wrap: nowrap;
	gap: 0.7rem;
	align-items: center;
	flex-shrink: 0;
}

.sgp-header__inner > *,
.sgp-brand > * {
	margin-block: 0;
}

.sgp-brand__mark {
	display: block;
	line-height: 0;
}

.sgp-brand__svg {
	width: 2.5rem;
	height: 2.5rem;
}

.sgp-brand__name {
	margin: 0;
	font-family: var(--sgp-font-heading);
	font-size: 1.4rem;
	line-height: 1.1;
	letter-spacing: 0.01em;
}

.sgp-brand__name a {
	color: var(--sgp-navy);
	text-decoration: none;
}

.sgp-brand__name a:hover {
	text-decoration: underline;
	text-decoration-color: var(--sgp-gold);
}

.sgp-nav .wp-block-navigation__container {
	gap: 1.75rem;
}

.sgp-nav .wp-block-navigation-item__content {
	display: inline-block;
	padding: 0.45rem 0.1rem;
	border-bottom: 3px solid transparent;
	color: var(--sgp-navy);
	font-size: 0.975rem;
	font-weight: 700;
	text-decoration: none;
	letter-spacing: 0.01em;
}

.sgp-nav .wp-block-navigation-item__content:hover,
.sgp-nav .current-menu-item > .wp-block-navigation-item__content {
	border-bottom-color: var(--sgp-gold);
	color: var(--sgp-navy);
}

.sgp-nav .wp-block-navigation__responsive-container-open,
.sgp-nav .wp-block-navigation__responsive-container-close {
	color: var(--sgp-navy);
	padding: 0.5rem;
	min-width: 44px;
	min-height: 44px;
	justify-content: center;
	align-items: center;
}

.sgp-nav .wp-block-navigation__responsive-container.is-menu-open {
	padding: 1.25rem var(--sgp-gutter) 2rem;
}

.sgp-nav .is-menu-open .wp-block-navigation__container {
	gap: 0.25rem;
	margin-top: 2.5rem;
}

.sgp-nav .is-menu-open .wp-block-navigation-item__content {
	font-family: var(--sgp-font-heading);
	font-size: 1.5rem;
	font-weight: 400;
	padding: 0.6rem 0;
}

/* ==========================================================================
   Page structure
   ========================================================================== */

.sgp-main {
	display: block;
}

.sgp-pagehead {
	padding: clamp(2.5rem, 6vw, 4.5rem) var(--sgp-gutter) 0;
}

.sgp-pagehead h1,
.sgp-pagehead .wp-block-post-title {
	margin: 0;
}

.sgp-pagehead h1::after,
.sgp-pagehead .wp-block-post-title::after {
	content: "";
	display: block;
	width: 3.5rem;
	height: 3px;
	margin-top: 1.25rem;
	background: var(--sgp-gold);
}

.sgp-content {
	padding: 2rem var(--sgp-gutter) clamp(3.5rem, 8vw, 6rem);
}

.sgp-main--home .sgp-content {
	padding: 0 var(--sgp-gutter);
}

/* Full-width bands break out of the side gutter. */
.sgp-content > .alignfull {
	margin-inline: calc(var(--sgp-gutter) * -1) !important;
	max-width: none;
	width: auto;
}

.sgp-content > .alignfull,
.sgp-content > .alignfull + * {
	margin-block-start: 0;
}

.sgp-content > h2,
.sgp-content > .wp-block-heading:where(h2) {
	margin-block-start: 3rem;
	margin-block-end: 0;
}

.sgp-content > h3,
.sgp-content > .wp-block-heading:where(h3) {
	margin-block-start: 2rem;
	margin-block-end: 0;
}

.sgp-content > h2 + *,
.sgp-content > h3 + * {
	margin-block-start: 0.75rem;
}

.sgp-content > :first-child {
	margin-block-start: 0;
}

.sgp-content .wp-block-list {
	padding-inline-start: 1.25rem;
}

.sgp-content .wp-block-list li {
	margin-block: 0.4rem;
}

.sgp-content .wp-block-list li::marker {
	color: var(--sgp-gold);
}

/* ==========================================================================
   Type helpers
   ========================================================================== */

.sgp-eyebrow {
	margin: 0 0 0.75rem;
	color: var(--sgp-muted);
	font-family: var(--sgp-font-body);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	line-height: 1.4;
	text-transform: uppercase;
}

.sgp-eyebrow a {
	color: inherit;
}

.sgp-lede {
	font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.3rem);
	line-height: 1.55;
	color: var(--sgp-ink);
}

.sgp-more a {
	font-weight: 700;
}

.sgp-more a::after {
	content: " \2192" / "";
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.wp-block-buttons {
	gap: 0.75rem;
}

.wp-block-button__link,
.sgp-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0.75rem 1.35rem;
	border: 2px solid var(--sgp-navy);
	border-radius: var(--sgp-radius);
	background: var(--sgp-navy);
	color: var(--sgp-white);
	font-family: var(--sgp-font-body);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.wp-block-button__link:hover,
.sgp-button:hover {
	background: var(--sgp-navy-deep);
	border-color: var(--sgp-navy-deep);
	color: var(--sgp-white);
	text-decoration: none;
}

.wp-block-button.is-style-outline > .wp-block-button__link,
.sgp-button--secondary {
	background: transparent;
	color: var(--sgp-navy);
	border-color: var(--sgp-navy);
}

.wp-block-button.is-style-outline > .wp-block-button__link:hover,
.sgp-button--secondary:hover {
	background: var(--sgp-navy);
	color: var(--sgp-white);
}

.wp-element-button:focus-visible,
.sgp-button:focus-visible {
	outline: 3px solid var(--sgp-navy);
	outline-offset: 3px;
}

.sgp-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 1.75rem;
}

/* ==========================================================================
   Bands
   ========================================================================== */

.sgp-band {
	padding: clamp(3rem, 7vw, 5rem) var(--sgp-gutter);
}

.sgp-catalog-section.sgp-band + .sgp-band {
	padding-top: 0;
}

.sgp-band--white {
	background: var(--sgp-white);
	border-block: 1px solid var(--sgp-divider);
}

.sgp-band__inner {
	max-width: var(--sgp-wide);
	margin-inline: auto;
}

.sgp-band__inner > h2:first-child,
.sgp-section-wide > h2:first-child {
	margin-top: 0;
}

/* ==========================================================================
   Home hero
   ========================================================================== */

.sgp-hero {
	position: relative;
	overflow: hidden;
	padding-block: clamp(3.5rem, 9vw, 7rem) clamp(3rem, 7vw, 5.5rem);
	/* Content box lines up with the wide column used by the sections below. */
	/* The containing block is the gutter-padded content area, hence + 2 × gutter. */
	padding-inline: max(var(--sgp-gutter), calc((100% + 2 * var(--sgp-gutter) - var(--sgp-wide)) / 2));
	background: var(--sgp-paper);
}

.sgp-hero::before {
	content: "";
	position: absolute;
	right: max(-3rem, calc((100% - var(--sgp-wide)) / 2 - 5rem));
	bottom: -1px;
	width: min(34rem, 48vw);
	aspect-ratio: 400 / 520;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 520' fill='none'%3E%3Cpath d='M60 520V200a140 140 0 0 1 280 0v320' stroke='%230B2747' stroke-opacity='.09' stroke-width='14'/%3E%3Cpath d='M104 520V206a96 96 0 0 1 192 0v314' stroke='%230B2747' stroke-opacity='.06' stroke-width='5'/%3E%3Cpath d='M200.0 179.0L206.2 196.4L224.7 197.0L210.1 208.3L215.3 226.0L200.0 215.6L184.7 226.0L189.9 208.3L175.3 197.0L193.8 196.4Z' fill='%23C99732' fill-opacity='.7'/%3E%3C/svg%3E") no-repeat center bottom / contain;
	pointer-events: none;
}

.sgp-hero > * {
	position: relative;
	margin-inline: 0;
}

.sgp-hero .sgp-hero__title {
	max-width: 15ch;
	margin: 0;
	font-size: clamp(2.4rem, 1.4rem + 4vw, 4.25rem);
	line-height: 1.08;
	letter-spacing: -0.015em;
}

.sgp-hero .sgp-lede {
	max-width: 36rem;
	margin-top: 1.5rem;
}

.sgp-hero .sgp-eyebrow {
	margin-bottom: 1.25rem;
}

/* ==========================================================================
   Series feature (home)
   ========================================================================== */

.sgp-feature {
	display: grid;
	grid-template-columns: minmax(0, 1.55fr) minmax(15rem, 1fr);
	gap: clamp(2rem, 5vw, 4.5rem);
	align-items: center;
}

.sgp-feature > .sgp-feature__text,
.sgp-feature > .sgp-feature__panel {
	margin-block: 0;
}

.sgp-feature__text > h2 {
	margin-top: 0;
}

.sgp-feature__panel {
	padding: clamp(1.75rem, 4vw, 2.5rem);
	border-top: 4px solid var(--sgp-gold);
	border-radius: var(--sgp-radius);
	background: var(--sgp-navy);
	color: var(--sgp-on-navy);
}

.sgp-feature__panel > * {
	margin-block: 0;
}

.sgp-panel__label {
	color: var(--sgp-on-navy-muted);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.sgp-feature__panel .sgp-panel__figure {
	margin: 0.35rem 0 0.5rem;
	color: var(--sgp-gold);
	font-family: var(--sgp-font-heading);
	font-size: clamp(3.25rem, 2.5rem + 3vw, 4.75rem);
	line-height: 1;
}

.sgp-panel__note {
	color: var(--sgp-white);
	font-family: var(--sgp-font-heading);
	font-size: 1.2rem;
	line-height: 1.4;
}

/* ==========================================================================
   Cards and callouts
   ========================================================================== */

.sgp-section-wide > h2 {
	margin-bottom: 1.5rem;
}

.sgp-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
	gap: 1.25rem;
}

.sgp-cards > .sgp-card {
	margin: 0;
}

.sgp-card {
	padding: 1.5rem 1.5rem 1.35rem;
	border: 1px solid var(--sgp-divider);
	border-top: 3px solid var(--sgp-navy);
	border-radius: var(--sgp-radius);
	background: var(--sgp-white);
}

.sgp-card > * {
	margin-block: 0;
}

.sgp-card > * + * {
	margin-block-start: 0.6rem;
}

.sgp-card h3 {
	font-size: 1.25rem;
}

.sgp-card .sgp-more {
	margin-top: 1rem;
}

.sgp-callout {
	margin-block-start: 3rem;
	padding: clamp(1.5rem, 4vw, 2rem);
	border: 1px solid var(--sgp-divider);
	border-left: 4px solid var(--sgp-gold);
	border-radius: var(--sgp-radius);
	background: var(--sgp-white);
}

.sgp-content > .sgp-callout {
	margin-block-start: 3rem;
}

.sgp-callout > * {
	margin-block: 0;
}

.sgp-callout > * + * {
	margin-block-start: 0.75rem;
}

.sgp-callout h2 {
	font-size: 1.6rem;
}

.sgp-callout .wp-block-buttons {
	margin-top: 1.25rem;
}

/* ==========================================================================
   Catalog grid and book cards
   ========================================================================== */

.sgp-catalog-section > h2 {
	margin: 0 0 1.5rem;
}

.sgp-book-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 15rem));
	gap: 2.5rem 2rem;
	margin: 2rem 0 0;
	padding: 0;
	list-style: none;
}

.sgp-catalog-section .sgp-book-grid {
	margin-top: 0;
}

.sgp-book-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.sgp-book-card__cover .sgp-cover,
.sgp-book-card__cover .sgp-titlecard {
	width: 100%;
}

.sgp-book-card__body > * {
	margin: 0;
}

.sgp-book-card__number {
	color: var(--sgp-muted);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.sgp-book-card__title {
	margin-top: 0.3rem;
	font-size: 1.3rem;
	line-height: 1.25;
}

.sgp-book-card__title a {
	color: var(--sgp-navy);
	text-decoration: none;
}

.sgp-book-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.sgp-book-card:hover .sgp-book-card__title a {
	text-decoration: underline;
	text-decoration-color: var(--sgp-gold);
	text-decoration-thickness: 2px;
}

.sgp-book-card__subtitle {
	margin-top: 0.2rem;
	color: var(--sgp-muted);
	font-family: var(--sgp-font-heading);
	font-style: italic;
}

.sgp-book-card__meta {
	margin-top: 0.5rem;
	font-size: 0.9375rem;
	font-weight: 700;
}

.sgp-book-card__availability {
	margin-top: 0.25rem;
	color: var(--sgp-muted);
	font-size: 0.9375rem;
}

.sgp-catalog-empty {
	margin-top: 1.5rem;
	padding: 1.5rem;
	border: 1px solid var(--sgp-divider);
	border-radius: var(--sgp-radius);
	background: var(--sgp-white);
}

.sgp-catalog-empty p {
	margin: 0;
}

/* Covers keep their full, uncropped proportions; no added frames. */
.sgp-cover {
	display: block;
	width: 100%;
	height: auto;
}

/* Typographic panel (shown to editors when no cover is set). */
.sgp-titlecard {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.6em;
	aspect-ratio: 5.25 / 8;
	overflow: hidden;
	padding: 34% 14% 13%;
	border-radius: 3px;
	background: var(--sgp-navy);
	color: var(--sgp-paper);
	text-align: center;
	container-type: inline-size;
}

.sgp-titlecard::before {
	content: "";
	position: absolute;
	inset: 7% 9% 5%;
	border: 2px solid rgba(201, 151, 50, 0.6);
	border-bottom: 0;
	border-radius: 999px 999px 0 0;
}

.sgp-titlecard > span {
	position: relative;
}

.sgp-titlecard__series {
	color: var(--sgp-on-navy-muted);
	font-size: clamp(0.5rem, 4.6cqi, 0.75rem);
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1.3;
	text-transform: uppercase;
}

.sgp-titlecard__rule {
	width: 22%;
	height: 2px;
	background: var(--sgp-gold);
}

.sgp-titlecard__title {
	font-family: var(--sgp-font-heading);
	font-size: clamp(1rem, 12cqi, 2.1rem);
	line-height: 1.12;
	color: var(--sgp-white);
}

.sgp-titlecard__subtitle {
	font-family: var(--sgp-font-heading);
	font-size: clamp(0.7rem, 6.5cqi, 1.05rem);
	font-style: italic;
	line-height: 1.3;
}

.sgp-titlecard__author {
	margin-top: auto;
	color: var(--sgp-gold);
	font-size: clamp(0.65rem, 6cqi, 0.95rem);
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* ==========================================================================
   Title pages
   ========================================================================== */

.sgp-book {
	padding: clamp(2rem, 5vw, 3.5rem) var(--sgp-gutter) clamp(3.5rem, 8vw, 6rem);
}

.sgp-book > .alignwide {
	max-width: var(--sgp-wide);
}

.sgp-book-hero {
	display: grid;
	grid-template-columns: minmax(11rem, 20rem) minmax(0, 1fr);
	gap: clamp(1.75rem, 5vw, 4rem);
	align-items: start;
	padding-bottom: clamp(2rem, 5vw, 3rem);
	border-bottom: 1px solid var(--sgp-divider);
}

.sgp-book-hero__body > :first-child {
	margin-top: 0;
}

.sgp-book-title {
	margin: 0.25rem 0 0;
	font-size: clamp(2.2rem, 1.5rem + 2.6vw, 3.5rem);
	line-height: 1.08;
}

.sgp-book-subtitle {
	margin: 0.5rem 0 0;
	color: var(--sgp-muted);
	font-family: var(--sgp-font-heading);
	font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem);
	font-style: italic;
	line-height: 1.3;
}

.sgp-book-byline {
	margin: 1rem 0 0;
	font-weight: 700;
}

.sgp-book-facts {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 2.5rem;
	margin: 1.5rem 0 0;
	padding: 0.9rem 0;
	border-block: 1px solid var(--sgp-divider);
}

.sgp-book-facts dt,
.sgp-specs dt {
	color: var(--sgp-muted);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.sgp-book-facts dd {
	margin: 0.15rem 0 0;
	color: var(--sgp-navy);
	font-family: var(--sgp-font-heading);
	font-size: 1.35rem;
}

.sgp-book-blurb {
	margin: 1.5rem 0 0;
	font-size: 1.15rem;
	line-height: 1.6;
}

.sgp-book-availability {
	margin: 1rem 0 0;
	color: var(--sgp-muted);
}

.sgp-book-about {
	margin-block-start: clamp(2.5rem, 5vw, 3.5rem) !important;
}

.sgp-book-description > * {
	margin-block: 0;
}

.sgp-book-description > * + * {
	margin-block-start: 1.1rem;
}

.sgp-book-section {
	margin-top: 3rem;
}

.sgp-book-section > h2 {
	margin: 0 0 1rem;
}

.sgp-specs {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
	column-gap: 2rem;
	margin: 0;
	border-top: 1px solid var(--sgp-divider);
}

.sgp-specs > div {
	padding: 0.8rem 0;
	border-bottom: 1px solid var(--sgp-divider);
}

.sgp-specs dd {
	margin: 0.2rem 0 0;
	font-size: 1.0625rem;
}

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

.sgp-tags li {
	padding: 0.3rem 0.85rem;
	border: 1px solid var(--sgp-divider);
	border-radius: 999px;
	background: var(--sgp-white);
	font-size: 0.9375rem;
}

.sgp-question {
	margin: 1.25rem 0 0;
	padding: 1rem 1.25rem;
	border-left: 4px solid var(--sgp-gold);
	background: var(--sgp-white);
	font-family: var(--sgp-font-heading);
	font-size: 1.2rem;
	line-height: 1.45;
}

.sgp-question__label,
.sgp-subjects__label {
	display: block;
	margin-bottom: 0.25rem;
	color: var(--sgp-muted);
	font-family: var(--sgp-font-body);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.sgp-subjects,
.sgp-content-notes {
	margin: 0 0 1rem;
}

.sgp-series-nav {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
	gap: 1rem;
	margin-top: 3rem;
}

.sgp-series-nav a {
	display: block;
	padding: 1rem 1.25rem;
	border: 1px solid var(--sgp-divider);
	border-radius: var(--sgp-radius);
	background: var(--sgp-white);
	text-decoration: none;
}

.sgp-series-nav a:hover {
	border-color: var(--sgp-navy);
}

.sgp-series-nav__next {
	text-align: right;
}

.sgp-series-nav__label {
	display: block;
	color: var(--sgp-muted);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.sgp-series-nav__title {
	display: block;
	margin-top: 0.2rem;
	font-family: var(--sgp-font-heading);
	font-size: 1.2rem;
}

/* ==========================================================================
   Reading order
   ========================================================================== */

.sgp-reading-order {
	margin-top: 3rem;
}

.sgp-reading-order > h2 {
	margin: 0 0 1rem;
}

.sgp-order-list {
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--sgp-divider);
}

.sgp-order-list__item {
	display: grid;
	grid-template-columns: 5.5rem minmax(0, 1fr);
	gap: 1rem;
	align-items: baseline;
	padding: 0.9rem 0;
	border-bottom: 1px solid var(--sgp-divider);
}

.sgp-order-list__num {
	color: var(--sgp-muted);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.sgp-order-list__text a {
	font-family: var(--sgp-font-heading);
	font-size: 1.2rem;
}

.sgp-order-list__sub {
	display: block;
	color: var(--sgp-muted);
	font-family: var(--sgp-font-heading);
	font-style: italic;
}

/* ==========================================================================
   Tables and lists
   ========================================================================== */

.sgp-table-wrap {
	margin-top: 1.25rem;
	overflow-x: auto;
}

.sgp-table {
	width: 100%;
	border: 1px solid var(--sgp-divider);
	border-collapse: collapse;
	background: var(--sgp-white);
	font-size: 0.98rem;
	line-height: 1.5;
}

.sgp-table th,
.sgp-table td {
	padding: 0.75rem 1rem;
	border-bottom: 1px solid var(--sgp-divider);
	text-align: left;
	vertical-align: top;
}

.sgp-table thead th {
	background: var(--sgp-tint);
	color: var(--sgp-navy);
	font-size: 0.8125rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.sgp-table tbody th {
	color: var(--sgp-navy);
	font-weight: 700;
}

.sgp-table--facts tbody th {
	width: 38%;
	background: #FBF9F4;
}

.sgp-site-family {
	margin: 1.25rem 0 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--sgp-divider);
}

.sgp-site-family li {
	padding: 0.9rem 0;
	border-bottom: 1px solid var(--sgp-divider);
}

.sgp-site-family__name {
	display: block;
	color: var(--sgp-navy);
	font-family: var(--sgp-font-heading);
	font-size: 1.2rem;
}

.sgp-site-family__role {
	display: block;
	margin-top: 0.15rem;
	color: var(--sgp-muted);
}

/* ==========================================================================
   Author
   ========================================================================== */

.sgp-author {
	display: grid;
	grid-template-columns: minmax(10rem, 15rem) minmax(0, 1fr);
	gap: clamp(1.5rem, 4vw, 2.5rem);
	align-items: start;
}

.sgp-author > * {
	margin-block: 0;
}

.sgp-author__text > * {
	margin-block: 0;
}

.sgp-author__text > * + * {
	margin-block-start: 1rem;
}

.sgp-author__text > h3 + p {
	margin-block-start: 0.5rem;
}

.sgp-author__text > p + h3 {
	margin-block-start: 1.75rem;
}

.sgp-portrait {
	margin: 0;
}

.sgp-portrait__img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--sgp-radius);
	background: var(--sgp-tint);
}

/* ==========================================================================
   Contact form
   ========================================================================== */

.sgp-contact {
	margin-top: 1.75rem;
}

.sgp-form {
	max-width: 38rem;
	padding: clamp(1.25rem, 4vw, 2rem);
	border: 1px solid var(--sgp-divider);
	border-radius: 6px;
	background: var(--sgp-white);
}

.sgp-form__intro,
.sgp-form__privacy {
	margin: 0 0 1.25rem;
	color: var(--sgp-muted);
	font-size: 0.9375rem;
}

.sgp-form__privacy {
	margin: 0.25rem 0 1.25rem;
}

.sgp-field {
	margin: 0 0 1.25rem;
}

.sgp-field label {
	display: block;
	margin-bottom: 0.35rem;
	color: var(--sgp-ink);
	font-weight: 700;
}

.sgp-field input,
.sgp-field select,
.sgp-field textarea {
	box-sizing: border-box;
	width: 100%;
	min-height: 44px;
	padding: 0.65rem 0.8rem;
	border: 1px solid #737B84;
	border-radius: var(--sgp-radius);
	background: var(--sgp-white);
	color: var(--sgp-ink);
	font: inherit;
	font-size: 1rem;
	line-height: 1.5;
}

.sgp-field textarea {
	min-height: 10rem;
	resize: vertical;
}

.sgp-field input:focus-visible,
.sgp-field select:focus-visible,
.sgp-field textarea:focus-visible {
	outline: 3px solid var(--sgp-navy);
	outline-offset: 1px;
	border-color: var(--sgp-navy);
}

.sgp-field.has-error input,
.sgp-field.has-error select,
.sgp-field.has-error textarea {
	border: 2px solid var(--sgp-error);
}

.sgp-field__error {
	margin: 0 0 0.4rem;
	color: var(--sgp-error);
	font-size: 0.95rem;
	font-weight: 700;
}

.sgp-form__submit {
	margin: 0;
}

.sgp-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.sgp-notice {
	max-width: 38rem;
	margin: 0 0 1.5rem;
	padding: 1rem 1.25rem;
	border: 1px solid var(--sgp-divider);
	border-left-width: 5px;
	border-radius: var(--sgp-radius);
	background: var(--sgp-white);
}

.sgp-notice p,
.sgp-notice ul {
	margin: 0;
}

.sgp-notice ul {
	margin-top: 0.5rem;
	padding-left: 1.25rem;
}

.sgp-notice--success {
	border-left-color: var(--sgp-success);
}

.sgp-notice--error {
	border-left-color: var(--sgp-error);
}

.sgp-notice--error a {
	color: var(--sgp-error);
}

.sgp-contact-directory {
	margin-top: 3rem;
}

.sgp-contact-directory > h2 {
	margin: 0;
}

.sgp-contact-email,
.sgp-address,
.sgp-effective-date {
	margin: 1rem 0 0;
}

.sgp-address__label,
.sgp-effective-date {
	color: var(--sgp-muted);
	font-size: 0.9375rem;
	font-weight: 700;
}

/* ==========================================================================
   Reader band, signup, editor notes
   ========================================================================== */

.sgp-reader-band {
	padding: 1.75rem var(--sgp-gutter);
	background: var(--sgp-navy);
	color: var(--sgp-on-navy);
}

.sgp-reader-band p {
	margin: 0;
	font-family: var(--sgp-font-heading);
	font-size: 1.25rem;
}

.sgp-reader-band a {
	color: var(--sgp-white);
	text-decoration-color: var(--sgp-gold);
}

.sgp-signup {
	margin-top: 3rem;
	padding: clamp(1.5rem, 4vw, 2rem);
	border: 1px solid var(--sgp-divider);
	border-top: 3px solid var(--sgp-navy);
	border-radius: var(--sgp-radius);
	background: var(--sgp-white);
}

.sgp-signup h2 {
	margin-top: 0;
	font-size: 1.6rem;
}

.sgp-editor-hint {
	margin: 1rem 0;
	padding: 0.75rem 1rem;
	border: 1px dashed #A77716;
	border-radius: var(--sgp-radius);
	background: #FFF7E3;
	color: #4A3A12;
	font-family: var(--sgp-font-body);
	font-size: 0.875rem;
	line-height: 1.45;
}

.sgp-content > .alignfull > .sgp-editor-hint,
.sgp-content > .sgp-editor-hint {
	max-width: var(--sgp-content);
	margin-inline: auto;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.sgp-footer {
	padding: clamp(2.75rem, 6vw, 4rem) var(--sgp-gutter) 1.5rem;
	border-top: 4px solid var(--sgp-gold);
	background: var(--sgp-navy);
	color: var(--sgp-on-navy);
	font-size: 0.96rem;
}

.sgp-footer > * {
	margin-block: 0;
}

.sgp-footer__inner {
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr));
	gap: 2rem 3rem;
	max-width: var(--sgp-wide);
	margin-inline: auto;
}

.sgp-footer__inner > * {
	margin-block: 0;
}

.sgp-footer__brand > * {
	margin-block: 0;
}

.sgp-footer__brand > * + * {
	margin-block-start: 0.6rem;
}

.sgp-footer .sgp-footer__name {
	color: var(--sgp-white);
	font-family: var(--sgp-font-heading);
	font-size: 1.4rem;
}

.sgp-footer__brand p:not(.sgp-footer__name) {
	max-width: 24rem;
}

.sgp-footer__heading {
	margin: 0 0 0.75rem;
	color: var(--sgp-on-navy-muted);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.sgp-footer__col ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.sgp-footer__col li {
	margin: 0 0 0.45rem;
}

.sgp-footer a {
	color: var(--sgp-white);
	text-decoration-color: rgba(255, 255, 255, 0.4);
}

.sgp-footer a:hover {
	color: var(--sgp-white);
	text-decoration-color: var(--sgp-gold);
}

.sgp-footer :focus-visible,
.sgp-reader-band :focus-visible,
.sgp-feature__panel :focus-visible {
	outline-color: var(--sgp-gold);
}

.sgp-footer__legal {
	max-width: var(--sgp-wide);
	margin: 2.5rem auto 0 !important;
	padding-top: 1.25rem;
	border-top: 1px solid rgba(255, 255, 255, 0.18);
	color: var(--sgp-on-navy-muted);
	font-size: 0.875rem;
}

.sgp-footer__legal p {
	margin: 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 781px) {
	.sgp-feature,
	.sgp-book-hero,
	.sgp-footer__inner {
		grid-template-columns: minmax(0, 1fr);
	}

	.sgp-book-hero__cover {
		max-width: 15rem;
	}

	.sgp-author {
		grid-template-columns: minmax(0, 1fr);
	}

	.sgp-author .sgp-portrait {
		max-width: 14rem;
	}
}

@media (max-width: 599px) {
	.sgp-header__inner {
		min-height: 4.25rem;
	}

	.sgp-brand__svg {
		width: 2.1rem;
		height: 2.1rem;
	}

	.sgp-brand__name {
		font-size: 1.2rem;
	}

	.sgp-hero::before {
		display: none;
	}

	.sgp-book-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 2rem 1rem;
	}

	.sgp-book-card__title {
		font-size: 1.1rem;
	}

	.sgp-order-list__item {
		grid-template-columns: minmax(0, 1fr);
		gap: 0.1rem;
	}

	.sgp-series-nav__next {
		text-align: left;
	}

	.sgp-table--facts tbody th {
		width: auto;
	}

	.sgp-actions .sgp-button {
		flex: 1 1 100%;
	}
}

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

@media print {
	.sgp-header .sgp-nav,
	.sgp-footer__col,
	.sgp-reader-band,
	.sgp-actions,
	.sgp-form {
		display: none !important;
	}

	body,
	.sgp-footer {
		background: #fff;
		color: #000;
	}
}
