/*
Theme Name: Yacht Law Journal
Theme URI: https://example.com/
Author: The Yacht Law Journal
Description: A restrained editorial theme for The Yacht Law Journal, an independent publication on yacht law. Topic-led archive, serif reading column, no external requests.
Version: 1.2.0
Requires at least: 5.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: yacht-law-journal
*/

/* ==========================================================================
   1. Design tokens (the only place colours, type and spacing are defined)
   ========================================================================== */
:root {
	/* Colour */
	--navy: #0f2338;            /* text, headings, dark bands */
	--navy-soft: #1b3350;       /* hover on dark */
	--cream: #f7f4ee;           /* page background */
	--cream-deep: #efeadf;      /* tinted bands */
	--white: #ffffff;           /* cards */
	--brass: #9a7b3f;           /* accent: rules, borders, hover lines */
	--brass-text: #7a5f2a;      /* accent for TEXT on light backgrounds (AA contrast) */
	--brass-light: #d3b777;     /* accent for text on navy */
	--grey-700: #3f4a58;
	--grey-600: #566170;        /* secondary text */
	--grey-300: #d9d3c5;        /* hairlines */
	--grey-200: #e6e1d5;
	--error: #8c1d18;
	--ok: #1f5c3a;

	/* Type (system fonts only: no external requests) */
	--serif: Georgia, "Iowan Old Style", Cambria, "Times New Roman", serif;
	--sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

	/* 8px grid */
	--s1: 8px;
	--s2: 16px;
	--s3: 24px;
	--s4: 32px;
	--s5: 40px;
	--s6: 48px;
	--s8: 64px;
	--s10: 80px;
	--s12: 96px;

	--wrap: 1160px;
	--narrow: 760px;
	--measure: 62ch;
	--line: 1px solid var(--grey-300);
	--radius: 2px;
}

/* ==========================================================================
   2. Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--cream);
	color: var(--navy);
	font-family: var(--serif);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	overflow-wrap: break-word;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}
.site-main { flex: 1 0 auto; }
.site-footer { flex-shrink: 0; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration-color: var(--brass); text-underline-offset: 3px; transition: color .15s ease, text-decoration-color .15s ease; }
a:hover { color: var(--brass-text); }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; }
.site-footer :focus-visible, .cover :focus-visible { outline-color: var(--brass-light); }
main:focus { outline: none; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 var(--s2); color: var(--navy); letter-spacing: -0.005em; }
p { margin: 0 0 var(--s2); }
ul, ol { padding-left: 1.25em; }
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
	clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
	position: absolute; left: var(--s2); top: -100px; z-index: 100; background: var(--navy); color: var(--cream);
	padding: var(--s1) var(--s2); font-family: var(--sans); font-size: 15px; text-decoration: none;
}
.skip-link:focus { top: var(--s2); color: var(--cream); }

.container { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-left: var(--s3); padding-right: var(--s3); }
.container-narrow { max-width: calc(var(--narrow) + var(--s6)); }

/* Shared small elements */
.meta, .topic-label, .eyebrow, .chip, .button, .section-link, .text-link, .nav-label, .subtopic-count, .topic-card-count,
.field label, .form-note, .field-error, .legal-note, .site-header, .site-footer, .pagination, .author-box-label {
	font-family: var(--sans);
}
.meta { font-size: 14px; color: var(--grey-600); margin: 0; display: flex; flex-wrap: wrap; gap: 0 var(--s1); align-items: baseline; }
.article-card .meta-author { flex-basis: 100%; }
.article-card .meta-author + .meta-sep { display: none; }
.meta a { color: var(--grey-600); text-decoration: none; }
.meta a:hover { color: var(--brass-text); text-decoration: underline; }
.meta-sep { color: var(--brass); }
.topic-label, .eyebrow {
	font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--brass-text); margin: 0 0 var(--s1);
}
.topic-label a, .eyebrow a { color: inherit; text-decoration: none; }
.topic-label a:hover, .eyebrow a:hover { text-decoration: underline; }
.text-link, .section-link { font-size: 15px; font-weight: 600; color: var(--navy); text-decoration: underline; text-decoration-color: var(--brass); text-underline-offset: 4px; }
.empty-note { color: var(--grey-600); font-style: italic; }

/* ==========================================================================
   3. Header and navigation (mobile first)
   ========================================================================== */
.site-header { background: var(--cream); border-bottom: var(--line); position: relative; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; min-height: 72px; gap: var(--s2); }
.brand-name {
	font-family: var(--serif); font-size: 18px; font-weight: 700; letter-spacing: -0.01em; color: var(--navy); text-decoration: none; line-height: 1.2; display: inline-block;
}
.brand-name:hover { color: var(--navy); }
.custom-logo-link { display: block; }
.custom-logo { max-height: 52px; width: auto; display: block; }
.nav-toggle {
	display: none; align-items: center; gap: var(--s1); background: none; border: 1px solid var(--grey-300); color: var(--navy);
	font: 600 14px/1 var(--sans); padding: 12px var(--s2); min-height: 44px; cursor: pointer; border-radius: var(--radius);
}
.nav-toggle:hover { border-color: var(--brass); }
.nav-toggle-icon, .nav-toggle-icon::before, .nav-toggle-icon::after { display: block; width: 18px; height: 2px; background: var(--navy); position: relative; }
.nav-toggle-icon::before, .nav-toggle-icon::after { content: ""; position: absolute; left: 0; }
.nav-toggle-icon::before { top: -6px; }
.nav-toggle-icon::after { top: 6px; }
.primary-nav { width: 100%; }
.primary-nav .menu, .footer-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 var(--s3); }
.primary-nav a, .footer-nav a { font-family: var(--sans); font-size: 14px; font-weight: 500; letter-spacing: .02em; text-decoration: none; display: block; padding: 12px 0; color: var(--navy); }
.primary-nav a { border-bottom: 2px solid transparent; }
.primary-nav a:hover { color: var(--brass-text); border-bottom-color: var(--brass); }
.primary-nav .current-menu-item > a, .primary-nav .current_page_item > a, .primary-nav .current-menu-ancestor > a, .primary-nav .current_page_parent > a, .primary-nav a[aria-current="page"] { border-bottom-color: var(--brass); }

/* Collapse only when JS can reopen it */
.js .nav-toggle { display: inline-flex; }
.js .primary-nav { display: none; }
.js .primary-nav.is-open { display: block; padding-bottom: var(--s2); }
.js .primary-nav .menu { flex-direction: column; gap: 0; }
.js .primary-nav li { border-top: var(--line); }
.js .primary-nav a { padding: 14px 0; border-bottom: 0; }
.js .primary-nav .current-menu-item > a, .js .primary-nav a[aria-current="page"] { color: var(--brass-text); font-weight: 600; }
.no-js-fallback { display: block; }

@media (min-width: 56em) {
	.js .nav-toggle { display: none; }
	.js .primary-nav, .primary-nav { display: block; width: auto; padding: 0; }
	.js .primary-nav .menu { flex-direction: row; gap: 0 var(--s4); }
	.js .primary-nav li { border-top: 0; }
	.js .primary-nav a, .primary-nav a { padding: 28px 0 24px; border-bottom: 2px solid transparent; }
	.js .primary-nav a:hover, .primary-nav a:hover { border-bottom-color: var(--brass); }
	.js .primary-nav .current-menu-item > a, .js .primary-nav a[aria-current="page"] { border-bottom-color: var(--brass); font-weight: 500; color: var(--navy); }
	.header-inner { flex-wrap: nowrap; min-height: 80px; }
	.brand-name { font-size: 22px; }
	.custom-logo { max-height: 64px; }
}

/* ==========================================================================
   4. Front page: cover, sections
   ========================================================================== */
.cover { background: var(--navy); color: var(--cream); border-bottom: 4px solid var(--brass); }
.cover-inner { padding-top: var(--s8); padding-bottom: var(--s8); }
.cover-title { color: var(--cream); font-size: clamp(2.25rem, 7vw, 4rem); font-weight: 600; margin-bottom: var(--s2); max-width: 16ch; line-height: 1.08; }
.cover-subtitle { font-size: clamp(1.15rem, 3vw, 1.5rem); color: var(--brass-light); margin-bottom: var(--s2); max-width: 36ch; line-height: 1.35; }
.cover-text { max-width: 56ch; color: #dfe4ea; font-size: 1.0625rem; margin: 0; }

.section { padding: var(--s8) 0; }
.section-tint { background: var(--cream-deep); border-top: var(--line); border-bottom: var(--line); }
.section-plain { padding: var(--s4) 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: var(--s1) var(--s3); margin-bottom: var(--s4); padding-bottom: var(--s2); border-bottom: 1px solid var(--brass); }
.section-title { font-size: 1.5rem; margin-bottom: var(--s4); padding-bottom: var(--s2); border-bottom: 1px solid var(--brass); display: block; }
.section-head .section-title { margin: 0; padding: 0; border: 0; flex: 1 1 auto; }

/* Featured */
.featured { display: grid; gap: var(--s3); }
.featured-media { display: block; background: var(--navy); overflow: hidden; text-decoration: none; }
.featured-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.thumb-placeholder {
	display: flex; align-items: flex-end; width: 100%; aspect-ratio: 16 / 10; padding: var(--s3); background: var(--navy);
	background-image: repeating-linear-gradient(0deg, transparent 0, transparent 31px, rgba(211, 183, 119, .22) 31px, rgba(211, 183, 119, .22) 32px);
	color: var(--brass-light); font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
}
.featured-title { font-size: clamp(1.6rem, 4.5vw, 2.125rem); line-height: 1.15; margin-bottom: var(--s2); }
.featured-title a, .article-card-title a, .article-row-title a { text-decoration: none; color: var(--navy); }
.featured-title a:hover, .article-card-title a:hover, .article-row-title a:hover { color: var(--brass-text); text-decoration: underline; text-decoration-color: var(--brass); }
.featured-excerpt { font-size: 1.125rem; color: var(--grey-700); max-width: 60ch; }
@media (min-width: 56em) {
	.featured { grid-template-columns: 1.1fr 1fr; gap: var(--s6); align-items: center; }
}

/* Cards */
.card-grid { display: grid; gap: var(--s4); grid-template-columns: 1fr; }
.article-card { background: var(--white); border: var(--line); border-top: 3px solid var(--brass); padding: var(--s3); display: flex; flex-direction: column; }
.article-card-thumb { margin: calc(var(--s3) * -1) calc(var(--s3) * -1) var(--s2); display: block; }
.article-card-thumb img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.article-card-title { font-size: 1.25rem; line-height: 1.25; margin-bottom: var(--s1); }
.article-card-excerpt { font-size: 15.5px; color: var(--grey-700); margin-bottom: var(--s2); flex: 1 1 auto; }
@media (min-width: 40em) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 72em) { .card-grid { grid-template-columns: repeat(4, 1fr); } .card-grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 40em) and (max-width: 71.99em) { .card-grid-3 { grid-template-columns: repeat(2, 1fr); } }

/* Topic cards */
.topic-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); grid-template-columns: repeat(2, 1fr); }
.topic-card {
	display: flex; flex-direction: column; justify-content: space-between; gap: var(--s2); min-height: 104px; height: 100%;
	background: var(--white); border: var(--line); padding: var(--s2); text-decoration: none; color: var(--navy);
	transition: border-color .15s ease, background-color .15s ease;
}
.topic-card:hover { border-color: var(--brass); color: var(--navy); }
.topic-card:hover .topic-card-name { color: var(--brass-text); }
.topic-card-name { font-family: var(--serif); font-size: 1.05rem; font-weight: 600; line-height: 1.25; }
.topic-card-count { font-size: 13px; color: var(--grey-600); letter-spacing: .02em; }
@media (min-width: 36em) { .topic-card { padding: var(--s3); min-height: 112px; } .topic-card-name { font-size: 1.2rem; } }
@media (min-width: 56em) { .topic-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 72em) { .topic-grid { grid-template-columns: repeat(4, 1fr); } }

/* Briefing (phase two, disabled by flag) */
.section-briefing { background: var(--navy); color: var(--cream); }
.section-briefing h2 { color: var(--cream); }

/* ==========================================================================
   5. Page headers, lists, chips, pagination
   ========================================================================== */
.page-header { padding: var(--s8) 0 var(--s5); }
.page-title { font-size: clamp(2rem, 5.5vw, 3rem); margin-bottom: var(--s2); max-width: 22ch; }
.page-lede { font-size: 1.1875rem; color: var(--grey-700); max-width: 60ch; margin-bottom: var(--s2); }
.page-lede p:last-child { margin-bottom: 0; }
.page-lede-large { font-size: clamp(1.25rem, 3vw, 1.5rem); line-height: 1.45; color: var(--navy); max-width: 44ch; }
.page-header .search-form { margin-top: var(--s3); max-width: 480px; }
.page-header .meta { margin-top: var(--s2); }

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s1); }
.topic-filter { margin-top: var(--s3); }
.chip {
	display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 500; text-decoration: none; color: var(--navy);
	background: transparent; border: 1px solid var(--grey-300); padding: 8px 14px; min-height: 40px; border-radius: 999px;
	transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}
.chip:hover { border-color: var(--brass); color: var(--brass-text); background: var(--white); }
.chip.is-current, .chip[aria-current="page"] { background: var(--navy); color: var(--cream); border-color: var(--navy); }
.chip-count { color: var(--grey-600); font-size: 12px; }
.chips-topics { margin-bottom: var(--s3); }

.article-list { border-top: 1px solid var(--brass); }
.article-row { display: grid; gap: var(--s2); padding: var(--s4) 0; border-bottom: var(--line); }
.article-row-title { font-size: clamp(1.35rem, 3.5vw, 1.75rem); line-height: 1.2; margin-bottom: var(--s1); }
.article-row-excerpt { color: var(--grey-700); max-width: 62ch; margin-bottom: var(--s2); }
.article-row-thumb img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
@media (min-width: 48em) {
	.article-row:has(.article-row-thumb) { grid-template-columns: 1fr 240px; gap: var(--s5); align-items: start; }
}

.pagination { margin: var(--s6) 0 var(--s8); }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: var(--s1); align-items: center; }
.pagination .page-numbers {
	font-size: 14px; text-decoration: none; color: var(--navy); border: 1px solid var(--grey-300); padding: 10px 16px; min-width: 44px; min-height: 44px;
	display: inline-flex; align-items: center; justify-content: center;
}
.pagination a.page-numbers:hover { border-color: var(--brass); color: var(--brass-text); }
.pagination .current { background: var(--navy); color: var(--cream); border-color: var(--navy); }
.pagination .dots { border-color: transparent; }

/* Topics page */
.topic-tree { display: grid; gap: var(--s5) var(--s6); grid-template-columns: 1fr; padding-bottom: var(--s8); }
.topic-block { background: var(--white); border: var(--line); border-top: 3px solid var(--brass); padding: var(--s3); }
.topic-block-title { font-size: 1.5rem; margin-bottom: var(--s1); }
.topic-block-title a { text-decoration: none; }
.topic-block-title a:hover { text-decoration: underline; text-decoration-color: var(--brass); }
.topic-block-desc { margin: var(--s2) 0 0; color: var(--grey-700); font-size: 15.5px; }
.subtopic-list { list-style: none; margin: var(--s2) 0 0; padding: 0; border-top: var(--line); }
.subtopic-list li { padding: 10px 0; border-bottom: var(--line); font-family: var(--sans); font-size: 15px; }
.subtopic-list li a { text-decoration: none; }
.subtopic-list li a:hover { color: var(--brass-text); text-decoration: underline; }
.subtopic-list .subtopic-list { margin: 10px 0 0 var(--s2); border-top: 0; }
.subtopic-list .subtopic-list li { border: 0; padding: 4px 0; }
.subtopic-count { color: var(--grey-600); font-size: 13px; margin-left: 6px; }
@media (min-width: 48em) { .topic-tree { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 72em) { .topic-tree { grid-template-columns: repeat(3, 1fr); } }

/* About, contributors */
.founder { padding-bottom: var(--s4); }
.founder-card { display: grid; gap: var(--s3); background: var(--white); border: var(--line); border-top: 3px solid var(--brass); padding: var(--s4); max-width: 820px; }
.founder-name { font-size: 1.5rem; font-weight: 600; margin: 0; }
.founder-role { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--brass-text); margin: 4px 0 var(--s2); }
.founder-body p { color: var(--grey-700); }
.founder-body p.founder-name { color: var(--navy); }
.founder-body p.founder-role { color: var(--brass-text); }
.founder-body .entry-content p { color: var(--navy); }
@media (min-width: 40em) { .founder-card { grid-template-columns: 96px 1fr; gap: var(--s4); } }
.about-links { padding-bottom: var(--s8); }
.author-initials {
	display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 56px; height: 56px; border-radius: 50%;
	background: var(--navy); color: var(--brass-light); font-family: var(--sans); font-size: 16px; font-weight: 600; letter-spacing: .04em;
}
.author-photo { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.author-box-role, .contributor-role { font-family: var(--sans); font-size: 13px; color: var(--grey-600); margin: 0 0 var(--s1); }
.author-box-link { margin: var(--s1) 0 0; }
.author-initials-lg { width: 88px; height: 88px; font-size: 24px; }
.author-initials-lg { width: 88px; height: 88px; font-size: 24px; }
.contributor-grid { list-style: none; margin: 0; padding: 0 0 var(--s8); display: grid; gap: var(--s3); grid-template-columns: 1fr; }
.contributor { display: flex; gap: var(--s3); background: var(--white); border: var(--line); border-top: 3px solid var(--brass); padding: var(--s3); }
.contributor-name { font-size: 1.25rem; margin-bottom: 4px; }
.contributor-name a { text-decoration: none; }
.contributor p:last-child { margin: var(--s1) 0 0; color: var(--grey-700); font-size: 15.5px; }
@media (min-width: 48em) { .contributor-grid { grid-template-columns: repeat(2, 1fr); } }
.note-box { background: var(--white); border: var(--line); border-left: 3px solid var(--brass); padding: var(--s3); max-width: 640px; margin-bottom: var(--s8); }
.note-box p:last-child { margin-bottom: 0; }

/* ==========================================================================
   6. Single article
   ========================================================================== */
.article-header { padding: var(--s8) 0 var(--s4); }
.article-title { font-size: clamp(2rem, 5.5vw, 3.125rem); line-height: 1.12; margin-bottom: var(--s3); }
.article-standfirst { font-size: clamp(1.125rem, 2.6vw, 1.375rem); line-height: 1.5; color: var(--grey-700); margin-bottom: var(--s3); }
.article-figure { margin: 0 0 var(--s5); }
.article-figure img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.article-figure figcaption { font-family: var(--sans); font-size: 13px; color: var(--grey-600); padding-top: var(--s1); }

.entry-content { font-size: 1.125rem; line-height: 1.75; max-width: var(--measure); }
.entry-content > * { max-width: 100%; }
.entry-content h2 { font-size: 1.75rem; margin: var(--s6) 0 var(--s2); }
.entry-content h3 { font-size: 1.375rem; margin: var(--s5) 0 var(--s2); }
.entry-content h4 { font-size: 1.125rem; margin: var(--s4) 0 var(--s1); }
.entry-content a { text-decoration: underline; text-decoration-color: var(--brass); text-decoration-thickness: 1px; }
.entry-content a:hover { text-decoration-thickness: 2px; }
.entry-content ul, .entry-content ol { margin: 0 0 var(--s3); padding-left: 1.4em; }
.entry-content li { margin-bottom: 6px; }
.entry-content blockquote {
	margin: var(--s4) 0; padding: var(--s1) 0 var(--s1) var(--s3); border-left: 3px solid var(--brass); font-size: 1.25rem; line-height: 1.5; font-style: italic; color: var(--navy);
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content blockquote cite { display: block; margin-top: var(--s1); font: normal 14px var(--sans); color: var(--grey-600); }
.entry-content img { height: auto; }
.entry-content figure { margin: var(--s4) 0; }
.entry-content figcaption { font-family: var(--sans); font-size: 13px; color: var(--grey-600); padding-top: var(--s1); }
.entry-content table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 15px; margin: var(--s3) 0; }
.entry-content th, .entry-content td { border-bottom: var(--line); padding: 10px 12px 10px 0; text-align: left; vertical-align: top; }
.entry-content hr { border: 0; border-top: 1px solid var(--brass); margin: var(--s5) 0; width: 64px; }
.entry-content pre, .entry-content code { font-size: .9em; background: var(--cream-deep); }
.entry-content pre { padding: var(--s2); overflow-x: auto; }
.entry-content .alignleft { float: left; margin: 0 var(--s3) var(--s2) 0; }
.entry-content .alignright { float: right; margin: 0 0 var(--s2) var(--s3); }
.entry-content .aligncenter { margin-left: auto; margin-right: auto; }
.entry-content-intro { margin-bottom: var(--s5); }
.page-links { font-family: var(--sans); font-size: 14px; margin: var(--s3) 0; }

.legal-note { margin: var(--s6) 0 var(--s4); padding: var(--s2) var(--s3); background: var(--cream-deep); border-left: 3px solid var(--brass); font-size: 14.5px; line-height: 1.55; color: var(--grey-700); max-width: var(--measure); }
.legal-note p { margin: 0; }
.legal-note strong { color: var(--navy); }

.author-box { display: flex; gap: var(--s3); border-top: 1px solid var(--brass); padding: var(--s4) 0 var(--s8); max-width: var(--measure); }
.author-box-label { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--brass-text); margin: 0 0 4px; }
.author-box-name { font-size: 1.25rem; font-weight: 600; margin: 0 0 var(--s1); }
.author-box-name a { text-decoration: none; }
.author-box-name a:hover { text-decoration: underline; text-decoration-color: var(--brass); }
.author-box-bio { color: var(--grey-700); font-size: 16px; margin: 0; }

.post-navigation { margin: 0 0 var(--s8); padding-top: var(--s3); border-top: var(--line); }
.post-navigation .nav-links { display: grid; gap: var(--s3); }
.post-navigation a { text-decoration: none; display: block; }
.post-navigation .nav-label { display: block; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--brass-text); margin-bottom: 4px; }
.post-navigation .nav-title { font-family: var(--serif); font-size: 1.125rem; font-weight: 600; line-height: 1.3; }
.post-navigation a:hover .nav-title { color: var(--brass-text); text-decoration: underline; text-decoration-color: var(--brass); }
@media (min-width: 48em) {
	.post-navigation .nav-links { grid-template-columns: 1fr 1fr; gap: var(--s6); }
	.post-navigation .nav-next { text-align: right; grid-column: 2; }
	.post-navigation .nav-previous { grid-column: 1; }
}

/* ==========================================================================
   7. Contact form
   ========================================================================== */
.route-grid { list-style: none; margin: 0 0 var(--s6); padding: 0; display: grid; gap: var(--s3); grid-template-columns: 1fr; }
.route { background: var(--white); border: var(--line); border-top: 3px solid var(--brass); padding: var(--s3); display: flex; flex-direction: column; }
.route-title { font-size: 1.25rem; }
.route p { color: var(--grey-700); font-size: 15.5px; flex: 1 1 auto; }
@media (min-width: 48em) { .route-grid { grid-template-columns: repeat(3, 1fr); } }
.contact-section { padding-bottom: var(--s10); max-width: 640px; }
.contact-form .field { margin-bottom: var(--s3); }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--navy); }
.req { color: var(--error); }
input[type="text"], input[type="email"], input[type="search"], select, textarea {
	width: 100%; font: 16px/1.4 var(--sans); color: var(--navy); background: var(--white); border: 1px solid #8a93a0; border-radius: var(--radius);
	padding: 12px 14px; min-height: 48px; transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { min-height: 160px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--navy); outline: 3px solid var(--brass); outline-offset: 1px; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--error); border-width: 2px; }
.field-error { color: var(--error); font-size: 14px; margin: 6px 0 0; }
.field-check { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; }
.field-check input { width: 24px; height: 24px; min-height: 0; margin: 2px 0 0; accent-color: var(--navy); }
.field-check label { font-weight: 400; font-size: 14.5px; margin: 0; }
.field-check .field-error { grid-column: 2; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: 14px; color: var(--grey-600); margin-bottom: var(--s3); }
.button {
	display: inline-flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; letter-spacing: .02em; min-height: 48px;
	padding: 12px var(--s4); background: var(--navy); color: var(--cream); border: 1px solid var(--navy); border-radius: var(--radius); cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease;
}
.button:hover { background: var(--navy-soft); border-color: var(--brass); color: var(--cream); }
.form-status { padding: var(--s2) var(--s3); margin-bottom: var(--s3); border-left: 4px solid; background: var(--white); font-family: var(--sans); font-size: 15px; }
.form-status p { margin: 0 0 6px; }
.form-status p:last-child { margin-bottom: 0; }
.form-status ul { margin: 6px 0 0; padding-left: 1.2em; }
.form-status-ok { border-color: var(--ok); }
.form-status-error { border-color: var(--error); }
.form-status-error a { color: var(--error); }
.form-status-wrap:focus { outline: none; }

.search-form { display: flex; gap: var(--s1); }
.search-form .search-field { flex: 1 1 auto; }
.search-form .button { padding-left: var(--s3); padding-right: var(--s3); }

/* ==========================================================================
   8. Footer
   ========================================================================== */
.site-footer { background: var(--navy); color: #d5dbe3; margin-top: var(--s4); border-top: 4px solid var(--brass); }
.site-footer a { color: var(--cream); text-decoration-color: var(--brass-light); }
.site-footer a:hover { color: var(--brass-light); }
.footer-grid { display: grid; gap: var(--s4); padding-top: var(--s8); padding-bottom: var(--s5); }
.footer-about .footer-brand { font-family: var(--serif); font-size: 1.375rem; font-weight: 600; color: var(--cream); margin-bottom: var(--s1); }
.footer-about p { max-width: 42ch; font-size: 15px; font-family: var(--sans); }
.footer-nav a { color: var(--cream); text-decoration: none; padding: 6px 0; }
.footer-nav a:hover { color: var(--brass-light); text-decoration: underline; }
.footer-nav .menu { gap: 0 var(--s3); }
.footer-legal { padding-bottom: var(--s4); font-family: var(--sans); font-size: 13.5px; }
.footer-legal::before { content: ""; display: block; border-top: 1px solid rgba(255, 255, 255, .18); margin-bottom: var(--s3); }
.footer-legal p { margin: 0 0 6px; }
.footer-legal .meta-sep { color: var(--brass-light); padding: 0 4px; }
@media (min-width: 48em) { .footer-grid { grid-template-columns: 1.2fr 1fr; align-items: start; } .footer-nav .menu { justify-content: flex-end; } }

/* ==========================================================================
   9. Motion and print
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
	@page { margin: 2cm; }
	body { background: #fff; color: #000; font-size: 11pt; line-height: 1.55; }
	.site-header, .site-footer, .skip-link, .post-navigation, .section-tint, .nav-toggle, .search-form, .legal-note + .author-box .author-initials { display: none !important; }
	.container, .container-narrow { max-width: none; padding: 0; }
	.article-header { padding: 0 0 12pt; }
	.article-title { font-size: 24pt; }
	.entry-content { font-size: 11pt; max-width: none; }
	.entry-content a { color: #000; text-decoration: none; }
	.entry-content a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; word-break: break-all; }
	.entry-content blockquote, .entry-content figure, .entry-content table { break-inside: avoid; }
	.entry-content h2, .entry-content h3 { break-after: avoid; }
	.legal-note { background: none; border: 1px solid #999; }
	.author-box { padding-bottom: 0; }
}

/* ==========================================================================
   10. Version 1.2.0: cover art, opening-soon state, article reading, topics, footer
   ========================================================================== */

/* Cover: text left, quiet nautical chart right (decorative, hidden on small screens) */
.cover { position: relative; overflow: hidden; }
.cover-inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); align-items: center; }
.cover-art-wrap { display: none; }
@media (min-width: 48em) {
	.cover-inner { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: var(--s6); }
	.cover-art-wrap { display: flex; justify-content: flex-end; }
	.cover-art { display: block; width: 100%; max-width: 380px; height: auto; }
}
@media (min-width: 72em) { .cover-art { max-width: 420px; } }

/* Opening soon (no published articles) */
.opening-soon { background: var(--cream); }
.opening-grid { display: grid; gap: var(--s6); grid-template-columns: minmax(0, 1fr); align-items: start; }
.opening-title { font-size: clamp(1.75rem, 4.5vw, 2.5rem); line-height: 1.15; margin-bottom: var(--s2); }
.opening-text { font-size: 1.125rem; color: var(--grey-700); max-width: 52ch; margin-bottom: var(--s3); }
.opening-links { font-family: var(--sans); display: flex; flex-wrap: wrap; gap: var(--s1) var(--s2); align-items: baseline; margin: 0; }
.opening-topics { background: var(--white); border: var(--line); border-top: 3px solid var(--brass); padding: var(--s3); }
.opening-topics-title { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--brass-text); margin-bottom: var(--s2); }
.topic-list { list-style: none; margin: 0; padding: 0; columns: 1; column-gap: var(--s4); }
.topic-list li { break-inside: avoid; border-bottom: var(--line); }
.topic-list a { display: block; padding: 10px 0; font-size: 1.05rem; text-decoration: none; }
.topic-list a:hover { color: var(--brass-text); text-decoration: underline; text-decoration-color: var(--brass); }
@media (min-width: 40em) { .topic-list { columns: 2; } }
@media (min-width: 56em) { .opening-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s8); } .opening-topics { padding: var(--s4); } }
.topic-card:hover { box-shadow: 0 1px 0 var(--brass); }

/* Topic and archive pages */
.page-header-topic .page-title { max-width: 24ch; font-size: clamp(2.25rem, 6vw, 3.5rem); }
.page-header-topic .page-lede { font-size: 1.1875rem; line-height: 1.6; }
.card-grid-2 { grid-template-columns: 1fr; }
@media (min-width: 40em) { .card-grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 72em) { .card-grid-2 { grid-template-columns: repeat(2, 1fr); } }
.card-grid-2 + .pagination { margin-top: var(--s6); }
.empty-state { padding-bottom: var(--s8); }
.empty-state .empty-note { font-size: 1.125rem; margin-bottom: var(--s3); }
.empty-lead { font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--grey-600); margin-bottom: var(--s1); }
.empty-state .topic-filter { margin-top: var(--s1); }

/* Cards: hover and keyboard focus */
.article-card { transition: border-color .15s ease, box-shadow .15s ease; }
.article-card:hover, .article-card:focus-within { border-color: var(--brass); box-shadow: 0 2px 10px rgba(15, 35, 56, .08); }
.article-card:hover .article-card-title a { color: var(--brass-text); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; }
.cover a:focus-visible, .site-footer a:focus-visible { outline-color: var(--brass-light); }

/* Single article */
.article-header { padding: var(--s6) 0 var(--s3); }
.article-title { font-size: clamp(2rem, 5.2vw, 3rem); line-height: 1.12; max-width: 22ch; }
.article-standfirst { font-family: var(--serif); font-style: normal; font-size: clamp(1.125rem, 2.4vw, 1.3125rem); line-height: 1.5; color: var(--grey-700); max-width: 52ch; margin-bottom: var(--s3); }
.article-byline { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s2); padding: var(--s2) 0; border-top: var(--line); border-bottom: var(--line); }
.article-byline .meta { font-size: 14.5px; }
.print-button {
	font: 600 13px/1 var(--sans); letter-spacing: .02em; color: var(--navy); background: transparent; border: 1px solid var(--grey-300); border-radius: var(--radius);
	padding: 10px 16px; min-height: 40px; cursor: pointer; transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}
.print-button:hover { border-color: var(--brass); color: var(--brass-text); background: var(--white); }
.entry-content { font-size: 1.125rem; line-height: 1.65; max-width: var(--measure); padding-top: var(--s4); }
@media (min-width: 48em) { .entry-content { font-size: 19.5px; } }
.entry-content p { margin-bottom: 1.1em; }
.entry-content h2 { font-size: 1.625rem; line-height: 1.25; margin: 2em 0 .6em; padding-top: var(--s2); border-top: 1px solid var(--grey-300); }
.entry-content h2:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.entry-content h3 { font-size: 1.3rem; line-height: 1.3; margin: 1.7em 0 .5em; }
.entry-content a { color: var(--navy); text-decoration: underline; text-decoration-color: var(--brass); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.entry-content a:hover { color: var(--brass-text); text-decoration-thickness: 2px; }
.entry-content blockquote { font-size: 1.15em; line-height: 1.5; margin: 1.6em 0; padding: var(--s1) 0 var(--s1) var(--s3); background: none; }
.entry-content ul, .entry-content ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.entry-content li { margin-bottom: .4em; }
.entry-content li::marker { color: var(--brass-text); }

.legal-trust { margin: var(--s6) 0 var(--s4); padding: var(--s3); background: var(--cream-deep); border-left: 3px solid var(--brass); font-family: var(--sans); font-size: 14.5px; line-height: 1.6; color: var(--grey-700); max-width: 740px; }
.legal-trust p { margin: 0 0 var(--s1); }
.legal-trust p:last-child { margin-bottom: 0; }
.legal-trust strong { color: var(--navy); font-weight: 600; }
.legal-trust a { color: var(--navy); text-decoration-color: var(--brass); }
.legal-trust a:hover { color: var(--brass-text); }
.author-box { max-width: 740px; }

/* Contact consent link */
.field-check label a { text-decoration: underline; text-decoration-color: var(--brass); }

/* Footer */
.footer-grid { gap: var(--s5); padding-top: var(--s8); padding-bottom: var(--s4); }
.footer-about .footer-brand { font-size: 1.5rem; }
.footer-nav .menu { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s3); }
.footer-nav a { display: block; font-size: 14.5px; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.footer-nav a:hover, .footer-nav a:focus-visible { color: var(--brass-light); text-decoration: none; border-bottom-color: var(--brass-light); }
.footer-legal { display: grid; gap: var(--s1); padding-bottom: var(--s5); color: #c3ccd7; }
.footer-legal p { margin: 0; }
.footer-legal::before { grid-column: 1 / -1; margin-bottom: var(--s2); }
@media (min-width: 48em) {
	.footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--s8); }
	.footer-nav .menu { grid-template-columns: repeat(3, minmax(0, 1fr)); justify-content: normal; }
	.footer-legal { grid-template-columns: 1fr auto; align-items: baseline; }
}

/* Print: article only */
@media print {
	.print-button, .cover-art-wrap, .article-byline .print-button, .card-grid, .pagination, .topic-filter { display: none !important; }
	.article-byline { border: 0; padding: 0 0 8pt; }
	.entry-content { padding-top: 12pt; font-size: 11pt; line-height: 1.55; }
	.entry-content h2 { border-top: 0; }
	.legal-trust { background: none; border: 1px solid #999; color: #000; break-inside: avoid; }
	.author-box { break-inside: avoid; }
}
