/*
    Theme Name: WWJ
    Theme URI: https://www.hamiltrowebsitedesign.com
    Description: Custom theme for William W. Jones, M.D. — psychiatrist and psychoanalyst in New York City.
    Version: 2026.1.0
    Author: hamiltro
    Author URI: https://www.hamiltrowebsitedesign.com
*/

/* HOW THE STYLES ARE ORGANIZED
   ============================================================================
   css/global.css   reset, accessibility basics, the layout skeleton (every page)
   style.css        THIS FILE: every color, font and size as a variable; then the
                    navbar, the reading column, quotations, notes, footer (every page)
   css/home.css     the home page                       (page-home.php)
   css/essay.css    long essay pages and book text      (page-essay.php, page-book.php)
   css/writing.css  the Writing page                    (page-writing.php)
   css/book.css     a book page's header and contents   (page-book.php)
   css/contact.css  the Contact page                    (page-contact.php)
   css/editor.css   the same quotation and paragraph styles inside the editor
   css/debug.css    not loaded; link it in header.php to tint the page by screen width

   A page-specific sheet is linked by its template immediately after get_header().


   BREAKPOINTS — single source of truth
   ============================================================================
   CSS custom properties cannot be used inside @media query brackets, so each
   rule that uses a breakpoint repeats the value and tags itself with a
   BP-NAME marker comment. To change one, search every .css file for its name.

   BP-MOB-CONTENT : 601px   .desktopOnly / .mobileOnly toggle
   BP-NAV-MOBILE  : 760px   navbar — hamburger replaces nav links below this
   BP-TWO-COL     : 900px   photograph-beside-text layouts and the three home
                            cards go side by side from here up; stacked below
   ========================================================================== */

/* TESTING SWITCHES */
div.container { outline: 0px solid #c66;} /* set to 1px for testing ******/
p.editLink {display: block;} /* set to none for testing */


/* VARIABLES — the whole look of the website is set here
   ============================================================================
   PROVISIONAL. The palette is drawn from the photographs as the brief asks
   (cream, paper, charcoal, dark wood, muted blue, deep rug red, brass); the
   exact values and the typeface are to be settled at the first design review.
   ========================================================================== */
:root {

	/* ---- Typefaces — the only place a font is named (plus the link in header.php) */
	--font-serif: "Newsreader",  "Literata", serif;
	--font-sans: "Source Sans 3", "Nunito Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

	--font-body: var(--font-sans);
	--font-heading: var(--font-serif);
	--font-nav: var(--font-sans);      /* navigation, small labels, metadata */

	/* ---- Palette ---- */
	--color-cream: #f8f4ec;
	--color-paper: #fcfaf5;
	--color-parchment: #ded3be;
	--color-charcoal: #33312e;
	--color-charcoal-soft: #6e6760;
	--color-charcoal-softer: #d3c4b4;
	--color-wood: #853715; /*  */
	--color-blue: #32587c; /* from blue wall */
	--color-blue: #0a528d; /* from blue wall */	
	--color-blue: #154961; /* from publicwords */
	--color-red: #a80810; /* direct from rug */
	--color-brass: #b7944a;

	/* ---- Roles (what each color is used for) ---- */
	--color-background: var(--color-cream);
	--color-text: var(--color-charcoal);
	--color-text-soft: var(--color-charcoal-soft);
	--color-heading: var(--color-charcoal);
	--color-h2: var(--color-blue);
	--color-rule: var(--color-parchment);
	--color-divider-line: var(--color-rule);   /* dividing line with an icon at its center */
	--color-divider-icon: var(--color-charcoal-soft);
	--color-link: var(--color-wood); /* was red */
	--color-link-hover: var(--color-blue); /* was wood */
	--color-focus: var(--color-blue);
	--color-editLink: var(--color-charcoal);

	--color-navbar-wrapper-background: var(--color-cream);
	--color-navbar-wrapper-border: var(--color-parchment);
	--color-mainNav-text-link: var(--color-charcoal);
	--color-mainNav-text-link-hover: var(--color-wood); /* was red */
	--color-sub-menu-background: var(--color-paper);
	--color-sub-menu-border: var(--color-parchment);

	--color-footer-background: var(--color-blue);
	--color-footer: #f3ead9;

	--color-backToTop-background: var(--color-blue);
	--color-backToTop-background-hover: var(--color-wood);
	--color-backToTop-icon: var(--color-footer);
	--color-backToTop-border: var(--color-paper);

	/* ---- Type sizes — fluid between phone and wide screen ---- */
	--text-base: clamp(1rem, 0.93rem + 0.35vw, 1.1875rem);       /* 16px → 19px reading text */
	--text-small: 0.875em;
	--text-small: 0.9em;
	--text-label: 0.8125rem;                                     /* nav, labels (sans, spaced caps) */
	--text-h1: clamp(2rem, 1.5rem + 2.2vw, 3.25rem);
	--text-h2: clamp(1.45rem, 1.25rem + 0.9vw, 1.9rem);
	--text-h3: clamp(1.2rem, 1.1rem + 0.4vw, 1.4rem);
	--text-quote-large: clamp(1.6rem, 1.2rem + 1.9vw, 2.6rem);
	--text-quote-large: clamp(1.3rem, 1rem + 1.4vw, 2.2rem); /* reduced bc Writing/Musil 10/19 request) */
	--text-quote-medium: clamp(1.3em, .8rem + 1.9vw, 2.0rem);
	--text-quote-small: clamp(1.3rem, 1.2rem + 0.35vw, 1.4875rem); 
	--leading-body: 1.6;

	/* ---- Measures and space ---- */
	--measure: 46rem;                  /* the reading column: about 75 characters a line */
	--measure-wide: 60rem;             /* an image set "wide" in the editor */
	--container-max: 80.5rem;          /* the widest anything gets (about 1288px) */
	--section-space: clamp(2.5rem, 2rem + 3vw, 5rem);
	--section-space: clamp(1.2rem, .5rem + 2vw, 2.5rem);
	--paragraph-space: 1.35em;
	--scroll-offset: 1.5rem;
}


/* BASE
   ========================================================================== */
body {
	background: var(--color-background);
	color: var(--color-text);
	font-family: var(--font-body);
	font-size: var(--text-base);
	line-height: var(--leading-body);
	font-optical-sizing: auto;
	display: flex;
	flex-direction: column;
}

.mainContent { flex: 1 0 auto; }
.mainContent:focus { outline: none; } /* focused only by the skip link, to move the keyboard there */

h1, h2, h3, h4 {
	font-family: var(--font-heading);
	color: var(--color-heading);
	font-weight: 400;
	line-height: 1.2;
	text-wrap: balance;
}
h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); color: var(--color-h2); }
h3 { font-size: var(--text-h3); }

a {
	color: var(--color-link);
	transition: color 0.15s ease, border-color 0.15s ease;
}
a:hover { color: var(--color-link-hover); }

/* Small spaced capitals in the sans — navigation, labels, link rows. */
.navbar-nav li a,
.sectionLinks a,
.onwardLinks a,
.footerLinks,
.footerCallButton,
.bookStatus,
.homeTitleLine,
.homeCardLink a,
.bookLinks,
.contactDetails dt {
	font-family: var(--font-nav);
	font-size: var(--text-label);
	letter-spacing: 0.09em;
	text-transform: uppercase;
	line-height: 1.5;
}

blockquote	{
	font-size: 1.5rem;
	font-size: var(--text-quote-large);
	font-style: italic;
	font-family: var(--font-serif);
}

/* NAVBAR
   ============================================================================
   The hamburger replaces the nav links below 760px (BP-NAV-MOBILE). To change
   that point, change the two @media blocks marked BP-NAV-MOBILE below.
   ========================================================================== */
.navbar-wrapper {
	background-color: var(--color-navbar-wrapper-background);
	border-bottom: 1px solid var(--color-navbar-wrapper-border);
	padding: 0 4%;
}

.navbar {
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem 2rem;
	min-height: 4.5rem;
	padding: 0.75rem 0;
}

p.siteTitle { line-height: 1.2; }
p.siteTitle a {
	font-family: var(--font-heading);
	font-size: 1.75rem;
	color: var(--color-h2);
}
p.siteTitle a:hover { color: var(--color-link); }

/* On the home page the name is the large heading of the first screen, so the
   small name in the navbar is hidden there (it stays in place for screen
   readers and keeps the menu where it is on every other page). */
body.home p.siteTitle { visibility: hidden; }

.navbar-nav {
	list-style: none;
	padding: 0;
	margin: 0;
	gap: 0;
}
.navbar-nav li { position: relative; }
.navbar-nav li a {
	display: block;
	padding: 0.6rem 0.9rem;
	color: var(--color-mainNav-text-link);
}
.navbar-nav li a:hover,
.navbar-nav li.current-menu-item > a,
.navbar-nav li.current-menu-ancestor > a,
.navbar-nav li.current-page-ancestor > a {
	color: var(--color-mainNav-text-link-hover);
}

/* The small arrow after a menu item that opens a drop-down. */
.navbar-nav > .menu-item-has-children > a::after {
	content: "";
	display: inline-block;
	width: 0.4em;
	height: 0.4em;
	margin-left: 0.5em;
	border-right: 1px solid currentColor;
	border-bottom: 1px solid currentColor;
	transform: translateY(-0.2em) rotate(45deg);
}

.sub-menu {
	list-style: none;
	padding: 0.4rem 0;
	margin: 0;
	background: var(--color-sub-menu-background);
}
.sub-menu li a { text-transform: none; letter-spacing: 0.02em; font-size: 0.9375rem; }

/* The divider line in a drop-down: a menu item whose label is --- */
.menuDivider { padding: 0.35rem 0.9rem; }
.menuDividerLine {
	display: block;
	height: 1px;
	background: var(--color-sub-menu-border);
}

/* hamburger */
.navbar-toggle {
	background: transparent;
	border: 0;
	padding: 0.6rem 0.4rem;
	cursor: pointer;
}
.navbar-toggle .icon-bar {
	display: block;
	width: 1.6rem;
	height: 1px;
	margin: 0.35rem 0;
	background: var(--color-mainNav-text-link);
}

/* ABOVE 760px (BP-NAV-MOBILE) — hamburger hidden; links in a row; sub-menu drops */
@media (min-width: 760px) { /* BP-NAV-MOBILE */
	.navbar-header { display: none; }
	.navbar-nav { flex-direction: row; flex-wrap: wrap; align-items: center; }
	.navbar-nav > li:last-child > a { padding-right: 0; }

	.sub-menu {
		position: absolute;
		left: 0;
		top: 100%;
		z-index: 200;
		min-width: 21rem;
		border: 1px solid var(--color-sub-menu-border);
		box-shadow: 0 8px 24px rgba(43, 42, 40, 0.08);
		/* hidden until its parent is hovered, focused or opened */
		visibility: hidden;
		opacity: 0;
		transition: opacity 0.15s ease, visibility 0.15s ease;
	}
	.navbar-nav li:hover > .sub-menu,
	.navbar-nav li:focus-within > .sub-menu,
	.navbar-nav li.open > .sub-menu {
		visibility: visible;
		opacity: 1;
	}
	.sub-menu li a { padding: 0.5rem 1.1rem; }
	.menuDivider { padding: 0.35rem 1.1rem; }

	/* HOME PAGE ONLY — the menu centered. The hidden name is taken out of the
	   row (still read by screen readers) so it no longer pushes the menu right. */
	body.home .navbar { justify-content: center; }
	body.home div.siteTitle {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}
	body.home .navbar-nav > li:last-child > a { padding-right: 0.9rem; }
}

/* BELOW 760px (BP-NAV-MOBILE) — hamburger shown; the menu opens beneath it */
@media (max-width: 759.98px) { /* BP-NAV-MOBILE */
	.mainNavigation { display: contents; }
	.navbar-header { margin-left: auto; }
	.navbar-menu { display: none; flex-basis: 100%; }
	#navbar.opened .navbar-menu { display: block; }
	.navbar-nav { padding: 0.5rem 0 1rem; }
	.navbar-nav li a { padding: 0.7rem 0; }
	.navbar-nav > li + li { border-top: 1px solid var(--color-rule); }
	/* The drop-down's own pages are shown once its parent is tapped. */
	.sub-menu { display: none; background: transparent; padding: 0 0 0.6rem 1rem; }
	.navbar-nav li.open > .sub-menu { display: block; }
	.sub-menu li a { padding: 0.45rem 0; }
	.menuDivider { padding: 0.35rem 0; }
}


/* PAGE HEADER — the title, and on long pages the row of section links
   ========================================================================== */
section.pageHeader .sectionInner { padding-bottom: calc(var(--section-space) * 0.45); }
section.pageHeader .container { text-align: center; }
h1.pageTitle { max-width: 22em; margin: 1em auto 0; }

.sectionLinks { margin-top: 1.75rem; }
.sectionLinks ul {
	list-style: none;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.35rem 0;
}
.sectionLinks li { display: flex; align-items: center; }
.sectionLinks li + li::before {
	content: "";
	width: 1px;
	height: 0.9em;
	margin: 0 0.9rem;
	background: var(--color-text-soft);
	opacity: 0.45;
}
.sectionLinks a {
	color: var(--color-text-soft);
	padding: 0.3rem 0;
	border-bottom: 1px solid transparent;
}
.sectionLinks li:first-child a {
	color: var(--color-h2);
}
.sectionLinks a:hover { color: var(--color-link); border-bottom-color: currentColor; }

/* On a phone the row becomes a plain list, one section to a line, so each
   link is easy to hit and nothing is crowded. */
@media (max-width: 600.98px) { /* BP-MOB-CONTENT */
	.sectionLinks ul { flex-direction: column; align-items: center; gap: 0.15rem; }
	.sectionLinks li + li::before { display: none; }
}


/* THE CONTENT — the reading column
   ============================================================================
   Everything typed in the editor sits in a narrow column (--measure), centered.
   An image set to "Wide width" in the editor is allowed wider (--measure-wide);
   one set to "Full width" takes the whole container.
   ========================================================================== */
section.content .sectionInner,
section.essay .sectionInner { padding-top: calc(var(--section-space) * 0.5); }

.theContent > *,
.notes,
.bookSectionHeading {
	max-width: var(--measure);
	margin-left: auto;
	margin-right: auto;
}

.theContent > * + * { margin-top: var(--paragraph-space); }

.theContent a {
	border-bottom: 1px solid currentColor;
}
.theContent a:hover { border-bottom-color: transparent; }

.theContent h2 {
	margin-top: 2.6em;
	margin-bottom: -0.2em;
}
.theContent > h2:first-child { margin-top: 0; }
.theContent h3 { margin-top: 2em; font-style: italic; }

.theContent ul, .theContent ol { padding-left: 1.3em; }
.theContent li + li { margin-top: 0.4em; }

.theContent hr,
.theContent .wp-block-separator {
	border: 0;
	border-top: 1px solid var(--color-rule);
	width: 6rem;
	margin-top: 3em;
	margin-bottom: 3em;
}

/* ICON DIVIDER — a line with a small drawing at its center
   (template-parts/sections/icon-divider.php). The drawings are in images/icons/. */
.iconDivider {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	margin-top: 2.5rem;
	color: var(--color-divider-icon);
}
.iconDivider::before,
.iconDivider::after {
	content: "";
	flex: 1;
	border-top: 1px solid var(--color-divider-line);
	border-top: .8px solid var(--color-divider-icon); /* ? */
}
.iconDividerIcon svg { display: block; width: 44px; height: 44px; }

/* Images in the text. Never stretched; a caption sits quietly beneath. */
.theContent figure { margin-top: 2.6em; margin-bottom: 2.6em; }
.theContent figure img { margin: 0 auto; }
.theContent > .alignwide { max-width: var(--measure-wide); }
.theContent > .alignfull { max-width: none; }

/* COLUMNS in a text (the Columns block) — for example a portrait beside the
   opening section. Set the block to "Wide width" so the pair of columns is
   allowed wider than the reading column. Text inside a column is spaced as
   it is in the reading column. Below 782px WordPress stacks the columns. */
.theContent .wp-block-columns {
	gap: clamp(2rem, 4vw, 3.5rem);
	align-items: flex-start;
}
.theContent .wp-block-column > :first-child { margin-top: 0; }
.theContent .wp-block-column > * + * { margin-top: var(--paragraph-space); }
.theContent .wp-block-column > .wp-block-image { margin-bottom: 0; }
@media (max-width: 781px) {
	.theContent .wp-block-column > .wp-block-image {
		max-width: 26rem;
		margin-left: auto;
		margin-right: auto;
	}
}
.theContent figcaption {
	margin-top: 0.7em;
	font-family: var(--font-nav);
	font-size: 0.8125rem;
	color: var(--color-text-soft);
	text-align: center;
}

.theContent p em	{
	/*color: #0d0d0c;*/
	text-shadow: .1px .1px .1px currentColor;
}
/* QUOTATIONS (rebuilt 2026-10-23)
   ---------------------------------------------------------------------------
   Three styles, chosen under Styles in the editor, named by what the
   quotation is doing:

     In-text    (Default, or is-style-hwd-intext) part of the argument:
                upright, a little smaller than the text, indented, no marks
     Literary   is-style-hwd-literary — a major quotation: large, italic,
                centered, quotation marks added here (leave them out of the text)
     Epigraph   is-style-hwd-epigraph — small italic set to the right, at the
                head or the foot of a section

   Extra classes, typed in Advanced → Additional CSS class. Each changes one
   thing only, means the same on all three styles, and they combine in any
   order, eg  q-medium q-panel  or  q-marks q-roman

     q-small  q-medium  q-large     size (the same three sizes on any style)
     q-marks  q-nomarks             small quotation marks around the words on / off
     q-bigmark                      large marks, as on the home page: the opening one
                                    beside the first line, the closing one after the
                                    last word; they never push the lines apart
     q-roman  q-italic              upright / italic
     q-left  q-center  q-justify    alignment
     q-narrow  q-wide               narrower / the full reading width
     q-rules                        a line above and below
     q-panel                        paper background with a border

   How it works: each style sets the --q- settings; the rules at the foot of
   this section draw the quotation from those settings alone; an extra class
   changes one setting. So no combination needs a special rule.
   ---------------------------------------------------------------------------
   The three sizes, and the color of the added quotation marks: */
:root {
	--q-text-small: 0.9em;                                        /* a little below the reading text */
	--q-text-medium: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem);     /* a little above it */
	--q-text-large: clamp(1.45rem, 1.1rem + 1.3vw, 2.1rem);      /* display */
	--q-mark-color: var(--color-brass);
	--q-mark-color: var(--color-charcoal-softer);
	/* the large marks (q-bigmark) — sizes in em are of the quotation's own text */
	--q-bigmark-size: 2.3em;
	--q-bigmark-font: var(--font-serif);
	--q-bigmark-gap: 0.05em;            /* space between a mark and the words */
	--q-bigmark-open-top: 0.3em;       /* lower (+) or raise (-) the opening mark */
	--q-bigmark-close-top: 0.38em;     /* lower (+) or raise (-) the closing mark */
}

/* In-text — the default */
.theContent blockquote {
	--q-size: 1em;
	--q-leading: var(--leading-body);
	--q-style: normal;
	--q-em-style: italic;          /* italics inside the quotation */
	--q-align: left;
	--q-cite-align: left;
	--q-cite-size: 0.9rem; 
	--q-color: var(--color-text);
	--q-width: var(--measure);
	--q-indent: 5%;   /* rem, not em, so the large mark lines up with it */
	--q-hang: -0.42em;             /* an added opening mark hangs into the margin */
	--q-marks: none;
	--q-big-hangs: absolute;       /* left-aligned: a large opening mark hangs to the left */
	--q-big-hang-right: 100%;
	/* how the marks are drawn; small by default, changed by q-bigmark */
	--q-mark-size: 1em;
	--q-mark-font: var(--font-serif);
	--q-mark-leading: var(--q-leading);
	--q-mark-gap: 0px;
	--q-mark-open-top: 0px;
	--q-mark-close-top: 0px;
	--q-open-position: relative;
	--q-open-right: auto;
	--q-space: 1.8rem;             /* above and below */
	--q-bg: transparent;
	--q-rule: 0;                   /* lines above and below */
	--q-side-rule: 0;              /* lines left and right */
	--q-pad-block: 0px;              /* space inside the lines, top and bottom */
	--q-pad-right: 0;
}

/* Literary */
.theContent blockquote.is-style-hwd-literary {
	--q-size: var(--q-text-large);
	--q-leading: 1.3;
	--q-style: italic;
	--q-em-style: normal;
	--q-align: center;
	--q-cite-align: center;
	--q-cite-size: 1rem;
	--q-cite-size: clamp(0.85rem, 0.73rem + 0.35vw, 1rem);    /* this will need fixing */    
	--q-color: var(--color-charcoal-soft);
	--q-width: min(24em, var(--measure));
	--q-indent: 0;
	--q-hang: 0;
	--q-marks: inline;
	--q-big-hangs: relative;       /* centered: a large opening mark sits at the start of the line */
	--q-big-hang-right: auto;
	--q-space: 3rem;
}

/* Epigraph */
.theContent blockquote.is-style-hwd-epigraph {
	--q-size: 1em;
	--q-style: italic;
	--q-em-style: normal;
	--q-cite-align: right;
	--q-cite-size: 1rem;
	--q-cite-size: clamp(0.85rem, 0.73rem + 0.35vw, 1rem);    /* this will need fixing */    
	--q-color: var(--color-text-soft);
	--q-indent: calc(26% - 20px);
	--q-space: 2.4rem;
}

.page-writing {
	--q-bigmark-open-top: 0.2em;	
}

/* OLD NAMES — kept so the pages look right until each quotation is given a
   new style. Remove this block once none is left on the website.
   Large → Literary without the added marks; Opening and Closing → Epigraph; .medium → q-medium;
   .base-width → q-medium q-wide q-panel; .small → q-medium q-wide q-justify q-rules */
.theContent blockquote.is-style-hwd-large {
	--q-size: var(--q-text-large);
	--q-leading: 1.3;
	--q-style: italic;
	--q-em-style: normal;
	--q-align: center;
	--q-cite-align: center;
	--q-cite-size: 1rem;
	--q-color: var(--color-charcoal-soft);
	--q-width: min(24em, var(--measure));
	--q-indent: 0;
	--q-hang: 0;
	--q-marks: none;     /* the old ones have their marks typed in */
	--q-space: 3rem;
}
.theContent blockquote.is-style-hwd-opening,
.theContent blockquote.is-style-hwd-closing {
	--q-size: var(--text-quote-large);   /* the size they had before */
	--q-style: italic;
	--q-em-style: normal;
	--q-cite-align: right;
	--q-cite-size: 1rem;
	--q-color: var(--color-text-soft);
	--q-indent: calc(26% - 20px);
	--q-space: 2.4rem;
}
.theContent blockquote.is-style-hwd-large.medium { --q-size: var(--q-text-medium); --q-leading: 1.45; }
.theContent blockquote.is-style-hwd-large.base-width {
	--q-size: var(--q-text-medium); --q-leading: 1.45; --q-width: var(--measure);
	--q-bg: var(--color-paper); --q-rule: 1px solid var(--color-parchment); --q-side-rule: 1px solid var(--color-parchment);
	--q-pad-block: 1.8em; --q-indent: 1.5rem; --q-pad-right: 1.5em;
}
.theContent blockquote.is-style-hwd-large.small {
	--q-size: var(--q-text-medium); --q-leading: var(--leading-body); --q-width: var(--measure);
	--q-align: justify; --q-rule: 1px solid var(--color-parchment); --q-pad-block: 1.5em;
}
/* end of OLD NAMES */

/* The extra classes. Kept after the styles so they always win. */
.theContent blockquote.q-small  { --q-size: var(--q-text-small);  --q-leading: var(--leading-body); }
.theContent blockquote.q-medium { --q-size: var(--q-text-medium); --q-leading: 1.45; }
.theContent blockquote.q-large  { --q-size: var(--q-text-large);  --q-leading: 1.3; }

.theContent blockquote.q-marks   { --q-marks: inline; }
.theContent blockquote.q-nomarks { --q-marks: none; }
.theContent blockquote.q-bigmark {
	--q-marks: inline;
	--q-hang: 0px;
	--q-mark-size: var(--q-bigmark-size);
	--q-mark-font: var(--q-bigmark-font);
	--q-mark-leading: 0;           /* so the marks never push the lines apart */
	--q-mark-gap: var(--q-bigmark-gap);
	--q-mark-open-top: var(--q-bigmark-open-top);
	--q-mark-close-top: var(--q-bigmark-close-top);
	--q-open-position: var(--q-big-hangs);
	--q-open-right: var(--q-big-hang-right);
}

.theContent blockquote.q-roman  { --q-style: normal; --q-em-style: italic; }
.theContent blockquote.q-italic { --q-style: italic; --q-em-style: normal; }

.theContent blockquote.q-left    { --q-align: left;    --q-cite-align: left;   --q-hang: -0.42em; --q-big-hangs: absolute; --q-big-hang-right: 100%; }
.theContent blockquote.q-center  { --q-align: center;  --q-cite-align: center; --q-hang: 0;         --q-big-hangs: relative; --q-big-hang-right: auto; }
.theContent blockquote.q-justify { --q-align: justify; }

.theContent blockquote.q-narrow { --q-width: min(30rem, var(--measure)); }
.theContent blockquote.q-wide   { --q-width: var(--measure); }

.theContent blockquote.q-rules { --q-rule: 1px solid var(--color-parchment); --q-pad-block: 1.5em; }
.theContent blockquote.q-panel {
	--q-bg: var(--color-cream);
	--q-rule: 1px dotted var(--color-charcoal-softer);
	--q-side-rule: 1px dotted var(--color-cream);
	--q-pad-block: 1.8em;
	--q-indent: 1.5rem;
	--q-pad-right: 1.5em;
}

/* Drawing — reads the settings above and nothing else. */
.theContent blockquote {
	max-width: var(--q-width);
	margin-top: var(--q-space);
	margin-bottom: var(--q-space);
	padding: var(--q-pad-block) var(--q-pad-right) var(--q-pad-block) var(--q-indent);
	background: var(--q-bg);
	border: 0;
	border-top: var(--q-rule);
	border-bottom: var(--q-rule);
	border-left: var(--q-side-rule);
	border-right: var(--q-side-rule);
	font-family: var(--font-serif);
	font-size: var(--q-size);
	line-height: var(--q-leading);
	font-style: var(--q-style);
	text-align: var(--q-align);
	color: var(--q-color);
	text-wrap: pretty;
	quotes: "“" "”" "‘" "’";      /* which marks to add: double outside, single inside */
}
.theContent blockquote.is-style-hwd-literary,
.theContent blockquote.is-style-hwd-large,
.theContent blockquote.q-center { text-wrap: balance; }
.theContent blockquote > * + * { margin-top: 0.8em; }
.theContent blockquote em { font-style: var(--q-em-style); }
.theContent blockquote.is-style-hwd-intext {padding-right: var(--q-indent); padding-left: 3vw; }
.theContent blockquote.is-style-hwd-intext p {padding-left: 2vw; border-left: 1px dotted var(--color-charcoal-softer);}

/* The added quotation marks: before the first paragraph, after the last.
   Small ones sit in the line like letters; large ones (q-bigmark) have no line
   height of their own, and on left-aligned text the opening one hangs to the
   left of the first line. */
.theContent blockquote > p:first-of-type { position: relative; }
.theContent blockquote > p:first-of-type::before,
.theContent blockquote > p:last-of-type::after {
	display: var(--q-marks);
	position: relative;
	font-family: var(--q-mark-font);
	font-size: var(--q-mark-size);
	font-style: normal;
	line-height: var(--q-mark-leading);
	color: var(--q-mark-color);
	pointer-events: none;
}
.theContent blockquote > p:first-of-type::before {
	content: open-quote;
	position: var(--q-open-position);
	right: var(--q-open-right);
	top: var(--q-mark-open-top);
	margin-left: var(--q-hang);
	margin-right: var(--q-mark-gap);
}
.theContent blockquote.q-bigmark:not(.is-style-hwd-literary):not(.q-center) > p:first-of-type::before { line-height: 0.5; }  /* the hanging one, as on the home page */
.theContent blockquote > p:last-of-type::after {
	content: close-quote;
	top: var(--q-mark-close-top);
	margin-left: var(--q-mark-gap);
}

/* The source, the same on every style; only its alignment follows the style. */
.theContent blockquote cite,
.theContent blockquote footer {
	display: block;
	margin-top: 1.2em;
	font-family: var(--font-body);
	font-size: var(--q-cite-size);
	font-style: normal;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-align: var(--q-cite-align);
	color: var(--color-text-soft);
	padding-right: 5%;
}
.theContent blockquote cite em { font-style: italic; }

/* PARAGRAPH STYLES
   Set apart      a paragraph given its own setting, as visual rest
   Closing note   a small closing paragraph in a different voice */
.theContent p.is-style-hwd-set-apart {
	margin-top: 2.2em;
	margin-bottom: 2.2em;
	padding-left: 1.4em;
	border-left: 1px solid var(--color-brass);
	font-size: 1.12em;
	font-style: italic;
	line-height: 1.55;
	color: var(--color-heading);
}
.theContent p.is-style-hwd-coda {
	position: relative;
	margin-top: 1.5em;
	padding-top: calc(44px + 1.6em);
}
/* Above a Closing note: a line with the cat at its center, matching the icon
   dividers. The line has a gap cut out of its middle; the cat is images/icons/cat.svg
   used as a stencil, so it takes --color-divider-icon.
   Where the Closing note follows a heading directly (About: A Small Personal Note),
   the cat is drawn above that heading instead, and the paragraph is spaced as
   any other paragraph (2026-11-04). */
.theContent p.is-style-hwd-coda::before,
.theContent p.is-style-hwd-coda::after,
.theContent h2:has(+ p.is-style-hwd-coda)::before,
.theContent h2:has(+ p.is-style-hwd-coda)::after {
	content: "";
	position: absolute;
}
.theContent h2:has(+ p.is-style-hwd-coda) {
	position: relative;
	padding-top: calc(44px + 1.6rem);
}
.theContent h2 + p.is-style-hwd-coda {
	margin-top: var(--paragraph-space);
	padding-top: 0;
}
.theContent h2 + p.is-style-hwd-coda::before,
.theContent h2 + p.is-style-hwd-coda::after { content: none; }
.theContent p.is-style-hwd-coda::before,
.theContent h2:has(+ p.is-style-hwd-coda)::before {
	top: 22px;
	left: 0;
	right: 0;
	border-top: 0.7px solid var(--color-divider-icon);
	-webkit-mask-image: linear-gradient(to right, #000 calc(50% - 22px - 0.9rem), transparent 0, transparent calc(50% + 22px + 0.9rem), #000 0);
	        mask-image: linear-gradient(to right, #000 calc(50% - 22px - 0.9rem), transparent 0, transparent calc(50% + 22px + 0.9rem), #000 0);
}
.theContent p.is-style-hwd-coda::after,
.theContent h2:has(+ p.is-style-hwd-coda)::after {
	top: 0;
	left: 50%;
	width: 44px;
	height: 44px;
	margin-left: -22px;
	background-color: var(--color-divider-icon);
	-webkit-mask: url("images/icons/cat.svg") center / contain no-repeat;
	        mask: url("images/icons/cat.svg") center / contain no-repeat;
}

/* Compact — credentials and similar: small and tight. */
.theContent .is-style-hwd-compact {
	font-family: var(--font-nav);
	/*font-size: 0.875rem;*/
	font-size: var(--text-small);
	line-height: 1.5;
	color: var(--color-text-soft);
}
.theContent .is-style-hwd-compact > * + *,
.theContent ul.is-style-hwd-compact li + li { margin-top: 0.5em; }
.theContent ul.is-style-hwd-compact { list-style: none; padding-left: 0; }


/* NOTES — the raised numbers, the Notes list, and the pop-up
   ========================================================================== */
sup.noteRef {
	font-family: var(--font-nav);
	font-size: 0.62em;
	font-style: normal;
	line-height: 0;
	vertical-align: super;
	margin-left: 0.08em;
}
/* A number is small; its link is given room around it so it can be tapped. */
sup.noteRef a {
	display: inline-block;
	padding: 0.5em 0.3em;
	margin: -0.5em -0.1em;
	border: 0;
	color: var(--color-link);
}
sup.noteRef a:hover,
sup.noteRef a[aria-expanded="true"] { color: var(--color-link-hover); text-decoration: underline; }

.notes {
	margin-top: 4rem;
	padding-top: 2.2rem;
	border-top: 1px solid var(--color-rule);
}
.notesHeading { font-size: var(--text-h3); margin-bottom: 1.2rem; }
.notesList {
	list-style: decimal;
	padding-left: 1.8em;
	font-size: 0.7rem;     /* book-style notes: small and close-set */
	line-height: 1.3;
}
.notesList li + li { margin-top: 0.45em; }
.notesList li::marker { font-family: var(--font-nav); font-size: 0.85em; color: var(--color-text-soft); }
.notesList a { border-bottom: 1px solid currentColor; }
.notesList a.noteReturn {
	border: 0;
	padding: 0.2em 0.4em;
	font-family: var(--font-nav);
}
/* The note a reader has just jumped to, or back from, is briefly marked. */
.notesList li:target,
sup.noteRef:target { background: var(--color-parchment); box-shadow: 0 0 0 0.25em var(--color-parchment); }

.notePopup {
	position: absolute;
	z-index: 300;
	width: min(26rem, calc(100vw - 2rem));
	padding: 1.1rem 2.4rem 1.2rem 1.2rem;
	background: var(--color-paper);
	border: 1px solid var(--color-rule);
	box-shadow: 0 10px 30px rgba(43, 42, 40, 0.14);
	font-size: 0.9rem;
	line-height: 1.55;
	color: var(--color-text);
}
.notePopup[hidden] { display: none; }
.notePopup:focus { outline: none; }
.notePopupNumber {
	font-family: var(--font-nav);
	font-size: 0.75rem;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--color-text-soft);
	margin-bottom: 0.4rem;
}
.notePopup a { border-bottom: 1px solid currentColor; }
.notePopupClose {
	position: absolute;
	top: 0.35rem;
	right: 0.4rem;
	width: 2rem;
	height: 2rem;
	border: 0;
	background: transparent;
	font-size: 1.3rem;
	line-height: 1;
	color: var(--color-text-soft);
	cursor: pointer;
}
.notePopupClose:hover { color: var(--color-link); }


/* WHERE NEXT — the links at the end of a page. Text links, no buttons, set
   apart so a reader who has finished can see where to go.
   ========================================================================== */
section.onwardLinks .sectionInner { padding-top: 0; }
section.onwardLinks nav {
	max-width: var(--measure);
	margin: 0 auto;
	/*padding-top: 2rem;
	border-top: 1px solid var(--color-rule);*/
}

section.onwardLinks .iconDivider {
	margin-bottom: 2rem;
}
section.onwardLinks ul {
	list-style: none;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem 2.2rem;
}
.onwardLinks a {
	display: inline-block;
	padding: 0.3rem 0;	
}
.onwardLinks a::after { content: "\2192"; margin-left: 0.5em; }
.onwardLinks a:hover { text-shadow: .2px .2px .3px currentColor;}
/*.onwardLinks a:hover { border-bottom: 1px solid currentColor; }*/


/* FOOTER
   ============================================================================
   Three columns at 900px and up (BP-TWO-COL): contact details left, the
   consultations line and Call button center, copyright and links right.
   Below 900px they stack, centered, in the order center / left / right.
   ========================================================================== */
section.footer {
	background: var(--color-footer-background);
	color: var(--color-footer);
}
section.footer .sectionInner { padding: 2.2rem 0; }
section.footer a { color: var(--color-footer); border-bottom: 1px solid transparent; }
section.footer a:hover { border-bottom-color: currentColor; }
.footerCol > * { margin: 0; }

.footerColumns {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2rem;
	text-align: center;
}
.footerConsult { order: 1; }
.footerContact { order: 2; }
.footerCredits { order: 3; }

/* Left column */
.footerName {
	font-family: var(--font-heading);
	font-size: 1.25rem;
	line-height: 1.3;
	margin-bottom: 0.3rem;
}
.footerTitle,
.footerAddress,
.footerEmail {
	font-family: var(--font-nav);
	font-size: 0.875rem;
	line-height: 1.6;
}
.footerTitle { margin-bottom: 0.6rem; }
.footerAddressLine { display: block; }

/* Center column */
.footerConsultLine {
	font-family: var(--font-heading);
	font-style: italic;
	font-size: 1.125rem;
	margin-bottom: 0.9rem;
}
section.footer a.footerCallButton {
	display: inline-block;
	padding: 0.65rem 1.4rem;
	border: 1px solid currentColor;
	border-radius: 2px;
	transition: background-color 0.15s ease, color 0.15s ease;
}
section.footer a.footerCallButton:hover,
section.footer a.footerCallButton:focus-visible {
	background-color: var(--color-footer);
	color: var(--color-footer-background);
	border-color: var(--color-footer);
}

/* Right column */
.copyright, .credit {
	font-family: var(--font-nav);
	font-size: 0.75rem;
	opacity: 0.75;
}
.credit { opacity: 0.50; }
.footerLinks {
	list-style: none;
	padding: 0;
	margin: 1rem 0 0;
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
}

@media (min-width: 900px) { /* BP-TWO-COL */
	.footerColumns {
		display: grid;
		grid-template-columns: 1fr auto 1fr;
		align-items: start;
		gap: 2.5rem;
	}
	.footerContact { order: 0; text-align: left; justify-self: start; }
	.footerConsult { order: 0; }
	.footerCredits { order: 0; text-align: right; justify-self: end;}
}


/* BACK TO TOP — fixed, bottom right; appears once the reader is 1.5 screen-
   heights down the page (the script is at the foot of footer.php)
   ========================================================================== */
.backToTop {
	position: fixed;
	right: 1.5rem;
	bottom: 1.5rem;
	z-index: 250;                      /* above the page, beneath a note pop-up */
	width: 2.6rem;
	height: 2.6rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--color-backToTop-background);
	color: var(--color-backToTop-icon);
	border: 1px solid var(--color-backToTop-border);
	opacity: 0;
	visibility: hidden;                /* hidden from the keyboard too until it appears */
	transform: translateY(0.5rem);
	transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease, background-color 0.15s ease;
}
.backToTop.isVisible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.backToTop:hover,
.backToTop:focus-visible {
	background: var(--color-backToTop-background-hover);
	color: var(--color-backToTop-icon);
}
.backToTop svg { display: block; }

@media (max-width: 600.98px) { /* BP-MOB-CONTENT */
	.backToTop { right: 1rem; bottom: 1rem; }
}


/* PRINT — the text, without the navigation
   ========================================================================== */
@media print {
	.navbar-wrapper, footer, .sectionLinks, .onwardLinks, .editLink, .notePopup, .skipLink, .backToTop { display: none !important; }
	body { background: #fff; color: #000; font-size: 11pt; }
	a { color: #000; }
}


	--color-cream: #f8f4ec;
	--color-paper: #fcfaf5;
	--color-parchment: #ded3be;
	--color-charcoal: #33312e;
	--color-charcoal-soft: #6e6760;
	--color-wood: #a97b5a; /* blond wood behind portrait */
	--color-blue: #4e6f7f;
	--color-red: #a80810; /* direct from rug */
	--color-brass: #b7944a;
