/*
Theme Name: mharma
Theme URI: https://mharma.net
Author: Mharma.net
Author URI: https://mharma.net
Description: The مْرَحْمَةْ.نت theme — journalism and podcasts in women's voices. A newsroom layout with "fold" shapes: one big rounded corner on every image, dashed-ring voice portraits, scarf-triangle programme cards, a drifting floral print, stitched threads and a working podcast player. Right-to-left first (Tunisian Arabic), left-to-right ready.
Version: 6.2.0
Requires at least: 6.3
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: mharma
Tags: rtl-language-support, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, blog, news
*/

/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
	--red: #C8102E;
	--red-dark: #A50D26;
	--ink: #1C2331;
	--cream: #F2EDE4;
	--rose: #E8619A;
	--leaf: #2E8B57;
	--white: #FFFFFF;
	--sand: #E6DFD2;
	--line: #D9D3C8;
	--muted: #5A5F6B;
	--body: #3A4050;
	--on-ink: #F2EDE4;
	--on-ink-soft: #D9D3C8;
	--on-ink-muted: #B9B4AB;

	--font: "Readex Pro", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
	--wrap: 1280px;
	--gutter: 24px;
	--ease: cubic-bezier(.2, .8, .2, 1);
	--thread: linear-gradient(to left, var(--red) 0 14px, transparent 14px 24px);
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--cream);
	color: var(--ink);
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.6;
	overflow-x: hidden;
}
img, video { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 700; }
p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, textarea, select { font: inherit; color: inherit; }
.print-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
html:not([dir="rtl"]) .icon-arrow { transform: scaleX(-1); }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto; margin: 0;
	inset-block-start: 12px; inset-inline-start: 12px;
	z-index: 100;
	padding: 12px 20px;
	background: var(--ink); color: var(--on-ink);
	border-radius: 999px;
}

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: 80px; }
.section--tight { padding-block: 24px 80px; }
.band { background: var(--white); border-block: 1px solid var(--line); }
.meta { font-size: 14px; color: var(--muted); }

.diamond {
	display: inline-block;
	width: .26em; height: .26em;
	margin-inline: .14em;
	background: var(--red);
	transform: rotate(45deg);
	vertical-align: .06em;
}
.thread {
	display: block;
	height: 2px;
	background-image: var(--thread);
	background-size: 24px 2px;
}

/* Buttons */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 12px;
	min-height: 44px; padding: 0 24px;
	border: 0; border-radius: 999px;
	font-size: 16px; font-weight: 600; line-height: 1;
	cursor: pointer;
	transition: background .2s, color .2s;
}
.btn--ink { background: var(--ink); color: var(--on-ink); }
.btn--ink:hover { background: #0E131D; color: var(--on-ink); }
.btn--red { background: var(--red); color: var(--white); }
.btn--red:hover { background: var(--red-dark); color: var(--white); }
.btn--light { border: 1.5px solid rgba(242, 237, 228, .45); background: transparent; color: var(--on-ink); font-size: 15px; font-weight: 500; }
.btn--light:hover { background: var(--on-ink); color: var(--ink); }
.icon-btn {
	width: 44px; height: 44px; flex: none;
	display: inline-flex; align-items: center; justify-content: center;
	border: 1.5px solid var(--ink); border-radius: 50%;
	background: transparent; color: var(--ink);
	cursor: pointer;
	transition: background .2s, color .2s;
}
.icon-btn:hover { background: var(--ink); color: var(--on-ink); }

/* Hover: cards lift with an ink shadow; fold corners swap sides. */
.lift { transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.lift:hover { transform: translateY(-6px) rotate(-.4deg); box-shadow: 0 18px 0 -6px var(--ink); color: inherit; }
.fold-img { transition: border-radius .45s var(--ease); }
.flip:hover .fold-img, .lift:hover .fold-img { border-radius: 0 72px 0 72px; }

/* Images in a "fold" frame: one big rounded corner, three square ones. */
.media { position: relative; overflow: hidden; background: var(--sand); }
.media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ph {
	background-color: var(--sand);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cg fill='%23D9CCBA'%3E%3Ccircle cx='20' cy='15' r='5'/%3E%3Ccircle cx='24.8' cy='18.5' r='5'/%3E%3Ccircle cx='22.9' cy='24' r='5'/%3E%3Ccircle cx='17.1' cy='24' r='5'/%3E%3Ccircle cx='15.2' cy='18.5' r='5'/%3E%3Ccircle cx='60' cy='55' r='5'/%3E%3Ccircle cx='64.8' cy='58.5' r='5'/%3E%3Ccircle cx='62.9' cy='64' r='5'/%3E%3Ccircle cx='57.1' cy='64' r='5'/%3E%3Ccircle cx='55.2' cy='58.5' r='5'/%3E%3C/g%3E%3Cpath d='M60 16l4 4-4 4-4-4zM20 56l4 4-4 4-4-4z' fill='%23CFC3B0'/%3E%3C/svg%3E");
}

/* Kicker line: category · thread · date */
.kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 14px; font-weight: 600; }
.kicker__a { color: var(--red); }
.kicker .thread { flex: 0 0 64px; }
.kicker__b { color: var(--muted); font-weight: 500; }

/* Section heading: ◆ title ··· see all, stitched thread underneath */
.sec-head { margin-bottom: 36px; }
.sec-head__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.sec-head__title { display: flex; align-items: center; gap: 12px; font-size: 28px; }
.sec-head__diamond { flex: none; width: 12px; height: 12px; background: var(--red); transform: rotate(45deg); }
.sec-head__more { padding-block: 10px; font-size: 15px; font-weight: 500; color: var(--red); }
.sec-head__more:hover { color: var(--red-dark); text-decoration: underline; text-underline-offset: 4px; }
.sec-head .thread { margin-top: 6px; }

/* ==========================================================================
   Top bar, masthead, menu, ribbon
   ========================================================================== */
.topbar { background: var(--ink); color: var(--on-ink); font-size: 13px; }
.topbar__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px; padding-block: 6px; }
.topbar__date { color: var(--on-ink-soft); }
.topbar__tagline { font-weight: 500; }
.topbar__links { display: flex; align-items: center; gap: 2px; }
.topbar__links a { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; color: var(--on-ink); }
.topbar__links a:hover { color: var(--white); }
.topbar__sep { width: 1px; height: 16px; margin-inline: 8px; background: rgba(242, 237, 228, .3); }
.topbar__lang { padding-inline: 4px; font-weight: 500; }

.masthead { position: relative; z-index: 20; background: var(--cream); }
.masthead__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px 18px; }
.brand { display: flex; align-items: center; gap: 16px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand__mark { width: 76px; height: 76px; object-fit: contain; }
.brand__text { display: flex; flex-direction: column; gap: 2px; }
.wordmark { font-size: 40px; font-weight: 700; line-height: 1.35; white-space: nowrap; }
.wordmark-latin { font-size: 13px; font-weight: 600; letter-spacing: .32em; text-align: end; }
html:not([dir="rtl"]) .wordmark-latin { text-align: start; }
.wordmark-latin .diamond { width: 6px; height: 6px; margin: 0 4px 1px 2px; }
.masthead__actions { display: flex; align-items: center; gap: 12px; }
.menu-toggle { display: none; }
html:not(.js) .search-toggle { display: none; }

/* Pill menu (Option B): white rounded bar, current page in a red pill, hover in ink.
   It sits on its own centred row under the logo so any number of items fits. */
.nav-pill { order: 3; flex-basis: 100%; display: flex; justify-content: center; }
.nav-pill > ul {
	display: flex; flex-wrap: wrap; gap: 2px;
	padding: 5px;
	background: var(--white); border: 1.5px solid var(--ink); border-radius: 999px;
	font-size: 15px; font-weight: 500;
}
.nav-pill li { position: relative; }
.nav-pill a { display: block; padding: 9px 16px; border-radius: 999px; white-space: nowrap; transition: background .2s, color .2s; }
.nav-pill a:hover { background: var(--ink); color: var(--on-ink); }
.nav-pill .current-menu-item > a,
.nav-pill .current_page_item > a,
.nav-pill .current-menu-ancestor > a,
.nav-pill a[aria-current="page"] { background: var(--red); color: var(--white); }
.nav-pill .sub-menu {
	position: absolute; inset-block-start: calc(100% + 10px); inset-inline-start: 0; z-index: 30;
	display: none; flex-direction: column; gap: 2px;
	min-width: 220px; padding: 6px;
	background: var(--white); border: 1.5px solid var(--ink); border-radius: 22px;
}
.nav-pill .sub-menu::before { content: ""; position: absolute; inset-inline: 0; bottom: 100%; height: 12px; }
.nav-pill li:hover > .sub-menu, .nav-pill li:focus-within > .sub-menu { display: flex; }

.search-panel { padding-block: 20px; background: var(--white); border-bottom: 1px solid var(--line); }
.search-form {
	display: flex; gap: 10px;
	max-width: 720px; padding: 6px;
	background: var(--white); border: 1.5px solid var(--ink); border-radius: 34px;
}
.search-form:focus-within { outline: 3px solid var(--red); outline-offset: 3px; }
.search-form input { flex: 1; min-width: 0; height: 48px; padding-inline: 18px; border: 0; background: transparent; font-size: 16px; }
.search-form input:focus { outline: none; }

.ribbon-band { display: block; background: var(--white); border-bottom: 1px solid var(--line); }

@media (max-width: 900px) {
	.menu-toggle { display: inline-flex; }
	.js .nav-pill { display: none; }
	.js .nav-pill.is-open { display: block; }
	.nav-pill > ul { flex-direction: column; border-radius: 28px; }
	.nav-pill a { padding: 12px 18px; }
	.nav-pill .sub-menu { position: static; display: flex; min-width: 0; padding: 0; padding-inline-start: 16px; border: 0; }
}
@media (max-width: 640px) {
	.topbar__tagline { display: none; }
	.brand { gap: 10px; }
	.brand__mark { width: 52px; height: 52px; }
	.wordmark { font-size: 28px; }
	.wordmark-latin { font-size: 10px; }
	.masthead__actions { gap: 6px; }
	.masthead__actions .btn { padding: 0 16px; font-size: 15px; }
}

/* ==========================================================================
   Lead story + latest news
   ========================================================================== */
.lead { display: flex; flex-wrap: wrap; gap: 40px; padding-block: 48px 72px; }
.lead__main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.media--lead { aspect-ratio: 16 / 9; border-radius: 160px 0 0 0; }
.lead__title { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.25; }
.lead__dek { max-width: 62ch; font-size: 19px; color: var(--body); }
.lead__aside { flex: 1 1 340px; min-width: 0; }
.lead__aside .sec-head { margin-bottom: 0; }
.lead__aside .sec-head__title { font-size: 22px; }
.lead__aside .sec-head__diamond { width: 10px; height: 10px; }

.latest__item { border-bottom: 1px solid var(--line); }
.latest__link { display: flex; gap: 16px; padding-block: 18px; }
.latest__link:hover { color: var(--ink); }
.latest__link:hover .latest__title { color: var(--red); }
.latest__thumb { flex: none; width: 112px; height: 84px; border-radius: 0 0 0 28px; }
.latest__item:nth-child(4n+2) .latest__thumb { border-radius: 28px 0 0 0; }
.latest__item:nth-child(4n+3) .latest__thumb { border-radius: 0 0 28px 0; }
.latest__item:nth-child(4n) .latest__thumb { border-radius: 0 28px 0 0; }
.latest__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.latest__cat { font-size: 13px; font-weight: 600; color: var(--red); }
.latest__title { font-size: 17px; font-weight: 600; line-height: 1.4; transition: color .2s; }

/* ==========================================================================
   Voices
   ========================================================================== */
.voices { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 40px 24px; padding: 4px; }
.voice__link { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.voice__link:hover { color: var(--ink); }
.voice__ring {
	display: block;
	width: 156px; height: 156px;
	border-radius: 50%;
	background: var(--sand);
	outline: 2px dashed var(--red); outline-offset: 7px;
	transition: outline-offset .3s var(--ease), transform .3s var(--ease);
}
.voice__ring img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.voice__link:hover .voice__ring { outline-offset: 12px; transform: rotate(-3deg); }
.voice__quote { font-size: 17px; line-height: 1.5; font-weight: 500; quotes: "«" "»"; }
.voice__name { font-size: 13px; color: var(--muted); }

/* ==========================================================================
   Podcast
   ========================================================================== */
.pod { background: var(--ink); color: var(--on-ink); }
.pod a:hover { color: var(--white); }
.pod__grid { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 48px; padding-block: 72px; }
.pod__main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.pod__kicker { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; letter-spacing: .04em; color: var(--on-ink-soft); }
.pod__kicker .sec-head__diamond { width: 10px; height: 10px; }
.pod__name { font-size: clamp(36px, 4vw, 48px); line-height: 1.2; }
.pod__desc { max-width: 56ch; font-size: 18px; color: var(--on-ink-muted); }

.pod-card {
	display: flex; flex-wrap: wrap; align-items: center; gap: 24px;
	padding: 24px 28px 28px;
	background: var(--cream); color: var(--ink);
	border-radius: 0 0 0 64px;
}
.pod-card a:hover { color: var(--red); }
.pod-card__art {
	position: relative; flex: none;
	width: 132px; height: 132px;
	display: flex; align-items: center; justify-content: center;
	background: var(--white); border-radius: 28px;
}
.pod-card__art img { width: 112px; height: 112px; }
.pod-card__num {
	position: absolute; bottom: -18px; left: -14px;
	font-size: 64px; line-height: 1; font-weight: 700;
	color: transparent; -webkit-text-stroke: 1.5px var(--red);
}
.pod-card__body { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.pod-card__label { font-size: 13px; font-weight: 600; color: var(--red); }
.pod-card__title { font-size: 24px; line-height: 1.35; }

.player { display: flex; align-items: center; gap: 16px; }
.player__btn {
	width: 56px; height: 56px; flex: none;
	display: inline-flex; align-items: center; justify-content: center;
	border: 0; border-radius: 50%;
	background: var(--red); color: var(--white);
	cursor: pointer;
	transition: transform .2s var(--ease), background .2s;
}
.player__btn:hover { transform: scale(1.06); background: var(--red-dark); color: var(--white); }
.pod-card a.player__btn:hover { color: var(--white); }
.player__btn .icon-pause, .is-playing .player__btn .icon-play { display: none; }
.is-playing .player__btn .icon-pause { display: block; }
.wave { flex: 1; display: flex; align-items: center; gap: 3px; height: 56px; overflow: hidden; direction: ltr; cursor: pointer; }
.wave span { flex: 1 0 3px; max-width: 5px; border-radius: 3px; background: rgba(28, 35, 49, .3); transition: background .2s; }
.wave span.on { background: var(--red); }
.wave span:nth-child(9n+2) { animation-delay: -.12s; }
.wave span:nth-child(9n+3) { animation-delay: -.24s; }
.wave span:nth-child(9n+4) { animation-delay: -.36s; }
.wave span:nth-child(9n+5) { animation-delay: -.48s; }
.wave span:nth-child(9n+6) { animation-delay: -.6s; }
.wave span:nth-child(9n+7) { animation-delay: -.72s; }
.wave span:nth-child(9n+8) { animation-delay: -.84s; }
.wave span:nth-child(9n) { animation-delay: -.96s; }
.player__time { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }

.platforms { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.platforms__label { margin-inline-end: 4px; font-size: 14px; color: var(--on-ink-muted); }

.episodes { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.episodes__head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 6px; border-bottom: 2px solid var(--on-ink); margin-bottom: 6px; }
.episodes__title { font-size: 20px; }
.episodes__all { padding-block: 10px; font-size: 14px; font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }
.episode {
	display: flex; align-items: center; gap: 16px;
	width: 100%; padding: 14px 18px;
	border: 1.5px solid rgba(242, 237, 228, .35); border-radius: 0 0 0 28px;
	background: transparent; color: var(--on-ink);
	text-align: start; cursor: pointer;
	transition: background .2s, color .2s, border-color .2s;
}
.episode:hover { border-color: var(--on-ink); color: var(--on-ink); }
.episode[aria-pressed="true"] { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.episode__num { flex: none; width: 40px; font-size: 28px; font-weight: 200; line-height: 1; }
.episode__text { flex: 1; display: flex; flex-direction: column; }
.episode__title { font-size: 16px; font-weight: 600; line-height: 1.4; }
.episode__dur { font-size: 13px; opacity: .8; }

/* ==========================================================================
   Investigations
   ========================================================================== */
.inv { display: flex; flex-wrap: wrap; gap: 48px; padding-top: 28px; }
.inv-feature { position: relative; flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.inv-feature__num {
	position: absolute; inset-block-start: -56px; left: 8px; z-index: 1;
	font-size: 200px; line-height: 1; font-weight: 200;
	color: transparent; -webkit-text-stroke: 2px var(--red);
	pointer-events: none;
}
.inv-feature .media { aspect-ratio: 16 / 10; border-radius: 160px 0 0 0; }
.inv-feature__title { font-size: clamp(26px, 2.8vw, 36px); line-height: 1.25; }
.inv-feature__dek { max-width: 60ch; font-size: 18px; color: var(--body); }
.inv-side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 40px; }
.inv-item { display: flex; align-items: flex-start; gap: 20px; }
.inv-item__num { flex: none; width: 64px; font-size: 96px; line-height: .9; font-weight: 200; color: var(--red); }
.inv-item__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.inv-item__body:hover { color: var(--ink); }
.inv-item__body:hover .inv-item__title { color: var(--red); }
.inv-item .media { aspect-ratio: 4 / 3; border-radius: 0 0 0 72px; }
.inv-item__title { font-size: 21px; font-weight: 700; line-height: 1.4; transition: color .2s; }

/* ==========================================================================
   Video reports
   ========================================================================== */
.videos { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; align-items: end; }
.video { display: flex; flex-direction: column; gap: 14px; }
.video__frame {
	position: relative;
	display: flex; align-items: center; justify-content: center;
	height: 260px; overflow: hidden;
	background: var(--ink); border-radius: 0 0 0 96px;
}
.video:nth-child(3n+2) .video__frame { height: 360px; border-radius: 120px 120px 0 0; }
.video:nth-child(3n) .video__frame { border-radius: 0 0 96px 0; }
.video__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.video__play {
	position: relative;
	width: 64px; height: 64px;
	display: inline-flex; align-items: center; justify-content: center;
	border-radius: 50%; background: var(--cream); color: var(--red);
	transition: transform .3s var(--ease);
}
.video:hover .video__play { transform: scale(1.12); }
.video__title { font-size: 19px; font-weight: 600; line-height: 1.4; }

/* ==========================================================================
   Programmes — each one its own mharma
   ========================================================================== */
.programs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.program {
	display: flex; flex-direction: column; overflow: hidden;
	background: var(--cream); color: var(--ink);
	border: 1.5px solid var(--ink); border-radius: 28px;
}
.program__scarf { position: relative; display: block; height: 170px; }
.program__scarf > span { position: absolute; inset: 0; clip-path: polygon(0 0, 100% 0, 50% 100%); }
.program__scarf svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; overflow: visible; }
.program__body { display: flex; flex-direction: column; gap: 10px; padding: 22px 24px 26px; }
.program__num { font-size: 14px; font-weight: 600; color: var(--red); }
.program__title { font-size: 21px; font-weight: 700; line-height: 1.35; }
.program__desc { font-size: 15px; color: var(--body); }

/* ==========================================================================
   Mission on a drifting print field
   ========================================================================== */
.mission { position: relative; overflow: hidden; background: var(--white); }
.mission__field { position: absolute; inset: 0; display: block; }
.mission__inner { position: relative; display: flex; justify-content: center; padding-block: 96px; }
.mission__card {
	display: flex; flex-direction: column; align-items: center; gap: 24px;
	max-width: 820px; padding: 56px 56px 48px;
	background: var(--cream); text-align: center;
	border-radius: 0 0 0 96px;
	box-shadow: 0 0 0 10px var(--white);
}
.mission__mark { width: 88px; height: 88px; }
.mission__text { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.55; font-weight: 600; }
.mission__text strong { color: var(--red); text-decoration: underline dashed var(--red) 2px; text-underline-offset: 10px; }
.mission__sign { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--muted); }
.mission__sign .thread { width: 56px; }
@media (max-width: 600px) {
	.mission__card { padding: 40px 24px 36px; border-radius: 0 0 0 56px; }
}

/* ==========================================================================
   Newsletter band
   ========================================================================== */
.newsletter { background: var(--red); color: var(--white); }
.newsletter__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px; padding-block: 64px; }
.newsletter__intro { flex: 1 1 420px; display: flex; flex-direction: column; gap: 10px; font-size: 18px; }
.newsletter__title { font-size: 36px; }
.newsletter__note { padding: 8px 14px; border: 1.5px dashed rgba(255, 255, 255, .7); border-radius: 12px; font-size: 13px; }
.newsletter__form { flex: 1 1 440px; display: flex; flex-direction: column; gap: 8px; }
.newsletter__label { font-size: 14px; font-weight: 500; }
.newsletter__field { display: flex; flex-wrap: wrap; gap: 10px; padding: 6px; background: var(--white); border-radius: 34px; }
.newsletter__field:focus-within { outline: 3px solid var(--ink); outline-offset: 3px; }
.newsletter__field input { flex: 1 1 220px; min-width: 0; height: 52px; padding-inline: 20px; border: 0; border-radius: 28px; background: transparent; color: var(--ink); font-size: 16px; text-align: start; }
.newsletter__field input:focus { outline: none; }
.newsletter__field .btn { min-height: 52px; padding: 0 32px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--ink); color: var(--on-ink); }
.site-footer a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 4px; }
.footer__top { display: flex; flex-wrap: wrap; gap: 48px; padding-block: 64px 32px; }
.footer__brand { flex: 2 1 320px; display: flex; flex-direction: column; gap: 20px; }
.footer__logo { display: flex; align-items: center; gap: 16px; }
.footer__logo:hover { text-decoration: none !important; }
.footer__mark { width: 72px; height: 72px; display: inline-flex; align-items: center; justify-content: center; background: var(--cream); border-radius: 18px; }
.footer__mark img { width: 60px; height: 60px; }
.footer__wordmark { font-size: 32px; }
.footer__tagline { max-width: 40ch; font-size: 16px; color: var(--on-ink-muted); }
.footer__col { flex: 1 1 160px; }
.footer__heading { margin-bottom: 14px; font-size: 15px; font-weight: 600; color: var(--on-ink-soft); }
.footer__col ul { display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.footer__social { text-align: end; }
html:not([dir="rtl"]) .footer__social { text-align: start; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-block: 20px 28px; font-size: 13px; color: var(--on-ink-muted); }
.footer__bottom a { color: var(--on-ink-soft); }

/* ==========================================================================
   Listings
   ========================================================================== */
.page-head { display: flex; flex-direction: column; gap: 20px; padding-block: 48px; }
.page-head__thread { width: 96px; }
.page-head__title { font-size: clamp(36px, 5vw, 72px); line-height: 1.12; }
.page-head__title .hl { color: var(--red); }
.page-head__desc { max-width: 60ch; font-size: 18px; color: var(--body); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 48px 32px; padding-bottom: 80px; }
.cards--flush { padding-bottom: 0; }
.card { display: flex; flex-direction: column; gap: 12px; }
.card .media { aspect-ratio: 4 / 3; border-radius: 0 0 0 72px; transition: border-radius .45s var(--ease); }
.card:nth-child(3n+2) .media { border-radius: 72px 0 0 0; }
.card:nth-child(3n) .media { border-radius: 0 0 72px 0; }
.card:hover .media { border-radius: 0 72px 0 72px; }
.card__cat { font-size: 13px; font-weight: 600; color: var(--red); }
.card__title { font-size: 22px; line-height: 1.4; }
.card__excerpt { font-size: 16px; color: var(--body); }

.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding-bottom: 80px; }
.page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 44px; height: 44px; padding: 0 16px;
	border: 1.5px solid var(--ink); border-radius: 22px;
	font-weight: 600;
}
.page-numbers.current { background: var(--ink); color: var(--on-ink); }
.page-numbers.dots { border-color: transparent; }

.empty, .notfound { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; padding-block: 48px 120px; }
.empty h2 { font-size: 32px; }
.notfound__num { font-size: clamp(140px, 22vw, 320px); line-height: .9; font-weight: 700; color: transparent; -webkit-text-stroke: 2px var(--red); }
.empty .search-form, .notfound .search-form { width: 100%; }

/* ==========================================================================
   Single story and pages
   ========================================================================== */
.article-head { display: flex; flex-direction: column; gap: 22px; max-width: 1028px; padding-block: 48px 40px; }
.article-head__title { font-size: clamp(34px, 5vw, 64px); line-height: 1.15; }
.article-head__dek { max-width: 60ch; font-size: 20px; color: var(--body); }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; font-size: 15px; color: var(--muted); }
.byline img { width: 44px; height: 44px; border-radius: 50%; }
.byline__name { font-weight: 600; color: var(--ink); }

.article-hero { display: flex; flex-direction: column; gap: 10px; }
.article-hero .media { aspect-ratio: 16 / 9; border-radius: 200px 0 0 0; }

.entry {
	max-width: calc(720px + 2 * var(--gutter));
	margin-inline: auto;
	padding: 56px var(--gutter) 64px;
	font-size: 19px; line-height: 1.85;
}
.entry > * + * { margin-top: 1.2em; }
.entry h2 { margin-top: 1.8em; font-size: 30px; line-height: 1.3; }
.entry h3 { margin-top: 1.6em; font-size: 24px; line-height: 1.35; }
.entry a { color: var(--red); text-decoration: underline; text-underline-offset: 4px; }
.entry a:hover { color: var(--red-dark); }
.entry ul, .entry ol { padding-inline-start: 1.4em; }
.entry ol { list-style: decimal; }
.entry ul li { position: relative; }
.entry ul li::before {
	content: "";
	position: absolute; inset-inline-start: -1.1em; top: .78em;
	width: 7px; height: 7px;
	background: var(--red);
	transform: rotate(45deg);
}
.entry blockquote { margin-block: 2em; padding: 0; border: 0; font-size: 26px; line-height: 1.5; font-weight: 600; }
.entry blockquote::before { content: ""; display: block; width: 96px; height: 2px; margin-bottom: 20px; background-image: var(--thread); background-size: 24px 2px; }
.entry blockquote cite { display: block; margin-top: 12px; font-size: 15px; font-style: normal; font-weight: 500; color: var(--muted); }
.entry img { border-radius: 0 0 0 48px; }
.entry figure { margin-block: 2em; }
.entry figcaption, .wp-caption-text, .wp-element-caption { margin-top: 10px; font-size: 14px; color: var(--muted); }
.entry .alignwide { width: min(1100px, 100vw - 2 * var(--gutter)); max-width: none; margin-inline: calc(50% - min(550px, 50vw - var(--gutter))); }
.entry .alignfull { width: 100vw; max-width: none; margin-inline: calc(50% - 50vw); }
.entry table { width: 100%; border-collapse: collapse; font-size: 16px; }
.entry th, .entry td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: start; }
.entry pre { overflow-x: auto; padding: 20px; background: var(--white); border: 1.5px solid var(--ink); border-radius: 16px; font-size: 15px; direction: ltr; }
.entry iframe { max-width: 100%; }
.page-links { display: flex; gap: 8px; }

.article-foot { display: flex; flex-direction: column; gap: 28px; max-width: calc(720px + 2 * var(--gutter)); margin-inline: auto; padding: 0 var(--gutter) 64px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags a { padding: 6px 14px; border: 1.5px solid var(--ink); border-radius: 999px; font-size: 14px; }
.tags a:hover { background: var(--ink); color: var(--on-ink); }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.share__label { margin-inline-end: 6px; font-size: 15px; font-weight: 600; }
.share .is-copied { background: var(--leaf); border-color: var(--leaf); color: var(--white); }
.post-navigation .nav-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.post-navigation a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 20px 24px; background: var(--white); border: 1.5px solid var(--ink); border-radius: 0 0 0 28px; }
.nav-subtitle { font-size: 13px; color: var(--muted); }
.nav-title { font-size: 17px; font-weight: 600; line-height: 1.4; }

/* Comments */
.comments { max-width: calc(720px + 2 * var(--gutter)); margin-inline: auto; padding: 72px var(--gutter); }
.comments__title, .comment-reply-title { margin-bottom: 24px; font-size: 28px; }
.comment-list .comment { padding-block: 20px; border-bottom: 1px solid var(--line); }
.comment-list .children { padding-inline-start: 28px; }
.comment-author { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.comment-author img { border-radius: 50%; }
.comment-metadata { font-size: 13px; color: var(--muted); }
.comment-content { margin-top: 10px; }
.comment-form { display: flex; flex-direction: column; gap: 14px; }
.comment-form label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 500; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: 12px 16px;
	background: var(--white); border: 1.5px solid var(--ink); border-radius: 18px;
}
.comment-form .comment-form-cookies-consent { display: flex; align-items: center; gap: 8px; }
.comment-form .comment-form-cookies-consent label { margin: 0; }

/* WordPress core classes */
.alignleft { float: left; margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption { max-width: 100%; }
.sticky, .bypostauthor, .gallery-caption { display: block; }

/* ==========================================================================
   Motion (opt-out in the Customizer; off for reduced-motion users)
   ========================================================================== */
@keyframes mharma-drift { to { transform: translate(-80px, 80px); } }
@keyframes mharma-ribbon { to { transform: translateX(-40px); } }
@keyframes mharma-sway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
@keyframes mharma-wave { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.45); } }
@keyframes mharma-stitch { to { background-position: -48px 0; } }

.has-motion .drift { animation: mharma-drift 14s linear infinite; }
.has-motion .ribbon { animation: mharma-ribbon 3.2s linear infinite; }
.has-motion .sway { animation: mharma-sway 6s ease-in-out infinite; transform-origin: 50% 85%; }
.has-motion .thread { animation: mharma-stitch 2.4s linear infinite; }
.has-motion .is-playing .wave span { animation: mharma-wave 1.1s ease-in-out infinite; }

.js .has-motion .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .has-motion .reveal.is-in { opacity: 1; transform: none; }
.js .has-motion .reveal:nth-child(2) { transition-delay: .08s; }
.js .has-motion .reveal:nth-child(3) { transition-delay: .16s; }
.js .has-motion .reveal:nth-child(4) { transition-delay: .24s; }
.js .has-motion .reveal:nth-child(5) { transition-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.has-motion .drift, .has-motion .ribbon, .has-motion .sway, .has-motion .thread, .has-motion .is-playing .wave span { animation: none; }
	.js .has-motion .reveal { opacity: 1; transform: none; transition: none; }
	.lift, .lift:hover, .fold-img { transition: none; transform: none; }
}

@media print {
	.topbar, .masthead, .ribbon-band, .pod, .newsletter, .share, .comments { display: none; }
	body { background: #fff; }
}
