/* ============================================================================
   Psychology Diary — "Mosaic" (psd-theme 1.0.0, 2026-11-10)
   Loads after theme-variables.css and main.css. All site styling lives here.
   Stitch direction B (user pick): built from the logo — heavy black condensed
   type and one orange dot. The front opens on an asymmetric five-story photo
   mosaic, every title UNDER its picture; topics are solid black bands. White
   ground, ONE rust ink for everything interactive, Barlow Condensed for the
   wordmark/headlines/bands/UI, Literata for reading text. Square corners.
   Photos sit in their own frame — never text on them.
   ========================================================================= */

/* --- Base ------------------------------------------------------------------- */

html { overflow-x: clip; background: var(--pd-ground); }
.psd-newsletter { scroll-margin-top: 1rem; }
body {
    background: var(--pd-ground);
    color: var(--pd-text);
    font-family: var(--pd-body);
    font-size: var(--pd-size-body);
    line-height: var(--pd-lh-body);
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--pd-display); color: var(--pd-ink); line-height: var(--pd-lh-head); font-weight: 600; letter-spacing: 0; }
a { color: var(--pd-brand); }
a:hover { color: var(--pd-brand-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--pd-brand); outline-offset: 2px; }
button, input, select, textarea { font-family: var(--pd-ui); }
::selection { background: var(--pd-brand-tint); color: var(--pd-ink); }

/* main.css styles .search-results (padding + white) and WP puts that class on <body> on search pages. */
body.search-results { padding: 0; background: var(--pd-ground); }
.site-container { max-width: none; margin: 0; padding: 0; }
.site-main { padding-top: 0; padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.psd-wrap, .psd-archive-inner, .psd-archive-body, .psd-single-main, .psd-page-wrap, .psd-empty-wrap {
    max-width: var(--pd-page-max); margin-left: auto; margin-right: auto; padding-left: var(--pd-gutter); padding-right: var(--pd-gutter);
}

.psd-skip-link { position: absolute; left: -9999px; top: 0; background: var(--pd-ink); color: #fff; padding: 0.75rem 1rem; z-index: 2000; font-weight: 700; }
.psd-skip-link:focus { left: 1rem; top: 1rem; color: #fff; }

/* UI text: the condensed face, in caps. */
.psd-breadcrumb, .psd-meta, .psd-article-meta, .psd-more, .psd-fhead, .psd-newsletter-label, .psd-archive-count, .psd-toc-count, .psd-pager, .psd-label, .psd-kicker, .psd-tagline, .psd-count {
    font-family: var(--pd-ui);
}
.psd-label { margin: 0; font-size: var(--pd-label); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pd-meta); }
.psd-meta { margin: 0; font-size: 0.875rem; font-weight: 600; line-height: 1.4; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pd-meta); }
.psd-meta a { color: inherit; text-decoration: none; }
.psd-dot { color: var(--pd-meta); padding: 0 0.25em; }
.psd-kicker { margin: 0; font-size: 0.875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; line-height: 1.3; }
.psd-kicker a { color: var(--pd-brand); text-decoration: none; display: inline-flex; align-items: center; min-height: 28px; }
.psd-kicker a:hover { text-decoration: underline; text-underline-offset: 0.2em; }

/* Framed photo: its own block, square corners, a quiet placeholder ground. */
.psd-frame { display: block; overflow: hidden; background: var(--pd-deep); }
.psd-frame img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
a.psd-frame:hover img { transform: scale(1.03); }
.psd-frame--wide img, .psd-frame--hero img { aspect-ratio: 16 / 9; height: auto; }
.psd-frame--photo img { aspect-ratio: 3 / 2; }
.psd-frame--square img { aspect-ratio: 1 / 1; }

.psd-more { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; font-size: 1rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--pd-brand); text-decoration: none; white-space: nowrap; }
.psd-more:hover { color: var(--pd-brand-dark); text-decoration: underline; text-underline-offset: 0.2em; }

/* --- Masthead: black strip, then wordmark left / topics right on one row ---------- */

.psd-masthead { position: relative; z-index: 100; background: var(--pd-white); border-bottom: 1px solid var(--pd-rule); }
.psd-strip { background: var(--pd-ink); color: var(--pd-on-ink); }
.psd-strip-inner { max-width: var(--pd-page-max); margin: 0 auto; padding: 0 var(--pd-gutter); min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.psd-tagline { margin: 0; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pd-on-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.psd-strip-sub { flex: none; display: inline-flex; align-items: center; gap: 0.35rem; min-height: 36px; font-family: var(--pd-ui); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pd-on-ink); text-decoration: none; }
.psd-strip-sub:hover { color: var(--pd-on-ink-accent); text-decoration: underline; text-underline-offset: 0.2em; }

.psd-mast-row { max-width: var(--pd-page-max); margin: 0 auto; padding: 0 var(--pd-gutter); min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.psd-brand-name { margin: 0; font-size: inherit; line-height: 1; font-weight: inherit; letter-spacing: inherit; }
.psd-wordmark, .psd-wordmark:hover, .psd-wordmark:focus, .psd-footer-word, .psd-footer-word:hover { text-decoration: none !important; }
.psd-wordmark { display: inline-flex; align-items: center; min-height: 48px; }
.psd-logo { display: inline-flex; align-items: baseline; gap: 0.16em; font-size: clamp(1.875rem, 1.5rem + 1.4vw, 2.625rem); line-height: 1; white-space: nowrap; color: var(--pd-ink); }
.psd-logo-sp { font-size: 0; width: 0; }
.psd-logo-a { font-family: var(--pd-display); font-weight: 700; text-transform: uppercase; letter-spacing: -0.005em; }
.psd-logo-dot { display: inline-block; width: 0.2em; height: 0.2em; background: var(--pd-dot); transform: translateY(-0.02em); }
.psd-logo-b { font-family: var(--pd-body); font-weight: 500; font-style: italic; font-size: 0.74em; letter-spacing: 0; }

.psd-mast-nav { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.psd-drawer-clip { display: contents; }
.psd-mast-nav .main-navigation { min-width: 0; display: flex; }
.psd-mast-nav .primary-menu { display: flex; align-items: stretch; flex-wrap: nowrap; gap: 0 1.6rem; list-style: none; margin: 0; padding: 0; }
.psd-mast-nav .main-navigation li { margin: 0; }
.psd-mast-nav .main-navigation a {
    display: inline-flex; align-items: center; min-height: 54px; position: relative; white-space: nowrap;
    font-family: var(--pd-ui); font-size: 1rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pd-ink); text-decoration: none;
}
.psd-mast-nav .main-navigation a:hover { color: var(--pd-brand); }
.psd-mast-nav .main-navigation a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 10px; height: 3px; background: var(--pd-brand); opacity: 0; transition: opacity 0.2s; }
.psd-mast-nav .main-navigation a:hover::after, .psd-mast-nav .main-navigation .current-cat > a::after { opacity: 1; }
.psd-mast-nav .main-navigation .current-cat > a { color: var(--pd-ink); }
.psd-mast-nav .main-navigation .psd-drawer-label, .psd-mast-nav .main-navigation .psd-drawer-sub { display: none; }

.psd-nav-tools { display: flex; align-items: center; gap: 0.25rem; padding-left: 0.75rem; border-left: 1px solid var(--pd-rule); }
.psd-masthead .psd-search-toggle { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 0; border-radius: 0; color: var(--pd-ink) !important; cursor: pointer; transition: color 0.2s, background 0.2s; }
.psd-masthead .psd-search-toggle:hover, .psd-masthead .psd-search-toggle[aria-expanded="true"] { color: var(--pd-brand) !important; background: var(--pd-brand-tint); }
.psd-masthead .mobile-menu-toggle { display: none; }
/* Search opens as a row under the masthead (main.css made it a fixed overlay). */
.psd-masthead .mobile-search-form { position: static; transform: none; box-shadow: none; z-index: auto; padding: 0.9rem var(--pd-gutter); background: var(--pd-deep); border-top: 1px solid var(--pd-rule); }
.psd-masthead .mobile-search-form form { max-width: 760px; margin: 0 auto; }
.psd-masthead .search-field { font-family: var(--pd-body); font-size: 1.0625rem; min-height: 50px; border-radius: 0; border: 1px solid var(--pd-ink); background: var(--pd-white); color: var(--pd-ink); }
.psd-masthead .mobile-search-form button[type="submit"] { min-height: 50px; border-radius: 0; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; background: var(--pd-ink); color: #fff; border: 0; }
.psd-masthead .mobile-search-close { background: transparent !important; color: var(--pd-ink) !important; min-width: 44px; min-height: 44px; }

/* --- Breadcrumb -------------------------------------------------------------------- */

.psd-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.45rem; margin: 0; font-size: 0.8125rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--pd-meta); }
.psd-breadcrumb a { display: inline-flex; align-items: center; min-height: 36px; color: var(--pd-meta); text-decoration: none; }
.psd-breadcrumb a:hover { color: var(--pd-brand); text-decoration: underline; }
.psd-breadcrumb [aria-current], .psd-breadcrumb a:last-of-type:not(:first-child) { color: var(--pd-ink); font-weight: 600; }
.psd-breadcrumb .sep { color: var(--pd-meta); }

/* --- The black band: orange dot, white condensed caps, an aside at the right -------- */

.psd-band { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; min-height: 52px; margin: 0 0 clamp(1.25rem, 2.4vw, 1.75rem); padding: 0 1.1rem; background: var(--pd-ink); color: var(--pd-on-ink); }
.psd-band-title { display: flex; align-items: center; gap: 0.6rem; margin: 0; font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.1; color: var(--pd-on-ink); }
.psd-band-dot { flex: none; display: inline-block; width: 0.5em; height: 0.5em; background: var(--pd-dot); }
.psd-band-aside { flex: none; display: inline-flex; align-items: center; gap: 0.35rem; min-height: 44px; font-family: var(--pd-ui); font-size: 0.9375rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--pd-on-ink); text-decoration: none; white-space: nowrap; }
a.psd-band-aside:hover { color: var(--pd-on-ink-accent); text-decoration: underline; text-underline-offset: 0.2em; }
.psd-band--small { min-height: 44px; margin-bottom: 0.25rem; padding: 0 0.9rem; }
.psd-band--small .psd-band-title { font-size: 1.0625rem; }
/* The quieter variant: a 4px black rule with the label under it on white. */
.psd-band--rule { min-height: 0; padding: 0.75rem 0 0; background: transparent; border-top: var(--pd-board) solid var(--pd-ink); color: var(--pd-ink); }
.psd-band--rule .psd-band-title { color: var(--pd-ink); }
.psd-band--rule .psd-band-aside { color: var(--pd-meta); }

.psd-section { margin-top: clamp(2.5rem, 5vw, 3.75rem); }

/* --- Photo card: the picture, then everything else under it on white ---------------- */

.psd-card { min-width: 0; display: flex; flex-direction: column; }
.psd-card-body { display: flex; flex-direction: column; gap: 0.3rem; padding-top: 0.8rem; min-width: 0; }
.psd-card-title { margin: 0; font-size: clamp(1.3125rem, 1.2rem + 0.45vw, 1.5rem); font-weight: 600; line-height: 1.14; text-wrap: balance; }
.psd-card-title a { color: var(--pd-ink); text-decoration: none; }
.psd-card-title a:hover { color: var(--pd-brand); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.14em; }
.psd-card-dek { margin: 0.2rem 0 0; font-size: 1rem; line-height: 1.55; color: var(--pd-meta); }
.psd-card .psd-meta { margin-top: 0.2rem; font-size: 0.8125rem; }
.psd-card--text .psd-card-body { padding-top: 0; }

.psd-board { display: grid; gap: clamp(1.5rem, 2.6vw, 2.25rem) clamp(1.25rem, 2.2vw, 1.75rem); align-items: start; }
.psd-board--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.psd-board--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.psd-board + .psd-board { margin-top: clamp(1.5rem, 2.6vw, 2.25rem); }

/* Image-left card. */
.psd-side { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 0 1.1rem; align-items: start; min-width: 0; }
.psd-side--text { grid-template-columns: minmax(0, 1fr); }
.psd-side-body { min-width: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.psd-side-title { margin: 0; font-size: clamp(1.25rem, 1.15rem + 0.45vw, 1.5rem); font-weight: 600; line-height: 1.14; text-wrap: balance; }
.psd-side-title a { color: var(--pd-ink); text-decoration: none; }
.psd-side-title a:hover { color: var(--pd-brand); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.14em; }

/* --- The mosaic: the tall lead (half), four more two-by-two -------------------------- */

.psd-front .psd-wrap, .psd-archive-body { padding-top: clamp(1.25rem, 2.6vw, 2rem); }
.psd-mosaic { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto auto; gap: clamp(1.25rem, 2.4vw, 2rem) clamp(1.25rem, 2.2vw, 1.75rem); align-items: stretch; }
.psd-mosaic-lead { grid-column: 1 / span 6; grid-row: 1 / span 2; }
.psd-mosaic-cell { grid-column: span 3; }
/* The lead's picture takes whatever height the two rows beside it leave. */
.psd-mosaic-lead .psd-frame { flex: 1 1 auto; min-height: 280px; position: relative; }
.psd-mosaic-lead .psd-frame img { position: absolute; inset: 0; width: 100%; height: 100%; }
.psd-mosaic-lead .psd-card-body { flex: none; padding-top: 1rem; gap: 0.4rem; }
.psd-mosaic-lead .psd-card-title { font-size: clamp(1.875rem, 1.3rem + 2.2vw, 2.75rem); line-height: 1.04; }
.psd-mosaic-lead .psd-card-dek { max-width: 34em; font-size: 1.0625rem; }
/* Fewer than five stories: the cells share the right half evenly. */
.psd-mosaic--1 .psd-mosaic-lead { grid-column: 1 / -1; }
.psd-mosaic--2 .psd-mosaic-cell, .psd-mosaic--3 .psd-mosaic-cell { grid-column: span 6; }
.psd-mosaic--1 .psd-mosaic-lead .psd-frame, .psd-mosaic--2 .psd-mosaic-lead .psd-frame { aspect-ratio: 16 / 9; }

.psd-ad--wide { max-width: 760px; margin: clamp(2rem, 4vw, 3rem) auto 0; min-height: 130px; }

/* --- Topic pair: one large picture beside two image-left cards ----------------------- */

.psd-pair { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 1.75rem clamp(1.5rem, 3vw, 2.5rem); align-items: start; }
.psd-pair--flip { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.psd-pair--flip .psd-pair-big { order: 2; }
.psd-pair-big .psd-card-title { font-size: clamp(1.625rem, 1.3rem + 1.4vw, 2.25rem); line-height: 1.06; }
.psd-pair-big .psd-card-dek { max-width: 38em; font-size: 1.0625rem; }
.psd-pair-side { min-width: 0; display: flex; flex-direction: column; }
.psd-pair-side .psd-side { padding: 0 0 1.25rem; }
.psd-pair-side .psd-side + .psd-side { padding-top: 1.25rem; border-top: 1px solid var(--pd-rule); }
.psd-pair-side .psd-side:last-child { padding-bottom: 0; }

/* --- Topic strip: label over the picture and title of the topic's newest story ------- */

.psd-topics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1.5rem, 2.6vw, 2.25rem) clamp(1.25rem, 2.2vw, 1.75rem); }
.psd-topics--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.psd-topics--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.psd-topic { min-width: 0; display: flex; flex-direction: column; }
.psd-topic-head { margin: 0 0 0.6rem; font-size: 1rem; border-top: var(--pd-board) solid var(--pd-ink); }
.psd-topic-head a { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: 44px; font-family: var(--pd-ui); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--pd-ink); text-decoration: none; }
.psd-topic-head a:hover { color: var(--pd-brand); }
.psd-topic-count { font-weight: 600; color: var(--pd-meta); font-variant-numeric: tabular-nums; }
.psd-topic-title { margin: 0.75rem 0 0; font-family: var(--pd-display); font-size: clamp(1.25rem, 1.15rem + 0.4vw, 1.4375rem); font-weight: 600; line-height: 1.14; text-wrap: balance; }
.psd-topic-title a { color: var(--pd-ink); text-decoration: none; }
.psd-topic-title a:hover { color: var(--pd-brand); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.14em; }
.psd-topics--5 .psd-topic-title { font-size: 1.1875rem; }

/* --- Ad frames: labelled, reserved; nothing for readers when unfilled ----------------- */

.psd-ad { text-align: center; background: var(--pd-white); border: 1px solid var(--pd-rule); border-radius: var(--pd-radius); padding: 0.75rem 0.5rem 1rem; min-height: 290px; }
.psd-ad::before { content: "Advertisement"; display: block; font-family: var(--pd-ui); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--pd-meta); margin-bottom: 0.6rem; }
.psd-ad--wide { max-width: 760px; margin: 0 auto clamp(2rem, 4vw, 3rem); min-height: 130px; }
.psd-ad:has(ins[data-ad-status="unfill-optimized"]), .psd-ad:has(ins[data-ad-status="unfilled"]) { display: none; }
.psd-ad-placeholder { border: 1px dashed var(--pd-rule); border-radius: var(--pd-radius); padding: 2rem 1rem; color: var(--pd-meta); font-size: 0.875rem; margin: 0 0.5rem; }

/* --- Archive: the light head with the dot field (1.0.3, user pick A) ------------------
   Warm paper, the title in black caps with the story count beside it, a 4px
   black rule under the band. Decoration: the logo's orange dot repeated as a
   halftone at the right, fading out before it reaches the text. Pure CSS. */

.psd-archive-head { position: relative; overflow: hidden; background: var(--pd-paper); color: var(--pd-ink); border-bottom: var(--pd-board) solid var(--pd-ink); }
.psd-archive-head::after { content: ""; position: absolute; inset: 0 0 0 42%; pointer-events: none; opacity: 0.6;
    background: radial-gradient(circle, var(--pd-dot) 0 2.6px, transparent 3.1px) 0 0 / 20px 20px;
    -webkit-mask-image: radial-gradient(ellipse 75% 120% at 100% 50%, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 78%);
    mask-image: radial-gradient(ellipse 75% 120% at 100% 50%, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 78%); }
.psd-archive-head .psd-archive-inner { position: relative; z-index: 1; padding-top: clamp(1.25rem, 2.6vw, 2rem); padding-bottom: clamp(1.75rem, 3.5vw, 2.75rem); }
.psd-archive-row { display: flex; align-items: flex-end; justify-content: flex-start; gap: 0.5rem 1.75rem; flex-wrap: wrap; margin-top: 0.6rem; }
.psd-archive-title { display: flex; align-items: center; gap: 0.3em; margin: 0; font-size: clamp(2.75rem, 1.6rem + 4.6vw, 4.5rem); font-weight: 700; line-height: 0.98; letter-spacing: 0.005em; text-transform: uppercase; color: var(--pd-ink); overflow-wrap: anywhere; }
.psd-archive-title .psd-band-dot { width: 0.28em; height: 0.28em; }
.psd-archive-count { margin: 0 0 0.9rem; font-size: 1rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pd-brand); white-space: nowrap; }
.psd-archive-line { margin: 1rem 0 0; max-width: 34em; font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem); line-height: 1.6; color: var(--pd-text); }
.psd-archive-head--search .search-form { display: flex; gap: 0.5rem; max-width: 560px; margin: 1.25rem 0 0; }
.psd-archive-head--search .search-field, .psd-empty .search-field { flex: 1 1 auto; min-width: 0; min-height: 50px; padding: 0 1rem; border: 1px solid var(--pd-ink); border-radius: 0; background: var(--pd-white); color: var(--pd-ink); font-family: var(--pd-body); font-size: 1.0625rem; }
.psd-archive-head--search .search-submit, .psd-empty .search-submit { min-height: 50px; padding: 0 1.25rem; border: 0; border-radius: 0; background: var(--pd-brand); color: #fff; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; }
.psd-archive .psd-pager { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.psd-other { margin-top: clamp(3rem, 6vw, 4.5rem); }

/* Pager: square boxes, the current page black. */
.psd-pager { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; margin: 0.5rem 0 0; }
.psd-pager .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.psd-pager .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; height: 48px; padding: 0 0.6rem; border: 1px solid var(--pd-rule); border-radius: var(--pd-radius); background: var(--pd-white); color: var(--pd-ink); font-family: var(--pd-ui); font-size: 1rem; font-weight: 600; text-decoration: none; font-variant-numeric: tabular-nums; }
.psd-pager a.page-numbers:hover { border-color: var(--pd-brand); color: var(--pd-brand); }
.psd-pager .page-numbers.current { background: var(--pd-brand); border-color: var(--pd-brand); color: #fff; }
.psd-pager .page-numbers.dots { border: 0; background: transparent; min-width: 24px; }
.psd-pager-count { margin: 0; font-size: 0.75rem; }

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

.psd-single-main { padding-top: clamp(1.25rem, 2.5vw, 2rem); }
.psd-article-head { max-width: 900px; margin: 0; padding: 0; border: 0; text-align: left; }
.psd-article-tag { margin: 0.75rem 0 0; }
.psd-title { margin: 0.8rem 0 0; font-size: var(--pd-title); font-weight: 700; line-height: 1.08; letter-spacing: 0; text-wrap: balance; }
.psd-standfirst { margin: 1rem 0 0; max-width: 42em; font-size: clamp(1.125rem, 1.05rem + 0.4vw, 1.3125rem); line-height: 1.55; color: var(--pd-meta); }
.psd-article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.4rem; margin: 1.1rem 0 0; font-size: 0.8125rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--pd-meta); }
.psd-mg { display: inline-flex; flex-wrap: nowrap; align-items: center; gap: 0 0.4rem; }
.psd-byline a { color: var(--pd-brand); font-weight: 600; text-decoration: none; display: inline-flex; min-height: 36px; align-items: center; }
.psd-byline a:hover { text-decoration: underline; }
/* The hero: a thin white mat, standing on the board. */
.psd-hero { margin: clamp(1.5rem, 3vw, 2.25rem) 0 clamp(2rem, 4vw, 3rem); padding-top: clamp(1.5rem, 3vw, 2rem); border-top: 1px solid var(--pd-rule); }
.psd-caption { font-size: 0.8125rem; line-height: 1.5; color: var(--pd-meta); padding: 0.6rem 0.1rem 0; }

/* Reading column on a white sheet + sidebar. */
.psd-layout { display: grid; grid-template-columns: minmax(0, 1fr) var(--pd-sidebar); gap: 2.5rem clamp(2rem, 3.5vw, 3rem); align-items: start; }
.psd-layout-main { min-width: 0; }
.psd-disclosure { margin: 0 0 1.5rem; padding: 0.85rem 1.1rem; background: var(--pd-ground); border: 1px solid var(--pd-rule); border-radius: var(--pd-radius); font-size: 0.875rem; line-height: 1.55; color: var(--pd-meta); }
.psd-disclosure a { color: var(--pd-brand); font-weight: 600; white-space: nowrap; }

.psd-article .entry-content { font-size: var(--pd-size-body); line-height: var(--pd-lh-body); color: var(--pd-text); }
.psd-article .entry-content > * { max-width: 100%; }
.psd-article .entry-content p { text-wrap: pretty; }
.psd-article .entry-content > :first-child { margin-top: 0; }
.psd-article .entry-content h2 { font-size: var(--pd-h2); font-weight: 700; line-height: 1.15; margin: 3rem 0 1rem; padding: 0; border: 0; color: var(--pd-ink); scroll-margin-top: 1.5rem; text-wrap: balance; }
.psd-article .entry-content h3 { font-size: var(--pd-h3); font-weight: 700; line-height: 1.22; margin: 2.25rem 0 0.75rem; scroll-margin-top: 1.5rem; text-wrap: balance; }
.psd-article .entry-content > h2:first-child { margin-top: 0.5rem; }
.psd-h2-num { display: inline-block; margin-right: 0.35em; color: var(--pd-brand); }
.psd-item-no { display: inline-block; margin-right: 0.3em; color: var(--pd-brand); font-weight: 700; }
.psd-article .entry-content h4 { font-family: var(--pd-display); font-weight: 700; font-size: 1.125rem; }
.psd-article .entry-content a { color: var(--pd-brand); text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
.psd-article .entry-content a:hover { color: var(--pd-brand-dark); text-decoration-thickness: 2px; }
.psd-article .entry-content strong { font-weight: 600; color: var(--pd-ink); }
.psd-article .entry-content figure { margin: 2.25rem 0; }
.psd-article .entry-content figure img, .psd-article .entry-content p > img { display: block; height: auto; padding: 4px; border: 1px solid var(--pd-rule); border-radius: var(--pd-radius); background: var(--pd-white); box-shadow: none; }
.psd-article .entry-content figcaption { text-align: left; font-family: var(--pd-ui); font-style: normal; font-size: 0.8125rem; line-height: 1.5; color: var(--pd-meta); padding-top: 0.6rem; }
.psd-article .entry-content ol, .psd-article .entry-content ul { padding-left: 1.5rem; }
.psd-article .entry-content li { margin-bottom: 0.6rem; }
.psd-article .entry-content ul li::marker { color: var(--pd-brand); }
.psd-article .entry-content ol li::marker { color: var(--pd-brand); font-family: var(--pd-display); font-weight: 700; }
.psd-article .entry-content blockquote { border: 0; border-left: 4px solid var(--pd-brand); background: var(--pd-ground); border-radius: 0 var(--pd-radius) var(--pd-radius) 0; margin: 2rem 0; padding: 1.1rem 1.4rem; font-size: 1.0625rem; line-height: 1.65; color: var(--pd-text); }
.psd-article .entry-content blockquote p { margin: 0; }
.psd-article .entry-content blockquote p + p { margin-top: 0.75rem; }
.psd-article .entry-content hr { border: 0; border-top: 1px solid var(--pd-rule); }
.table-scroll { overflow-x: auto; margin: 2rem 0; -webkit-overflow-scrolling: touch; border: 1px solid var(--pd-rule); border-radius: var(--pd-radius);
    /* scroll cue: a soft shadow on the right edge while more columns are hidden (the white cover scrolls with the content and hides it at the end) */
    background: linear-gradient(to left, var(--pd-white) 40%, rgba(255, 255, 255, 0)) right center / 48px 100% no-repeat local,
                radial-gradient(farthest-side at 100% 50%, rgba(34, 32, 29, 0.18), rgba(34, 32, 29, 0)) right center / 16px 100% no-repeat scroll,
                var(--pd-white); }
.table-scroll table { min-width: 560px; margin: 0; }
.psd-article .entry-content table { border-collapse: collapse; width: 100%; font-size: 0.875em; line-height: 1.5; background: transparent; }
.psd-article .entry-content th { font-family: var(--pd-ui); background: var(--pd-ground); color: var(--pd-ink); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; text-align: left; border-bottom: 2px solid var(--pd-brand); }
.psd-article .entry-content td, .psd-article .entry-content th { border-bottom: 1px solid var(--pd-rule); padding: 0.75rem 0.85rem; vertical-align: top; min-width: 7.25rem; }
.psd-article .entry-content tr:last-child td { border-bottom: 0; }
.psd-article .entry-content td:first-child, .psd-article .entry-content th:first-child { position: sticky; left: 0; z-index: 1; }
.psd-article .entry-content td:first-child { background: var(--pd-white); font-weight: 600; color: var(--pd-ink); }

/* "In this guide" (the article's own contents block, psd_toc_panel). */
.psd-toc { margin: 0 0 2.25rem; background: var(--pd-ground); border: 1px solid var(--pd-rule); border-radius: var(--pd-radius); }
.psd-toc summary { display: flex; align-items: center; gap: 1rem; min-height: 58px; padding: 0.6rem 1.25rem; cursor: pointer; list-style: none; }
.psd-toc summary::-webkit-details-marker { display: none; }
.psd-toc summary::after { content: "+"; font-family: var(--pd-display); font-size: 1.375rem; font-weight: 700; color: var(--pd-brand); margin-left: 0.25rem; }
.psd-toc[open] summary::after { content: "−"; }
.psd-toc-title { font-family: var(--pd-display); font-size: 0.875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--pd-ink); }
.psd-toc-count { margin-left: auto; font-size: 0.75rem; color: var(--pd-meta); }
.psd-article .entry-content .psd-toc-list { list-style: none; margin: 0; padding: 0 1.25rem 1rem; counter-reset: psdtoc; }
.psd-article .entry-content .psd-toc-list li { margin: 0; padding: 0; counter-increment: psdtoc; border-top: 1px solid var(--pd-rule); }
.psd-article .entry-content .psd-toc-list li::marker { content: none; }
.psd-article .entry-content .psd-toc-list a { display: flex; gap: 0.9rem; align-items: baseline; min-height: 46px; padding: 0.65rem 0; color: var(--pd-ink); text-decoration: none; font-family: var(--pd-ui); font-size: 0.9375rem; font-weight: 600; line-height: 1.4; }
.psd-article .entry-content .psd-toc-list a::before { content: counter(psdtoc, decimal-leading-zero); flex: none; font-family: var(--pd-display); font-size: 0.875rem; font-weight: 700; color: var(--pd-brand); font-variant-numeric: tabular-nums; }
.psd-article .entry-content .psd-toc-list a:hover { color: var(--pd-brand); }

/* Article pager (posts split with <!--nextpage-->): numbers only. */
.psd-page-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin: 2.25rem 0 0.5rem; }
.entry-content .psd-page-links .post-page-numbers {
    display: inline-flex; align-items: center; justify-content: center; min-width: 48px; height: 48px; padding: 0 0.75rem;
    border: 1px solid var(--pd-rule); border-radius: var(--pd-radius); background: var(--pd-white); color: var(--pd-ink);
    font-family: var(--pd-display); font-size: 1rem; font-weight: 700; text-decoration: none; font-variant-numeric: tabular-nums;
}
.entry-content .psd-page-links a.post-page-numbers:hover { border-color: var(--pd-brand); color: var(--pd-brand); }
.entry-content .psd-page-links .post-page-numbers.current { background: var(--pd-brand); border-color: var(--pd-brand); color: #fff; }

.psd-team { margin: 2.75rem 0 0; padding: 1.25rem 1.5rem; background: var(--pd-ground); border: 1px solid var(--pd-rule); border-left: 4px solid var(--pd-brand); border-radius: 0 var(--pd-radius) var(--pd-radius) 0; }
.psd-team-title { margin: 0 0 0.5rem; font-family: var(--pd-display); font-size: 0.875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--pd-ink); }
.psd-team p { margin: 0; font-size: 0.9375rem; line-height: 1.65; color: var(--pd-text); }
.psd-team .psd-team-more { margin-top: 0.5rem; }
.psd-team-more a { display: inline-flex; align-items: center; min-height: 40px; font-weight: 600; }

.psd-related { margin: clamp(3rem, 6vw, 4.5rem) 0 0; }


/* Mosaic: the hero is a plain square-cornered picture closed by a 4px black rule. */
.psd-article-head { max-width: none; padding-bottom: clamp(1.25rem, 2.6vw, 1.75rem); margin-bottom: clamp(1.5rem, 3vw, 2.25rem); border-bottom: var(--pd-board) solid var(--pd-ink); }
.psd-article-head > * { max-width: 900px; }
.psd-hero { margin: 0 0 clamp(1.5rem, 3vw, 2.25rem); padding: 0; border: 0; }
.psd-article { min-width: 0; }
/* The lifted top-of-article ad (psd_article_parts): above the photo on phones, under it on desktop. Space reserved. */
.psd-layout-main { display: flex; flex-direction: column; }
.psd-layout-main > * { order: 2; }
.psd-layout-main > .psd-hero { order: 0; }
.psd-layout-main > .psd-atf { order: 1; min-height: 280px; margin: 0 0 clamp(1.5rem, 3vw, 2.25rem); }
.psd-atf .code-block { margin: 0 !important; }
.psd-atf:has(ins[data-ad-status="unfill-optimized"]), .psd-atf:has(ins[data-ad-status="unfilled"]) { display: none; }
.psd-article-tag { margin-top: 0.6rem; }
.psd-title { font-weight: 600; line-height: 1.04; }
.psd-standfirst { font-family: var(--pd-body); }
.psd-article-meta { font-size: 0.875rem; font-weight: 600; letter-spacing: 0.08em; }
.psd-article .entry-content h2 { font-weight: 700; line-height: 1.08; }
.psd-article .entry-content h3 { font-weight: 600; line-height: 1.12; }
.psd-article .entry-content h4 { font-size: 1.3125rem; font-weight: 600; }
.psd-article .entry-content strong { font-weight: 700; }
.psd-article .entry-content figure img, .psd-article .entry-content p > img { padding: 0; border: 0; }
.psd-article .entry-content figcaption, .psd-caption { font-family: var(--pd-body); font-style: italic; font-size: 0.875rem; }
.psd-item-no { font-size: 1.25em; }
.psd-article .entry-content th { background: var(--pd-ink); color: #fff; font-size: 0.9375rem; border-bottom: 0; }
.psd-article .entry-content blockquote { background: var(--pd-brand-tint); }
.psd-toc { background: var(--pd-white); border: 1px solid var(--pd-ink); }
.psd-toc-title { font-size: 1.0625rem; }
.psd-toc-count { font-size: 0.875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.psd-article .entry-content .psd-toc-list a { font-family: var(--pd-body); font-size: 1rem; font-weight: 500; }
.psd-article .entry-content .psd-toc-list a::before { font-size: 1.0625rem; }
.entry-content .psd-page-links .post-page-numbers { border-color: var(--pd-ink); font-size: 1.125rem; }
.entry-content .psd-page-links .post-page-numbers.current { background: var(--pd-ink); border-color: var(--pd-ink); }
.psd-page-next { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin: 1rem 0 0.5rem; }
.entry-content .psd-page-next a { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 48px; padding: 0 1.5rem; background: var(--pd-ink); color: #fff; font-family: var(--pd-ui); font-size: 1.0625rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; }
.entry-content .psd-page-next a:hover { background: var(--pd-brand); color: #fff; }
.psd-team { background: var(--pd-white); border: 1px solid var(--pd-rule); border-left: var(--pd-board) solid var(--pd-ink); }
.psd-team-title { font-size: 1.0625rem; }
.psd-team-more a { gap: 0.35rem; }
.psd-pager .page-numbers { border-color: var(--pd-ink); font-size: 1.125rem; font-weight: 700; min-width: 44px; height: 44px; }
.psd-pager .page-numbers.current { background: var(--pd-ink); border-color: var(--pd-ink); }
.psd-pager a.page-numbers:hover { background: var(--pd-brand-tint); }
.psd-pager-count { font-size: 0.8125rem; }

/* main.css sets content-visibility:auto (500px placeholder) on the comments; the form is taller,
   so it painted late and shifted the page (visual QA 2026-10-08 on the fork). */
.comments-area { margin-top: 2rem; padding-top: 0; border-top: 0; content-visibility: visible; contain-intrinsic-size: none; }
.comments-area .comments-title, .comments-area .comment-reply-title { font-size: var(--pd-h3); }
.comments-area .comment-list { list-style: none; padding: 0; }
.comments-area .comment-respond { margin: 0; background: var(--pd-ground); border: 1px solid var(--pd-rule); border-radius: var(--pd-radius); }
.comments-area label, .comments-area .comment-notes, .comments-area .logged-in-as { color: var(--pd-meta); }
.comments-area input:not([type="checkbox"]):not([type="submit"]), .comments-area textarea { border-radius: var(--pd-radius); border: 1px solid var(--pd-rule); background: var(--pd-white); color: var(--pd-ink); }
.comments-area input:focus, .comments-area textarea:focus { border-color: var(--pd-brand); outline: none; }
.comments-area .submit, .comments-area #submit { background: var(--pd-brand) !important; border: none; border-radius: var(--pd-radius) !important; color: #fff !important; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; min-height: 48px; padding: 0 1.5rem; cursor: pointer; }
.comments-area .submit:hover, .comments-area #submit:hover { background: var(--pd-brand-dark) !important; }
.comments-area .comment-body { background: transparent; border: 0; border-bottom: 1px solid var(--pd-rule); border-radius: 0; }
.comment-form-cookies-consent { display: flex; align-items: flex-start; gap: 0.5rem; }
.comment-form-cookies-consent input { flex: 0 0 auto; margin: 0.3rem 0 0; }
.comment-form-cookies-consent label { margin: 0; }

/* --- Sidebar ------------------------------------------------------------------------ */

.psd-sidebar { display: flex; flex-direction: column; gap: 2rem; min-width: 0; }
.psd-widget { min-width: 0; }

/* Most read: 80px photo, headline. */
.psd-thumbs { list-style: none; margin: 0; padding: 0; }
.psd-thumbs li { display: flex; gap: 0.9rem; align-items: center; margin: 0; padding: 0.8rem 0; border-bottom: 1px solid var(--pd-rule); }
.psd-thumbs li:last-child { border-bottom: 0; }
.psd-thumbs-img { flex: none; display: block; width: 80px; height: 80px; overflow: hidden; background: var(--pd-deep); }
.psd-thumbs-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.psd-thumbs-text { min-width: 0; line-height: 1.15; }
.psd-thumbs-title { font-family: var(--pd-display); font-size: 1.1875rem; font-weight: 600; line-height: 1.15; color: var(--pd-ink); text-decoration: none; }
.psd-thumbs-title:hover { color: var(--pd-brand); text-decoration: underline; text-underline-offset: 0.16em; }

.psd-deptlist { list-style: none; margin: 0; padding: 0; }
.psd-deptlist li { margin: 0; border-bottom: 1px solid var(--pd-rule); }
.psd-deptlist li:last-child { border-bottom: 0; }
.psd-deptlist a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 48px; color: var(--pd-ink); text-decoration: none; font-family: var(--pd-ui); font-size: 1.0625rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.psd-deptlist a:hover, .psd-deptlist a.is-current { color: var(--pd-brand); }
.psd-count { font-size: 0.9375rem; font-weight: 600; color: var(--pd-meta); font-variant-numeric: tabular-nums; }

/* The newsletter card and band: solid black, the rust button. */
.psd-widget-news { padding: 1.5rem; background: var(--pd-ink); color: var(--pd-on-ink); }
.psd-newsletter-label { margin: 0 0 0.4rem; font-size: 0.875rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pd-on-ink-accent); }
.psd-widget-news-title { margin: 0; font-size: 1.75rem; font-weight: 700; line-height: 1.05; text-transform: uppercase; color: var(--pd-on-ink); text-wrap: balance; }
.psd-widget-news .psd-newsletter-note { margin: 0.6rem 0 1rem; font-family: var(--pd-body); font-size: 0.9375rem; line-height: 1.55; color: var(--pd-on-ink-meta); }
.psd-widget-news .newsletter-form { display: flex; flex-direction: column; gap: 0.6rem; }
.psd-widget-news input[type="email"], .psd-newsletter input[type="email"], .psd-inline-news input[type="email"] {
    min-height: 50px; padding: 0 1rem; border: 1px solid var(--pd-ink); border-radius: 0; background: var(--pd-white); color: var(--pd-ink); font-family: var(--pd-body); font-size: 1rem;
}
.psd-widget-news input[type="email"]:focus, .psd-newsletter input[type="email"]:focus, .psd-inline-news input[type="email"]:focus { outline: 2px solid var(--pd-on-ink-accent); outline-offset: 2px; }
.psd-widget-news button, .psd-newsletter button, .psd-inline-news button {
    min-height: 50px; padding: 0 1.5rem; border: 0; border-radius: 0; background: var(--pd-brand); color: #fff;
    font-family: var(--pd-ui); font-weight: 700; font-size: 1.0625rem; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; transition: background 0.2s;
}
.psd-widget-news button:hover, .psd-newsletter button:hover, .psd-inline-news button:hover { background: var(--pd-brand-dark); }
.psd-sidebar .psd-ad { min-height: 290px; }
.newsletter-message { margin-top: 0.75rem; font-weight: 600; }
.psd-widget-news .newsletter-message, .psd-newsletter .newsletter-message { color: var(--pd-on-ink); }

.psd-newsletter { margin-top: clamp(1rem, 2vw, 1.5rem); padding: clamp(2.5rem, 5vw, 3.75rem) var(--pd-gutter); background: var(--pd-ink); color: var(--pd-on-ink); border-bottom: 1px solid #2E2B28; }
.psd-newsletter-inner { max-width: calc(var(--pd-page-max) - 2 * var(--pd-gutter)); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem clamp(2rem, 5vw, 4.5rem); align-items: center; }
.psd-newsletter-copy, .psd-newsletter-form { min-width: 0; }
.psd-newsletter h2 { margin: 0 0 0.6rem; font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3.25rem); font-weight: 700; line-height: 1; text-transform: uppercase; color: var(--pd-on-ink); text-wrap: balance; }
.psd-newsletter-dek { margin: 0; max-width: 34em; font-size: 1.0625rem; line-height: 1.6; color: var(--pd-on-ink-meta); }
.psd-newsletter .newsletter-form { display: flex; flex-direction: row; gap: 0; width: 100%; max-width: 560px; }
.psd-newsletter input[type="email"] { flex: 1 1 auto; min-width: 0; min-height: 54px; border-color: var(--pd-white); }
.psd-newsletter button { min-height: 54px; white-space: nowrap; flex: none; }
.psd-newsletter-note { margin: 0.85rem 0 0; font-family: var(--pd-body); font-size: 0.875rem; color: var(--pd-on-ink-meta); }

/* --- Footer: black ------------------------------------------------------------------- */

.psd-footer { background: var(--pd-ink); color: var(--pd-on-ink); }
.psd-footer-inner { max-width: var(--pd-page-max); margin: 0 auto; padding: clamp(2.5rem, 5vw, 3.5rem) var(--pd-gutter) 2rem; }
.psd-footer-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem 3rem; flex-wrap: wrap; padding-bottom: 2rem; border-bottom: 1px solid #2E2B28; }
.psd-footer-brand { min-width: 0; max-width: 26rem; }
.psd-footer-word { display: inline-flex; }
.psd-logo--footer { font-size: 2rem; color: var(--pd-on-ink); }
.psd-footer-about { margin: 0.8rem 0 0; font-size: 0.9375rem; line-height: 1.6; color: var(--pd-on-ink-meta); }
.psd-footer-mail { margin: 0.4rem 0 0; font-size: 0.9375rem; overflow-wrap: anywhere; }
.psd-footer-mail a, .psd-social a { display: inline-flex; align-items: center; min-height: 44px; color: var(--pd-on-ink); text-decoration: underline; text-underline-offset: 0.2em; }
.psd-footer-mail a:hover, .psd-social a:hover { color: var(--pd-on-ink-accent); }
.psd-social { display: flex; flex-wrap: wrap; gap: 0 1.25rem; list-style: none; margin: 0; padding: 0; }
.psd-flist { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.psd-flist:empty { display: none; }
.psd-flist li { margin: 0; }
.psd-flist a { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; color: var(--pd-on-ink); font-family: var(--pd-body); font-size: 0.9375rem; text-decoration: none; }
.psd-flist a:hover { color: var(--pd-on-ink-accent); text-decoration: underline; text-underline-offset: 0.25em; }
.psd-footer-topics .psd-flist a { font-family: var(--pd-ui); font-size: 1.0625rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.psd-fcount { font-weight: 600; color: var(--pd-on-ink-accent); font-variant-numeric: tabular-nums; }
.psd-footer-links { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.25rem; padding: 1.25rem 0; border-bottom: 1px solid #2E2B28; }
.psd-footer-links nav { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); align-items: baseline; gap: 0 1rem; }
.psd-fhead { margin: 0; font-size: 0.875rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pd-on-ink-meta); }
.psd-footer-small { padding-top: 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; }
.psd-footer-owner, .psd-colophon { margin: 0; max-width: 64rem; font-family: var(--pd-body); font-size: 0.8125rem; line-height: 1.6; color: var(--pd-on-ink-meta); }
.psd-footer-owner { color: var(--pd-on-ink); }
.psd-footer .psd-footer-note { color: var(--pd-on-ink-meta); }

/* --- Static pages, empty states ------------------------------------------------------ */

.psd-page { max-width: 820px; margin: clamp(1.75rem, 3.5vw, 2.75rem) auto 0.5rem; padding: 0 var(--pd-gutter); }
.psd-empty { max-width: 680px; margin: clamp(2rem, 4vw, 3rem) auto 2rem; padding: 2.5rem 1.5rem; text-align: center; background: var(--pd-white); border: 1px solid var(--pd-rule); border-bottom: var(--pd-board) solid var(--pd-ink); border-radius: var(--pd-radius); }
.psd-empty h1, .psd-empty h2 { font-size: var(--pd-title); font-weight: 700; margin: 0.5rem 0 0.75rem; }
.psd-empty .search-form { display: flex; gap: 0.5rem; justify-content: center; margin-top: 1.25rem; }
.psd-deptlist--chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 1.25rem; }
.psd-deptlist--chips li { border-bottom: 0; }
.psd-deptlist--chips a { padding: 0 1rem; border: 1px solid var(--pd-rule); border-radius: var(--pd-radius); background: var(--pd-white); }
.psd-deptlist--chips a:hover { border-color: var(--pd-brand); color: var(--pd-brand); }

.psd-page-head { position: relative; text-align: left; margin: 0 0 2rem; padding: 0 0 calc(1.5rem + var(--pd-board)); }
.psd-page-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: var(--pd-board); background: var(--pd-ink); }
.psd-page-kicker { margin: 0 0 .75rem; }
.psd-page-kicker { display: inline-flex; padding: 0.45rem 0.7rem 0.42rem; border-radius: 3px; background: var(--pd-tape); color: var(--pd-tape-text); font-family: var(--pd-ui); font-size: 0.75rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; }
.psd-page-head .psd-page-title { margin: 0; font-family: var(--pd-display); font-size: var(--pd-title); font-weight: 700; line-height: 1.06; letter-spacing: 0; color: var(--pd-ink); text-wrap: balance; }
.psd-page-standfirst { margin: .85rem 0 0; font-size: 1.125rem; line-height: 1.6; color: var(--pd-meta); max-width: 40rem; }
.psd-page-updated { margin: .9rem 0 0; font-family: var(--pd-ui); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--pd-meta); }
.psd-page .entry-content { font-size: var(--pd-size-body); line-height: var(--pd-lh-body); }
.psd-page .entry-content h2 { font-family: var(--pd-display); font-size: clamp(1.5rem, 1.3rem + .6vw, 1.8125rem); font-weight: 700; line-height: 1.15; margin: 2.5rem 0 .75rem; scroll-margin-top: 1.5rem; }
.psd-page .entry-content h2:first-child { margin-top: 0; }
.psd-page .entry-content a { color: var(--pd-brand); }
.psd-onpage { margin: 0 0 2rem; padding: 1.1rem 1.4rem; background: var(--pd-white); border: 1px solid var(--pd-rule); border-radius: var(--pd-radius); }
.psd-onpage-title { margin: 0 0 .5rem; font-family: var(--pd-display); font-size: 0.875rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--pd-ink); }
.psd-page .entry-content .psd-onpage ol { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 2rem; }
.psd-page .entry-content .psd-onpage li { margin: 0; padding: 0; break-inside: avoid; }
.psd-page .entry-content .psd-onpage li::marker { content: none; }
.psd-page .entry-content .psd-onpage a { display: flex; gap: .6rem; align-items: baseline; min-height: 44px; padding: .45rem 0; color: var(--pd-ink); text-decoration: none; font-family: var(--pd-ui); font-size: 0.9375rem; font-weight: 600; line-height: 1.35; }
.psd-page .entry-content .psd-onpage a:hover span:last-child { text-decoration: underline; color: var(--pd-brand); }
.psd-onpage-num { flex: none; font-family: var(--pd-display); font-weight: 700; color: var(--pd-brand); }
.psd-page-ask { margin: 2.25rem 0 0; padding: 1.25rem 1.5rem; background: var(--pd-white); border: 1px solid var(--pd-rule); border-left: 4px solid var(--pd-brand); border-radius: 0 var(--pd-radius) var(--pd-radius) 0; }
.psd-page-ask-title { margin: 0 0 .25rem; font-family: var(--pd-display); font-weight: 700; font-size: 1.125rem; }
.psd-page-ask p { margin: 0; }
.psd-page-ask a, .psd-contact-email a { display: inline-flex; align-items: center; min-height: 44px; color: var(--pd-brand); font-weight: 600; }
.psd-contact-intro { margin: 0 0 1.5rem; padding: 0 0 1.25rem; border-bottom: 1px solid var(--pd-rule); }
.psd-contact-intro p { margin: 0 0 .5rem; }
.psd-contact-email { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

/* Theme contact form (inc/contact-form.php; off here — the page carries CF7). */
.psd-contact-form { margin: 1.75rem 0 2rem; padding: clamp(1.25rem, 3vw, 2rem); background: var(--pd-white); border: 1px solid var(--pd-rule); border-top: 4px solid var(--pd-brand); border-radius: var(--pd-radius); }
.psd-contact-form-title { margin: 0 0 1.25rem; font-family: var(--pd-display); font-weight: 700; font-size: 1.5rem; line-height: var(--pd-lh-head); color: var(--pd-ink); }
.psd-contact-row { display: grid; grid-template-columns: 1fr; gap: 0 1rem; }
@media (min-width: 640px) { .psd-contact-row { grid-template-columns: 1fr 1fr; } }
.psd-page .inedit-form-group { margin: 0 0 1.1rem; display: flex; flex-direction: column; gap: .35rem; }
.psd-page .inedit-form-group label { font-weight: 600; font-size: .9375rem; color: var(--pd-ink); }
.psd-page .inedit-form-group input, .psd-page .inedit-form-group select, .psd-page .inedit-form-group textarea { width: 100%; box-sizing: border-box; font-size: 1.0625rem; min-height: 50px; padding: .6rem .85rem; border: 1px solid var(--pd-rule); border-radius: var(--pd-radius); background: var(--pd-white); color: var(--pd-ink); }
.psd-page .psd-contact-form textarea { min-height: 180px; resize: vertical; line-height: 1.55; }
.psd-page .psd-contact-form input:focus, .psd-page .psd-contact-form select:focus, .psd-page .psd-contact-form textarea:focus { outline: 2px solid var(--pd-brand); outline-offset: 1px; border-color: var(--pd-brand); }
.psd-optional { font-weight: 400; color: var(--pd-meta); }
.psd-contact-hint { margin: .1rem 0 0; font-size: .9375rem; color: var(--pd-meta); }
.psd-contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-top: .5rem; }
.psd-page .inedit-contact-submit { min-height: 50px; padding: 0 1.5rem; border: 0; border-radius: var(--pd-radius); background: var(--pd-brand); color: #fff; font-weight: 600; font-size: .875rem; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
.psd-page .inedit-contact-submit:hover { background: var(--pd-brand-dark); }
.psd-page .inedit-contact-submit:disabled { opacity: .7; cursor: wait; }
.psd-contact-privacy { margin: 0; font-size: .9375rem; color: var(--pd-meta); }
.psd-contact-privacy a { color: var(--pd-brand); }
.psd-contact-status { margin-top: 1rem; }
.psd-contact-status:empty { display: none; }
.psd-contact-status.is-ok, .psd-contact-status.is-error { padding: .85rem 1rem; border-radius: var(--pd-radius); font-weight: 600; }
.psd-contact-status.is-ok { background: #EAF1E8; color: #1E4D2B; border: 1px solid #B9D2B3; }
.psd-contact-status.is-error { background: #F8EAE7; color: #7A2617; border: 1px solid #E3BDB4; }
.psd-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* Contact Form 7 on the Contact page: match the theme. */
.psd-page .wpcf7 input:not([type="submit"]):not([type="checkbox"]), .psd-page .wpcf7 textarea { width: 100%; box-sizing: border-box; min-height: 50px; padding: .6rem .85rem; border: 1px solid var(--pd-rule); border-radius: var(--pd-radius); background: var(--pd-white); color: var(--pd-ink); font-family: var(--pd-body); font-size: 1.0625rem; }
.psd-page .wpcf7 input[type="submit"] { min-height: 50px; padding: 0 1.5rem; border: 0; border-radius: var(--pd-radius); background: var(--pd-brand); color: #fff; font-family: var(--pd-ui); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
.psd-page .wpcf7 input[type="submit"]:hover { background: var(--pd-brand-dark); }

/* Inline newsletter card inside long numbered lists (psd_inline_newsletter). */
.psd-inline-news { margin: 2.25rem 0; padding: 1.25rem 1.4rem; background: var(--pd-ground); border: 1px solid var(--pd-rule); border-bottom: var(--pd-board) solid var(--pd-ink); border-radius: var(--pd-radius); }
.psd-inline-news .psd-newsletter-label { margin: 0 0 0.25rem; }
.psd-inline-news-title { margin: 0 0 0.85rem !important; font-family: var(--pd-display); font-weight: 700; font-size: 1.3125rem; line-height: 1.15; color: var(--pd-ink); }
.psd-inline-news .newsletter-form { display: flex; flex-direction: row; flex-wrap: wrap; align-items: stretch; gap: 0.5rem; }
.psd-inline-news input[type=email] { flex: 1 1 220px; width: auto; min-width: 0; }
.psd-inline-news button { flex: 0 0 auto; }


/* Mosaic adjustments to the shared page/empty blocks. */
.psd-page-kicker { background: var(--pd-ink); color: #fff; border-radius: 0; font-size: 0.875rem; font-weight: 700; }
.psd-page-head .psd-page-title { font-weight: 600; }
.psd-page .entry-content h2 { font-weight: 700; }
.psd-page-updated, .psd-onpage-title { font-size: 0.875rem; }
.psd-page .entry-content .psd-onpage a { font-family: var(--pd-body); font-weight: 500; }
.psd-empty { border-color: var(--pd-ink); }
.psd-deptlist--chips a { border-color: var(--pd-ink); border-radius: 0; padding: 0 1rem; }
.psd-inline-news { background: var(--pd-ink); border: 0; color: #fff; }
.psd-inline-news-title { color: #fff; text-transform: uppercase; font-size: 1.5rem; }
.site-main > .psd-empty { width: calc(100% - 2 * var(--pd-gutter)); }

/* --- Responsive ------------------------------------------------------------------------ */

@media (max-width: 1180px) {
    .psd-mast-nav .primary-menu { gap: 0 1.1rem; }
    .psd-mast-nav .main-navigation a { font-size: 0.9375rem; letter-spacing: 0.06em; }
}

@media (max-width: 1024px) {
    /* Masthead: wordmark left; search + menu right; topics in the drawer. */
    .psd-mast-row { min-height: 64px; }
    .psd-nav-tools { padding-left: 0; border-left: 0; }
    .psd-masthead .mobile-menu-toggle { display: inline-flex !important; width: 44px; height: 44px; align-items: center; justify-content: center; flex-direction: column; gap: 5px; background: transparent; border: 0; }
    .psd-masthead .hamburger-line { background: var(--pd-ink); }
    .psd-masthead .mobile-menu-toggle.active .hamburger-line { background: var(--pd-ink); }
    .psd-drawer-clip { display: block; position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 1000; }
    .psd-drawer-clip .main-navigation { position: absolute; pointer-events: auto; background: var(--pd-white); overflow-y: auto; padding: 0; max-width: none; display: block; }
    .psd-mast-nav .primary-menu, .psd-mast-nav .main-navigation ul.primary-menu { display: block; text-align: left; margin: 0; }
    .psd-mast-nav .main-navigation .primary-menu li { border-bottom: 1px solid var(--pd-rule); }
    .psd-mast-nav .main-navigation a { min-height: 58px; width: 100%; padding: 0 1.5rem; font-size: 1.375rem; letter-spacing: 0.06em; color: var(--pd-ink); }
    .psd-mast-nav .main-navigation a::after { display: none; }
    .psd-mast-nav .main-navigation .current-cat > a { background: var(--pd-brand-tint); color: var(--pd-brand); }
    .psd-mast-nav .main-navigation .psd-drawer-label { display: block; margin: 1.25rem 1.5rem 0.5rem; font-family: var(--pd-ui); font-size: 0.875rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pd-meta); }
    .psd-mast-nav .main-navigation .psd-drawer-sub { display: flex; align-items: center; justify-content: center; width: auto; margin: 1.5rem; min-height: 52px; padding: 0 1rem; font-size: 1.0625rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; background: var(--pd-ink); color: #fff; }
    .psd-masthead .mobile-menu-toggle.active { position: fixed; top: 0.75rem; left: auto; right: 0.75rem; z-index: 1002; }

    .psd-layout { grid-template-columns: minmax(0, 1fr); }
    .psd-layout > .psd-sidebar { margin-top: 1rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; align-items: start; }
    .psd-sidebar .psd-widget-news { display: none; }
    .psd-board--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .psd-topics, .psd-topics--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .psd-newsletter-inner { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
    /* Mosaic: the lead across the top with its natural 16:9 picture, then two-by-two. */
    .psd-mosaic-lead { grid-column: 1 / -1; grid-row: auto; }
    .psd-mosaic-lead .psd-frame { flex: none; min-height: 0; aspect-ratio: 16 / 9; }
    .psd-mosaic-cell, .psd-mosaic--2 .psd-mosaic-cell, .psd-mosaic--3 .psd-mosaic-cell { grid-column: span 6; }
    .psd-pair, .psd-pair--flip { grid-template-columns: minmax(0, 1fr); }
    .psd-pair--flip .psd-pair-big { order: 0; }
    .psd-pair-side { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
    .psd-pair-side .psd-side, .psd-pair-side .psd-side + .psd-side { padding: 0; border-top: 0; grid-template-columns: minmax(0, 1fr); gap: 0.75rem; }
    .psd-board--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .psd-tagline { font-size: 0.75rem; letter-spacing: 0.08em; }
    .psd-layout-main > .psd-atf { order: 0; min-height: 300px; }
    .psd-layout-main > .psd-hero { order: 1; }
    .psd-archive-head::after { inset: 0 0 0 55%; opacity: 0.45; }
    .psd-board--3, .psd-board--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 1rem; }
    .psd-topics, .psd-topics--5, .psd-topics--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 1rem; }
    .psd-card-title, .psd-topic-title, .psd-topics--5 .psd-topic-title { font-size: 1.1875rem; }
    .psd-mosaic { gap: 1.5rem 1rem; }
    .psd-mosaic-lead .psd-card-title { font-size: 1.875rem; }
    .psd-pair-side { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
    .psd-pair-side .psd-side, .psd-pair-side .psd-side + .psd-side { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 0 1rem; }
    .psd-side-title { font-size: 1.1875rem; }
    .psd-band { padding: 0 0.85rem; }
    .psd-band--rule { padding: 0.75rem 0 0; }
    .psd-topics--5 > :last-child { grid-column: 1 / -1; }
    .psd-band-aside { font-size: 0.8125rem; letter-spacing: 0.08em; }
    .psd-layout > .psd-sidebar { grid-template-columns: minmax(0, 1fr); }
    .psd-newsletter .newsletter-form { flex-direction: column; gap: 0.6rem; }
    .psd-page .entry-content .psd-onpage ol { columns: 1; }
    .psd-footer-links nav { grid-template-columns: minmax(0, 1fr); padding-top: 0.75rem; }
    .psd-flist { gap: 0 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; scroll-behavior: auto !important; }
    a.psd-frame:hover img { transform: none; }
}
