/*
Theme Name: Propertydome
Theme URI: https://propertydome.com
Author: Propertydome
Description: Propertydome's real estate and lifestyle magazine theme ("Pulse"). Light by default with a dark mode switch, deep green and gold. A live feed, story circles, next-story loading, listen-to-story, tap-a-term explanations, continue reading and saved stories. The homepage is built from blocks you can edit. No page builder needed; permalinks, posts and SEO settings are left untouched.
Version: 3.1.0
Requires at least: 6.2
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: propertydome
Tags: blog, news, light, dark, custom-logo, custom-menu, featured-images, post-formats, threaded-comments, translation-ready
*/

/* Tokens live in assets/css/sections.css, loaded first. */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0; background: var(--pd-bg); color: var(--pd-text);
	font-family: var(--pd-sans); font-size: 16.5px; line-height: 1.55;
	-webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
	overflow-x: clip;
}
img, video { max-width: 100%; height: auto; }
iframe { max-width: 100%; }
a { color: var(--pd-text); }
a:hover { color: var(--pd-accent-text); }
:focus-visible { outline: 2.5px solid var(--pd-accent-text); outline-offset: 3px; border-radius: 4px; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.15; }
.pd-skip { position: absolute; left: -9999px; top: 0; z-index: 1000; background: var(--pd-green); color: #FFFFFF; padding: 12px 18px; font-weight: 700; }
.pd-skip:focus { left: 12px; top: 12px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pd-wrap--read { max-width: calc(var(--pd-read) + 40px); }
.pd-wrap--wide { max-width: calc(var(--pd-wide) + 40px); }

/* ---------- Icon buttons, chips ---------- */
.pd-iconbtn {
	position: relative; width: 42px; height: 42px; border-radius: 999px; border: 1.5px solid var(--pd-line-2);
	background: transparent; color: var(--pd-text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.pd-iconbtn:hover { border-color: var(--pd-text); }
.pd-chip { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--pd-line-2); font-size: 14px; font-weight: 600; text-decoration: none; color: var(--pd-text); }
.pd-chip:hover { border-color: var(--pd-text); color: var(--pd-text); }
.pd-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-badge-count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--pd-gold); color: #0F1412; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; }

/* ---------- Top bar + header ---------- */
.pd-topbar { background: var(--pd-green); color: #FFFFFF; font-size: 14px; font-weight: 600; }
.pd-topbar__in { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; padding-top: 8px; padding-bottom: 8px; text-align: center; }
.pd-topbar a { color: var(--pd-gold); }

.pd-header { position: sticky; top: 0; z-index: 60; background: var(--pd-bg); border-bottom: 2px solid var(--pd-text); }
.admin-bar .pd-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .pd-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .pd-header { top: 0; } }
.pd-header__in { display: flex; align-items: center; gap: 12px 28px; min-height: 64px; }
.pd-brand { font-family: var(--pd-display); font-weight: 800; font-size: 27px; letter-spacing: -1.2px; color: var(--pd-text); text-decoration: none; white-space: nowrap; }
.pd-brand:hover { color: var(--pd-text); }
.pd-brand__dot { color: var(--pd-gold); }
.custom-logo { max-height: 40px; width: auto; display: block; }

.pd-nav { flex: 1 1 auto; min-width: 0; }
.pd-nav__sheethead { display: none; }
.pd-nav__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 22px; font-weight: 600; font-size: 15px; }
.pd-nav__list li { position: relative; }
.pd-nav__list a { display: block; padding: 20px 0; text-decoration: none; color: var(--pd-text); }
.pd-nav__list a:hover { color: var(--pd-accent-text); }
.pd-nav__list .current-menu-item > a, .pd-nav__list .current-menu-ancestor > a { color: var(--pd-accent-text); box-shadow: inset 0 -3px 0 var(--pd-gold); }
.pd-nav__list .sub-menu {
	list-style: none; margin: 0; padding: 8px; position: absolute; top: 100%; left: -12px; min-width: 210px;
	background: var(--pd-card); border: 1px solid var(--pd-line); border-radius: 12px; box-shadow: 0 12px 32px rgba(15, 20, 18, .12);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s ease; z-index: 70;
}
.pd-nav__list li:hover > .sub-menu, .pd-nav__list li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.pd-nav__list .sub-menu a { padding: 10px 12px; border-radius: 8px; box-shadow: none; }
.pd-nav__list .sub-menu a:hover { background: var(--pd-surface); }

.pd-header__tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.pd-cur { display: inline-flex; border: 1.5px solid var(--pd-line-2); border-radius: 999px; padding: 2px; }
.pd-cur button { min-width: 34px; height: 34px; border-radius: 999px; border: 0; background: transparent; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--pd-text); }
.pd-cur button[aria-pressed="true"] { background: var(--pd-text); color: var(--pd-bg); }
.pd-themetoggle .pd-ic--sun { display: none; }
[data-theme="dark"] .pd-themetoggle .pd-ic--sun { display: block; }
[data-theme="dark"] .pd-themetoggle .pd-ic--moon { display: none; }

.pd-searchbar { border-top: 1px solid var(--pd-line); padding: 14px 0; background: var(--pd-bg); }
.pd-searchform { display: flex; gap: 8px; }
.pd-searchform input[type="search"] { flex: 1; min-width: 0; min-height: 48px; border-radius: 999px; border: 1.5px solid var(--pd-line-2); background: var(--pd-card); color: var(--pd-text); padding: 0 20px; font: 500 16px var(--pd-sans); }
.pd-searchform .pd-btn { min-height: 48px; }

.pd-progress { position: absolute; left: 0; right: 0; bottom: -2px; height: 3px; }
.pd-progress span { display: block; height: 3px; width: 0; background: var(--pd-gold); }

/* ---------- Phone: sections sheet + tab bar ---------- */
.pd-tabbar { display: none; }
@media (max-width: 899px) {
	body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
	.pd-hide-mobile { display: none !important; }
	.pd-header__in { min-height: 58px; }
	.pd-brand { font-size: 24px; }
	.pd-nav {
		position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; max-height: 78vh; overflow-y: auto;
		background: var(--pd-card); border-radius: 22px 22px 0 0; box-shadow: 0 -12px 40px rgba(15, 20, 18, .2);
		padding: 8px 20px calc(24px + env(safe-area-inset-bottom)); transform: translateY(105%); transition: transform .28s ease; visibility: hidden;
	}
	.pd-nav.is-open { transform: none; visibility: visible; }
	.pd-nav__sheethead { display: flex; justify-content: space-between; align-items: center; padding: 10px 0 6px; font-family: var(--pd-display); font-weight: 800; font-size: 22px; }
	.pd-nav__list { flex-direction: column; gap: 0; font-size: 18px; }
	.pd-nav__list a { padding: 14px 0; border-bottom: 1px solid var(--pd-line); box-shadow: none !important; }
	.pd-nav__list .sub-menu { position: static; opacity: 1; visibility: inherit; transform: none; border: 0; box-shadow: none; background: transparent; padding: 0 0 0 16px; }
	.pd-nav__list .sub-menu a { font-size: 16px; padding: 12px 0; }
	.pd-tabbar {
		display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
		background: color-mix(in srgb, var(--pd-bg) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
		border-top: 1px solid var(--pd-line); padding-bottom: env(safe-area-inset-bottom);
	}
	.pd-tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 62px; border: 0; background: none; color: var(--pd-muted); font-size: 11px; font-weight: 700; text-decoration: none; cursor: pointer; }
	.pd-tab.is-current, .pd-tab[aria-expanded="true"] { color: var(--pd-text); }
	.pd-tab.is-current::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--pd-gold); }
	.pd-tab .pd-badge-count { top: 6px; right: calc(50% - 22px); }
	.pd-sheet-open::after { content: ""; position: fixed; inset: 0; background: rgba(8, 10, 9, .45); z-index: 85; }
}

/* ---------- Saved drawer ---------- */
.pd-drawer { position: fixed; inset: 0; z-index: 120; }
.pd-drawer[hidden] { display: none; }
.pd-drawer__scrim { position: absolute; inset: 0; background: rgba(8, 10, 9, .5); }
.pd-drawer__panel {
	position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--pd-card); color: var(--pd-text);
	display: flex; flex-direction: column; box-shadow: -12px 0 40px rgba(15, 20, 18, .2);
}
@media (max-width: 899px) { .pd-drawer__panel { top: auto; left: 0; width: 100%; max-height: 82vh; border-radius: 22px 22px 0 0; padding-bottom: env(safe-area-inset-bottom); } }
.pd-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--pd-line); }
.pd-drawer__head h2 { margin: 0; font-family: var(--pd-display); font-weight: 800; font-size: 22px; }
.pd-drawer__list { list-style: none; margin: 0; padding: 8px 20px; overflow-y: auto; flex: 1; }
.pd-drawer__list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--pd-line); }
.pd-drawer__list a { flex: 1; display: flex; align-items: center; gap: 12px; color: var(--pd-text); text-decoration: none; font-weight: 600; min-width: 0; }
.pd-drawer__list img, .pd-drawer__thumb { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; flex: 0 0 auto; background: var(--pd-tone-0); }
.pd-drawer__empty { color: var(--pd-muted); padding: 24px 0; border: 0 !important; }
.pd-drawer__note { margin: 0; padding: 12px 20px 18px; font-size: 13px; color: var(--pd-muted); }

/* ---------- Article ---------- */
.pd-article { padding-bottom: 16px; }
.pd-article__head { padding-top: 36px; padding-bottom: 22px; display: flex; flex-direction: column; gap: 14px; }
.pd-article__top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.pd-article__title { margin: 0; font-family: var(--pd-display); font-weight: 800; font-size: clamp(34px, 5.4vw, 62px); line-height: 1; letter-spacing: -1.6px; color: var(--pd-text); }
.pd-article__dek { margin: 0; font-family: var(--pd-serif); font-size: 21px; line-height: 1.5; color: var(--pd-muted); }
.pd-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 6px; }
.pd-action {
	display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 15px; border-radius: 999px; border: 1.5px solid var(--pd-line-2);
	background: transparent; color: var(--pd-text); font-family: var(--pd-sans); font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none;
}
.pd-action:hover { border-color: var(--pd-text); color: var(--pd-text); }
.pd-action[aria-pressed="true"], .pd-action.is-playing { background: var(--pd-green); border-color: var(--pd-green); color: #FFFFFF; }
.pd-action[aria-pressed="true"] .pd-ic--bookmark { fill: currentColor; }
.pd-action--wa { background: var(--pd-green-tint); border-color: transparent; }
@media (max-width: 600px) {
	.pd-actions { flex-wrap: nowrap; overflow-x: auto; margin: 0 -20px; padding: 6px 20px 2px; scrollbar-width: none; }
	.pd-actions::-webkit-scrollbar { display: none; }
	.pd-action { flex: 0 0 auto; min-height: 40px; padding: 0 13px; font-size: 13.5px; }
}
.pd-article__hero { margin: 0 auto 8px; }
.pd-article__hero img { width: 100%; max-height: 640px; object-fit: cover; border-radius: var(--pd-r); display: block; }
.pd-article__hero figcaption { font-size: 13.5px; color: var(--pd-muted); margin-top: 8px; }
.pd-elementor-content { width: 100%; }

/* ---------- Story text ---------- */
.pd-prose { font-family: var(--pd-serif); font-size: 19px; line-height: 1.72; color: var(--pd-prose); padding-top: 20px; overflow-wrap: break-word; }
.pd-prose p, .pd-prose li { hyphens: auto; -webkit-hyphens: auto; }
@media (min-width: 768px) {
	.pd-prose { font-size: 20px; }
	.pd-prose p, .pd-prose li { text-align: justify; text-wrap: pretty; }
}
.pd-prose > * { margin-top: 0; margin-bottom: 1.2em; }
.pd-prose h2, .pd-prose h3, .pd-prose h4 { font-family: var(--pd-display); color: var(--pd-text); letter-spacing: -.5px; text-align: left; }
.pd-prose h2 { font-weight: 800; font-size: 30px; margin-top: 1.6em; margin-bottom: .5em; }
.pd-prose h3 { font-weight: 700; font-size: 23px; margin-top: 1.4em; margin-bottom: .4em; }
.pd-prose a { color: var(--pd-accent-text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.pd-prose strong { color: var(--pd-text); }
.pd-prose blockquote, .pd-prose .wp-block-quote, .pd-prose .wp-block-pullquote {
	margin: 1.6em 0; padding: 4px 0 4px 22px; border: 0; box-shadow: inset 4px 0 0 var(--pd-gold);
	font-family: var(--pd-display); font-weight: 700; font-size: 25px; line-height: 1.3; letter-spacing: -.4px; color: var(--pd-text); text-align: left;
}
.pd-prose blockquote p { text-align: left !important; }
.pd-prose blockquote cite, .pd-prose .wp-block-quote cite { display: block; margin-top: 8px; font-family: var(--pd-sans); font-weight: 500; font-size: 14px; color: var(--pd-muted); font-style: normal; }
.pd-prose img { border-radius: 10px; }
.pd-prose figure { margin-left: 0; margin-right: 0; }
.pd-prose figcaption, .pd-prose .wp-caption-text { font-family: var(--pd-sans); font-size: 13.5px; color: var(--pd-muted); margin-top: 8px; text-align: left; }
.pd-prose .wp-caption { max-width: 100%; }
.pd-prose ul, .pd-prose ol { padding-left: 1.3em; }
.pd-prose li { margin-bottom: .45em; }
.pd-prose li::marker { color: var(--pd-gold-text); font-family: var(--pd-sans); font-weight: 700; }
.pd-prose hr { border: 0; border-top: 1px solid var(--pd-line-2); margin: 2.4em 0; }
.pd-prose table { width: 100%; border-collapse: collapse; font-family: var(--pd-sans); font-size: 15.5px; }
.pd-prose th, .pd-prose td, .pd-prose .wp-block-table th, .pd-prose .wp-block-table td { border: 0; border-bottom: 1px solid var(--pd-line); padding: 11px 12px; text-align: left; }
.pd-prose th { color: var(--pd-text); font-weight: 700; }
.pd-prose .wp-block-table thead { border-bottom: 2px solid var(--pd-text); }
.pd-prose iframe { width: 100%; border-radius: 10px; }
.pd-prose .alignwide { margin-left: -80px; margin-right: -80px; max-width: calc(100% + 160px); }
.pd-prose .alignfull { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); max-width: 100vw; width: 100vw; }
.pd-prose .alignleft { float: left; margin: .3em 1.4em 1em 0; max-width: 50%; }
.pd-prose .alignright { float: right; margin: .3em 0 1em 1.4em; max-width: 50%; }
.pd-prose .aligncenter { margin-left: auto; margin-right: auto; display: block; }
.pd-prose .wp-block-button__link { background: var(--pd-green); color: #FFFFFF; border-radius: 999px; font-family: var(--pd-sans); font-weight: 700; text-decoration: none; }
.pd-prose .pd-lc, .pd-prose .pd-lc-row { font-size: 16px; text-align: left; }
.pd-prose .pd-lc a, .pd-prose .pd-lc-row a { text-decoration: none; }
@media (max-width: 1100px) { .pd-prose .alignwide { margin-left: 0; margin-right: 0; max-width: 100%; } }
.pd-prose .is-speaking { background: var(--pd-green-tint); box-shadow: 0 0 0 8px var(--pd-green-tint); border-radius: 4px; transition: background .3s ease; }
.pd-pagelinks { font-family: var(--pd-sans); font-weight: 700; display: flex; gap: 10px; }

/* Tap-a-term */
.pd-term { cursor: help; text-decoration: underline dotted var(--pd-gold); text-decoration-thickness: 2px; text-underline-offset: 4px; border-radius: 3px; }
.pd-term:hover, .pd-term[aria-expanded="true"] { background: var(--pd-green-tint); }
.pd-pop {
	position: absolute; z-index: 130; width: min(320px, calc(100vw - 32px)); padding: 16px 18px; border-radius: 14px;
	background: var(--pd-card); color: var(--pd-text); border: 1px solid var(--pd-line); box-shadow: 0 18px 48px rgba(15, 20, 18, .18);
	font-family: var(--pd-sans); font-size: 15px; line-height: 1.5; text-align: left;
}
.pd-pop strong { display: block; margin-bottom: 4px; font-family: var(--pd-display); font-size: 17px; color: var(--pd-accent-text); }
.pd-pop__note { display: block; margin-top: 8px; font-size: 12px; color: var(--pd-muted); }

/* Article footer */
.pd-article__foot { padding-top: 8px; padding-bottom: 8px; }
.pd-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 24px; }
.pd-tags a { display: inline-flex; min-height: 34px; align-items: center; padding: 0 13px; border-radius: 999px; background: var(--pd-surface); font-size: 13.5px; font-weight: 600; text-decoration: none; color: var(--pd-text); }
.pd-after { margin-bottom: 24px; }
.pd-author { display: flex; gap: 16px; align-items: flex-start; padding: 22px 0; border-top: 2px solid var(--pd-text); border-bottom: 1px solid var(--pd-line); }
.pd-author__img { width: 64px; height: 64px; border-radius: 999px; flex: 0 0 auto; }
.pd-author__body { display: flex; flex-direction: column; gap: 3px; }
.pd-author__name { font-family: var(--pd-display); font-weight: 800; font-size: 21px; letter-spacing: -.4px; color: var(--pd-text); text-decoration: none; }
.pd-author__bio { margin: 4px 0 0; font-size: 15px; color: var(--pd-muted); }

/* Next story */
.pd-next { padding-top: 24px; }
.pd-next__fallback { display: flex; flex-direction: column; gap: 6px; padding-top: 22px; padding-bottom: 22px; text-decoration: none; color: var(--pd-text); }
.pd-next__title { font-family: var(--pd-display); font-weight: 800; font-size: 26px; letter-spacing: -.6px; line-height: 1.1; }
.pd-next.is-loading::after { content: ""; display: block; width: 28px; height: 28px; margin: 32px auto; border-radius: 999px; border: 3px solid var(--pd-line); border-top-color: var(--pd-green); animation: pd-spin .8s linear infinite; }
@keyframes pd-spin { to { transform: rotate(360deg); } }
.pd-article--appended { border-top: 6px solid var(--pd-text); margin-top: 40px; }
.pd-next__label { align-self: flex-start; background: var(--pd-gold); color: #0F1412; font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 6px 10px; border-radius: 4px; }

/* ---------- Story circles viewer ---------- */
.pd-viewer { position: fixed; inset: 0; z-index: 200; background: rgba(6, 8, 7, .96); display: flex; align-items: center; justify-content: center; padding: 12px; }
.pd-viewer[hidden] { display: none; }
.pd-viewer__stage { position: relative; width: min(440px, 100%); height: min(86vh, 800px); border-radius: 20px; overflow: hidden; background: #1A201D; color: #FFFFFF; touch-action: pan-y; }
@media (max-width: 520px) { .pd-viewer { padding: 0; } .pd-viewer__stage { height: 100%; border-radius: 0; } }
.pd-viewer__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pd-viewer__shade { position: absolute; left: 0; right: 0; bottom: 0; height: 62%; background: linear-gradient(to top, rgba(6, 8, 7, .92), rgba(6, 8, 7, 0)); pointer-events: none; }
.pd-viewer__top { position: absolute; left: 0; right: 0; top: 0; padding: 12px 12px 0; z-index: 3; background: linear-gradient(to bottom, rgba(6, 8, 7, .55), rgba(6, 8, 7, 0)); }
.pd-viewer__bars { display: flex; gap: 4px; }
.pd-viewer__bar { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .35); overflow: hidden; }
.pd-viewer__bar span { display: block; height: 100%; width: 0; background: #FFFFFF; }
.pd-viewer__bar.is-done span { width: 100%; }
.pd-viewer__head { display: flex; align-items: center; justify-content: space-between; padding: 10px 2px; font-weight: 700; font-size: 14px; }
.pd-viewer__close { width: 44px; height: 44px; border: 0; border-radius: 999px; background: rgba(0, 0, 0, .25); color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.pd-viewer__body { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 22px 26px; z-index: 3; display: flex; flex-direction: column; gap: 10px; }
.pd-viewer__cat { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--pd-gold); }
.pd-viewer__title { font-family: var(--pd-display); font-weight: 800; font-size: 28px; line-height: 1.05; letter-spacing: -.8px; }
.pd-viewer__text { font-size: 15px; line-height: 1.5; color: #DCE3DF; margin: 0; }
.pd-viewer__cta { align-self: flex-start; margin-top: 4px; background: #FFFFFF; color: #0F1412 !important; }
.pd-viewer__tap { position: absolute; top: 80px; bottom: 170px; width: 40%; z-index: 2; border: 0; background: transparent; cursor: pointer; }
.pd-viewer__tap--prev { left: 0; }
.pd-viewer__tap--next { right: 0; width: 60%; }

/* ---------- Archives ---------- */
.pd-archive__head { padding-top: 40px; padding-bottom: 16px; display: flex; flex-direction: column; gap: 12px; }
.pd-archive__title { margin: 0; font-family: var(--pd-display); font-weight: 800; font-size: clamp(36px, 5.5vw, 64px); letter-spacing: -1.6px; line-height: 1; }
.pd-archive__desc { color: var(--pd-muted); max-width: 680px; font-size: 17px; }
.pd-archive__desc p { margin: 0; }
.pd-archive__search { max-width: 640px; }
.pd-pagination { margin-top: 48px; }
.pd-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pd-pagination .page-numbers { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--pd-line-2); font-weight: 700; text-decoration: none; color: var(--pd-text); }
.pd-pagination .page-numbers.current { background: var(--pd-text); color: var(--pd-bg); border-color: var(--pd-text); }
.pd-empty { display: flex; flex-direction: column; gap: 16px; max-width: 640px; }
.pd-404 { padding-top: 64px; padding-bottom: 24px; display: flex; flex-direction: column; gap: 16px; }
.pd-page { padding-bottom: 56px; }

/* ---------- Comments ---------- */
.pd-comments-wrap { padding-top: 16px; padding-bottom: 24px; }
.pd-comments__title, .comment-reply-title { font-family: var(--pd-display); font-weight: 800; font-size: 26px; letter-spacing: -.5px; }
.pd-comments__list { list-style: none; padding: 0; }
.pd-comments__list .comment-body { border-bottom: 1px solid var(--pd-line); padding: 16px 0; }
.pd-comments__list .children { list-style: none; padding-left: 22px; }
.pd-comments__list .avatar { border-radius: 999px; vertical-align: middle; margin-right: 10px; }
.comment-meta a { color: var(--pd-muted); font-size: 13.5px; }
.comment-form label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; background: var(--pd-card); color: var(--pd-text); border: 1.5px solid var(--pd-line-2); border-radius: 12px; padding: 12px 14px; font: 500 16px var(--pd-sans);
}

/* ---------- Footer ---------- */
.pd-footer { background: var(--pd-surface); margin-top: 64px; }
.pd-newsletter + .pd-footer { margin-top: 0; }
.pd-footer__in { display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: flex-start; justify-content: space-between; padding-top: 44px; padding-bottom: 20px; }
.pd-footer__about { max-width: 420px; }
.pd-footer__about p { margin: 8px 0 0; color: var(--pd-muted); }
.pd-footer__menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; font-weight: 600; }
.pd-footer__menu a { text-decoration: none; }
.pd-footer__copy { padding-top: 12px; padding-bottom: 28px; font-size: 13.5px; color: var(--pd-muted); }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.pd-nav, .pd-next.is-loading::after { transition: none; animation: none; }
}

/* =====================================================================
   3.1: phone-friendly tables, embeds, story sidebar, share menu, banner, alerts card
   ===================================================================== */

/* ---------- Tables (any story, block editor or Elementor) ---------- */
.pd-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1.4em; }
.pd-table-wrap table { width: 100%; min-width: 100%; margin: 0; }
.pd-article th, .pd-article td { word-break: normal; overflow-wrap: normal; hyphens: manual; -webkit-hyphens: manual; vertical-align: top; }
.pd-article td p, .pd-article th p, .pd-article td li { text-align: left !important; hyphens: manual; margin: 0; }
.pd-prose figure.wp-block-table { overflow: visible; }
@media (max-width: 640px) {
	.pd-table-wrap table:not(.pd-table--stack) th, .pd-table-wrap table:not(.pd-table--stack) td { min-width: 132px; }
	.pd-table-wrap--scroll {
		margin-right: -20px; padding-right: 20px;
		background:
			linear-gradient(to right, var(--pd-bg) 30%, rgba(255, 255, 255, 0)) left center / 40px 100% no-repeat local,
			linear-gradient(to left, var(--pd-bg) 30%, rgba(255, 255, 255, 0)) right center / 40px 100% no-repeat local,
			radial-gradient(farthest-side at 0 50%, rgba(15, 20, 18, .16), rgba(15, 20, 18, 0)) left center / 14px 100% no-repeat scroll,
			radial-gradient(farthest-side at 100% 50%, rgba(15, 20, 18, .16), rgba(15, 20, 18, 0)) right center / 14px 100% no-repeat scroll;
	}

	.pd-article table.pd-table--stack, .pd-article .pd-table--stack tbody, .pd-article .pd-table--stack tr, .pd-article .pd-table--stack td { display: block; width: 100%; }
	.pd-article .pd-table--stack thead, .pd-article .pd-table--stack .pd-table__head { display: none; }
	.pd-article .pd-table--stack tr { margin: 0 0 12px; padding: 4px 16px; border: 1px solid var(--pd-line); border-radius: 14px; background: var(--pd-card); }
	.pd-article .pd-table--stack td { display: grid; grid-template-columns: minmax(88px, 36%) minmax(0, 1fr); gap: 12px; padding: 10px 0; border: 0; border-bottom: 1px solid var(--pd-line); font-size: 15.5px; line-height: 1.45; }
	.pd-article .pd-table--stack td:last-child { border-bottom: 0; }
	.pd-article .pd-table--stack td::before { content: attr(data-label); font-family: var(--pd-sans); font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--pd-muted); padding-top: 3px; }
	.pd-article .pd-table--stack td.pd-table__lead { display: block; padding: 12px 0 10px; font-family: var(--pd-display); font-size: 19px; font-weight: 800; letter-spacing: -.3px; color: var(--pd-text); }
	.pd-article .pd-table--stack td.pd-table__lead::before { display: none; }
}

/* ---------- Embeds, long links, code, floats ---------- */
.pd-article iframe[src*="youtube"], .pd-article iframe[src*="youtu.be"], .pd-article iframe[src*="vimeo"] { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.pd-article .wp-embed-aspect-16-9 iframe, .pd-article .elementor-video iframe { aspect-ratio: auto; }
.pd-prose p, .pd-prose li, .pd-prose p a, .pd-prose li a { overflow-wrap: anywhere; }
.pd-article pre { max-width: 100%; overflow-x: auto; white-space: pre; }
.pd-elementor-content img { height: auto; }
@media (max-width: 600px) {
	.pd-prose .alignleft, .pd-prose .alignright { float: none; max-width: 100%; margin: 1em 0; }
	.pd-prose { font-size: 18px; }
	.pd-prose h2 { font-size: 26px; }
}
.pd-prose h2, .pd-prose h3, .pd-elementor-content h2 { scroll-margin-top: 96px; }

/* ---------- Story layout with the sidebar ---------- */
.pd-rail { display: none; }
.pd-promo--inline { margin: 8px 0 24px; }
@media (min-width: 1200px) {
	.pd-story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, calc(var(--pd-read) + 40px)) minmax(0, 1fr); }
	.pd-story > .pd-rail { display: block; grid-column: 1; justify-self: end; width: 240px; margin-right: 8px; }
	.pd-story > .pd-story__main { grid-column: 2; min-width: 0; }
	.pd-story:not(.pd-story--wide) .pd-promo--inline { display: none; }
}
@media (min-width: 1280px) {
	.pd-story--wide { grid-template-columns: 252px minmax(0, 1fr); padding-left: 20px; }
	.pd-story--wide > .pd-rail { justify-self: stretch; width: auto; margin-right: 8px; }
	.pd-story--wide .pd-promo--inline { display: none; }
}
@media (min-width: 1200px) and (max-width: 1279px) {
	.pd-story--wide { display: block; }
	.pd-story--wide > .pd-rail { display: none; }
}
.pd-rail__in { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 22px; max-height: calc(100vh - 110px); overflow-y: auto; padding: 22px 4px 24px 0; scrollbar-width: thin; }
.admin-bar .pd-rail__in { top: 124px; }
.pd-rail__label { display: block; margin-bottom: 10px; font-family: var(--pd-sans); font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--pd-muted); }

/* Contents */
.pd-toc__list { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--pd-line); }
.pd-toc__list a { display: block; margin-left: -2px; padding: 6px 0 6px 14px; border-left: 2px solid transparent; font-family: var(--pd-sans); font-size: 14px; font-weight: 500; line-height: 1.35; color: var(--pd-muted); text-decoration: none; transition: color .2s ease, border-color .2s ease; }
.pd-toc__list a:hover { color: var(--pd-text); }
.pd-toc__list a.is-current { color: var(--pd-text); font-weight: 700; border-left-color: var(--pd-gold); }

/* Share row + tools */
.pd-sharerow { display: flex; flex-wrap: wrap; gap: 6px; }
.pd-sharerow__btn { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; border: 1.5px solid var(--pd-line-2); background: transparent; color: var(--pd-text); cursor: pointer; text-decoration: none; transition: background .15s ease, color .15s ease, border-color .15s ease; }
.pd-sharerow__btn:hover { background: var(--pd-green); border-color: var(--pd-green); color: #FFFFFF; }
.pd-sharerow__btn.is-done { background: var(--pd-green); border-color: var(--pd-green); color: #FFFFFF; }
.pd-rail__tools { display: flex; flex-direction: column; gap: 8px; }
.pd-railbtn { display: inline-flex; align-items: center; gap: 9px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--pd-line-2); background: transparent; color: var(--pd-text); font-family: var(--pd-sans); font-size: 14px; font-weight: 700; cursor: pointer; }
.pd-railbtn[hidden] { display: none; }
.pd-railbtn:hover { border-color: var(--pd-text); }
.pd-railbtn[aria-pressed="true"], .pd-railbtn.is-playing { background: var(--pd-green); border-color: var(--pd-green); color: #FFFFFF; }
.pd-railbtn[aria-pressed="true"] .pd-ic--bookmark { fill: currentColor; }
@media (min-width: 900px) { .pd-action--wa { display: none; } }

/* ---------- Sidebar banner ---------- */
.pd-promo { display: flex; flex-direction: column; gap: 10px; padding: 18px 18px 16px; border-radius: 16px; background: #111111; color: #FFFFFF; text-decoration: none; position: relative; overflow: hidden; }
.pd-promo::after { content: ""; position: absolute; right: -36px; top: -36px; width: 110px; height: 110px; border-radius: 999px; background: radial-gradient(circle, rgba(232, 122, 2, .45), rgba(232, 122, 2, 0) 70%); pointer-events: none; }
.pd-promo:hover { color: #FFFFFF; }
.pd-promo__brand { font-family: var(--pd-sans); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #E87A02; }
.pd-promo__text { font-family: var(--pd-display); font-size: 21px; font-weight: 800; line-height: 1.1; letter-spacing: -.5px; }
.pd-promo__cta { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; padding: 9px 14px; border-radius: 999px; background: #E87A02; color: #111111; font-family: var(--pd-sans); font-size: 14px; font-weight: 800; transition: transform .15s ease; }
.pd-promo:hover .pd-promo__cta { transform: translateX(3px); }
.pd-promo--inline { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; }
.pd-promo--inline .pd-promo__brand { flex-basis: 100%; }
.pd-promo--inline .pd-promo__text { font-size: 20px; flex: 1 1 200px; }
.pd-promo--inline .pd-promo__cta { align-self: center; margin-top: 0; }
[data-theme="dark"] .pd-promo { background: #000000; box-shadow: inset 0 0 0 1px #262626; }

/* ---------- Share menu (desktop) ---------- */
.pd-sharemenu { position: absolute; z-index: 140; width: 230px; padding: 8px; border-radius: 16px; background: var(--pd-card); border: 1px solid var(--pd-line); box-shadow: 0 18px 48px rgba(15, 20, 18, .18); display: flex; flex-direction: column; }
.pd-sharemenu__title { padding: 8px 10px 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--pd-muted); }
.pd-sharemenu__item { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--pd-text); font-family: var(--pd-sans); font-size: 15px; font-weight: 600; text-decoration: none; text-align: left; cursor: pointer; }
.pd-sharemenu__item:hover, .pd-sharemenu__item:focus-visible { background: var(--pd-surface); color: var(--pd-text); }
.pd-sharemenu__item .pd-ic { flex: 0 0 auto; }

/* ---------- Alerts card ---------- */
.pd-alert { position: fixed; z-index: 120; right: 20px; bottom: 20px; width: min(360px, calc(100vw - 24px)); padding: 18px; border-radius: 18px; background: var(--pd-card); color: var(--pd-text); border: 1px solid var(--pd-line); box-shadow: 0 22px 60px rgba(15, 20, 18, .22); display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; transform: translateY(16px); opacity: 0; transition: transform .35s ease, opacity .35s ease; }
.pd-alert.is-in { transform: none; opacity: 1; }
.pd-alert__icon { grid-row: span 2; width: 42px; height: 42px; border-radius: 999px; background: var(--pd-green); color: var(--pd-gold); display: inline-flex; align-items: center; justify-content: center; }
.pd-alert__title { font-family: var(--pd-display); font-size: 18px; font-weight: 800; line-height: 1.2; letter-spacing: -.3px; }
.pd-alert__text { margin: 0; font-size: 14.5px; color: var(--pd-muted); }
.pd-alert__btns { grid-column: 1 / -1; display: flex; gap: 8px; margin-top: 10px; justify-content: flex-end; }
@media (max-width: 899px) { .pd-alert { left: 12px; right: 12px; width: auto; bottom: calc(76px + env(safe-area-inset-bottom)); } }
@media (prefers-reduced-motion: reduce) { .pd-alert { transition: none; } }
