/*
Theme Name: Bernard Weiss – One-Sided Conversations
Theme URI: https://bernardweiss.creativewebdevelopments.com/
Author: Creative Web Developments
Description: Literary author website for Bernard Weiss, M.D. and his book "One-Sided Conversations: Musings of a Scientist". Includes one-click setup, starter essays from the book, table of contents, book club questions, a contact inbox, newsletter signups with CSV export and Customizer settings for buy links, book details and photos.
Version: 1.1.1
Requires at least: 6.2
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: bernard-weiss
*/

/* ------------------------------------------------------------------
   Tokens – colours taken from the book cover
------------------------------------------------------------------ */
:root {
	--green: #233a2e;
	--green-dark: #17271f;
	--ink: #2b2a24;
	--ink-soft: #57544a;
	--paper: #f7f1e5;
	--paper-2: #efe6d4;
	--cream: #f4ead8;
	--rule: #d5c7ad;
	--oxblood: #7d2c22;
	--rust: #a5532f;
	--brass: #b08d4f;
	--display: 'Libre Caslon Display', 'Libre Caslon Text', Georgia, serif;
	--serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
	--sans: 'Libre Franklin', 'Franklin Gothic Medium', Arial, sans-serif;
	--header: 76px;
	--grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .28 0 0 0 0 .18 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ------------------------------------------------------------------
   Base
------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 12px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--paper) var(--grain); color: var(--ink); font-family: var(--serif); font-size: 19px; line-height: 1.65; -webkit-font-smoothing: antialiased; font-optical-sizing: auto; }
img, video, iframe { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1.05em; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 400; line-height: 1.12; color: var(--green); margin: 0 0 .5em; }
h1 { font-size: clamp(2.8rem, 6.2vw, 5.6rem); letter-spacing: -.01em; }
h2 { font-size: clamp(2rem, 3.8vw, 3.2rem); }
h3 { font-size: 1.5rem; line-height: 1.2; }
h4 { font-size: 1.1rem; }
em, i { font-style: italic; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: #e8cfa4; color: var(--green-dark); }
:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5em 0; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed !important; top: 10px; left: 10px; width: auto; height: auto; clip: auto; z-index: 999; background: var(--green); color: #fff; padding: 10px 16px; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.container { width: min(1180px, calc(100% - 56px)); margin-inline: auto; }
.container.narrow, .narrow { max-width: 720px; }
.container.narrow { width: min(720px, calc(100% - 56px)); }
.center { text-align: center; }
.section { padding: 110px 0; }
.section--tight { padding: 70px 0 100px; }

/* Small label: italic serif, not shouty caps */
.label { display: block; font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--rust); margin-bottom: 10px; }
.label--light { color: #e2bf91; }
.smallcaps { font-family: var(--sans); font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.lede { font-size: 1.22rem; line-height: 1.6; color: var(--ink-soft); max-width: 36em; }
.rule-ornament { display: flex; align-items: center; gap: 16px; color: var(--brass); margin: 0 auto 26px; max-width: 220px; }
.rule-ornament::before, .rule-ornament::after { content: ''; flex: 1; border-top: 1px solid currentColor; opacity: .7; }

/* Links and buttons */
.btn { display: inline-block; padding: 15px 26px 14px; background: var(--green); color: #f7f1e5; border: 1px solid var(--green); border-radius: 0; font: 600 .78rem/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; transition: background .2s, color .2s; text-decoration: none !important; }
.btn:hover { background: var(--oxblood); border-color: var(--oxblood); color: #fff; }
.btn--light { background: var(--paper); color: var(--green); border-color: var(--paper); }
.btn--light:hover { background: #fff; color: var(--oxblood); border-color: #fff; }
.btn--line { background: transparent; color: var(--green); }
.btn--line:hover { background: var(--green); color: var(--paper); border-color: var(--green); }
.btn--line-light { background: transparent; color: var(--paper); border-color: rgba(247, 241, 229, .6); }
.btn--line-light:hover { background: var(--paper); color: var(--green); border-color: var(--paper); }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 30px; }
.more { font-family: var(--serif); font-style: italic; color: var(--oxblood); border-bottom: 1px solid currentColor; padding-bottom: 1px; transition: color .2s; }
.more:hover { color: var(--green); }
.more--light { color: #f0d8b4; }
.more--light:hover { color: #fff; }

/* Forms */
.input { width: 100%; padding: 14px 15px; background: #fffcf5; border: 1px solid #c9b896; border-radius: 0; color: var(--ink); font-family: var(--serif); font-size: 1rem; }
.input:focus { outline: 2px solid var(--rust); outline-offset: 1px; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%23233a2e' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 16px; padding-right: 40px; }
textarea.input { resize: vertical; min-height: 160px; }
.inline-form { display: flex; gap: 10px; }
.inline-form .input { flex: 1; min-width: 0; }
.form-note { font-size: .86rem; color: var(--ink-soft); margin: 12px 0 0; font-style: italic; }
.form-note a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.notice { padding: 14px 18px; margin-bottom: 18px; background: #e5ecdf; border-left: 3px solid var(--green); color: var(--green); }
.notice--error { background: #f6e1d8; border-color: var(--oxblood); color: var(--oxblood); }

/* ------------------------------------------------------------------
   Header
------------------------------------------------------------------ */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper) var(--grain); border-bottom: 1px solid var(--rule); transition: box-shadow .25s; }
.admin-bar .site-header { top: 32px; }
.site-header.is-scrolled { box-shadow: 0 6px 20px rgba(35, 30, 20, .08); }
.header-inner { min-height: var(--header); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; flex-direction: column; font: 400 1.55rem/1 var(--display); color: var(--green); }
.brand span { font: italic 400 .88rem/1.2 var(--serif); color: var(--rust); margin-top: 5px; letter-spacing: 0; text-transform: none; }
.custom-logo { max-height: 56px; width: auto; }
.main-nav { display: flex; align-items: center; gap: 30px; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 28px; }
.main-nav li { position: relative; }
.main-nav a { font: 500 .8rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.main-nav .menu > li > a { display: block; padding: 10px 0; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.main-nav .menu > li > a:hover { color: var(--oxblood); }
.main-nav .current-menu-item > a, .main-nav .current_page_parent > a, .main-nav .current-menu-ancestor > a { color: var(--oxblood); border-color: var(--oxblood); }
.main-nav .btn { padding: 12px 18px 11px; color: var(--paper); }
.main-nav .sub-menu { display: none; position: absolute; top: 100%; left: -18px; min-width: 230px; background: var(--paper); border: 1px solid var(--rule); box-shadow: 0 14px 30px rgba(0, 0, 0, .1); padding: 10px 0; flex-direction: column; align-items: stretch; gap: 0; }
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { display: flex; }
.main-nav .sub-menu a { display: block; padding: 9px 18px; text-transform: none; letter-spacing: 0; font-size: .9rem; }
.menu-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; position: relative; }
.menu-toggle .bars, .menu-toggle .bars::before, .menu-toggle .bars::after { position: absolute; left: 11px; width: 22px; height: 2px; background: var(--green); transition: transform .25s, top .25s; content: ''; }
.menu-toggle .bars { top: 21px; }
.menu-toggle .bars::before { left: 0; top: -7px; }
.menu-toggle .bars::after { left: 0; top: 7px; }
.nav-open .menu-toggle .bars { background: transparent; }
.nav-open .menu-toggle .bars::before { top: 0; transform: rotate(45deg); }
.nav-open .menu-toggle .bars::after { top: 0; transform: rotate(-45deg); }

/* ------------------------------------------------------------------
   Banners (painted sections)
------------------------------------------------------------------ */
.banner { position: relative; background-color: var(--green-dark); background-size: cover; background-position: center; color: var(--paper); isolation: isolate; }
.banner::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(20, 30, 23, .94) 0%, rgba(20, 30, 23, .82) 42%, rgba(20, 30, 23, .35) 100%); }
.banner--even::before { background: rgba(20, 30, 23, .78); }
.banner--warm::before { background: linear-gradient(0deg, rgba(43, 24, 14, .88), rgba(43, 24, 14, .7)); }
.banner h1, .banner h2, .banner h3 { color: #fbf4e6; }
.banner p { color: #e8dfcd; }

/* Home hero */
.hero { min-height: min(86vh, 838px); display: flex; align-items: center; padding: 90px 0 70px; background-position: 70% center; }
.hero { background: #141d17; overflow: hidden; }
.hero::before { display: none; }
.hero .container { position: relative; z-index: 2; }
.hero-painting { position: absolute; top: 0; right: 0; height: 100%; width: auto; max-width: none; z-index: 0; -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 38%); mask-image: linear-gradient(90deg, transparent 0%, #000 38%); filter: brightness(.9); }
.hero-copy { max-width: 600px; }
.hero h1 { margin: 6px 0 6px; font-size: clamp(3rem, 7vw, 6.2rem); line-height: .98; }
.hero .subtitle { font: italic 400 clamp(1.4rem, 2.4vw, 2rem)/1.3 var(--serif); color: #e7b98c; margin-bottom: 30px; }
.hero .lede { color: #e9e0cf; font-size: 1.2rem; }
.hero-status { margin-top: 34px; font-family: var(--sans); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: #cdbf9f; }
.hero-status::before { content: ''; display: inline-block; width: 26px; border-top: 1px solid currentColor; vertical-align: middle; margin-right: 12px; }
.hero-credit { z-index: 2; position: absolute; right: 22px; bottom: 16px; font: italic .8rem var(--serif); color: rgba(255, 255, 255, .55); }

/* Preface */
.preface-grid { display: grid; grid-template-columns: 380px 1fr; gap: 90px; align-items: center; }
.book-3d { display: block; position: relative; width: 100%; max-width: 380px; margin-inline: auto; box-shadow: 1px 1px 0 rgba(0, 0, 0, .08), 22px 26px 40px -6px rgba(35, 25, 12, .38); transition: transform .5s; }
.book-3d::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .3) 0, rgba(255, 255, 255, .2) 1.6%, rgba(0, 0, 0, .06) 3.5%, transparent 6%); z-index: 1; pointer-events: none; }
.book-3d img { width: 100%; }
a.book-3d:hover { transform: translateY(-4px); }
.preface-text p { font-size: 1.2rem; line-height: 1.7; }
.preface-text p.first::first-letter { float: left; font: 400 5.4rem/.8 var(--display); color: var(--oxblood); padding: 8px 12px 0 0; }
.signature { font: italic 1.5rem var(--display); color: var(--green); margin-top: 10px; }
.disclaimer { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--rule); font-size: .95rem; font-style: italic; color: var(--ink-soft); }
.disclaimer strong { font-family: var(--sans); font-style: normal; font-size: .7rem; letter-spacing: .14em; color: var(--oxblood); margin-right: 6px; }

/* "What's inside" index with dot leaders */
.inside { background: var(--paper-2) var(--grain); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.inside-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 90px; align-items: start; }
.index { list-style: none; margin: 0; padding: 0; }
.index li { display: flex; align-items: baseline; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--rule); font-size: 1.12rem; }
.index li:first-child { border-top: 1px solid var(--green); }
.index .leader { flex: 1; border-bottom: 1px dotted #a99a7c; transform: translateY(-5px); min-width: 20px; }
.index .n { font: 400 1.5rem/1 var(--display); color: var(--oxblood); min-width: 34px; }
.index .word { font-family: var(--sans); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); white-space: nowrap; }

/* Author band */
.author-banner { padding: 120px 0; background-position: center top; }
.author-grid { display: grid; grid-template-columns: 340px 1fr; gap: 80px; align-items: center; }
.print { margin: 0; background: #fbf6ea; padding: 14px 14px 52px; transform: rotate(-2deg); box-shadow: 0 24px 50px rgba(0, 0, 0, .45); position: relative; max-width: 340px; }
.print img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 25%; }
.print figcaption { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; font: italic 1rem var(--serif); color: #5d5446; }
.author-text p { font-size: 1.12rem; }
.author-text blockquote { margin: 28px 0; padding-left: 22px; border-left: 2px solid #c58a5a; font: italic 1.3rem/1.5 var(--serif); color: #f3e7d1; }

/* Essays: newspaper-style list */
.essays-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; border-bottom: 2px solid var(--green); padding-bottom: 18px; margin-bottom: 40px; }
.essays-head h2 { margin: 0; }
.essays-head p { margin: 0; max-width: 30em; color: var(--ink-soft); font-style: italic; }
.essays-layout { display: grid; grid-template-columns: 1.15fr 1fr; gap: 0 70px; }
.essay-lead h3 { font-size: clamp(2rem, 3.4vw, 2.8rem); margin: 6px 0 16px; }
.essay-lead .opening { font-size: 1.15rem; }
.essay-lead .opening::first-letter { float: left; font: 400 4.4rem/.8 var(--display); color: var(--oxblood); padding: 6px 10px 0 0; }
.essay-list { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule); padding-left: 50px; }
.essay-item { padding: 0 0 22px; margin-bottom: 22px; border-bottom: 1px solid var(--rule); }
.essay-item:last-child { border-bottom: 0; margin-bottom: 0; }
.essay-item h3 { font-size: 1.45rem; margin: 2px 0 6px; }
.essay-item h3 a:hover, .essay-lead h3 a:hover { color: var(--oxblood); }
.essay-item p { margin: 0; color: var(--ink-soft); font-size: 1rem; }
.cat { font-family: var(--sans); font-size: .68rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--rust); }
.cat .time { color: #8e8574; font-weight: 400; margin-left: 8px; }
.essays-foot { margin-top: 44px; text-align: center; }

/* Quote banner */
.quote-banner { padding: 140px 0; text-align: center; }
.big-quote { margin: 0 auto; max-width: 900px; transition: opacity .45s; }
.big-quote.is-fading { opacity: 0; }
.big-quote p { font: italic 400 clamp(1.7rem, 3.4vw, 2.8rem)/1.35 var(--serif); color: #fbf4e6 !important; margin-bottom: 22px; }
.big-quote cite { font-style: normal; font-family: var(--sans); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: #e2bf91; }

/* Two-up columns (book clubs / write) */
.two-up { display: grid; grid-template-columns: 1fr 1fr; }
.two-up > div { padding: 10px 60px; }
.two-up > div:first-child { padding-left: 0; border-right: 1px solid var(--rule); }
.two-up > div:last-child { padding-right: 0; }
.two-up h2 { font-size: clamp(1.8rem, 2.8vw, 2.4rem); }

/* Newsletter postcard */
.letter-section { background: var(--paper-2) url('assets/img/banner-window.jpg') center 35% / cover; position: relative; isolation: isolate; }
.letter-section::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(rgba(35, 28, 18, .55), rgba(35, 28, 18, .55)); }
.postcard { position: relative; background: #fdf9ef var(--grain); max-width: 980px; margin: 0 auto; padding: 56px 60px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px; box-shadow: 0 2px 0 #e3d6bb, 0 30px 60px -20px rgba(60, 40, 15, .35); }
.postcard::after { content: ''; position: absolute; top: 40px; bottom: 40px; left: 52.4%; border-left: 1px solid var(--rule); }
.postcard h2 { font-size: clamp(1.9rem, 3vw, 2.6rem); }
.stamp { position: absolute; top: 26px; right: 30px; width: 70px; height: 84px; border: 2px dashed #b9a47f; display: grid; place-items: center; font: italic 1.6rem var(--display); color: var(--oxblood); background: #f6ecd8; transform: rotate(4deg); }
.postcard .inline-form { flex-direction: column; margin-top: 70px; }
.postcard .notice { margin-top: 60px; }

/* ------------------------------------------------------------------
   Inner page banner
------------------------------------------------------------------ */
.page-banner { padding: 130px 0 90px; }
.page-banner h1 { font-size: clamp(2.6rem, 5.4vw, 4.6rem); margin-bottom: 12px; max-width: 14em; }
.page-banner .lede { color: #e6dccb; margin: 0; }
.page-plain { padding: 90px 0 30px; border-bottom: 1px solid var(--rule); }
.page-plain h1 { font-size: clamp(2.4rem, 5vw, 4rem); }

/* Book page */
.book-top { display: grid; grid-template-columns: 400px 1fr; gap: 90px; align-items: start; }
.book-top .book-3d { margin-top: -170px; position: relative; z-index: 2; }
.book-meta h2 { margin-bottom: 4px; }
.book-meta .subtitle { font: italic 1.5rem/1.3 var(--serif); color: var(--rust); margin-bottom: 6px; }
.book-meta .byline { font-family: var(--sans); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 26px; }
.buy-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.coming-soon { margin-top: 30px; border-top: 1px solid var(--green); border-bottom: 1px solid var(--rule); padding: 22px 0 24px; max-width: 560px; }
.coming-soon p { color: var(--ink-soft); font-size: 1rem; }
.status { font-family: var(--sans); font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--oxblood); display: block; margin-bottom: 6px; }
.back-cover { font-size: 1.15rem; line-height: 1.75; columns: 2; column-gap: 50px; column-rule: 1px solid var(--rule); }
.contents { background: var(--paper-2) var(--grain); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.contents-page { background: #fdf9ef; max-width: 980px; margin: 0 auto; padding: 70px 80px; box-shadow: 0 30px 60px -25px rgba(60, 40, 15, .35); }
.contents-page h2 { text-align: center; font-size: 2.2rem; margin-bottom: 6px; }
.contents-page .note { text-align: center; font-style: italic; color: var(--ink-soft); margin-bottom: 40px; }
.toc { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 60px; }
.toc li { display: flex; gap: 12px; align-items: baseline; padding: 6px 0; break-inside: avoid; font-size: 1.02rem; }
.toc-n { font-family: var(--display); color: var(--rust); min-width: 26px; text-align: right; }
.toc a { border-bottom: 1px solid rgba(125, 44, 34, .35); }
.toc a:hover { color: var(--oxblood); }
.toc .read { font: italic .85rem var(--serif); color: var(--oxblood); margin-left: 4px; white-space: nowrap; }
.details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.book-wrap img { width: 100%; box-shadow: 0 30px 60px -20px rgba(35, 25, 12, .45); }
.details { width: 100%; border-collapse: collapse; margin: 10px 0 30px; font-size: 1.02rem; }
.details th, .details td { text-align: left; padding: 11px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.details th { width: 32%; font: 600 .7rem/1.6 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); padding-right: 16px; padding-top: 14px; }

/* Author page */
.about-grid { display: grid; grid-template-columns: 380px 1fr; gap: 90px; align-items: start; }
.about-grid .print { position: sticky; top: calc(var(--header) + 40px); margin-top: -190px; z-index: 2; }
.cv { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--green); }
.cv li { display: grid; grid-template-columns: 220px 1fr; gap: 30px; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.cv strong { font: 400 1.35rem/1.25 var(--display); color: var(--green); }
.cv span { color: var(--ink-soft); }
.rules-list { list-style: none; margin: 0; padding: 0; }
.rules-list li { padding: 20px 0; border-bottom: 1px solid rgba(255, 255, 255, .18); font: italic 1.4rem/1.4 var(--serif); color: #fbf4e6; }
.rules-list li:last-child { border-bottom: 0; }
.rules-list small { display: block; font: 600 .7rem/1.6 var(--sans); font-style: normal; letter-spacing: .14em; text-transform: uppercase; color: #e2bf91; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }

/* Contact page */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 90px; align-items: start; }
.reasons { margin-top: 34px; border-top: 1px solid var(--green); }
.reasons p { padding: 18px 0; margin: 0; border-bottom: 1px solid var(--rule); }
.reasons strong { display: block; font: 400 1.3rem var(--display); color: var(--green); margin-bottom: 2px; }
.form-card { background: #fdf9ef; padding: 46px; box-shadow: 0 30px 60px -25px rgba(60, 40, 15, .35); margin-top: -150px; position: relative; z-index: 2; }
.form-card h2 { font-size: 2rem; }
.field { margin: 0 0 18px; }
.field label { display: block; font: 600 .72rem/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 7px; color: var(--ink-soft); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Essays archive */
.filter { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-bottom: 50px; padding-bottom: 16px; border-bottom: 1px solid var(--rule); font-family: var(--sans); font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; }
.filter a { color: var(--ink-soft); padding: 4px 0; border-bottom: 1px solid transparent; }
.filter a:hover { color: var(--oxblood); }
.filter a.is-active { color: var(--oxblood); border-color: var(--oxblood); }
.essay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 70px; }
.essay-grid .essay-item { padding: 26px 0; margin: 0; border-bottom: 1px solid var(--rule); }
.essay-grid .essay-item h3 { font-size: 1.7rem; }
.pagination { margin-top: 50px; }
.pagination .nav-links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pagination .page-numbers { min-width: 44px; height: 44px; display: inline-grid; place-items: center; border: 1px solid var(--rule); padding: 0 12px; }
.pagination .page-numbers.current, .pagination a.page-numbers:hover { background: var(--green); color: #fff; border-color: var(--green); }
.empty { padding: 40px 0; }

/* Single essay */
.essay-head { padding: 100px 0 50px; text-align: center; }
.essay-head h1 { font-size: clamp(2.6rem, 5.6vw, 4.6rem); margin: 10px 0 18px; }
.essay-head .lede { margin: 0 auto 26px; font-style: italic; }
.essay-meta { font-family: var(--sans); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.essay-meta span { margin: 0 8px; color: var(--brass); }
.essay-img img { width: 100%; }
.essay-body { padding: 20px 0 10px; font-size: 1.18rem; line-height: 1.75; }
.essay-body > p:first-of-type::first-letter { float: left; font: 400 5.2rem/.8 var(--display); color: var(--oxblood); padding: 8px 12px 0 0; }
.essay-book { display: grid; grid-template-columns: 100px 1fr; gap: 28px; align-items: center; border-top: 2px solid var(--green); border-bottom: 1px solid var(--rule); padding: 28px 0; margin: 50px auto; }
.essay-book img { width: 100px; box-shadow: 8px 12px 22px rgba(25, 20, 10, .3); }
.essay-book h3 { margin-bottom: 6px; font-size: 1.4rem; }
.essay-book p { font-size: 1rem; color: var(--ink-soft); margin-bottom: 8px; }
.essay-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-bottom: 70px; }
.essay-nav a { display: block; font: 400 1.35rem/1.25 var(--display); color: var(--green); }
.essay-nav a:hover { color: var(--oxblood); }
.essay-nav small { display: block; font: italic .95rem var(--serif); color: var(--rust); margin-bottom: 4px; }
.essay-nav div:last-child { text-align: right; }

/* Entry content */
.entry-content { font-size: 1.1rem; }
.entry-content h2 { font-size: clamp(1.7rem, 2.8vw, 2.3rem); margin-top: 1.5em; }
.entry-content h3 { margin-top: 1.4em; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content a { color: var(--oxblood); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.entry-content a:hover { color: var(--green); }
.entry-content ul, .entry-content ol { padding-left: 1.3em; margin: 0 0 1.3em; }
.entry-content li { margin-bottom: .5em; }
.entry-content ol.wp-block-list { counter-reset: q; list-style: none; padding-left: 0; }
.entry-content ol.wp-block-list > li { counter-increment: q; position: relative; padding: 20px 0 20px 62px; border-bottom: 1px solid var(--rule); margin: 0; }
.entry-content ol.wp-block-list > li::before { content: counter(q); position: absolute; left: 0; top: 14px; font: 400 2.2rem/1 var(--display); color: var(--oxblood); }
.entry-content blockquote, .wp-block-quote { margin: 2em 0; padding: 4px 0 4px 26px; border-left: 2px solid var(--oxblood); }
.entry-content blockquote p { font: italic 1.35rem/1.5 var(--serif); color: var(--green); }
.entry-content blockquote cite { font: normal 600 .7rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.entry-content hr, .wp-block-separator { border: 0; text-align: center; margin: 2.4em auto; max-width: none; height: auto; background: none; opacity: 1; }
.entry-content hr::before, .wp-block-separator::before { content: '\2042'; font-size: 1.3rem; color: var(--brass); }
.entry-content img { max-width: 100%; }
.entry-content figure { margin: 2em 0; }
.entry-content figcaption { font-size: .9rem; color: var(--ink-soft); text-align: center; margin-top: 8px; font-style: italic; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content td, .entry-content th { border-bottom: 1px solid var(--rule); padding: 10px; text-align: left; }
.alignwide { max-width: 1100px; }
.aligncenter { margin-inline: auto; }

/* Comments */
.comments-area { border-top: 1px solid var(--rule); padding: 50px 0 80px; }
.comments-title, .comment-reply-title { font-size: 2rem; }
.comment-list { list-style: none; padding: 0; margin: 0 0 40px; }
.comment-list .children { list-style: none; padding-left: 30px; }
.comment-body { padding: 20px 0; border-bottom: 1px solid var(--rule); }
.comment-author { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.comment-author img { border-radius: 50%; }
.comment-metadata { font-size: .85rem; color: var(--ink-soft); margin: 4px 0 10px; }
.comment-form label { display: block; font: 600 .72rem/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 7px; color: var(--ink-soft); }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { width: 100%; padding: 13px; border: 1px solid #c9b896; background: #fffcf5; font-family: var(--serif); }
.comment-form .comment-form-cookies-consent { display: flex; gap: 8px; align-items: flex-start; }
.comment-form .comment-form-cookies-consent label { font: inherit; text-transform: none; letter-spacing: 0; }
.comment-notes { font-size: .95rem; color: var(--ink-soft); font-style: italic; }

/* 404 */
.notfound { padding: 140px 0; }
.search-404 { max-width: 480px; margin: 40px auto 0; }

/* ------------------------------------------------------------------
   Footer
------------------------------------------------------------------ */
.site-footer { background: var(--green-dark); color: #c8c6b6; padding: 80px 0 30px; font-size: 1rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.3fr 1.2fr; gap: 50px; }
.site-footer .brand { color: #fbf4e6; }
.site-footer .brand span { color: #e2bf91; }
.footer-about p { margin-top: 18px; color: #a9ad9d; max-width: 320px; font-style: italic; }
.site-footer h4 { font: 600 .7rem/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: #e2bf91; margin-bottom: 18px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a:hover { color: #fff; }
.footer-book { display: flex; gap: 16px; align-items: center; }
.footer-book img { width: 66px; box-shadow: 6px 8px 16px rgba(0, 0, 0, .4); }
.footer-book strong { color: #fbf4e6; font-family: var(--display); font-weight: 400; font-size: 1.1rem; }
.footer-book em { color: #a9ad9d; }
.footer-contact { margin-top: 20px; }
.footer-contact a { color: #f0d8b4; font-style: italic; border-bottom: 1px solid currentColor; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 60px; padding-top: 24px; font-size: .85rem; color: #8b917f; }
.to-top { position: fixed; right: 22px; bottom: 22px; width: 46px; height: 46px; border: 1px solid var(--rule); background: var(--paper); color: var(--green); display: grid; place-items: center; cursor: pointer; opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .3s, transform .3s; z-index: 40; }
.to-top .icon { width: 20px; height: 20px; }
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.icon { width: 20px; height: 20px; flex: none; }

/* ------------------------------------------------------------------
   Responsive
------------------------------------------------------------------ */
@media (max-width: 1080px) {
	.main-nav ul { gap: 20px; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.preface-grid, .book-top, .about-grid { grid-template-columns: 300px 1fr; gap: 60px; }
	.author-grid { grid-template-columns: 280px 1fr; gap: 60px; }
}
@media (max-width: 900px) {
	:root { --header: 68px; }
	body { font-size: 18px; }
	.menu-toggle { display: block; }
	.main-nav { position: fixed; inset: var(--header) 0 auto 0; background: var(--paper); flex-direction: column; align-items: stretch; gap: 18px; padding: 20px 28px 30px; box-shadow: 0 16px 24px rgba(0, 0, 0, .12); border-top: 1px solid var(--rule); transform: translateY(-10px); opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s, visibility .25s; max-height: calc(100vh - var(--header)); overflow-y: auto; }
	.admin-bar .main-nav { top: calc(var(--header) + 46px); }
	.nav-open .main-nav { opacity: 1; visibility: visible; transform: none; }
	.main-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
	.main-nav .menu > li > a { padding: 15px 0; border-bottom: 1px solid var(--rule); font-size: .86rem; }
	.main-nav .current-menu-item > a { border-color: var(--rule); }
	.main-nav .sub-menu { display: flex; position: static; box-shadow: none; border: 0; padding: 0 0 0 16px; background: none; }
	.main-nav .btn { align-self: flex-start; }
	.section { padding: 80px 0; }
	.hero { min-height: 0; padding: 110px 0 90px; background-position: 78% center; }
	.hero::before { display: block; z-index: 1; background: linear-gradient(0deg, rgba(19, 29, 22, .96) 0%, rgba(19, 29, 22, .8) 60%, rgba(19, 29, 22, .5) 100%); }
	.hero-painting { width: 100%; height: 100%; object-fit: cover; object-position: 75% center; -webkit-mask-image: none; mask-image: none; }
	.preface-grid, .inside-grid, .author-grid, .essays-layout, .book-top, .details-grid, .about-grid, .contact-grid, .split, .two-up, .postcard, .essay-grid { grid-template-columns: 1fr; gap: 50px; }
	.preface-grid .book-3d, .book-top .book-3d { max-width: 280px; }
	.book-top .book-3d { margin-top: -40px; }
	.about-grid .print { position: relative; top: 0; margin: -150px auto 0; max-width: 300px; }
	.print { max-width: 300px; margin-inline: auto; }
	.essay-list { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 26px; }
	.two-up > div, .two-up > div:first-child, .two-up > div:last-child { padding: 0; border: 0; }
	.two-up > div:first-child { padding-bottom: 40px; border-bottom: 1px solid var(--rule); }
	.postcard { padding: 46px 32px; gap: 20px; }
	.postcard::after { display: none; }
	.postcard .inline-form, .postcard .notice { margin-top: 0; }
	.back-cover { columns: 1; }
	.contents-page { padding: 50px 30px; }
	.form-card { margin-top: 0; }
	.cv li { grid-template-columns: 1fr; gap: 4px; }
	.essays-head { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 782px) {
	.admin-bar .site-header { top: 46px; }
}
@media (max-width: 600px) {
	body { font-size: 17px; }
	.container, .container.narrow { width: calc(100% - 36px); }
	.section { padding: 64px 0; }
	.hero h1 { font-size: 3rem; }
	.page-banner { padding: 90px 0 70px; }
	.toc { columns: 1; }
	.inline-form { flex-direction: column; }
	.form-card { padding: 30px 22px; }
	.field-row { grid-template-columns: 1fr; }
	.essay-nav { grid-template-columns: 1fr; }
	.essay-nav div:last-child { text-align: left; }
	.footer-grid { grid-template-columns: 1fr; gap: 36px; }
	.stamp { width: 54px; height: 66px; font-size: 1.2rem; top: 18px; right: 18px; }
	.quote-banner { padding: 100px 0; }
	.essay-book { grid-template-columns: 70px 1fr; gap: 18px; }
	.essay-book img { width: 70px; }
	.admin-bar .site-header { top: 0; }
}
