/*
Theme Name: Hassas Arts
Theme URI: https://hassasarts.com/
Author: Hassas Arts
Description: A literary-magazine theme for Hassas Arts: Pashto literature, poetry and thought. Right-to-left first, Lateef headings with Pashto Kror text, latest-posts ticker, dark mode, poem layouts with copy and save-as-image, writer pages and reader reactions.
Version: 1.1.0
Requires at least: 5.9
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hassas-arts
*/

/* ==========================================================================
   Fonts
   --------------------------------------------------------------------------
   Headings: Lateef, loaded from Google Fonts (inc/setup.php).
   Text:     Pashto Kror, self-hosted. Put the file in /fonts/ and the theme
             prints the matching @font-face rule for you (inc/fonts.php), e.g.

             @font-face {
               font-family: "Pashto Kror";
               src: url("fonts/pashto-kror.woff2") format("woff2"),
                    url("fonts/pashto-kror.ttf") format("truetype");
               font-weight: 400 700;
               font-display: swap;
             }

             Only the formats that are really in the folder are listed. AGT Patyal
             works the same way and can be chosen as the heading font in
             Appearance > Customize > Hassas Arts.
   ========================================================================== */

/* ==========================================================================
   Colours
   --------------------------------------------------------------------------
   The palette never changes: navy, paper white, saffron, antique gold, cream, mist.
   Light and dark mode only swap which palette colour plays which role.
   ========================================================================== */

:root {
	/* palette (constant) */
	--navy: #0F1A2E;
	--navy-2: #1B2A47;
	--cream: #F5F3EE;
	--mist: #B4BCCB;
	--accent: #F0A202;
	--gold: #C9A553;

	/* roles (light mode) */
	--ink: #0F1A2E;          /* text, rules, and the fill of buttons */
	--ink-2: #1B2A47;
	--ground: #FBFBF9;       /* page */
	--surface: #FFFFFF;      /* cards, header */
	--tint: #F0F1F5;         /* tinted bands */
	--text-2: #4A5468;
	--meta: #5F6878;
	--line: #E2E4EA;
	--line-strong: #8D94A3;
	--accent-ink: #8A5200;   /* saffron dark enough to read as text on paper */
	--glow: rgba(240, 162, 2, .28);

	--on-dark: var(--cream);
	--on-dark-2: var(--mist);

	--font-display: "Lateef", "Scheherazade New", "Noto Naskh Arabic", serif;
	--font-body: "Pashto Kror", Tahoma, "Segoe UI", "Noto Naskh Arabic", sans-serif;
	--ds: 1; /* heading scale: Lateef draws small, other heading fonts are scaled down */
	--container: 1280px;
	--measure: 780px;
	--lattice: repeating-linear-gradient(45deg, rgba(240, 162, 2, .16) 0 1px, transparent 1px 26px), repeating-linear-gradient(-45deg, rgba(240, 162, 2, .16) 0 1px, transparent 1px 26px);
	--lattice-soft: repeating-linear-gradient(45deg, rgba(255, 255, 255, .04) 0 1px, transparent 1px 34px), repeating-linear-gradient(-45deg, rgba(255, 255, 255, .04) 0 1px, transparent 1px 34px);
}

/* Dark mode: the same palette with the roles turned round. Set by the header button (assets/js/main.js). */
:root[data-theme="dark"] {
	--ink: #F5F3EE;
	--ink-2: #B4BCCB;
	--ground: #0F1A2E;
	--surface: #1B2A47;
	--tint: #1B2A47;
	--text-2: #B4BCCB;
	--meta: #B4BCCB;
	--line: rgba(245, 243, 238, .16);
	--line-strong: rgba(180, 188, 203, .55);
	--accent-ink: #F0A202;
	--glow: rgba(240, 162, 2, .34);
	color-scheme: dark;
}

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

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

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

body {
	margin: 0;
	background: var(--ground);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.95;
	direction: rtl;
	text-align: right;
	font-synthesis: none;
	-webkit-font-smoothing: antialiased;
	overflow-wrap: break-word;
	transition: background-color .25s ease, color .25s ease;
}

body.has-drawer { overflow: hidden; }

h1, h2, h3, h4, h5, h6 {
	margin: 0;
	font-family: var(--font-display);
	font-weight: 800;
	line-height: 1.4;
	text-wrap: balance;
}

p { margin: 0 0 1.4rem; }

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .32em; }

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

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }

/* English-only text keeps its own direction and a Latin face */
[dir="ltr"] { text-align: left; }

[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	top: -5rem;
	inset-inline-start: 1rem;
	z-index: 200;
	padding: .6rem 1.2rem;
	background: var(--navy);
	color: var(--cream);
}
.skip-link:focus { top: 1rem; }

.container {
	width: 100%;
	max-width: var(--container);
	margin-inline: auto;
	padding-inline: clamp(1rem, 4vw, 2rem);
}
.container--narrow { max-width: calc(var(--measure) + 4rem); }

.meta { font-family: var(--font-body); font-size: .84rem; line-height: 1.6; color: var(--meta); }
.kicker { font-family: var(--font-body); font-size: .84rem; line-height: 1.6; color: var(--accent-ink); }

.chip {
	display: inline-block;
	padding: .15rem .8rem;
	background: var(--accent);
	color: var(--navy);
	font-family: var(--font-body);
	font-size: .875rem;
	line-height: 1.7;
}
a.chip:hover { text-decoration: none; background: var(--gold); }

/* Status badges: new / trending / hot (inc/stats.php) */
.badge {
	display: inline-flex;
	align-items: center;
	margin-inline-end: .5rem;
	padding: 0 .5rem;
	font-family: var(--font-body);
	font-size: .6875rem;
	line-height: 1.75;
	white-space: nowrap;
	vertical-align: middle;
}
.badge--new { background: var(--accent); color: var(--navy); }
.badge--trending { background: var(--ink); color: var(--ground); }
.badge--hot { background: var(--gold); color: var(--navy); }
.poem-card--dark .badge--trending, .site-footer .badge--trending { background: var(--cream); color: var(--navy); }

/* Buttons: every tap target is at least 48px tall */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .6rem;
	min-height: 3rem;
	padding: 0 1.6rem;
	border: 1px solid var(--ink);
	background: var(--ink);
	color: var(--ground);
	font-family: var(--font-body);
	font-size: 1rem;
	line-height: 1.5;
	text-decoration: none;
	transition: background-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.btn:hover { text-decoration: none; background: var(--ink-2); border-color: var(--ink-2); transform: translateY(-1px); }
.btn--sm { padding: 0 1.3rem; font-size: .9375rem; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.btn--gold { border-color: var(--gold); background: var(--gold); color: var(--navy); }
.btn--gold:hover { border-color: var(--gold); background: var(--gold); box-shadow: 0 8px 22px var(--glow); }

.icon-btn {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
}

/* ==========================================================================
   Covers (16:9 everywhere) and portraits
   ========================================================================== */

.cover {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background-color: var(--tint);
	transition: box-shadow .35s ease;
}
/* The geometric pattern is only the fallback for a post with no picture */
.cover--empty { background-color: var(--navy); background-image: var(--lattice); }
/* Old and new uploads alike are cropped to the frame, never stretched */
.cover__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.cover__ornament {
	position: absolute;
	top: 22%;
	left: 50%;
	height: 56%;
	aspect-ratio: 1 / 1;
	transform: translateX(-50%);
	border: 1.5px solid var(--accent);
	background: var(--navy);
}
.cover__ornament::before {
	content: "";
	position: absolute;
	inset: -1.5px;
	border: 1.5px solid var(--accent);
	transform: rotate(45deg);
}
.cover__ornament::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: .7rem;
	height: .7rem;
	background: var(--accent);
	transform: translate(-50%, -50%) rotate(45deg);
}
.cover__play {
	position: absolute;
	top: 50%;
	left: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3.25rem;
	height: 3.25rem;
	border-radius: 50%;
	background: var(--accent);
	color: var(--navy);
	transform: translate(-50%, -50%);
}
.cover--shadow { box-shadow: -14px 14px 0 var(--accent); }

/* Card hover: gentle zoom of the picture and a soft saffron glow */
a:hover .cover__img, .lead-card:hover .cover__img { transform: scale(1.04); }
a:hover .cover:not(.cover--shadow), .lead-card:hover .cover { box-shadow: 0 0 0 1px var(--accent), 0 10px 28px var(--glow); }

.portrait {
	position: relative;
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: var(--portrait, 52px);
	height: var(--portrait, 52px);
	border-radius: 50%;
	background: var(--ink);
	color: var(--ground);
}
.portrait__initial {
	font-family: var(--font-display);
	font-size: calc(var(--portrait, 52px) * .58);
	font-weight: 700;
	line-height: 1;
}
/* The photo sits on top of the initial badge; when there is none the badge shows */
.portrait__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
}
.portrait--ring { box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--accent); }

/* ==========================================================================
   Top bar, header, navigation
   ========================================================================== */

.topbar { background: var(--navy); color: var(--cream); font-size: .8125rem; line-height: 1.5; }
.topbar__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 1.5rem; }
.topbar__tagline { padding: .5rem 0; color: var(--mist); }
.topbar .menu { display: flex; flex-wrap: wrap; gap: 0 1.4rem; margin: 0; padding: 0; list-style: none; }
.topbar .menu a { display: inline-flex; align-items: center; min-height: 2.25rem; }

/* One compact row on every page: logo on the right, menu in the middle, search and dark mode on the left */
.site-header { position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--ink); transition: background-color .25s ease; }
.admin-bar .site-header { top: 32px; }
.site-header__inner { display: flex; align-items: center; gap: 0 1.5rem; min-height: 4rem; }

.site-brand { flex: none; margin: 0; font-size: 1rem; line-height: 1; }
.site-brand a { display: inline-flex; flex-direction: column; align-items: center; text-decoration: none; }
/* multiply lets a logo saved on a white background sit on any light header */
.site-brand .custom-logo { display: block; width: auto; max-width: 100%; height: auto; max-height: 3.6rem; mix-blend-mode: multiply; }
.site-brand__name { font-family: var(--font-display); font-size: calc(var(--ds) * 2.6rem); font-weight: 800; line-height: 1.3; }
.site-brand__latin { display: none; }

.menu-toggle { display: none; border: 1px solid var(--ink); }

.primary-nav { flex: 1 1 auto; min-width: 0; }
.primary-nav .menu { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 clamp(.8rem, 1.3vw, 1.5rem); margin: 0; padding: 0; list-style: none; }
.primary-nav .menu > li { position: relative; }
.primary-nav a {
	position: relative;
	display: inline-flex;
	align-items: center;
	min-height: 4rem;
	font-family: var(--font-display);
	font-size: calc(var(--ds) * clamp(1.25rem, 1.5vw, 1.5rem));
	font-weight: 700;
	line-height: 1.4;
	white-space: nowrap;
}
.primary-nav a:hover { text-decoration: none; }
/* Underline that grows from right to left */
.primary-nav .menu > li > a::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: .8rem;
	left: 0;
	height: 3px;
	background: var(--accent);
	transform: scaleX(0);
	transform-origin: right center;
	transition: transform .3s ease;
}
.primary-nav .menu > li > a:hover::after,
.primary-nav .menu > li:focus-within > a::after,
.primary-nav .current-menu-item > a::after,
.primary-nav .current-menu-ancestor > a::after,
.primary-nav .current-category-ancestor > a::after,
.primary-nav .current-post-ancestor > a::after { transform: scaleX(1); }

.primary-nav .sub-menu {
	position: absolute;
	top: 100%;
	inset-inline-start: -1rem;
	z-index: 40;
	display: none;
	min-width: 15rem;
	margin: 0;
	padding: .4rem 0;
	list-style: none;
	background: var(--surface);
	border: 1px solid var(--ink);
	box-shadow: 0 18px 40px rgba(15, 26, 46, .22);
}
.primary-nav li:hover > .sub-menu,
.primary-nav li:focus-within > .sub-menu { display: block; }
.primary-nav .sub-menu a { display: flex; min-height: 2.6rem; padding: 0 1.1rem; font-size: calc(var(--ds) * 1.35rem); font-weight: 600; white-space: normal; transition: background-color .2s ease, padding .2s ease; }
.primary-nav .sub-menu a:hover { background: var(--tint); padding-inline-start: 1.5rem; }

.site-tools { display: flex; flex: none; align-items: center; gap: .15rem; margin-inline-start: auto; }
.theme-toggle__sun { display: none; }
:root[data-theme="dark"] .theme-toggle__moon { display: none; }
:root[data-theme="dark"] .theme-toggle__sun { display: block; }
.icon-btn:hover { color: var(--accent-ink); }

.site-search { border-top: 1px solid var(--line); background: var(--surface); }
.site-search .container { padding-block: .8rem; }

.search-form { display: flex; gap: .6rem; }
.search-form__input {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 3rem;
	padding: 0 1rem;
	border: 1px solid var(--line-strong);
	background: var(--surface);
	color: var(--ink);
	font-size: 1rem;
}

/* Tablets and phones: menu button on the right, drawer slides in from the right */
@media (max-width: 1179.98px) {
	.topbar .menu { display: none; }
	.menu-toggle { display: inline-flex; }
	.primary-nav { display: none; }
	.site-header__inner { justify-content: space-between; min-height: 3.75rem; }
	.site-tools { margin-inline-start: 0; }
	.site-brand .custom-logo { max-height: 2.75rem; }
	.site-brand__name { font-size: calc(var(--ds) * 2.3rem); }
}
@media (max-width: 782px) {
	.admin-bar .site-header { top: 46px; }
}
@media (max-width: 600px) {
	.admin-bar .site-header { top: 0; }
}

.drawer { position: fixed; inset: 0; z-index: 100; display: flex; }
.drawer__panel {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	width: min(84vw, 21rem);
	height: 100%;
	padding: 1rem 1.4rem 1.75rem;
	overflow-y: auto;
	overscroll-behavior: contain;
	background: var(--navy);
	color: var(--cream);
	transform: translateX(100%);
	transition: transform .25s ease;
}
.drawer__overlay { flex: 1 1 auto; padding: 0; border: 0; background: rgba(15, 26, 46, .6); opacity: 0; transition: opacity .25s ease; }
.drawer.is-open .drawer__panel { transform: translateX(0); }
.drawer.is-open .drawer__overlay { opacity: 1; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.drawer__name { font-family: var(--font-display); font-size: calc(var(--ds) * 2.5rem); font-weight: 800; line-height: 1.35; }
.drawer__close { border: 1px solid rgba(245, 243, 238, .3); }
.drawer .icon-btn:hover { color: var(--gold); }
.drawer .search-form { margin: .5rem 0 .75rem; }
.drawer .search-form__input { border-color: rgba(245, 243, 238, .3); background: transparent; color: var(--cream); }
.drawer .search-form .btn { border-color: var(--gold); background: var(--gold); color: var(--navy); }
.drawer .menu, .drawer .sub-menu { margin: 0; padding: 0; list-style: none; }
.drawer .menu > li { display: flex; flex-wrap: wrap; align-items: center; border-bottom: 1px solid rgba(245, 243, 238, .14); }
.drawer .menu a {
	display: flex;
	flex: 1 1 0;
	align-items: center;
	min-height: 3.3rem;
	font-family: var(--font-display);
	font-size: calc(var(--ds) * 1.8rem);
	font-weight: 700;
	line-height: 1.3;
}
.drawer .menu .current-menu-item > a { color: var(--accent); }
.drawer .submenu-toggle { border: 0; color: var(--mist); transition: transform .2s ease; }
.drawer .is-expanded > .submenu-toggle { transform: rotate(180deg); }
.drawer .sub-menu { display: none; flex: 0 0 100%; padding: 0 1rem .6rem 0; }
.drawer .is-expanded > .sub-menu { display: block; }
.drawer .sub-menu a { min-height: 2.9rem; font-size: calc(var(--ds) * 1.55rem); font-weight: 500; color: var(--mist); }
.drawer__cta { margin-top: 1.4rem; }

/* ==========================================================================
   Ticker: "تازه ترين", moves left to right, pauses on hover
   ========================================================================== */

.ticker { background: var(--surface); border-bottom: 1px solid var(--line); }
.ticker__inner { display: flex; align-items: center; gap: 1rem; }
.ticker__label {
	display: inline-flex;
	flex: none;
	align-items: center;
	gap: .5rem;
	padding: .1rem .9rem;
	background: var(--accent);
	color: var(--navy);
	font-family: var(--font-display);
	font-size: calc(var(--ds) * 1.35rem);
	font-weight: 700;
	line-height: 1.5;
}
.ticker__label::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: var(--navy); animation: hassas-pulse 1.6s ease-in-out infinite; }
.ticker__viewport {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	-webkit-mask-image: linear-gradient(to right, transparent, #000 2.5rem, #000 calc(100% - 2.5rem), transparent);
	mask-image: linear-gradient(to right, transparent, #000 2.5rem, #000 calc(100% - 2.5rem), transparent);
}
.ticker__track { display: flex; width: max-content; animation: hassas-ticker var(--ticker-time, 70s) linear infinite; will-change: transform; }
.ticker__viewport:hover .ticker__track,
.ticker__viewport:focus-within .ticker__track { animation-play-state: paused; }
.ticker__list { display: flex; flex: none; margin: 0; padding: 0; list-style: none; }
.ticker__item a {
	display: inline-flex;
	align-items: center;
	min-height: 2.75rem;
	padding-inline: 1.1rem;
	font-family: var(--font-display);
	font-size: calc(var(--ds) * 1.4rem);
	font-weight: 600;
	line-height: 1.4;
	white-space: nowrap;
}
.ticker__item a:hover { text-decoration: none; color: var(--accent-ink); }
.ticker__item a::after { content: ""; flex: none; width: .35rem; height: .35rem; margin-inline-start: 1.1rem; margin-inline-end: -1.3rem; background: var(--accent); transform: rotate(45deg); }

@keyframes hassas-ticker {
	from { transform: translate3d(-50%, 0, 0); }
	to { transform: translate3d(0, 0, 0); }
}
@keyframes hassas-pulse {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: .35; transform: scale(.7); }
}

/* ==========================================================================
   Sections shared by the home page
   ========================================================================== */

.section { padding-block: clamp(2.25rem, 4.5vw, 3.5rem); }
.section--tint { background: var(--tint); }

.section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0 1.5rem;
	margin-bottom: 1.5rem;
	padding-bottom: .2rem;
	border-bottom: 1px solid var(--ink);
}
.section-head__title { font-size: calc(var(--ds) * clamp(2.3rem, 4vw, 3rem)); line-height: 1.35; }
.section-head__link { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: .9rem; color: var(--accent-ink); }

/* Hero */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 2rem 3.5rem; padding-block: clamp(1.5rem, 3.5vw, 2.75rem); }
.hero__text { display: flex; flex: 1 1 30rem; flex-direction: column; align-items: flex-start; gap: 1rem; min-width: 0; }
.hero__kicker { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.hero__title { font-size: calc(var(--ds) * clamp(2.9rem, 5vw, 4.75rem)); line-height: 1.3; }
.hero__title a { transition: color .2s ease; }
.hero__title a:hover { text-decoration: none; color: var(--accent-ink); }
.hero__excerpt { margin: 0; max-width: 36em; font-size: 1.125rem; line-height: 2; color: var(--text-2); text-wrap: pretty; }
.hero__cover { display: block; flex: 1.2 1 30rem; min-width: 0; padding: 0 0 14px 14px; }

.byline { display: flex; align-items: center; gap: .9rem; }
.byline__portrait { display: inline-flex; }
.byline__text { display: flex; flex-direction: column; }
.byline__name { font-family: var(--font-display); font-size: calc(var(--ds) * 1.69rem); font-weight: 700; line-height: 1.3; }

/* Featured row: picture, number, title */
.featured { padding-bottom: clamp(.5rem, 2vw, 1.25rem); }
.featured__list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
	gap: 1.25rem 1.5rem;
	margin: 0;
	padding: 1.5rem 0 0;
	list-style: none;
	border-top: 1px solid var(--ink);
}
.featured__item a { display: flex; flex-direction: column; gap: .6rem; }
.featured__item a:hover { text-decoration: none; }
.featured__media { position: relative; display: block; }
.featured__num {
	position: absolute;
	top: 0;
	inset-inline-start: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	background: var(--accent);
	color: var(--navy);
	font-family: var(--font-display);
	font-size: 1.7rem;
	font-weight: 700;
	line-height: 1;
}
.featured__title { font-family: var(--font-display); font-size: calc(var(--ds) * 1.7rem); font-weight: 600; line-height: 1.45; text-wrap: balance; transition: color .2s ease; }
.featured__item a:hover .featured__title { color: var(--accent-ink); }

/* Latest: lead card + rows */
.latest { display: flex; flex-wrap: wrap; gap: 2rem 3rem; }
.latest > * { flex: 1 1 28rem; min-width: 0; }

.lead-card { display: flex; flex-direction: column; gap: .8rem; }
.lead-card__cover { display: block; }
.lead-card__body { display: flex; flex-direction: column; gap: .4rem; }
.lead-card__title { font-size: calc(var(--ds) * clamp(2.1rem, 3.4vw, 2.6rem)); font-weight: 700; line-height: 1.4; }
.lead-card__title a { transition: color .2s ease; }
.lead-card__title a:hover { text-decoration: none; color: var(--accent-ink); }
.lead-card__excerpt { margin: 0; font-size: 1.0625rem; line-height: 2; color: var(--text-2); text-wrap: pretty; }

.rows { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.row:hover { text-decoration: none; }
.row:first-child { padding-top: 0; }
.row:last-child { border-bottom: 0; }
.row__thumb { flex: none; width: 6.75rem; }
.row__text { display: flex; flex: 1 1 auto; flex-direction: column; gap: .1rem; min-width: 0; }
.row__title { font-family: var(--font-display); font-size: calc(var(--ds) * 1.75rem); font-weight: 600; line-height: 1.45; transition: color .2s ease; }
.row:hover .row__title { color: var(--accent-ink); }

/* Poetry band */
.poetry-band { background-color: var(--navy); background-image: var(--lattice-soft); color: var(--cream); }
.poetry-band .section-head { border-color: rgba(245, 243, 238, .28); }
.poetry-band .section-head__link { color: var(--accent); }

.couplet { display: flex; flex-direction: column; align-items: center; gap: .5rem; max-width: 58rem; margin: 0 auto 2.25rem; text-align: center; }
.couplet__label { font-size: .84rem; line-height: 1.5; color: var(--accent); }
.couplet__lines { margin: 0; font-family: var(--font-display); font-size: calc(var(--ds) * clamp(2.1rem, 4vw, 3.4rem)); font-weight: 600; line-height: 1.7; }
.couplet__lines span { display: block; text-wrap: balance; }
.couplet__lines a { transition: color .2s ease; }
.couplet__lines a:hover { text-decoration: none; color: var(--gold); }
.couplet__poet { font-family: var(--font-display); font-size: calc(var(--ds) * 1.7rem); line-height: 1.5; color: var(--mist); }

.ornament { display: flex; align-items: center; justify-content: center; gap: .9rem; }
.ornament::before, .ornament::after { content: ""; width: 3.5rem; height: 1px; background: currentColor; opacity: .45; }
.ornament i { width: .5rem; height: .5rem; background: var(--accent); transform: rotate(45deg); }

/* auto-fill, so a single card keeps a card's width instead of stretching across the page */
.poem-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100%), 1fr)); gap: 1rem; }
.poem-card {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: .6rem;
	min-height: 8rem;
	padding: 1rem 1.25rem;
	border: 1px solid rgba(245, 243, 238, .2);
	background: var(--navy);
	color: var(--cream);
	transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.poem-card:hover { text-decoration: none; border-color: var(--accent); box-shadow: 0 10px 28px var(--glow); transform: translateY(-2px); }
.poem-card__title { font-family: var(--font-display); font-size: calc(var(--ds) * 1.8rem); font-weight: 600; line-height: 1.45; }
.poem-card__line { font-family: var(--font-display); font-size: calc(var(--ds) * 1.4rem); line-height: 1.6; color: var(--mist); }
.poem-card .meta { color: var(--mist); }
.poem-card--light { border-color: var(--line); background: var(--surface); color: var(--ink); }
.poem-card--light .poem-card__line, .poem-card--light .meta { color: var(--meta); }

/* Writers */
.writers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100%), 1fr)); gap: .9rem; }
.writer-card { display: flex; align-items: center; gap: 1rem; min-height: 5.25rem; padding: .75rem 1.1rem; border: 1px solid var(--line); background: var(--surface); transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease; }
.writer-card:hover { text-decoration: none; border-color: var(--accent); box-shadow: 0 10px 28px var(--glow); transform: translateY(-2px); }
.writer-card__text { display: flex; flex-direction: column; min-width: 0; }
.writer-card__name { font-family: var(--font-display); font-size: calc(var(--ds) * 1.75rem); font-weight: 700; line-height: 1.4; }

.writer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(19rem, 100%), 1fr)); gap: 1.75rem 3rem; margin-top: 2.5rem; }
.writer-col { display: flex; flex-direction: column; }
.writer-col__title { margin-bottom: .5rem; font-size: calc(var(--ds) * 2rem); }
.writer-col__title a { display: inline-flex; align-items: center; gap: .75rem; }
.writer-col__title a:hover { text-decoration: none; color: var(--accent-ink); }
.writer-col .row { padding: .65rem 0; border-bottom: 0; border-top: 1px solid var(--line); }
.writer-col .row:first-of-type { border-top-color: var(--ink); }
.writer-col .row__title { font-size: calc(var(--ds) * 1.6rem); }

/* Small cards (videos, related) */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100%), 1fr)); gap: 1.5rem 1.25rem; }
.card-grid--three { grid-template-columns: repeat(auto-fill, minmax(min(19rem, 100%), 1fr)); gap: 1.75rem 1.5rem; }
.mini-card { display: flex; flex-direction: column; gap: .5rem; }
.mini-card:hover { text-decoration: none; }
.mini-card__title { font-family: var(--font-display); font-size: calc(var(--ds) * 1.7rem); font-weight: 600; line-height: 1.45; text-wrap: balance; transition: color .2s ease; }
.mini-card:hover .mini-card__title { color: var(--accent-ink); }
.card-grid--three .mini-card__title { font-size: calc(var(--ds) * 1.9rem); font-weight: 700; }

/* App promotion card */
.app-promo__card {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1.75rem 3rem;
	padding: clamp(1.5rem, 4vw, 2.75rem);
	border: 1px solid var(--gold);
	outline: 1px solid var(--gold);
	outline-offset: -9px;
	background-color: var(--navy);
	background-image: var(--lattice-soft);
	color: var(--cream);
}
.app-promo__text { display: flex; flex: 1 1 24rem; flex-direction: column; align-items: flex-start; gap: .8rem; min-width: 0; }
.app-promo__kicker { display: inline-flex; align-items: center; gap: .75rem; font-family: var(--font-display); font-size: calc(var(--ds) * 1.7rem); font-weight: 700; line-height: 1.4; color: var(--gold); }
.app-promo__icon { flex: none; width: 3.5rem; height: 3.5rem; border: 1px solid var(--gold); border-radius: .9rem; }
.app-promo__title { font-size: calc(var(--ds) * clamp(2.1rem, 3.8vw, 3rem)); line-height: 1.35; }
.app-promo__copy { margin: 0; max-width: 34em; font-size: 1.0625rem; line-height: 2; color: var(--mist); text-wrap: pretty; }
.app-promo__visual { flex: 1 1 22rem; min-width: 0; }
.app-promo__image { display: block; width: 100%; height: auto; border: 1px solid rgba(201, 165, 83, .55); }

.play-btn {
	display: inline-flex;
	align-items: center;
	gap: .9rem;
	min-height: 3.5rem;
	margin-top: .3rem;
	padding: .35rem 1.5rem;
	border: 1px solid var(--gold);
	background: var(--gold);
	color: var(--navy);
	transition: transform .2s ease, box-shadow .2s ease;
}
.play-btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 10px 28px var(--glow); }
.play-btn__text { display: flex; flex-direction: column; line-height: 1.3; }
.play-btn__store { font-family: Tahoma, "Segoe UI", sans-serif; font-size: .72rem; letter-spacing: .04em; text-align: right; }
.play-btn__label { font-family: var(--font-display); font-size: calc(var(--ds) * 1.5rem); font-weight: 700; }

/* Submission banner: muted antique gold */
.cta { background: var(--gold); color: var(--navy); }
.cta__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 3rem; padding-block: clamp(2rem, 4vw, 2.75rem); }
.cta__text { display: flex; flex: 1 1 35rem; flex-direction: column; gap: .4rem; min-width: 0; }
.cta__title { font-size: calc(var(--ds) * clamp(2.3rem, 4vw, 3rem)); line-height: 1.35; }
.cta__copy { margin: 0; max-width: 38em; font-size: 1.0625rem; line-height: 2; text-wrap: pretty; }
.cta__note { margin: 0; font-size: .875rem; line-height: 1.8; }
.cta .btn { border-color: var(--navy); background: var(--navy); color: var(--cream); }
.cta .btn:hover { border-color: var(--navy-2); background: var(--navy-2); }

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

.site-footer { background: var(--navy); color: var(--cream); }
.site-footer__inner { display: flex; flex-direction: column; gap: 2rem; padding-block: 2.75rem 1.25rem; }
.site-footer__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(13.5rem, 100%), 1fr)); gap: 2rem 2.5rem; }
.site-footer__brand { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; }
.site-footer__name { font-family: var(--font-display); font-size: calc(var(--ds) * 3.25rem); font-weight: 800; line-height: 1.3; transition: color .2s ease; }
.site-footer__name:hover { text-decoration: none; color: var(--gold); }
.site-footer__tagline { font-size: .9rem; line-height: 1.9; color: var(--mist); }

.socials { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .25rem; }
.socials__link { display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; border: 1px solid rgba(245, 243, 238, .3); transition: border-color .2s ease, color .2s ease, transform .2s ease; }
.socials__link:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }

.app-badge { display: inline-flex; align-items: center; gap: .75rem; margin-top: .5rem; padding: .45rem .9rem; border: 1px solid var(--gold); transition: box-shadow .2s ease, transform .2s ease; }
.app-badge:hover { text-decoration: none; box-shadow: 0 8px 22px var(--glow); transform: translateY(-2px); }
.app-badge__icon { flex: none; width: 2.75rem; height: 2.75rem; border-radius: .6rem; }
.app-badge__text { display: flex; flex-direction: column; line-height: 1.35; }
.app-badge__name { font-family: var(--font-display); font-size: calc(var(--ds) * 1.4rem); font-weight: 700; }
.app-badge__store { font-family: Tahoma, "Segoe UI", sans-serif; font-size: .72rem; color: var(--mist); text-align: right; }

.footer-nav__title { margin-bottom: .15rem; font-size: calc(var(--ds) * 1.8rem); font-weight: 700; color: var(--accent); }
.footer-nav ul { margin: 0; padding: 0; list-style: none; }
.footer-nav li a { display: inline-flex; align-items: center; min-height: 2.5rem; font-size: .9375rem; line-height: 1.5; transition: color .2s ease, padding .2s ease; }
.footer-nav li a:hover { text-decoration: none; color: var(--gold); padding-inline-start: .35rem; }

.footer-posts .row { padding: .6rem 0; border-color: rgba(245, 243, 238, .14); }
.footer-posts .row__thumb { width: 5rem; }
.footer-posts .row__title { font-size: calc(var(--ds) * 1.4rem); color: var(--cream); }
.footer-posts .row:hover .row__title { color: var(--gold); }
.footer-posts .meta { color: var(--mist); }

.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem 2rem; padding-top: 1rem; border-top: 1px solid rgba(245, 243, 238, .18); font-size: .8125rem; line-height: 1.7; color: var(--mist); }
.site-footer__copyright { display: flex; flex-wrap: wrap; gap: 0 .4rem; }

/* ==========================================================================
   Article
   ========================================================================== */

.article__head { display: flex; flex-direction: column; align-items: center; gap: .75rem; max-width: 61rem; padding-block: 1.1rem 1.75rem; text-align: center; }

.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 .6rem; font-size: .84rem; line-height: 1.5; color: var(--meta); }
.breadcrumb a { display: inline-flex; align-items: center; min-height: 2.5rem; }

.article__title { font-size: calc(var(--ds) * clamp(2.9rem, 6vw, 5.25rem)); line-height: 1.3; }
.article__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .75rem 2.5rem; margin-top: .25rem; }
.article__meta .byline { text-align: right; }

.font-size { display: flex; align-items: center; gap: .5rem; }
.font-size__btn {
	width: 3rem;
	height: 3rem;
	padding: 0;
	border: 1px solid var(--ink);
	background: var(--surface);
	color: var(--ink);
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1rem;
	line-height: 1;
	transition: background-color .2s ease, color .2s ease;
}
.font-size__btn--lg { font-size: 1.25rem; }
.font-size__btn:hover { background: var(--ink); color: var(--ground); }
.font-size__btn:disabled { opacity: .4; cursor: default; background: var(--surface); color: var(--ink); }

.article__cover { max-width: 62rem; }

/* The reading column. --reading-size is set by the A+ / A- buttons (assets/js/main.js) */
.entry-content {
	max-width: var(--measure);
	margin: 0 auto;
	padding-top: 2.25rem;
	font-size: var(--reading-size, 1.25rem);
	line-height: 2.05;
}
.entry-content > * { margin-block: 0 1.4rem; }
.entry-content > *:last-child { margin-bottom: 0; }
.entry-content p { text-align: justify; text-wrap: pretty; }
/* Sizes and fonts pasted in from Word or the old theme give way to the theme's own */
.entry-content [style] { font-family: inherit !important; font-size: inherit !important; line-height: inherit !important; }
.entry-content a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: .3em; }
.entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4 { margin-top: 2rem; line-height: 1.4; }
.entry-content h1, .entry-content h2 { display: flex; align-items: center; gap: .9rem; font-size: calc(var(--ds) * 2.3em); }
.entry-content h1::before, .entry-content h2::before { content: ""; flex: none; width: .6rem; height: .6rem; background: var(--accent); transform: rotate(45deg); }
.entry-content h3 { font-size: calc(var(--ds) * 1.9em); }
.entry-content h4, .entry-content h5, .entry-content h6 { font-size: calc(var(--ds) * 1.6em); font-weight: 700; }
.entry-content blockquote {
	margin-inline: 0;
	padding: 1.4rem 0;
	border-block: 1px solid var(--ink);
	font-family: var(--font-display);
	font-size: calc(var(--ds) * 2.1em);
	font-weight: 700;
	line-height: 1.6;
	text-align: center;
}
.entry-content blockquote p { margin: 0; text-align: center; }
.entry-content blockquote cite { display: block; margin-top: .6rem; font-family: var(--font-body); font-size: .875rem; font-style: normal; font-weight: 400; color: var(--accent-ink); }
.entry-content ul, .entry-content ol { padding-inline-start: 1.6rem; }
.entry-content li { margin-bottom: .4rem; }
.entry-content img { display: block; height: auto; }
.entry-content figure { margin-inline: 0; }
.entry-content figcaption, .wp-caption-text { margin-top: .5rem; font-size: .84rem; line-height: 1.7; color: var(--meta); text-align: center; }
.entry-content table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; font-size: .9em; }
.entry-content th, .entry-content td { padding: .5rem .8rem; border: 1px solid var(--line); }
.entry-content hr { height: 1px; border: 0; background: var(--line); }
.entry-content iframe { display: block; width: 100%; max-width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; }
.entry-content [dir="ltr"], .entry-content :lang(en) { font-family: Georgia, "Times New Roman", serif; }
.wp-caption { max-width: 100%; }
.alignleft { float: left; margin: .4rem 1.5rem 1rem 0; }
.alignright { float: right; margin: .4rem 0 1rem 1.5rem; }
.aligncenter { display: block; margin-inline: auto; }
.entry-content::after { content: ""; display: block; clear: both; }
.page-links { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-size: .9rem; }

.article__foot { display: flex; flex-direction: column; gap: 1.75rem; max-width: var(--measure); margin: 0 auto; padding-top: 2.5rem; }

.tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.tags a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1rem; border: 1px solid var(--line-strong); font-size: .875rem; transition: border-color .2s ease, color .2s ease; }
.tags a:hover { text-decoration: none; border-color: var(--accent); color: var(--accent-ink); }

/* Reactions */
.reactions { display: flex; flex-direction: column; align-items: center; gap: .8rem; padding: 1.5rem 0; border-block: 1px solid var(--line); text-align: center; }
.reactions__title { font-size: calc(var(--ds) * 2.2rem); }
.reactions__list { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.reaction {
	display: inline-flex;
	align-items: center;
	gap: .6rem;
	min-height: 3rem;
	padding: 0 1.1rem;
	border: 1px solid var(--ink);
	background: var(--surface);
	color: var(--ink);
	font-size: .9375rem;
	line-height: 1.5;
	transition: background-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.reaction:hover { transform: translateY(-2px); box-shadow: 0 8px 20px var(--glow); }
.reaction[aria-pressed="true"] { background: var(--ink); color: var(--ground); }
.reaction__count { min-width: 1.6rem; padding: 0 .4rem; border: 1px solid var(--line-strong); font-family: Tahoma, "Segoe UI", sans-serif; font-size: .8125rem; line-height: 1.7; text-align: center; }
.reaction[aria-pressed="true"] .reaction__count { border-color: currentColor; }
.reactions.is-busy .reaction { opacity: .6; pointer-events: none; }
.reactions__status { margin: 0; font-size: .9rem; color: var(--accent-ink); }

.share { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 1.4rem; font-size: .9rem; line-height: 1.5; }
.share__label { color: var(--meta); }
.share__link { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--accent-ink); }
.share__link--x { font-family: Tahoma, "Segoe UI", sans-serif; }

.writer-box { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; padding: 1.4rem; border: 1px solid var(--line); background: var(--surface); }
.writer-box__text { display: flex; flex: 1 1 20rem; flex-direction: column; min-width: 0; }
.writer-box__name { font-family: var(--font-display); font-size: calc(var(--ds) * 2.4rem); font-weight: 800; line-height: 1.4; }
.writer-box__bio { margin: .25rem 0 0; font-size: .9375rem; line-height: 1.9; color: var(--text-2); }

/* Comments */
.comments { background: var(--tint); }
.comments > .container { padding-block: 2.75rem 3rem; }
.comments__title, .comment-reply-title { display: block; margin-bottom: .4rem; font-family: var(--font-display); font-size: calc(var(--ds) * 2.75rem); font-weight: 800; line-height: 1.35; }
.comment-reply-title small { margin-inline-start: .75rem; font-family: var(--font-body); font-size: .875rem; font-weight: 400; }
.comment-list, .comment-list .children { margin: 0; padding: 0; list-style: none; }
.comment-list { margin-bottom: 2.25rem; }
.comment-list .children { padding-inline-start: clamp(1rem, 4vw, 2.5rem); }
.comment-body { padding: 1.1rem 0; border-bottom: 1px solid var(--line-strong); }
.comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; margin-bottom: .5rem; font-size: .84rem; color: var(--meta); }
.comment-author { display: flex; align-items: center; gap: .75rem; font-family: var(--font-display); font-size: calc(var(--ds) * 1.6rem); font-weight: 700; color: var(--ink); }
.comment-author .avatar { width: 3rem; height: 3rem; border-radius: 50%; }
.comment-author .says { display: none; }
.comment-content { font-size: 1.0625rem; line-height: 2; }
.comment-content p:last-child { margin-bottom: 0; }
.reply a { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: .875rem; color: var(--accent-ink); }
.comment-form { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .9rem; line-height: 1.6; }
.comment-form > p { flex: 1 1 100%; margin: 0; }
.comment-form .comment-form-author, .comment-form .comment-form-email { flex: 1 1 17.5rem; }
.comment-form label { display: block; margin-bottom: .3rem; }
.comment-form .required { color: var(--accent-ink); }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	display: block;
	width: 100%;
	min-height: 3rem;
	padding: .5rem 1rem;
	border: 1px solid var(--line-strong);
	background: var(--surface);
	color: var(--ink);
	font-size: 1.0625rem;
	line-height: 2;
	transition: border-color .2s ease, box-shadow .2s ease;
}
.comment-form input:focus, .comment-form textarea:focus, .search-form__input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); outline: 0; }
.comment-form textarea { resize: vertical; }
.comment-form input[type="email"], .comment-form input[type="url"] { direction: ltr; text-align: left; }
.comment-form .comment-form-cookies-consent { display: flex; align-items: center; gap: .75rem; min-height: 2.75rem; color: var(--text-2); }
.comment-form .comment-form-cookies-consent input { flex: none; width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--accent); }
.comment-form .comment-form-cookies-consent label { margin: 0; }
.comment-notes, .logged-in-as { color: var(--meta); }
.comment-form .submit { min-height: 3rem; padding: 0 2rem; border: 1px solid var(--ink); background: var(--ink); color: var(--ground); font-size: 1rem; transition: background-color .2s ease; }
.comment-form .submit:hover { background: var(--ink-2); border-color: var(--ink-2); }

/* ==========================================================================
   Poem page
   ========================================================================== */

.poem-head { display: flex; flex-direction: column; align-items: center; gap: .7rem; max-width: 61rem; padding-block: 1.1rem 1.75rem; text-align: center; }
.poem-head__title { font-size: calc(var(--ds) * clamp(2.6rem, 5vw, 4.4rem)); line-height: 1.4; }
.poem-head__poet { display: flex; align-items: center; gap: .9rem; font-family: var(--font-display); font-size: calc(var(--ds) * 2rem); font-weight: 700; line-height: 1.4; }

.poem-stage { max-width: 68rem; }
/* Midnight frame with a double gold border */
.poem-frame {
	padding: clamp(2.5rem, 6vw, 3.75rem) clamp(1.25rem, 5vw, 4rem);
	border: 2px solid var(--gold);
	outline: 1px solid var(--gold);
	outline-offset: -14px;
	background-color: var(--navy);
	background-image: var(--lattice-soft);
	color: var(--cream);
	text-align: center;
}
.poem {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.5rem;
	font-family: var(--font-display);
	font-size: calc(var(--ds) * clamp(2rem, 3.4vw, 3rem));
	font-weight: 500;
	line-height: 1.85;
}
.poem__stanza { display: flex; flex-direction: column; align-items: center; }
.poem__line { display: block; text-wrap: balance; }
/* The gold diamond between couplets */
.poem__divider { display: flex; align-items: center; justify-content: center; gap: .9rem; }
.poem__divider::before, .poem__divider::after { content: ""; width: 3rem; height: 1px; background: rgba(245, 243, 238, .4); }
.poem__divider i { width: .5rem; height: .5rem; background: var(--gold); transform: rotate(45deg); }
.poem__note { max-width: 40rem; margin: 0; font-family: var(--font-body); font-size: 1rem; font-weight: 400; line-height: 2; color: var(--mist); }
.poem__embed { max-width: 100%; font-family: var(--font-body); font-size: 1rem; }
.poem__embed img { margin-inline: auto; }

.poem-foot { display: flex; flex-direction: column; gap: 1.75rem; max-width: calc(var(--measure) + 4rem); padding-top: 2rem; }
.poem-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .6rem; }
.poem-actions .btn { padding: 0 1.4rem; font-size: .9375rem; }
.poem-actions .share__link { min-height: 3rem; padding: 0 1.4rem; border: 1px solid var(--ink); background: var(--surface); color: var(--ink); font-size: .9375rem; transition: background-color .2s ease, transform .2s ease; }
.poem-actions .share__link:hover { text-decoration: none; background: var(--tint); transform: translateY(-1px); }

.toast {
	position: fixed;
	bottom: 1.5rem;
	left: 50%;
	z-index: 150;
	max-width: calc(100vw - 2rem);
	padding: .7rem 1.4rem;
	background: var(--navy);
	color: var(--cream);
	border: 1px solid var(--gold);
	font-size: .9rem;
	line-height: 1.7;
	opacity: 0;
	pointer-events: none;
	transform: translate(-50%, 1rem);
	transition: opacity .2s ease, transform .2s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ==========================================================================
   Archives, search, pages
   ========================================================================== */

.archive-head { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 2rem; padding-block: clamp(1.5rem, 3.5vw, 2.5rem) clamp(1.25rem, 3vw, 2rem); }
.archive-head__text { display: flex; flex: 1 1 26rem; flex-direction: column; gap: .1rem; min-width: 0; }
.archive-head__title { font-size: calc(var(--ds) * clamp(2.9rem, 6vw, 5rem)); line-height: 1.3; }
.archive-head__desc { max-width: 44em; margin-top: .4rem; font-size: 1.0625rem; line-height: 2; color: var(--text-2); }
.archive-head__desc p:last-child { margin-bottom: 0; }
.archive-head .search-form { max-width: 32rem; margin-top: .8rem; }

.index { border-top: 1px solid var(--ink); }
.index .lead-card { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 1.25rem 2.5rem; padding: 1.75rem 0; border-bottom: 1px solid var(--ink); }
.index .lead-card > * { flex: 1 1 26rem; min-width: 0; }
.index .lead-card__title { font-size: calc(var(--ds) * clamp(2.3rem, 3.8vw, 3.25rem)); font-weight: 800; }

/* Archive row: thumbnail, title, date */
.index-row { display: flex; align-items: center; gap: 1.25rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.index-row:hover { text-decoration: none; }
.index-row__thumb { flex: none; width: clamp(6.5rem, 15vw, 10.5rem); }
.index-row__body { display: flex; flex: 1 1 auto; flex-direction: column; gap: .15rem; min-width: 0; }
.index-row__title { font-family: var(--font-display); font-size: calc(var(--ds) * clamp(1.75rem, 2.8vw, 2.25rem)); font-weight: 700; line-height: 1.45; transition: color .2s ease; }
.index-row:hover .index-row__title { color: var(--accent-ink); }
.index-row__arrow { flex: none; font-size: 1.4rem; line-height: 1; color: var(--accent-ink); transition: transform .25s ease; }
.index-row:hover .index-row__arrow { transform: translateX(-6px); }

.pagination { margin-top: 2rem; }
.pagination .nav-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem; }
.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	min-width: 3rem;
	height: 3rem;
	padding: 0 .9rem;
	border: 1px solid var(--ink);
	font-family: Tahoma, "Segoe UI", sans-serif;
	font-size: .9375rem;
	line-height: 1;
	text-decoration: none;
	transition: background-color .2s ease, color .2s ease;
}
.pagination .page-numbers.current { background: var(--ink); color: var(--ground); }
.pagination .page-numbers.dots { border-color: transparent; }
.pagination a.page-numbers:hover { background: var(--ink); color: var(--ground); }
.pagination .prev, .pagination .next { font-family: var(--font-body); }

.chips { display: flex; flex-wrap: wrap; gap: .6rem; }
.chip-link { display: inline-flex; align-items: baseline; gap: .6rem; min-height: 3rem; padding: .15rem 1.1rem; border: 1px solid var(--line-strong); background: var(--surface); font-family: var(--font-display); font-size: calc(var(--ds) * 1.6rem); font-weight: 600; line-height: 1.5; transition: border-color .2s ease, box-shadow .2s ease; }
.chip-link:hover { text-decoration: none; border-color: var(--accent); box-shadow: 0 6px 18px var(--glow); }
.chip-link .meta { font-family: Tahoma, "Segoe UI", sans-serif; }

.pad-bottom { padding-bottom: clamp(2.5rem, 5vw, 3.75rem); }

.page-head { padding-block: clamp(1.5rem, 3.5vw, 2.5rem) 0; text-align: center; }
.page-head__title { font-size: calc(var(--ds) * clamp(2.75rem, 5vw, 4.25rem)); }
.page-head__title[dir="ltr"] { text-align: center; }
.page-body { padding-bottom: clamp(2.5rem, 5vw, 3.75rem); }
.page-body .entry-content { padding-top: 1.75rem; }

.empty { padding: 2.5rem 0; font-size: 1.125rem; text-align: center; color: var(--text-2); }
.not-found { display: flex; flex-direction: column; align-items: center; gap: 1.1rem; padding-block: clamp(3rem, 8vw, 5.5rem); text-align: center; }
.not-found__title { font-size: calc(var(--ds) * clamp(2.75rem, 6vw, 4.75rem)); }
.not-found .search-form { width: min(100%, 32rem); }

/* ==========================================================================
   Motion
   --------------------------------------------------------------------------
   Everything animates only transform and opacity (handled by the GPU), and
   everything is switched off for readers who ask for reduced motion.
   ========================================================================== */

/* Scroll reveal: main.js adds .reveal, then .is-in when the element enters the screen */
.reveal { opacity: 0; transform: translate3d(0, 18px, 0); }
.reveal.is-in {
	opacity: 1;
	transform: none;
	transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1);
	transition-delay: var(--reveal-delay, 0s);
}

@media (prefers-reduced-motion: no-preference) {
	/* Couplets arrive one after another when a poem opens. The poem is visible by default:
	   main.js adds .poem--animate only on a page that is really on screen, and .poem--done
	   afterwards, so the verses can never be left hidden. */
	.poem--animate .poem__stanza, .poem--animate .poem__divider, .poem--animate .poem__note {
		animation: hassas-verse .8s cubic-bezier(.2, .7, .2, 1) both;
		animation-delay: calc(var(--i, 0) * .16s + .1s);
	}
	.poem--done .poem__stanza, .poem--done .poem__divider, .poem--done .poem__note { animation: none; }
}
@keyframes hassas-verse {
	from { opacity: 0; transform: translate3d(0, 14px, 0); }
	to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
	.reveal { opacity: 1; transform: none; }
	.ticker__viewport { direction: rtl; overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
	.ticker__list[aria-hidden="true"] { display: none; }
}

/* ==========================================================================
   Dark mode details
   ========================================================================== */

/* A logo on a white background: turn white to black, keep the hues, then let black drop out */
:root[data-theme="dark"] .site-brand .custom-logo { filter: invert(1) hue-rotate(180deg); mix-blend-mode: screen; }
:root[data-theme="dark"] .topbar,
:root[data-theme="dark"] .poetry-band,
:root[data-theme="dark"] .site-footer { border-block: 1px solid var(--line); }
:root[data-theme="dark"] .topbar { border-top: 0; }
:root[data-theme="dark"] .cover--empty { box-shadow: inset 0 0 0 1px var(--line); }
/* Text colours typed into old posts would vanish on the dark page */
:root[data-theme="dark"] .entry-content [style*="color"] { color: inherit !important; background-color: transparent !important; }
:root[data-theme="dark"] .primary-nav .sub-menu { box-shadow: 0 18px 40px rgba(0, 0, 0, .45); }

/* ==========================================================================
   Small screens
   ========================================================================== */

@media (max-width: 640px) {
	body { font-size: 1rem; }
	.entry-content { padding-top: 1.75rem; font-size: var(--reading-size, 1.125rem); }
	.hero { gap: 1.5rem; }
	.hero__excerpt, .cta__copy { font-size: 1.0625rem; }
	.cover--shadow { box-shadow: -10px 10px 0 var(--accent); }
	.hero__cover { padding: 0 0 10px 10px; }
	.featured__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem .9rem; }
	.featured__title { font-size: calc(var(--ds) * 1.45rem); }
	.row__thumb { width: 5.5rem; }
	.poem-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
	.poem-card { min-height: 7rem; padding: .8rem .9rem; }
	.poem-card__title { font-size: calc(var(--ds) * 1.5rem); }
	.poem-card__line { display: none; }
	.writers-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
	.writer-card { flex-direction: column; gap: .4rem; min-height: 0; padding: .9rem .5rem; text-align: center; }
	.writer-card__text { align-items: center; }
	.writer-card__name { font-size: calc(var(--ds) * 1.45rem); }
	.card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem .75rem; }
	.card-grid--three { grid-template-columns: minmax(0, 1fr); }
	.mini-card__title { font-size: calc(var(--ds) * 1.4rem); }
	.cover__play { width: 2.5rem; height: 2.5rem; }
	.poem-frame { outline-offset: -9px; }
	.poem { gap: 1.2rem; }
	.poem-actions .btn, .poem-actions .share__link { flex: 1 1 calc(50% - .6rem); justify-content: center; }
	.index-row { gap: .9rem; }
	.index-row__arrow { display: none; }
	.writer-box { padding: 1.1rem; }
	.cta__inner .btn, .play-btn { width: 100%; justify-content: center; }
	.search-form { flex-wrap: wrap; }
	.search-form .btn { flex: 1 1 100%; }
	.ticker__inner { gap: .6rem; padding-inline-end: 0; }
	.ticker__label { font-size: calc(var(--ds) * 1.2rem); padding-inline: .6rem; }
	.site-footer__bottom { flex-direction: column; }
}

@media print {
	.topbar, .site-header, .ticker, .drawer, .cta, .app-promo, .site-footer, .comments, .reactions, .share, .poem-actions, .font-size, .related { display: none !important; }
	body { background: #fff; color: #000; }
	.reveal { opacity: 1; transform: none; }
}
