/* ==========================================================================
   Rental Yield Calculator theme
   ========================================================================== */

:root {
	--ink: #0f1b2d;
	--ink-2: #1b2a40;
	--ink-soft: #3d4b60;
	--muted: #66748a;
	--line: #e3e0d8;
	--line-2: #d6d2c7;
	--paper: #f7f5f0;
	--paper-2: #efece4;
	--white: #ffffff;
	--accent: #0b7a5e;
	--accent-ink: #075a45;
	--accent-tint: #e3f2ec;
	--accent-2: #f2b33d;
	--accent-2-tint: #fdf2db;
	--neg: #b4372f;
	--neg-tint: #fbe9e7;

	--font-head: "Fraunces", Georgia, "Times New Roman", serif;
	--font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	--r-sm: 8px;
	--r: 14px;
	--r-lg: 22px;
	--shadow: 0 1px 2px rgba(15, 27, 45, .06), 0 8px 24px rgba(15, 27, 45, .06);
	--shadow-lg: 0 2px 4px rgba(15, 27, 45, .08), 0 24px 60px rgba(15, 27, 45, .18);
	--wrap: 1180px;
	--wrap-narrow: 780px;
	--gutter: 20px;
}

/* Reset ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	font-feature-settings: "cv11", "ss01";
}
img, svg, video, iframe { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-ink); }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2.2rem, 1.6rem + 2.6vw, 3.6rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.7rem, 1.35rem + 1.4vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; border-radius: 4px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r-sm); }
.skip-link:focus { left: 8px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--narrow { max-width: var(--wrap-narrow); }

/* Buttons ---------------------------------------------------------------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	font: 600 .95rem/1 var(--font-body);
	padding: 14px 20px; border-radius: 999px; border: 1.5px solid var(--ink);
	background: var(--ink); color: #fff; text-decoration: none; cursor: pointer;
	transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.btn:hover { background: var(--ink-2); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn--accent { background: var(--accent); border-color: var(--accent); }
.btn--accent:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn--ghost:hover { background: var(--paper-2); color: var(--ink); }
.btn--link { background: none; border-color: transparent; color: var(--muted); padding-left: 8px; padding-right: 8px; }
.btn--link:hover { background: none; color: var(--ink); }
.btn--sm { padding: 10px 16px; font-size: .88rem; }
.btn--lg { padding: 18px 28px; font-size: 1.02rem; }

.eyebrow {
	font: 600 .78rem/1.2 var(--font-body); letter-spacing: .12em; text-transform: uppercase;
	color: var(--accent); margin: 0 0 12px;
}
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow--light { color: var(--accent-2); }
.tag { display: inline-block; font: 600 .72rem/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; background: var(--paper-2); color: var(--ink-soft); }
.tag--accent { background: var(--accent-tint); color: var(--accent-ink); }
.link-arrow { font-weight: 600; text-decoration: none; white-space: nowrap; }
.link-arrow::after { content: " \2192"; }

/* Header ----------------------------------------------------------------- */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(15, 27, 45, .96);
	backdrop-filter: saturate(140%) blur(8px);
	-webkit-backdrop-filter: saturate(140%) blur(8px);
	color: #fff;
	transition: box-shadow .2s;
}
.site-header.is-scrolled { box-shadow: 0 1px 0 rgba(255, 255, 255, .06), 0 10px 30px rgba(0, 0, 0, .18); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand__mark { width: 38px; height: 38px; color: var(--accent); flex: none; }
.brand__text { font: 600 1.06rem/1.05 var(--font-head); letter-spacing: -.01em; display: flex; flex-direction: column; }
.brand__text span { font: 500 .72rem/1.3 var(--font-body); letter-spacing: .16em; text-transform: uppercase; opacity: .7; }
.custom-logo-link img { max-height: 44px; width: auto; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav__list, .nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 26px; }
.nav a:not(.btn) { color: rgba(255, 255, 255, .82); text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav a:not(.btn):hover, .nav .current-menu-item > a { color: #fff; }
.nav .sub-menu { display: none; }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; padding: 10px; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; position: relative; transition: transform .2s, opacity .2s; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -7px; }
.nav-toggle__bars::after { top: 7px; }
.nav-open .nav-toggle__bars { background: transparent; }
.nav-open .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
	.nav-toggle { display: block; }
	.nav {
		position: fixed; inset: 72px 0 auto 0; background: var(--ink);
		flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 24px;
		transform: translateY(-120%); transition: transform .25s ease; box-shadow: 0 20px 40px rgba(0, 0, 0, .3);
	}
	.nav-open .nav { transform: none; }
	.nav__list, .nav ul { flex-direction: column; gap: 0; }
	.nav a:not(.btn) { display: block; padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); font-size: 1.05rem; }
	.nav__cta { margin-top: 18px; }
}

/* Hero ------------------------------------------------------------------- */
.hero {
	background:
		radial-gradient(1200px 500px at 85% -10%, rgba(11, 122, 94, .35), transparent 60%),
		linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px) 0 0 / 100% 40px,
		var(--ink);
	color: #fff;
	padding: 56px 0 0;
	position: relative;
}
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 160px; background: var(--paper); z-index: 0; }
.hero .wrap { position: relative; z-index: 1; }
.hero__head { max-width: 760px; margin-bottom: 36px; }
.hero .eyebrow { color: var(--accent-2); }
.hero__title { color: #fff; margin-bottom: 14px; }
.hero__sub { font-size: 1.15rem; color: rgba(255, 255, 255, .8); max-width: 640px; margin-bottom: 18px; }
.hero__meta { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .9rem; color: rgba(255, 255, 255, .7); }
.hero__meta li { display: flex; align-items: center; gap: 8px; }
.hero__meta li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }

/* Calculator ------------------------------------------------------------- */
.calc {
	display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
	background: var(--ink); color: var(--ink);
	border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
	overflow: clip;
	position: relative;
}
.calc__inputs { padding: 28px 30px 30px; margin: 0; background: var(--white); }
.calc__group { border: 0; margin: 0 0 22px; padding: 0; min-width: 0; }
.calc__group:last-child { margin-bottom: 0; }
.calc__group legend, .calc__group summary {
	font: 600 .78rem/1.2 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
	padding: 0; margin-bottom: 14px;
}
.calc__group--details { border-top: 1px solid var(--line); padding-top: 18px; }
.calc__group summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; margin-bottom: 0; }
.calc__group summary::-webkit-details-marker { display: none; }
.calc__group summary > span:first-child::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); transition: transform .2s; }
.calc__group[open] summary > span:first-child::after { transform: translateY(0) rotate(-135deg); }
.calc__group[open] summary { margin-bottom: 14px; }
.calc__sum-total { font: 600 .9rem/1 var(--font-body); letter-spacing: 0; text-transform: none; color: var(--ink); font-variant-numeric: tabular-nums; }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin-bottom: 14px; }
.field-grid:last-child { margin-bottom: 0; }
.field, .field__control { min-width: 0; }
.field label { display: block; font-size: .86rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.field__control {
	display: flex; align-items: center; background: var(--paper); border: 1.5px solid var(--line);
	border-radius: var(--r-sm); transition: border-color .15s, box-shadow .15s, background .15s;
}
.field__control:focus-within { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px var(--accent-tint); }
.field__control input, .field__control select {
	flex: 1 1 0; width: 100%; min-width: 0; border: 0; background: transparent; padding: 12px 12px; font: 600 1.02rem/1.2 var(--font-body);
	color: var(--ink); font-variant-numeric: tabular-nums; outline: none; appearance: none; -webkit-appearance: none;
}
.field__control--select { position: relative; }
.field__control--select::after { content: ""; position: absolute; right: 14px; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.field__control select { cursor: pointer; padding-right: 36px; }
.field__affix { padding: 0 0 0 12px; color: var(--muted); font-weight: 600; }
.field__affix--end { padding: 0 12px 0 0; font-size: .82rem; font-weight: 500; white-space: nowrap; }
.field__control input + .field__affix--end { padding-left: 0; }
.field__help { font-size: .76rem; color: var(--muted); margin: 5px 0 0; line-height: 1.4; }

.calc__results {
	background: var(--ink); color: #fff; padding: 28px 30px 26px;
	display: flex; flex-direction: column; gap: 22px;
}
.result-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.result-hero__item { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); border-radius: var(--r); padding: 16px 18px; }
.result-hero__item--net { background: var(--accent); border-color: var(--accent); }
.result-hero__label { font-size: .82rem; font-weight: 600; color: rgba(255, 255, 255, .75); margin: 0 0 6px; }
.result-hero__value { font: 600 clamp(2rem, 1.6rem + 1.4vw, 2.6rem)/1 var(--font-head); margin: 0; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

.bench__track {
	position: relative; height: 10px; border-radius: 999px; margin: 30px 6px 12px;
	background: linear-gradient(90deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .28));
}
.bench__marker { position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; transform: translate(-50%, -50%); transition: left .3s ease; border: 3px solid var(--ink); }
.bench__marker em { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); font: 600 .72rem/1 var(--font-body); font-style: normal; white-space: nowrap; padding: 4px 7px; border-radius: 6px; }
.bench__marker--you { background: var(--accent-2); z-index: 2; }
.bench__marker--you em { background: var(--accent-2); color: var(--ink); }
.bench__marker--avg { background: #fff; }
.bench__marker--avg em { background: rgba(255, 255, 255, .14); color: #fff; bottom: auto; top: 20px; }
.bench__text { font-size: .9rem; color: rgba(255, 255, 255, .8); margin: 26px 0 0; }
.bench.is-above .bench__text { color: #9ee6c9; }
.bench.is-below .bench__text { color: #ffd38a; }

.result-list { margin: 0; display: grid; gap: 0; font-size: .92rem; }
.result-list > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.result-list > div[hidden] { display: none; }
.result-list dt { color: rgba(255, 255, 255, .7); }
.result-list dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.result-list__total dt { color: #fff; font-weight: 600; }
.result-list__total dd { font-size: 1.02rem; }
.result-list .is-neg { color: #ff9a8f; }
.result-list .is-pos { color: #9ee6c9; }

.breakdown__title { font-size: .82rem; font-weight: 600; color: rgba(255, 255, 255, .75); margin: 0 0 10px; }
.breakdown__bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: rgba(255, 255, 255, .08); gap: 2px; }
.breakdown__bar .seg { height: 100%; transition: width .3s ease; }
.breakdown__legend { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .78rem; color: rgba(255, 255, 255, .72); }
.breakdown__legend li { display: inline-flex; align-items: center; gap: 6px; }
.breakdown__legend b { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.breakdown__legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.seg--keep { background: var(--accent); }
.seg--c0 { background: #e2777a; }
.seg--c1 { background: #f2b33d; }
.seg--c2 { background: #f5cf7d; }
.seg--c3 { background: #8fb3e8; }
.seg--c4 { background: #b79be6; }
.seg--c5 { background: #6ec5d6; }
.seg--c6 { background: #d9a37e; }
.seg--c7 { background: #c7c2b6; }

.calc__actions { display: flex; gap: 8px; align-items: center; }
.calc__results .btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .25); }
.calc__results .btn--ghost:hover { background: rgba(255, 255, 255, .08); }
.calc__results .btn--link { color: rgba(255, 255, 255, .6); }
.calc__results .btn--link:hover { color: #fff; }
.calc__note { font-size: .76rem; color: rgba(255, 255, 255, .55); margin: -8px 0 0; line-height: 1.5; }

.calc__mini { display: none; }

@media (max-width: 900px) {
	.calc { grid-template-columns: 1fr; }
	.calc__inputs, .calc__results { padding: 22px 18px; }
	.calc__mini {
		display: flex; justify-content: space-between; gap: 8px; position: sticky; bottom: 0; z-index: 5;
		background: var(--ink); color: rgba(255, 255, 255, .75); font-size: .78rem; padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
		border-top: 1px solid rgba(255, 255, 255, .1); grid-row: 2;
	}
	.calc__mini b { display: block; color: #fff; font: 600 1.1rem/1.2 var(--font-head); font-variant-numeric: tabular-nums; }
	.calc__results { grid-row: 3; }
}
@media (max-width: 480px) {
	.field-grid { grid-template-columns: 1fr; }
	.result-hero__value { font-size: 1.9rem; }
}

/* Compact calculator inside articles */
.calc--compact { margin: 2em 0; box-shadow: var(--shadow); border: 1px solid var(--line); }
.entry-content .calc--compact { grid-template-columns: 1fr; }
.entry-content .calc--compact .calc__mini { display: none; }
.entry-content .calc--compact .calc__results { grid-row: auto; }
.entry-content .calc label, .entry-content .calc p, .entry-content .calc dl { margin-top: 0; }

/* Sections --------------------------------------------------------------- */
.section { padding: 80px 0; }
.section--tight { padding: 40px 0; }
.section--alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__head { max-width: 720px; margin-bottom: 36px; }
.section__head--row { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.section__head h2 { margin-bottom: 12px; }
.section__lede { font-size: 1.08rem; color: var(--ink-soft); margin: 0; }
.section__title-sm { font-size: 1.5rem; margin-bottom: 24px; }

.answer {
	background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--accent);
	border-radius: var(--r); padding: 28px 30px; box-shadow: var(--shadow);
}
.answer__q { font-size: 1.5rem; margin-bottom: 10px; }
.answer__a { font-size: 1.1rem; line-height: 1.6; margin-bottom: 14px; }
.answer__byline { font-size: .85rem; color: var(--muted); margin: 0; }

.formula-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.formula { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; display: flex; flex-direction: column; }
.formula--net { border-color: #bfe0d3; box-shadow: 0 0 0 4px var(--accent-tint); }
.formula__head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.formula__head h3 { margin: 0; }
.formula__eq {
	display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
	background: var(--paper); border-radius: var(--r); padding: 22px 16px; margin-bottom: 20px;
	font-weight: 600; font-size: 1.02rem;
}
.frac { display: inline-flex; flex-direction: column; align-items: center; text-align: center; }
.frac span:first-child { padding: 0 6px 6px; border-bottom: 2px solid var(--ink); }
.frac span:last-child { padding-top: 6px; }
.op { color: var(--muted); white-space: nowrap; }
.formula__steps { margin: 0 0 18px; padding-left: 1.3em; display: grid; gap: 8px; font-size: .96rem; color: var(--ink-soft); }
.formula__steps strong { color: var(--ink); }
.formula__use { margin: auto 0 0; font-size: .92rem; padding-top: 14px; border-top: 1px dashed var(--line-2); color: var(--ink-soft); }
.callout { margin: 24px 0 0; background: var(--accent-2-tint); border: 1px solid #f1d699; border-radius: var(--r); padding: 18px 22px; font-size: .98rem; }

.bench-table-wrap { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.bench-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.bench-table caption { text-align: left; font-size: .85rem; color: var(--muted); padding-bottom: 12px; }
.bench-table th, .bench-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.bench-table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.bench-table tbody th { font-weight: 600; width: 32%; }
.bench-table .num { font-weight: 700; width: 18%; }
.bar-cell { width: 50%; }
.bar { display: block; height: 10px; width: var(--w); border-radius: 999px; background: linear-gradient(90deg, var(--accent), #35a985); }
.bench-table tbody tr:first-child .bar { background: linear-gradient(90deg, var(--accent-2), #f7cc72); }
.bench-side { display: grid; gap: 14px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.stat__label { font-size: .85rem; color: var(--muted); font-weight: 600; margin: 0 0 4px; }
.stat__value { font: 600 2.4rem/1 var(--font-head); margin: 0; font-variant-numeric: tabular-nums; }
.bench-side__note { font-size: .92rem; color: var(--ink-soft); margin: 0; }
.source { font-size: .8rem; color: var(--muted); margin: 18px 0 0; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--r); background: var(--white); }
.compare-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.compare-table th, .compare-table td { text-align: left; padding: 16px 18px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .96rem; }
.compare-table tr:last-child th, .compare-table tr:last-child td { border-bottom: 0; }
.compare-table thead th { background: var(--ink); color: #fff; font-family: var(--font-head); font-size: 1.05rem; }
.compare-table thead th:last-child { background: var(--accent); }
.compare-table tbody th { width: 22%; color: var(--ink-soft); font-weight: 600; }
.compare-table .num { font: 600 1.4rem/1 var(--font-head); }

.split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: start; }
.split p { color: var(--ink-soft); }
.checklist { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; }
.checklist h3 { font-size: 1.15rem; margin-bottom: 16px; }
.checklist ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checklist li { padding-left: 30px; position: relative; font-size: .96rem; color: var(--ink-soft); }
.checklist li::before { content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 5px; background: var(--accent-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%230b7a5e' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
.checklist strong { color: var(--ink); }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 14px; }
.steps li { counter-increment: s; position: relative; padding: 20px 22px 20px 76px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); }
.steps li::before { content: counter(s); position: absolute; left: 22px; top: 20px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font: 600 1rem/1 var(--font-head); }
.steps h3 { font-size: 1.1rem; margin-bottom: 4px; }
.steps p { margin: 0; color: var(--ink-soft); font-size: .96rem; }

.faq { display: grid; gap: 10px; }
.faq__item { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); transition: border-color .15s; }
.faq__item[open] { border-color: var(--line-2); box-shadow: var(--shadow); }
.faq__item summary { list-style: none; cursor: pointer; padding: 20px 56px 20px 22px; position: relative; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary h3 { font: 600 1.05rem/1.4 var(--font-body); margin: 0; letter-spacing: 0; }
.faq__item summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); font: 500 1.2rem/1 var(--font-body); color: var(--ink); }
.faq__item[open] summary::after { content: "\2212"; background: var(--accent); color: #fff; }
.faq__a { padding: 0 22px 20px; color: var(--ink-soft); }
.faq__a p { margin: 0; }

.cta-card {
	display: flex; align-items: center; justify-content: space-between; gap: 32px;
	background: radial-gradient(600px 300px at 100% 0%, rgba(11, 122, 94, .45), transparent 70%), var(--ink);
	color: #fff; border-radius: var(--r-lg); padding: 44px 48px;
}
.cta-card h2 { color: #fff; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); margin-bottom: 10px; max-width: 640px; }
.cta-card p { color: rgba(255, 255, 255, .78); margin: 0; max-width: 620px; }
.cta-card .btn { flex: none; }

/* Cards ------------------------------------------------------------------ */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card__link { color: inherit; text-decoration: none; display: flex; flex-direction: column; height: 100%; }
.card__link:hover { color: inherit; }
.card__media { aspect-ratio: 16 / 9; background: var(--paper-2); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__placeholder { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, var(--ink) 0%, var(--accent) 140%); }
.card__body { padding: 20px 22px 24px; }
.card__meta { font-size: .8rem; color: var(--muted); margin: 0 0 8px; }
.card__title { font-size: 1.18rem; margin: 0 0 8px; }
.card__excerpt { font-size: .93rem; color: var(--ink-soft); margin: 0; }

/* Archive ---------------------------------------------------------------- */
.archive-head { background: var(--ink); color: #fff; padding: 48px 0 44px; }
.archive-head h1 { color: #fff; }
.archive-head__desc { color: rgba(255, 255, 255, .78); font-size: 1.1rem; max-width: 640px; }
.archive-head .crumbs a, .archive-head .crumbs li { color: rgba(255, 255, 255, .65); }
.search-form { display: flex; gap: 8px; max-width: 460px; margin-top: 22px; }
.search-form input { flex: 1; min-width: 0; padding: 12px 16px; border-radius: 999px; border: 1.5px solid var(--line); font: 500 1rem var(--font-body); background: #fff; }
.archive-head .btn { background: var(--accent); border-color: var(--accent); }
.nav-links { display: flex; gap: 8px; justify-content: center; margin-top: 40px; }
.nav-links .page-numbers { padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); text-decoration: none; color: var(--ink); background: #fff; }
.nav-links .current { background: var(--ink); color: #fff; border-color: var(--ink); }
.empty { font-size: 1.1rem; }

/* Breadcrumbs ------------------------------------------------------------ */
.crumbs ol { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: .85rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .5; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }

/* Article ---------------------------------------------------------------- */
.article__head { padding: 48px 0 28px; }
.article__title { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); margin-bottom: 14px; }
.article__dek { font-size: 1.2rem; color: var(--ink-soft); margin-bottom: 20px; }
.article__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); }
.article__avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font: 600 .9rem/1 var(--font-head); }
.article__meta strong { color: var(--ink); }
.article__hero-img { margin-bottom: 40px; }
.article__hero-img img { border-radius: var(--r-lg); width: 100%; max-height: 520px; object-fit: cover; }
.article__layout { display: grid; grid-template-columns: 260px minmax(0, var(--wrap-narrow)); gap: 56px; justify-content: center; padding-bottom: 80px; }
.article__layout--no-toc { grid-template-columns: minmax(0, var(--wrap-narrow)); }
.article__aside { position: sticky; top: 96px; align-self: start; display: grid; gap: 18px; }
.toc { border-left: 2px solid var(--line); padding-left: 16px; }
.toc__title { font: 600 .75rem/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.toc a { color: var(--ink-soft); text-decoration: none; font-size: .9rem; line-height: 1.4; display: block; }
.toc a:hover, .toc a.is-active { color: var(--accent); }
.toc a.is-active { font-weight: 600; }
.side-cta { display: grid; gap: 6px; padding: 18px; border-radius: var(--r); background: var(--ink); color: rgba(255, 255, 255, .78); text-decoration: none; font-size: .88rem; }
.side-cta:hover { color: #fff; }
.side-cta__title { color: #fff; font: 600 1.1rem/1.2 var(--font-head); }
.side-cta .link-arrow { color: var(--accent-2); margin-top: 4px; }
.article__aside { min-width: 0; }
.article__aside > * { min-width: 0; max-width: 100%; }
.side-widget { font-size: .9rem; }
.side-widget h2, .side-widget__title, .side-widget .wp-block-heading { font: 600 .75rem/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.side-widget ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.side-widget a { color: var(--ink-soft); text-decoration: none; }
.side-widget a:hover { color: var(--accent); }
.side-widget .wp-block-search__label { display: none; }
.side-widget .wp-block-search__inside-wrapper { display: flex; gap: 6px; }
.side-widget .wp-block-search__input { flex: 1; min-width: 0; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: var(--r-sm); font: inherit; }
.side-widget .wp-block-search__button { padding: 9px 12px; border: 0; border-radius: var(--r-sm); background: var(--ink); color: #fff; font: 600 .85rem var(--font-body); cursor: pointer; }
@media (min-width: 1001px) {
	.article__head--toc .wrap { max-width: calc(260px + 56px + var(--wrap-narrow) + 2 * var(--gutter)); padding-left: calc(260px + 56px + var(--gutter)); }
}

@media (max-width: 1000px) {
	.article__layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
	.article__aside { position: static; }
	.side-cta, .article__aside .side-widget { display: none; }
	.toc { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; }
}

/* Entry content (Gutenberg) */
.entry-content { font-size: 1.08rem; }
.entry-content > * + * { margin-top: 1.1em; }
.entry-content p, .entry-content ul, .entry-content ol { margin-bottom: 0; }
.entry-content h2 { margin-top: 1.9em; font-size: 1.85rem; }
.entry-content h3 { margin-top: 1.6em; font-size: 1.35rem; }
.entry-content h2 + *, .entry-content h3 + * { margin-top: .5em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li + li { margin-top: .4em; }
.entry-content blockquote { margin-left: 0; margin-right: 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--accent-2); font-size: 1.15rem; color: var(--ink-soft); }
.entry-content img { border-radius: var(--r); }
.entry-content figcaption { font-size: .85rem; color: var(--muted); margin-top: 8px; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .95rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.entry-content th, .entry-content td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.entry-content thead th { background: var(--ink); color: #fff; }
.entry-content .wp-block-table { overflow-x: auto; }
.entry-content iframe { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r); }
.entry-content .wp-block-embed__wrapper iframe { height: auto; }
.entry-content--wide { max-width: var(--wrap); padding-bottom: 80px; }
.page-content { padding-bottom: 80px; }
.entry-content .wp-block-button__link { background: var(--accent); border-radius: 999px; padding: 14px 22px; font-weight: 600; }
.alignwide { margin-left: calc(-1 * min(120px, 6vw)); margin-right: calc(-1 * min(120px, 6vw)); }

.inline-cta { margin: 48px 0 32px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 26px; background: var(--accent-tint); border: 1px solid #bfe0d3; border-radius: var(--r); }
.inline-cta__title { font: 600 1.2rem/1.2 var(--font-head); margin: 0 0 4px; }
.inline-cta p { margin: 0; font-size: .95rem; }
.inline-cta .btn { flex: none; }

.author-box { display: flex; gap: 18px; padding: 24px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); }
.author-box__avatar { flex: none; width: 72px; height: 72px; border-radius: 50%; overflow: hidden; background: var(--ink); color: #fff; display: grid; place-items: center; font: 600 1.6rem/1 var(--font-head); }
.author-box__avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-box__label { font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0 0 2px; font-weight: 600; }
.author-box__name { font: 600 1.15rem/1.3 var(--font-head); margin: 0 0 6px; }
.author-box__name span { display: block; font: 500 .88rem/1.4 var(--font-body); color: var(--muted); }
.author-box__bio { font-size: .94rem; color: var(--ink-soft); margin: 0 0 6px; }
.author-box__link { font-size: .9rem; font-weight: 600; }
.disclaimer-note { font-size: .8rem; color: var(--muted); margin-top: 20px; }

.notfound { text-align: left; }

/* Footer ----------------------------------------------------------------- */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, .72); padding: 64px 0 36px; font-size: .94rem; }
.site-footer a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 36px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.site-footer__brand p { margin-top: 16px; max-width: 360px; }
.site-footer__brand p a { text-decoration: underline; }
.site-footer__title { font: 600 .78rem/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: #fff; margin-bottom: 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer__disclaimer { font-size: .8rem; color: rgba(255, 255, 255, .5); margin: 24px 0 8px; max-width: 860px; }
.site-footer__copy { font-size: .8rem; color: rgba(255, 255, 255, .5); margin: 0; }

/* Responsive ------------------------------------------------------------- */
@media (max-width: 1000px) {
	.formula-grid, .split, .bench-table-wrap { grid-template-columns: 1fr; }
	.split { gap: 32px; }
	.card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.site-footer__grid { grid-template-columns: 1fr 1fr; }
	.site-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
	body { font-size: 16px; }
	.section { padding: 56px 0; }
	.hero { padding-top: 36px; }
	.hero__sub { font-size: 1.05rem; }
	.card-grid { grid-template-columns: 1fr; }
	.cta-card, .inline-cta { flex-direction: column; align-items: flex-start; padding: 28px 22px; }
	.section__head--row { flex-direction: column; align-items: start; }
	.answer { padding: 22px 20px; }
	.formula { padding: 22px 18px; }
	.steps li { padding: 18px 18px 18px 66px; }
	.steps li::before { left: 16px; }
	.author-box { flex-direction: column; }
	.bench-table .bar-cell { width: 40%; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; }
}
@media print {
	.site-header, .site-footer, .calc__actions, .calc__mini, .cta-card, .inline-cta { display: none !important; }
}

/* v1.1 content components --------------------------------------------------- */
.more-links { margin: 22px 0 0; font-size: .95rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.more-links > span:first-child { font-weight: 600; color: var(--muted); }
.more-links a { font-weight: 600; }
.more-links__sep { color: var(--line-2); }
.answer .more-links { margin-top: 14px; font-size: .9rem; }

.entry-content .inline-cta--in { margin: 2em 0; }
.entry-content .inline-cta--in p { margin: 0; }
.ryc-bench-embed { margin: 1.6em 0; }
.ryc-bench-embed .bench-table-wrap { gap: 20px; }
.entry-content .ryc-bench-embed table { border: 0; background: transparent; }
.entry-content .ryc-bench-embed thead th { background: transparent; color: var(--muted); }
.entry-content .ryc-bench-embed .bench-side p { margin: 0; }
.entry-content .ryc-bench-embed .stat__value { font-size: 2rem; }

/* Key takeaways / answer box (Group block with class "takeaways") */
.entry-content .takeaways { background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--r); padding: 22px 24px; }
.entry-content .takeaways > * + * { margin-top: .6em; }
.entry-content .takeaways h2, .entry-content .takeaways h3 { margin-top: 0; font-size: 1.15rem; font-family: var(--font-body); letter-spacing: 0; }
.entry-content .takeaways ul { margin: 0; }
.entry-content .note { background: var(--accent-2-tint); border: 1px solid #f1d699; border-radius: var(--r); padding: 16px 20px; font-size: .98rem; }

/* FAQ using core Details blocks */
.entry-content .faq-block > * + * { margin-top: 10px; }
.entry-content .wp-block-details { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 0; }
.entry-content .wp-block-details[open] { box-shadow: var(--shadow); }
.entry-content .wp-block-details summary { list-style: none; cursor: pointer; padding: 18px 56px 18px 20px; position: relative; font-weight: 600; font-size: 1.02rem; line-height: 1.4; }
.entry-content .wp-block-details summary::-webkit-details-marker { display: none; }
.entry-content .wp-block-details summary::after { content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); font-weight: 500; }
.entry-content .wp-block-details[open] summary::after { content: "\2212"; background: var(--accent); color: #fff; }
.entry-content .wp-block-details > :not(summary) { padding: 0 20px 18px; margin: 0; color: var(--ink-soft); }

/* Glossary */
.glossary-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 1.4em 0; padding: 0; list-style: none; }
.glossary-nav a { display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--white); text-decoration: none; font-weight: 600; font-size: .9rem; }
.glossary-nav a:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.entry-content dl.glossary { margin: 0; display: grid; gap: 0; }
.glossary__term { padding: 18px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 96px; }
.glossary__term dt { font: 600 1.15rem/1.3 var(--font-head); margin-bottom: 6px; }
.glossary__term dd { margin: 0; color: var(--ink-soft); }
.glossary__term:target { background: var(--accent-2-tint); margin: 0 -14px; padding: 18px 14px; border-radius: var(--r-sm); }

/* Author profile */
.entry-content .profile-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; padding: 0; list-style: none; }
.entry-content .profile-facts li { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin: 0; font-size: .95rem; }
.entry-content .profile-facts strong { display: block; font: 600 1.05rem/1.3 var(--font-head); color: var(--ink); margin-bottom: 4px; }
.entry-content .glossary-nav { padding-left: 0; }
.entry-content .glossary-nav li { margin: 0; }
.entry-content .glossary-letter { margin-top: 1.4em; font-size: 2rem; scroll-margin-top: 96px; }
@media (max-width: 680px) {
	.entry-content table { font-size: .86rem; }
	.entry-content th, .entry-content td { padding: 10px 10px; }
	.entry-content .wp-block-table table { min-width: 520px; }
	.entry-content .wp-block-table { margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); padding: 0 var(--gutter); }
}

/* v1.2 calculator family ----------------------------------------------------- */
.calc__group--sep legend { float: left; width: 100%; border-top: 1px solid var(--line); padding-top: 18px; }
.calc__group--sep legend + * { clear: both; }
.calc__group > legend + .field-grid { padding-top: 0; }
.field--wide { grid-column: 1 / -1; }
.result-hero__value--sm { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); }
.result-hero__value.is-neg { color: #ff9a8f; }
.tool-verdict { margin: 0; font-size: .95rem; color: #d7efe5; background: rgba(255, 255, 255, .06); border-radius: var(--r-sm); padding: 12px 14px; line-height: 1.5; }
.tool-verdict:empty { display: none; }
.calc__noscript { padding: 20px; color: #fff; }
.calc--tool .calc__inputs { padding-bottom: 26px; }

.calc-page__head { background: var(--ink); color: #fff; padding: 40px 0 120px; margin-bottom: -88px; background-image: radial-gradient(900px 400px at 90% -20%, rgba(11, 122, 94, .35), transparent 60%); }
.calc-page__head .crumbs a, .calc-page__head .crumbs li { color: rgba(255, 255, 255, .65); }
.calc-page__title { color: #fff; font-size: clamp(2rem, 1.5rem + 2vw, 3rem); margin-bottom: 10px; }
.calc-page__dek { color: rgba(255, 255, 255, .8); font-size: 1.12rem; max-width: 720px; margin-bottom: 12px; }
.calc-page__meta { font-size: .88rem; color: rgba(255, 255, 255, .65); margin: 0; }
.calc-page__meta a { color: var(--accent-2); }
.calc-page__tool { position: relative; z-index: 1; }
.calc-page__content { padding-top: 56px; }

.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tool-card { display: grid; gap: 6px; align-content: start; padding: 20px 22px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink-soft); transition: transform .2s, box-shadow .2s, border-color .2s; }
.tool-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-2); color: var(--ink-soft); }
.tool-card__title { font: 600 1.1rem/1.25 var(--font-head); color: var(--ink); }
.tool-card__text { font-size: .92rem; line-height: 1.5; }
.tool-card .link-arrow { color: var(--accent); font-size: .9rem; margin-top: 4px; }
.entry-content .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tool-grid, .entry-content .tool-grid { grid-template-columns: 1fr; } }

@media (min-width: 901px) and (max-width: 1100px) {
	.nav { gap: 16px; }
	.nav__list, .nav ul { gap: 16px; }
	.nav a:not(.btn) { font-size: .9rem; }
}

@media (max-width: 900px) {
	.calc__mini--tool:empty { display: none; }
}
.entry-content .calc--tool .calc__mini { display: none; }
