/*
Theme Name: The Healthy Ways
Theme URI: https://thehealthyways.com
Author: The Healthy Ways
Author URI: https://thehealthyways.com
Description: Trailhead — a warm, editorial wellness theme built around a topographic trail-line motif. Presents healthy living as a flexible path rather than a strict program. Includes a custom homepage, category waypoint archives, key-takeaway and source blocks, a configurable newsletter section and a configurable unsubscribe link.
Version: 1.0.0
Requires at least: 6.2
Tested up to: 6.6
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: thehealthyways
Tags: blog, custom-logo, custom-menu, featured-images, translation-ready, accessibility-ready, block-styles, wide-blocks
*/

/* =========================================================
   1. TOKENS
   ========================================================= */
:root {
	--thw-cream: #faf4ea;
	--thw-paper: #fffdf8;
	--thw-sand: #f2e8d8;
	--thw-terracotta: #b9552f;
	--thw-terracotta-ink: #9e4426;
	--thw-teal: #14524e;
	--thw-teal-soft: #e2eeeb;
	--thw-plum: #6b3f55;
	--thw-plum-soft: #f0e6ec;
	--thw-gold: #d99a16;
	--thw-gold-soft: #fbeecd;
	--thw-clay-soft: #f7e5db;
	--thw-charcoal: #241f1b;
	--thw-muted: #57504a;
	--thw-line: rgba(36, 31, 27, 0.14);
	--thw-line-strong: rgba(36, 31, 27, 0.28);

	--thw-accent: var(--thw-teal);
	--thw-accent-soft: var(--thw-teal-soft);

	--thw-display: "Avenir Next", "Segoe UI", "Noto Sans", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
	--thw-body: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
	--thw-utility: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Consolas, "Liberation Mono", monospace;

	--thw-shell: 1220px;
	--thw-text: 68ch;
	--thw-gap: clamp(1.25rem, 3vw, 2.5rem);
	--thw-section: clamp(3.5rem, 8vw, 7rem);
	--thw-radius: 4px;
	--thw-radius-lg: 26px;
	--thw-shadow: 0 18px 44px -30px rgba(36, 31, 27, 0.55);
	--thw-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* =========================================================
   2. BASE
   ========================================================= */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
	margin: 0;
	background-color: var(--thw-cream);
	color: var(--thw-charcoal);
	font-family: var(--thw-body);
	font-size: clamp(1.0625rem, 0.35vw + 1rem, 1.1875rem);
	line-height: 1.75;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }

a { color: var(--thw-teal); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--thw-terracotta-ink); }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--thw-display);
	font-weight: 600;
	line-height: 1.14;
	letter-spacing: -0.018em;
	color: var(--thw-charcoal);
	margin: 0 0 0.6em;
	text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.35rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.15rem; }

p, ul, ol { margin: 0 0 1.35em; }
ul, ol { padding-left: 1.25em; }
li { margin-bottom: 0.5em; }

blockquote {
	margin: 2rem 0;
	padding: 0.2rem 0 0.2rem 1.4rem;
	border-left: 3px solid var(--thw-gold);
	font-style: italic;
	color: var(--thw-muted);
}

hr { border: 0; border-top: 1px solid var(--thw-line); margin: 2.5rem 0; }

table { width: 100%; border-collapse: collapse; }
th, td { border: 1px solid var(--thw-line); padding: 0.6rem 0.75rem; text-align: left; }

::selection { background: var(--thw-gold-soft); color: var(--thw-charcoal); }

/* =========================================================
   3. LAYOUT HELPERS
   ========================================================= */
.thw-shell {
	width: min(100% - 2.5rem, var(--thw-shell));
	margin-inline: auto;
}
@media (min-width: 48em) { .thw-shell { width: min(100% - 5rem, var(--thw-shell)); } }

.thw-section { padding-block: var(--thw-section); position: relative; }
.thw-section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.thw-section--paper { background: var(--thw-paper); }
.thw-section--sand { background: var(--thw-sand); }

.thw-eyebrow {
	font-family: var(--thw-utility);
	font-size: 0.72rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--thw-muted);
	margin: 0 0 1rem;
	display: flex;
	align-items: center;
	gap: 0.6rem;
}
.thw-eyebrow::before {
	content: "";
	width: 2.2rem;
	height: 2px;
	background: var(--thw-accent);
	flex: none;
}

.thw-lede {
	font-size: clamp(1.15rem, 1.4vw, 1.35rem);
	line-height: 1.6;
	color: var(--thw-muted);
	max-width: 58ch;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	word-wrap: normal !important;
}
.screen-reader-text:focus {
	background-color: var(--thw-paper);
	clip: auto !important;
	clip-path: none;
	color: var(--thw-teal);
	display: block;
	font-family: var(--thw-display);
	font-size: 0.95rem;
	font-weight: 600;
	height: auto;
	left: 1rem;
	line-height: normal;
	padding: 0.9rem 1.4rem;
	text-decoration: none;
	top: 1rem;
	width: auto;
	z-index: 100000;
	border: 2px solid var(--thw-teal);
	border-radius: var(--thw-radius);
}

/* Focus visibility (WCAG 2.2 AA) */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--thw-terracotta);
	outline-offset: 3px;
	border-radius: 2px;
}

/* =========================================================
   4. SIGNATURE — TRAIL LINE + TOPO FIELD
   ========================================================= */
.thw-topo {
	position: absolute;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
	z-index: 0;
	opacity: 0.5;
}
.thw-topo svg { width: 130%; height: 100%; min-width: 900px; }
.thw-topo path { fill: none; stroke: var(--thw-line); stroke-width: 1.1; }
.thw-section > .thw-shell { position: relative; z-index: 1; }

.thw-trail {
	display: block;
	width: 100%;
	height: clamp(48px, 7vw, 92px);
	color: var(--thw-accent);
}
.thw-trail path.thw-trail__line {
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-dasharray: 10 9;
	opacity: 0.7;
}
.thw-trail circle { fill: var(--thw-gold); }

/* =========================================================
   5. HEADER
   ========================================================= */
.thw-header {
	position: relative;
	z-index: 30;
	background: var(--thw-cream);
	border-bottom: 1px solid var(--thw-line);
}
.thw-header__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	padding-block: clamp(1rem, 2vw, 1.6rem);
}
.thw-brand { display: flex; align-items: center; gap: 0.9rem; text-decoration: none; }
.thw-brand__mark { flex: none; }
.thw-brand__text { display: flex; flex-direction: column; }
.thw-brand__title {
	font-family: var(--thw-display);
	font-weight: 600;
	font-size: clamp(1.15rem, 2vw, 1.4rem);
	letter-spacing: -0.02em;
	color: var(--thw-charcoal);
	line-height: 1.1;
}
.thw-brand__tagline {
	font-family: var(--thw-utility);
	font-size: 0.68rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--thw-muted);
	margin-top: 0.35rem;
}
.thw-brand .custom-logo { max-height: 60px; width: auto; }
.thw-brand:hover .thw-brand__title { color: var(--thw-teal); }

.thw-nav__list {
	display: flex;
	align-items: center;
	gap: clamp(1.25rem, 2.5vw, 2.4rem);
	list-style: none;
	margin: 0;
	padding: 0;
}
.thw-nav__list li { margin: 0; }
.thw-nav__list a {
	font-family: var(--thw-display);
	font-size: 0.98rem;
	font-weight: 600;
	letter-spacing: -0.005em;
	color: var(--thw-charcoal);
	text-decoration: none;
	padding: 0.4rem 0;
	position: relative;
	display: inline-block;
}
.thw-nav__list a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 100%;
	bottom: 0;
	height: 2px;
	background: var(--thw-terracotta);
	transition: right 0.28s var(--thw-ease);
}
.thw-nav__list a:hover::after,
.thw-nav__list .current-menu-item > a::after,
.thw-nav__list .current-cat > a::after,
.thw-nav__list .thw-nav-current > a::after { right: 0; }
.thw-nav__list .sub-menu {
	position: absolute;
	background: var(--thw-paper);
	border: 1px solid var(--thw-line);
	padding: 0.6rem;
	list-style: none;
	min-width: 200px;
	display: none;
	box-shadow: var(--thw-shadow);
}
.thw-nav__list li:hover > .sub-menu,
.thw-nav__list li:focus-within > .sub-menu { display: block; }

.thw-menu-toggle {
	display: none;
	align-items: center;
	gap: 0.65rem;
	background: transparent;
	border: 1px solid var(--thw-line-strong);
	border-radius: 999px;
	padding: 0.7rem 1.15rem;
	font-family: var(--thw-utility);
	font-size: 0.72rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--thw-charcoal);
	cursor: pointer;
	min-height: 44px;
}
.thw-menu-toggle__bars { display: block; width: 18px; height: 10px; position: relative; }
.thw-menu-toggle__bars::before,
.thw-menu-toggle__bars::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	height: 2px;
	background: var(--thw-charcoal);
	transition: transform 0.25s var(--thw-ease);
}
.thw-menu-toggle__bars::before { top: 0; }
.thw-menu-toggle__bars::after { bottom: 0; }
.thw-menu-toggle[aria-expanded="true"] .thw-menu-toggle__bars::before { transform: translateY(4px) rotate(45deg); }
.thw-menu-toggle[aria-expanded="true"] .thw-menu-toggle__bars::after { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 61.99em) {
	.thw-menu-toggle { display: inline-flex; }
	.thw-nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: var(--thw-paper);
		border-bottom: 1px solid var(--thw-line);
		box-shadow: var(--thw-shadow);
		display: none;
		padding: 0.5rem 0 1.5rem;
	}
	.thw-nav.is-open { display: block; }
	.thw-nav__list { flex-direction: column; align-items: stretch; gap: 0; width: min(100% - 2.5rem, var(--thw-shell)); margin-inline: auto; }
	.thw-nav__list li { border-bottom: 1px solid var(--thw-line); }
	.thw-nav__list a { display: block; padding: 1.05rem 0; font-size: 1.1rem; min-height: 44px; }
	.thw-nav__list a::after { display: none; }
	.thw-nav__list .sub-menu { position: static; display: block; border: 0; box-shadow: none; padding-left: 1rem; }
}

/* =========================================================
   6. HERO
   ========================================================= */
.thw-hero {
	position: relative;
	overflow: hidden;
	background: linear-gradient(178deg, var(--thw-sand) 0%, var(--thw-cream) 62%);
	padding-block: clamp(3rem, 7vw, 6rem) clamp(2.5rem, 5vw, 4rem);
}
.thw-hero__grid {
	display: grid;
	gap: clamp(2rem, 4vw, 3.5rem);
	align-items: end;
}
@media (min-width: 62em) {
	.thw-hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
}
.thw-hero__title { margin-bottom: 1.1rem; }
.thw-hero__title em {
	font-style: normal;
	color: var(--thw-terracotta-ink);
	position: relative;
	white-space: nowrap;
}
.thw-hero__title em::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -0.12em;
	height: 0.14em;
	background: var(--thw-gold);
	opacity: 0.55;
	border-radius: 999px;
}
.thw-hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }

.thw-hero__scene {
	position: relative;
	aspect-ratio: 5 / 4;
	min-height: 260px;
}
.thw-hero__scene svg { width: 100%; height: 100%; }

/* Waypoint strip under the hero */
.thw-waypoints {
	display: grid;
	gap: 0;
	border-top: 1px solid var(--thw-line-strong);
	margin-top: clamp(2.5rem, 5vw, 4rem);
}
@media (min-width: 48em) { .thw-waypoints { grid-template-columns: repeat(3, 1fr); } }
.thw-waypoint {
	padding: 1.6rem 1.4rem 1.6rem 0;
	border-bottom: 1px solid var(--thw-line);
	display: flex;
	gap: 1rem;
	align-items: flex-start;
}
@media (min-width: 48em) {
	.thw-waypoint { border-bottom: 0; border-right: 1px solid var(--thw-line); padding-inline: 1.6rem; }
	.thw-waypoint:first-child { padding-left: 0; }
	.thw-waypoint:last-child { border-right: 0; }
}
.thw-waypoint__num {
	font-family: var(--thw-utility);
	font-size: 0.72rem;
	letter-spacing: 0.1em;
	color: var(--thw-terracotta-ink);
	padding-top: 0.35rem;
}
.thw-waypoint h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.thw-waypoint p { font-size: 0.98rem; color: var(--thw-muted); margin: 0; line-height: 1.55; }

/* =========================================================
   7. BUTTONS + LINKS
   ========================================================= */
.thw-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	min-height: 48px;
	padding: 0.85rem 1.6rem;
	border-radius: 999px;
	border: 1px solid transparent;
	font-family: var(--thw-display);
	font-size: 0.97rem;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.22s var(--thw-ease), background-color 0.22s var(--thw-ease), color 0.22s var(--thw-ease);
}
.thw-btn--solid { background: var(--thw-teal); color: #fff; }
.thw-btn--solid:hover { background: var(--thw-charcoal); color: #fff; transform: translateY(-2px); }
.thw-btn--ghost { border-color: var(--thw-line-strong); color: var(--thw-charcoal); background: transparent; }
.thw-btn--ghost:hover { border-color: var(--thw-teal); color: var(--thw-teal); transform: translateY(-2px); }
.thw-btn--clay { background: var(--thw-terracotta); color: #fff; }
.thw-btn--clay:hover { background: var(--thw-terracotta-ink); color: #fff; transform: translateY(-2px); }

.thw-arrow-link {
	font-family: var(--thw-display);
	font-weight: 600;
	font-size: 0.97rem;
	text-decoration: none;
	color: var(--thw-teal);
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 44px;
}
.thw-arrow-link::after { content: "→"; transition: transform 0.22s var(--thw-ease); }
.thw-arrow-link:hover::after { transform: translateX(5px); }

/* =========================================================
   8. CATEGORY ACCENTS
   ========================================================= */
.thw-accent-nutrition { --thw-accent: var(--thw-terracotta-ink); --thw-accent-soft: var(--thw-clay-soft); }
.thw-accent-fitness   { --thw-accent: var(--thw-teal);           --thw-accent-soft: var(--thw-teal-soft); }
.thw-accent-sleep     { --thw-accent: var(--thw-plum);           --thw-accent-soft: var(--thw-plum-soft); }

.thw-tag {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	font-family: var(--thw-utility);
	font-size: 0.68rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--thw-accent);
	text-decoration: none;
	background: var(--thw-accent-soft);
	padding: 0.4rem 0.8rem;
	border-radius: 999px;
}
a.thw-tag:hover { background: var(--thw-accent); color: #fff; }

/* =========================================================
   9. CARDS — three distinct formats
   ========================================================= */

/* 9a. Guide panel (large feature) */
.thw-guide {
	display: grid;
	gap: clamp(1.5rem, 3vw, 3rem);
	background: var(--thw-paper);
	border: 1px solid var(--thw-line);
	border-radius: var(--thw-radius-lg);
	overflow: hidden;
	position: relative;
}
@media (min-width: 56em) {
	.thw-guide { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; }
}
.thw-guide__media { position: relative; min-height: 260px; background: var(--thw-accent-soft); }
.thw-guide__media img { width: 100%; height: 100%; object-fit: cover; }
.thw-guide__body { padding: clamp(1.75rem, 3vw, 3rem); }
.thw-guide__body h2, .thw-guide__body h3 { margin-bottom: 0.7rem; }
.thw-guide__body p { color: var(--thw-muted); }

/* 9b. Routine card (vertical, numbered path) */
.thw-routines { display: grid; gap: clamp(1.25rem, 2.5vw, 2rem); }
@media (min-width: 48em) { .thw-routines { grid-template-columns: repeat(2, 1fr); } }
.thw-routine {
	position: relative;
	background: var(--thw-paper);
	border: 1px solid var(--thw-line);
	border-left: 4px solid var(--thw-accent);
	border-radius: 0 var(--thw-radius-lg) var(--thw-radius-lg) 0;
	padding: clamp(1.4rem, 2.5vw, 2rem);
	transition: transform 0.28s var(--thw-ease), box-shadow 0.28s var(--thw-ease);
}
.thw-routine:hover { transform: translateY(-4px); box-shadow: var(--thw-shadow); }
.thw-routine__meta {
	font-family: var(--thw-utility);
	font-size: 0.7rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--thw-muted);
	margin-bottom: 0.9rem;
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
}
.thw-routine h3 { font-size: clamp(1.15rem, 1.7vw, 1.4rem); margin-bottom: 0.6rem; }
.thw-routine h3 a { color: inherit; text-decoration: none; }
.thw-routine h3 a:hover { color: var(--thw-accent); }
.thw-routine p { color: var(--thw-muted); font-size: 1rem; margin-bottom: 1.1rem; }

/* 9c. Tip card (compact, gold field) */
.thw-tips { display: grid; gap: 1px; background: var(--thw-line); border: 1px solid var(--thw-line); border-radius: var(--thw-radius-lg); overflow: hidden; }
@media (min-width: 40em) { .thw-tips { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64em) { .thw-tips { grid-template-columns: repeat(4, 1fr); } }
.thw-tip { background: var(--thw-gold-soft); padding: clamp(1.4rem, 2.2vw, 1.9rem); }
.thw-tip__num {
	font-family: var(--thw-utility);
	font-size: 0.7rem;
	letter-spacing: 0.14em;
	color: var(--thw-terracotta-ink);
	display: block;
	margin-bottom: 0.9rem;
}
.thw-tip h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.thw-tip p { font-size: 0.95rem; line-height: 1.6; color: var(--thw-muted); margin: 0; }

/* 9d. Offset article preview (editorial list) */
.thw-offset-list { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
.thw-offset {
	display: grid;
	gap: 1.25rem;
	padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
	border-bottom: 1px solid var(--thw-line);
	align-items: start;
}
@media (min-width: 52em) {
	.thw-offset { grid-template-columns: 8.5rem minmax(0, 1fr) minmax(0, 15rem); gap: clamp(1.5rem, 3vw, 3rem); }
	.thw-offset:nth-child(even) { padding-left: clamp(0rem, 4vw, 3.5rem); }
}
.thw-offset__rail {
	font-family: var(--thw-utility);
	font-size: 0.7rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--thw-muted);
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	padding-top: 0.4rem;
}
.thw-offset h3 { font-size: clamp(1.25rem, 2.1vw, 1.6rem); margin-bottom: 0.55rem; }
.thw-offset h3 a { color: inherit; text-decoration: none; background-image: linear-gradient(var(--thw-accent), var(--thw-accent)); background-size: 0% 2px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size 0.3s var(--thw-ease); }
.thw-offset h3 a:hover { background-size: 100% 2px; }
.thw-offset p { color: var(--thw-muted); margin-bottom: 0.9rem; font-size: 1.02rem; }
.thw-offset__thumb { border-radius: var(--thw-radius-lg); overflow: hidden; background: var(--thw-accent-soft); aspect-ratio: 4 / 3; }
.thw-offset__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--thw-ease); }
.thw-offset:hover .thw-offset__thumb img { transform: scale(1.04); }

/* Fallback thumbnail (procedural topo panel, no stock photos) */
.thw-fallback-art { width: 100%; height: 100%; display: block; background: var(--thw-accent-soft); }

/* =========================================================
   10. SECTION HEADS
   ========================================================= */
.thw-head {
	display: grid;
	gap: 1rem;
	margin-bottom: clamp(2rem, 4vw, 3rem);
	align-items: end;
}
@media (min-width: 56em) {
	.thw-head { grid-template-columns: minmax(0, 1fr) auto; }
	.thw-head__aside { text-align: right; }
}
.thw-head h2 { margin-bottom: 0.4rem; }
.thw-head p { color: var(--thw-muted); margin: 0; max-width: 54ch; }

/* Category chooser */
.thw-chooser { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
@media (min-width: 52em) { .thw-chooser { grid-template-columns: repeat(3, 1fr); } }
.thw-chooser__card {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 1.5rem;
	min-height: 15rem;
	padding: clamp(1.5rem, 2.5vw, 2.2rem);
	background: var(--thw-accent-soft);
	border-radius: var(--thw-radius-lg);
	text-decoration: none;
	color: var(--thw-charcoal);
	overflow: hidden;
	transition: transform 0.3s var(--thw-ease);
}
.thw-chooser__card:hover { transform: translateY(-6px); color: var(--thw-charcoal); }
.thw-chooser__card svg { position: absolute; right: -10%; bottom: -12%; width: 72%; opacity: 0.45; pointer-events: none; }
.thw-chooser__card h3 { font-size: clamp(1.3rem, 2vw, 1.65rem); margin: 0; position: relative; }
.thw-chooser__card p { position: relative; color: var(--thw-muted); font-size: 0.98rem; margin: 0.6rem 0 0; }
.thw-chooser__go { position: relative; font-family: var(--thw-utility); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--thw-accent); }

/* =========================================================
   11. NEWSLETTER
   ========================================================= */
.thw-newsletter {
	background: var(--thw-teal);
	color: #fdf9f1;
	border-radius: var(--thw-radius-lg);
	padding: clamp(2rem, 4vw, 3.5rem);
	position: relative;
	overflow: hidden;
}
.thw-newsletter h2 { color: #fff; }
.thw-newsletter p { color: rgba(253, 249, 241, 0.86); }
.thw-newsletter__grid { display: grid; gap: clamp(1.5rem, 3vw, 3rem); align-items: center; position: relative; z-index: 1; }
@media (min-width: 56em) { .thw-newsletter__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); } }
.thw-newsletter__sun { position: absolute; right: -6rem; top: -6rem; width: 22rem; opacity: 0.16; pointer-events: none; }
.thw-newsletter__form { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.thw-newsletter__form label { flex: 1 1 16rem; }
.thw-newsletter__form input[type="email"] {
	width: 100%;
	min-height: 52px;
	padding: 0.85rem 1.1rem;
	border-radius: 999px;
	border: 1px solid rgba(253, 249, 241, 0.4);
	background: rgba(253, 249, 241, 0.08);
	color: #fff;
	font-family: var(--thw-body);
	font-size: 1rem;
}
.thw-newsletter__form input[type="email"]::placeholder { color: rgba(253, 249, 241, 0.6); }
.thw-newsletter__form input[type="email"]:focus-visible { outline: 3px solid var(--thw-gold); outline-offset: 2px; }
.thw-newsletter__form .thw-btn { background: var(--thw-gold); color: var(--thw-charcoal); }
.thw-newsletter__form .thw-btn:hover { background: #fdf9f1; color: var(--thw-charcoal); }
.thw-newsletter__note { font-size: 0.9rem; margin: 1.1rem 0 0; color: rgba(253, 249, 241, 0.8); }
.thw-newsletter__note a { color: #fff; }
.thw-newsletter__notice {
	background: var(--thw-gold-soft);
	color: var(--thw-charcoal);
	border-radius: var(--thw-radius);
	padding: 1rem 1.25rem;
	font-size: 0.95rem;
}

/* =========================================================
   12. ARTICLE
   ========================================================= */
.thw-article { padding-block: clamp(2.5rem, 5vw, 4rem) var(--thw-section); }
.thw-article__head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.thw-article__meta {
	font-family: var(--thw-utility);
	font-size: 0.72rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--thw-muted);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.9rem;
	margin-top: 1.5rem;
}
.thw-article__hero { border-radius: var(--thw-radius-lg); overflow: hidden; margin-bottom: clamp(2rem, 4vw, 3rem); background: var(--thw-accent-soft); }
.thw-article__hero img { width: 100%; }

.thw-article__layout { display: grid; gap: clamp(2rem, 4vw, 3.5rem); }
@media (min-width: 64em) {
	.thw-article__layout { grid-template-columns: minmax(0, 12rem) minmax(0, 1fr); }
}
.thw-article__rail { position: sticky; top: 2rem; align-self: start; display: none; }
@media (min-width: 64em) { .thw-article__rail { display: block; } }
.thw-article__rail-inner {
	border-left: 2px solid var(--thw-accent);
	padding-left: 1rem;
	font-family: var(--thw-utility);
	font-size: 0.72rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--thw-muted);
	display: grid;
	gap: 0.6rem;
}

.thw-prose { max-width: var(--thw-text); }
.thw-prose > * { margin-inline: 0; }
.thw-prose h2 {
	margin-top: 2.6rem;
	padding-top: 1.6rem;
	border-top: 1px solid var(--thw-line);
}
.thw-prose h3 { margin-top: 2rem; color: var(--thw-teal); }
.thw-prose ul li::marker { color: var(--thw-terracotta); }
.thw-prose ol li::marker { color: var(--thw-terracotta-ink); font-family: var(--thw-utility); font-size: 0.85em; }
.thw-prose img { border-radius: var(--thw-radius-lg); }
.thw-prose .alignwide { width: min(100%, 56rem); }
.thw-prose .alignfull { width: 100%; }

.thw-note {
	background: var(--thw-accent-soft);
	border-radius: var(--thw-radius-lg);
	padding: clamp(1.25rem, 2.4vw, 1.9rem);
	margin: 2.2rem 0;
}
.thw-note p:last-child { margin-bottom: 0; }
.thw-note__label {
	font-family: var(--thw-utility);
	font-size: 0.7rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--thw-accent);
	display: block;
	margin-bottom: 0.7rem;
}

.thw-takeaways {
	background: var(--thw-paper);
	border: 1px solid var(--thw-line);
	border-top: 4px solid var(--thw-gold);
	border-radius: 0 0 var(--thw-radius-lg) var(--thw-radius-lg);
	padding: clamp(1.5rem, 3vw, 2.2rem);
	margin: 2.8rem 0;
}
.thw-takeaways h2 { font-size: 1.2rem; margin: 0 0 1rem; padding: 0; border: 0; }
.thw-takeaways ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.85rem; }
.thw-takeaways li { display: flex; gap: 0.8rem; margin: 0; font-size: 1rem; line-height: 1.6; }
.thw-takeaways li::before {
	content: "";
	flex: none;
	width: 0.6rem;
	height: 0.6rem;
	margin-top: 0.55rem;
	border-radius: 50%;
	border: 2px solid var(--thw-terracotta);
}

.thw-sources {
	border: 1px solid var(--thw-line);
	border-radius: var(--thw-radius-lg);
	padding: clamp(1.4rem, 2.6vw, 2rem);
	margin: 2.4rem 0;
	background: transparent;
}
.thw-sources h2 { font-size: 1.1rem; margin: 0 0 1rem; padding: 0; border: 0; }
.thw-sources ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.7rem; }
.thw-sources li { font-size: 0.95rem; line-height: 1.55; color: var(--thw-muted); margin: 0; padding-left: 1.4rem; position: relative; }
.thw-sources li::before { content: "↗"; position: absolute; left: 0; color: var(--thw-terracotta-ink); }

.thw-disclaimer {
	font-size: 0.92rem;
	line-height: 1.6;
	color: var(--thw-muted);
	border-left: 3px solid var(--thw-plum);
	padding: 0.2rem 0 0.2rem 1.1rem;
	margin: 2.4rem 0;
}
.thw-disclaimer strong { color: var(--thw-plum); }

/* Post navigation */
.thw-postnav { display: grid; gap: 1px; background: var(--thw-line); border-block: 1px solid var(--thw-line); margin-top: clamp(2.5rem, 5vw, 4rem); }
@media (min-width: 48em) { .thw-postnav { grid-template-columns: 1fr 1fr; } }
.thw-postnav a { background: var(--thw-cream); padding: clamp(1.4rem, 2.5vw, 2rem); text-decoration: none; display: block; transition: background-color 0.25s var(--thw-ease); }
.thw-postnav a:hover { background: var(--thw-paper); }
.thw-postnav span {
	font-family: var(--thw-utility);
	font-size: 0.7rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--thw-muted);
	display: block;
	margin-bottom: 0.6rem;
}
.thw-postnav strong { font-family: var(--thw-display); font-size: 1.08rem; font-weight: 600; color: var(--thw-charcoal); line-height: 1.3; display: block; }
.thw-postnav .thw-postnav__next { text-align: right; }

/* =========================================================
   13. ARCHIVE / PAGE / SEARCH / 404
   ========================================================= */
.thw-archive-hero {
	position: relative;
	overflow: hidden;
	background: var(--thw-accent-soft);
	padding-block: clamp(3rem, 6vw, 5rem);
	border-bottom: 1px solid var(--thw-line);
}
.thw-archive-hero__grid { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 56em) { .thw-archive-hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr); } }

.thw-pagination { margin-top: clamp(2.5rem, 5vw, 4rem); }
.thw-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.thw-pagination .page-numbers {
	min-width: 48px;
	min-height: 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 0.9rem;
	border: 1px solid var(--thw-line-strong);
	border-radius: 999px;
	text-decoration: none;
	font-family: var(--thw-display);
	font-weight: 600;
	font-size: 0.95rem;
	color: var(--thw-charcoal);
}
.thw-pagination .page-numbers:hover { border-color: var(--thw-teal); color: var(--thw-teal); }
.thw-pagination .page-numbers.current { background: var(--thw-teal); border-color: var(--thw-teal); color: #fff; }

.thw-empty {
	border: 1px dashed var(--thw-line-strong);
	border-radius: var(--thw-radius-lg);
	padding: clamp(2rem, 4vw, 3rem);
	text-align: center;
	max-width: 42rem;
	margin-inline: auto;
}
.thw-empty h2 { margin-bottom: 0.6rem; }
.thw-empty p { color: var(--thw-muted); max-width: 46ch; margin-inline: auto; }

.thw-page { padding-block: clamp(2.5rem, 5vw, 4rem) var(--thw-section); }
.thw-page__head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3rem); }

.thw-searchform { display: flex; gap: 0.6rem; flex-wrap: wrap; max-width: 32rem; }
.thw-searchform label { flex: 1 1 14rem; }
.thw-searchform input[type="search"] {
	width: 100%;
	min-height: 48px;
	padding: 0.75rem 1.1rem;
	border: 1px solid var(--thw-line-strong);
	border-radius: 999px;
	background: var(--thw-paper);
	font-family: var(--thw-body);
	font-size: 1rem;
	color: var(--thw-charcoal);
}

.thw-404 { text-align: center; padding-block: clamp(3.5rem, 8vw, 7rem); }
.thw-404 .thw-404__mark { max-width: 22rem; margin: 0 auto 2rem; }
.thw-404 .thw-searchform { margin-inline: auto; justify-content: center; }

/* Breadcrumbs */
.thw-breadcrumbs {
	font-family: var(--thw-utility);
	font-size: 0.72rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--thw-muted);
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1.5rem;
}
.thw-breadcrumbs a { color: var(--thw-muted); text-decoration: none; }
.thw-breadcrumbs a:hover { color: var(--thw-teal); text-decoration: underline; }
.thw-breadcrumbs span[aria-hidden="true"] { opacity: 0.5; }

/* =========================================================
   14. FOOTER
   ========================================================= */
.thw-footer {
	background: var(--thw-charcoal);
	color: #e9e0d4;
	padding-block: clamp(3rem, 6vw, 5rem) 2rem;
	position: relative;
	overflow: hidden;
}
.thw-footer a { color: #f6efe4; }
.thw-footer a:hover { color: var(--thw-gold); }
.thw-footer__ridge { position: absolute; top: 0; left: 0; right: 0; height: 60px; color: rgba(233, 224, 212, 0.18); }
.thw-footer__grid { display: grid; gap: clamp(2rem, 4vw, 3.5rem); position: relative; z-index: 1; }
@media (min-width: 56em) { .thw-footer__grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.thw-footer__brand { font-family: var(--thw-display); font-size: 1.35rem; font-weight: 600; color: #fff; margin-bottom: 0.9rem; }
.thw-footer__desc { color: rgba(233, 224, 212, 0.82); max-width: 44ch; font-size: 1rem; }
.thw-footer__menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; }
.thw-footer__menu li { margin: 0; }
.thw-footer__menu a { font-family: var(--thw-display); font-size: 0.97rem; font-weight: 600; text-decoration: none; display: inline-block; padding: 0.5rem 0; min-height: 44px; }
.thw-footer__menu a:hover { text-decoration: underline; }
.thw-footer__disclaimer {
	font-size: 0.88rem;
	line-height: 1.6;
	color: rgba(233, 224, 212, 0.7);
	border-top: 1px solid rgba(233, 224, 212, 0.18);
	margin-top: clamp(2rem, 4vw, 3rem);
	padding-top: 1.5rem;
	max-width: 70ch;
	position: relative;
	z-index: 1;
}
.thw-footer__legal {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 1rem;
	font-family: var(--thw-utility);
	font-size: 0.72rem;
	letter-spacing: 0.08em;
	color: rgba(233, 224, 212, 0.7);
	margin-top: 1.5rem;
	position: relative;
	z-index: 1;
}
.thw-admin-notice {
	background: var(--thw-gold-soft);
	color: var(--thw-charcoal);
	border-left: 4px solid var(--thw-gold);
	padding: 0.9rem 1.1rem;
	font-family: var(--thw-display);
	font-size: 0.92rem;
	border-radius: var(--thw-radius);
	margin-top: 1.25rem;
}

/* =========================================================
   15. MOTION
   ========================================================= */
.thw-reveal { opacity: 0; transform: translateY(22px); }
.thw-reveal.is-visible { opacity: 1; transform: none; transition: opacity 0.7s var(--thw-ease), transform 0.7s var(--thw-ease); }
.no-js .thw-reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
	.thw-reveal { opacity: 1; transform: none; }
}

/* =========================================================
   16. BLOCK EDITOR ALIGNMENT SUPPORT
   ========================================================= */
.alignleft { float: left; margin: 0.4rem 1.6rem 1.2rem 0; }
.alignright { float: right; margin: 0.4rem 0 1.2rem 1.6rem; }
.aligncenter { margin-inline: auto; }
.wp-caption-text, .wp-element-caption { font-family: var(--thw-utility); font-size: 0.78rem; color: var(--thw-muted); margin-top: 0.6rem; }
.wp-block-button__link { border-radius: 999px; font-family: var(--thw-display); font-weight: 600; }
.sticky .thw-offset__rail::after { content: "Featured"; color: var(--thw-terracotta-ink); }

/* =========================================================
   17. HOMEPAGE-SPECIFIC LAYOUTS
   ========================================================= */
.thw-intro { display: grid; gap: clamp(1rem, 3vw, 3rem); }
@media (min-width: 56em) { .thw-intro { grid-template-columns: 12rem minmax(0, 1fr); } }
.thw-intro__body { max-width: 62ch; }
.thw-intro__body h2 { max-width: 24ch; }
.thw-intro__body p { color: var(--thw-muted); }
.thw-intro__label .thw-eyebrow { margin: 0; }

/* Guide panel, media on the right */
.thw-guide--reverse .thw-guide__media { order: 2; }
@media (max-width: 55.99em) { .thw-guide--reverse .thw-guide__media { order: 0; } }

/* Vertical pathway list */
.thw-pathway { list-style: none; margin: 0; padding: 0; position: relative; }
.thw-pathway::before {
	content: "";
	position: absolute;
	left: 1.45rem;
	top: 1.5rem;
	bottom: 1.5rem;
	width: 2px;
	background-image: linear-gradient(var(--thw-accent) 55%, transparent 0);
	background-size: 2px 14px;
	opacity: 0.45;
}
@media (min-width: 52em) { .thw-pathway::before { left: 1.7rem; } }
.thw-pathway__item {
	display: grid;
	gap: 1.25rem;
	align-items: center;
	padding: clamp(1.4rem, 2.6vw, 2.1rem) 0;
	border-bottom: 1px solid var(--thw-line);
	margin: 0;
	grid-template-columns: 3rem minmax(0, 1fr);
}
@media (min-width: 52em) {
	.thw-pathway__item { grid-template-columns: 3.6rem minmax(0, 1fr) 13rem; gap: clamp(1.5rem, 3vw, 2.5rem); }
}
.thw-pathway__item:last-child { border-bottom: 0; }
.thw-pathway__step {
	width: 2.9rem;
	height: 2.9rem;
	border-radius: 50%;
	background: var(--thw-cream);
	border: 2px solid var(--thw-accent);
	display: grid;
	place-items: center;
	font-family: var(--thw-utility);
	font-size: 0.78rem;
	color: var(--thw-accent);
	position: relative;
	z-index: 1;
}
.thw-section--paper .thw-pathway__step { background: var(--thw-paper); }
.thw-pathway__body h3 { font-size: clamp(1.2rem, 2vw, 1.55rem); margin-bottom: 0.5rem; }
.thw-pathway__body h3 a { color: inherit; text-decoration: none; }
.thw-pathway__body h3 a:hover { color: var(--thw-accent); }
.thw-pathway__body p { color: var(--thw-muted); margin-bottom: 0.6rem; font-size: 1.02rem; }
.thw-pathway__meta {
	font-family: var(--thw-utility);
	font-size: 0.7rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--thw-muted);
}
.thw-pathway__media { display: none; border-radius: var(--thw-radius-lg); overflow: hidden; aspect-ratio: 4 / 3; background: var(--thw-accent-soft); }
@media (min-width: 52em) { .thw-pathway__media { display: block; } }
.thw-pathway__media img { width: 100%; height: 100%; object-fit: cover; }

/* Comments (kept quiet — the theme does not push discussion) */
.thw-comments { max-width: var(--thw-text); margin-top: clamp(2.5rem, 5vw, 4rem); }
.thw-comments ol { list-style: none; padding: 0; }
.thw-comments .comment-body { border-bottom: 1px solid var(--thw-line); padding: 1.25rem 0; }
.thw-comments .comment-meta { font-family: var(--thw-utility); font-size: 0.75rem; color: var(--thw-muted); }
.thw-comments input[type="text"],
.thw-comments input[type="email"],
.thw-comments input[type="url"],
.thw-comments textarea {
	width: 100%;
	padding: 0.7rem 0.9rem;
	border: 1px solid var(--thw-line-strong);
	border-radius: var(--thw-radius);
	font-family: var(--thw-body);
	font-size: 1rem;
	background: var(--thw-paper);
	color: var(--thw-charcoal);
}
.thw-hero__image {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 420 / 340;
	object-fit: cover;
	border-radius: 26px;
	border: 1px solid var(--thw-line-strong);
}