/*
Theme Name: How Millionaires Live
Description: Bespoke editorial theme for howmillionaireslive.com. Classic PHP templates, one stylesheet, system fonts, no builder, no jQuery.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.0
Text Domain: hml
*/

/* ---------- tokens ---------- */
:root {
	--navy: #0f2a4a; --ink: #1d1f24; --muted: #5d6470; --cream: #faf7f0; --line: #e3dccb; --gold: #b08d3e; --gold-ink: #7a5f1f; --paper: #fff;
	--serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
	--sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--global-palette1: #0f2a4a; /* the mu-plugin boxes read this variable */
	--w: 1160px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { --global-palette1: #0f2a4a; /* set on body too: a plugin redefines it on :root */ margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--sans); overflow-wrap: break-word; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--navy); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.2em 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.screen-reader-text, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 10; background: var(--navy); color: #fff; padding: .5em .9em; border-radius: 6px; }
.wrap { width: 100%; max-width: var(--w); margin: 0 auto; padding: 0 24px; }
.wrap--article { max-width: 748px; }
.wrap--page { max-width: 868px; }
main { padding-bottom: 3rem; }
main.wrap { padding-top: 2.2rem; }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--line); box-shadow: 0 2px 0 -1px var(--gold); background: var(--paper); }
.site-header__in { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; color: var(--navy); }
.brand__mark { width: 40px; height: 40px; flex: 0 0 40px; object-fit: contain; }
.brand__name { font-family: var(--serif); font-weight: 700; font-size: 25px; line-height: 1.1; letter-spacing: -.01em; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav__list, .mnav__list { list-style: none; margin: 0; padding: 0; }
.nav__list { display: flex; gap: 2px; }
.nav__list a { display: block; padding: .5em .8em; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: 15.5px; font-weight: 500; }
.nav__list a:hover, .nav__list .current-menu-item > a, .nav__list .current-page-ancestor > a { color: var(--navy); background: var(--cream); }
.nav__search { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 6px; color: var(--navy); }
.nav__search:hover { background: var(--cream); }
.mnav { display: none; }
.mnav summary { list-style: none; width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; border-radius: 6px; }
.mnav summary::-webkit-details-marker { display: none; }
.mnav summary span, .mnav summary span::before, .mnav summary span::after { display: block; width: 22px; height: 2px; background: var(--navy); border-radius: 2px; content: ""; }
.mnav summary span { position: relative; }
.mnav summary span::before { position: absolute; top: -7px; }
.mnav summary span::after { position: absolute; top: 7px; }
.mnav[open] summary { background: var(--cream); }
.mnav__panel { position: absolute; top: 100%; left: 0; right: 0; z-index: 5; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 24px 20px; box-shadow: 0 12px 20px -14px rgba(15, 42, 74, .35); }
.mnav__list a { display: block; padding: .8em 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; }
.mnav__panel .search-form { margin-top: 16px; }
@media (max-width: 860px) {
	.nav { display: none; }
	.mnav { display: block; }
	.site-header__in { min-height: 58px; position: relative; }
	.site-header { position: relative; }
	.brand__mark { width: 34px; height: 34px; flex-basis: 34px; }
	.brand__name { font-size: 21px; }
}
@media (max-width: 380px) { .brand__name { font-size: 19px; } .wrap { padding: 0 18px; } .mnav__panel { padding: 8px 18px 20px; } }

/* ---------- shared pieces ---------- */
.kicker { display: inline-block; font: 700 12px/1.3 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--gold-ink); text-decoration: none; margin: 0 0 .5em; }
a.kicker { padding: 6px 0; margin: -6px 0 0; } /* 24px tap target */
a.kicker:hover { text-decoration: underline; }
.section-title { font-size: 1.45rem; margin: 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0 0 1.1rem; padding-bottom: .6rem; border-bottom: 2px solid var(--navy); }
.section-head a { padding: 5px 0; font-size: .92rem; font-weight: 600; white-space: nowrap; text-decoration: none; }
.section-head a:hover { text-decoration: underline; }
.band-section { margin-top: 3.2rem; }
.band-section > .section-title, .latest > .section-title, .related > .section-title, .comments > .section-title { padding-bottom: .6rem; border-bottom: 2px solid var(--navy); margin-bottom: 1.1rem; }
.grid { display: grid; gap: 28px 24px; }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid--3 { grid-template-columns: 1fr; } }
.btn, .search-form button, .comment-form input[type=submit] { display: inline-block; padding: .75em 1.3em; border: 0; border-radius: 6px; background: var(--navy); color: #fff; font: 700 1rem var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; }
.search-form { display: flex; gap: 8px; max-width: 520px; }
.search-form input[type=search] { flex: 1 1 auto; min-width: 0; padding: .7em .9em; border: 1px solid #c9c2b0; border-radius: 6px; font: 1rem var(--sans); background: #fff; color: var(--ink); }

/* cards */
.card { display: flex; flex-direction: column; }
.card__img { display: block; background: #f3efe6; border-radius: 8px; overflow: hidden; margin-bottom: .9rem; }
.card__img img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card__title { font-size: 1.22rem; line-height: 1.25; margin: 0 0 .4em; }
.card__title a, .row__title, .lead__title a { color: var(--navy); text-decoration: none; }
.card__title a:hover, .row__title:hover, .lead__title a:hover { text-decoration: underline; }
.card__ex { color: #3b4048; font-size: .95rem; line-height: 1.5; margin: 0 0 .5em; }
.card__meta, .row__meta { color: var(--muted); font-size: .82rem; margin: 0; }

/* text rows */
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: flex; flex-direction: column; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.row:first-child { padding-top: 0; }
.row .kicker { margin-bottom: 0; align-self: flex-start; }
.row__title { font: 700 1.15rem/1.3 var(--serif); letter-spacing: -.01em; }
.row__meta { margin-top: .35em; }
.row__ex { color: #3b4048; font-size: .95rem; margin-top: .3em; }
.rows--search .row:first-child { padding-top: 1rem; }

/* topic chips, term lists */
.topics ul, .term-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.topics a, .term-list a { display: block; padding: .45em .85em; border: 1px solid var(--line); border-radius: 999px; background: var(--cream); color: var(--navy); text-decoration: none; font-size: .93rem; font-weight: 500; }
.topics a:hover, .term-list a:hover, .topics a[aria-current] { border-color: var(--navy); }
.topics a[aria-current] { background: var(--navy); color: #fff; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }

/* pagination */
.pagination { margin-top: 2.5rem; }
.pagination ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.pagination a, .pagination span { display: block; min-width: 42px; padding: .5em .8em; text-align: center; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; font-weight: 600; font-size: .95rem; }
.pagination .current { background: var(--navy); border-color: var(--navy); color: #fff; }
.pagination a:hover { border-color: var(--navy); }

/* ---------- home ---------- */
.hero { background: var(--cream); border-bottom: 1px solid var(--line); padding: 2.6rem 0 2.4rem; margin-bottom: 2.6rem; }
.hml-intro__title { font-size: clamp(1.9rem, 4.2vw, 3rem); line-height: 1.12; margin: 0 0 .35em; max-width: 20em; }
.hml-intro__lede { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: #3b4048; margin: 0 0 1.5em; max-width: 44em; }
.hml-intro__paths { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.hml-intro__paths a { display: block; padding: .95em 1.05em; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: 8px; text-decoration: none; color: inherit; }
.hml-intro__paths a:hover { border-color: var(--navy); border-top-color: var(--navy); }
.hml-intro__paths strong { display: block; font-family: var(--serif); font-size: 1.1rem; color: var(--navy); }
.hml-intro__paths span { display: block; font-size: .88rem; color: var(--muted); margin-top: .2em; }
@media (max-width: 900px) { .hml-intro__paths { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .hero { padding: 1.8rem 0; margin-bottom: 2rem; } .hml-intro__paths { gap: 8px; } .hml-intro__paths a { padding: .8em .85em; } .hml-intro__paths span { font-size: .8rem; } }

.front { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 44px; align-items: start; }
.lead__img { display: block; background: #f3efe6; border-radius: 10px; overflow: hidden; margin-bottom: 1.1rem; }
.lead__img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.lead__label { font: 700 12px/1.3 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--gold-ink); margin: 0 0 .5em; }
.lead__title { font-size: clamp(1.6rem, 3vw, 2.25rem); line-height: 1.15; margin: 0 0 .4em; }
.lead__ex { font-size: 1.08rem; color: #3b4048; margin: 0; max-width: 38em; }
@media (max-width: 900px) { .front { grid-template-columns: 1fr; gap: 32px; } }

.series-grid { gap: 14px; }
.series-card { display: flex; flex-direction: column; gap: .35em; padding: 1.1em 1.2em; border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 8px; background: var(--paper); text-decoration: none; color: inherit; }
.series-card:hover { border-color: var(--navy); }
.series-card strong { font: 700 1.2rem/1.2 var(--serif); color: var(--navy); }
.series-card span { font-size: .93rem; color: #3b4048; line-height: 1.45; }
.series-card em { font-style: normal; font-size: .8rem; font-weight: 600; color: var(--gold-ink); margin-top: auto; padding-top: .3em; }

.tool-band { background: var(--navy); color: #fff; margin-top: 3.2rem; padding: 2.4rem 0; }
.tool-band__in { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.tool-band h2 { color: #fff; font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0 0 .3em; }
.tool-band p { margin: 0; color: #dfe5ee; max-width: 42em; }
.tool-band .tool-band__kicker { font: 700 12px/1.3 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: #e8d9b0; margin-bottom: .6em; }
.tool-band .btn { background: #e8d9b0; color: var(--navy); }
.tool-band .btn:hover { background: #fff; }
@media (max-width: 760px) { .tool-band__in { flex-direction: column; align-items: flex-start; gap: 20px; } }

/* ---------- listing heads ---------- */
.page-head { margin: 0 0 2rem; padding-bottom: 1.4rem; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 0 0 .3em; }
.page-head p, .page-head__desc { color: #3b4048; font-size: 1.08rem; max-width: 44em; }
.page-head .search-form { margin-top: 1rem; }

/* ---------- article ---------- */
.entry-header { margin: .4rem 0 1.5rem; }
.entry-title { font-size: clamp(2rem, 4.6vw, 2.75rem); line-height: 1.12; margin: 0 0 .45em; }
.entry-meta { color: var(--muted); font-size: .92rem; margin: 0; }
.crumbs { font-size: .85rem; color: var(--muted); margin: 0 0 .9em; }
.crumbs a { color: var(--muted); }
.entry-hero { margin: 0 0 2rem; background: #f3efe6; border-radius: 10px; overflow: hidden; }
.entry-hero img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.entry-content { font-size: 19px; line-height: 1.65; color: var(--ink); }
.entry-content > :first-child { margin-top: 0; }
.entry-content p, .entry-content ul, .entry-content ol { margin: 0 0 1.25em; }
.entry-content li { margin-bottom: .45em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content h2 { font-size: 1.62em; margin: 1.9em 0 .55em; }
.entry-content h3 { font-size: 1.25em; margin: 1.6em 0 .45em; }
.entry-content h4 { font: 700 1em var(--sans); margin: 1.4em 0 .4em; }
.entry-content a { color: var(--navy); text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 1.5px; }
.entry-content a:hover { text-decoration-color: var(--navy); }
.entry-content strong { color: #111; }
.entry-content blockquote { margin: 1.8em 0; padding: .2em 0 .2em 1.2em; border-left: 3px solid var(--gold); color: #33373e; font-style: italic; }
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content figure { margin: 2em 0; }
.entry-content figcaption { font-size: .85rem; color: var(--muted); margin-top: .5em; }
.entry-content sup { line-height: 0; }
@media (max-width: 600px) { .entry-content { font-size: 18px; } .entry-hero { border-radius: 0; margin-left: -24px; margin-right: -24px; } }
@media (max-width: 380px) { .entry-hero { margin-left: -18px; margin-right: -18px; } }

/* tables: hairlines, a firm rule under the head, figures that line up */
.table-scroll, .hml-nw-scroll { overflow-x: auto; margin: 1.8em 0; -webkit-overflow-scrolling: touch; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .86em; line-height: 1.4; font-variant-numeric: tabular-nums lining-nums; }
.entry-content th, .entry-content td { padding: .65em .8em; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.entry-content thead th, .entry-content table > tbody:first-child > tr:first-child > th { font: 700 .82em/1.3 var(--sans); letter-spacing: .03em; text-transform: uppercase; color: var(--navy); background: var(--cream); border-bottom: 2px solid var(--navy); vertical-align: bottom; }
.entry-content tbody th { font-weight: 600; color: var(--navy); }
.entry-content tbody tr:hover > * { background: #fdfbf6; }
.entry-content td.num, .entry-content th.num { text-align: right; white-space: nowrap; }
.entry-content th:first-child, .entry-content td:first-child { padding-left: .5em; }

/* Million Dollar Question card (markup from million-ui.php) */
.entry-content blockquote.hml-mdq { border: 1px solid var(--line); border-left: 4px solid var(--navy); background: var(--cream); border-radius: 8px; padding: 1.2em 1.4em; margin: 0 0 2em; font-style: normal; font-size: .95em; color: var(--ink); }
.entry-content blockquote.hml-mdq p { margin: 0 0 .6em; }
.hml-mdq__options { list-style: none; margin: .4em 0 .8em !important; padding: 0 !important; }
.hml-mdq__options li { display: flex; gap: .7em; align-items: baseline; padding: .55em .8em; margin: .4em 0; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.hml-mdq__letter { flex: 0 0 1.6em; height: 1.6em; line-height: 1.6em; text-align: center; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; font-size: .85em; }
.entry-content blockquote.hml-mdq p.hml-mdq__more { margin: 0; font-weight: 600; font-size: .9em; color: #6b5d3f; }

/* boxes printed by the mu-plugins: keep their own look, tidy the fit */
.entry-content .hml-series-tag { margin: 0 0 1.6em; }
.entry-content .hml-nl a, .entry-content .hml-author a { text-decoration-color: currentColor; }
.hml-nl-footer-wrap { max-width: 908px; padding: 0 24px; margin: 1rem auto 3rem; }
.hml-series__item a, .hml-series-card { text-decoration: none !important; }
.hml-series__text strong, .hml-series-card__body strong { font-family: var(--serif); }
.post-views { font-size: .8rem; color: var(--muted); margin-top: 1.5em; }

/* after the article */
.entry-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 2rem 0 0; font-size: .85rem; }
.entry-tags span { font-weight: 700; color: var(--muted); margin-right: 4px; }
.entry-tags a { padding: .25em .7em; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: #3b4048; }
.entry-tags a:hover { border-color: var(--navy); color: var(--navy); }
.related { margin-top: 3.2rem; }
.wrap--article .related .grid--3 { gap: 20px 18px; }
.wrap--article .related .card__title { font-size: 1.02rem; }
.comments { margin-top: 3.2rem; }
.comment-list { list-style: none; padding: 0; margin: 0 0 2rem; }
.comment-list li { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.comment-list .children { list-style: none; padding-left: 1.5rem; }
.comment-meta { font-size: .85rem; color: var(--muted); margin-bottom: .4em; }
.comment-form label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: .25em; }
.comment-form input[type=text], .comment-form input[type=email], .comment-form input[type=url], .comment-form textarea { width: 100%; padding: .65em .8em; border: 1px solid #c9c2b0; border-radius: 6px; font: 1rem var(--sans); }
.comment-form .comment-form-cookies-consent label { display: inline; font-weight: 400; }
.comment-notes, .logged-in-as { font-size: .88rem; color: var(--muted); }

/* ---------- footer ---------- */
.site-footer { background: var(--cream); border-top: 1px solid var(--line); box-shadow: inset 0 3px 0 -2px var(--gold); padding: 2.8rem 0 1.6rem; font-size: .93rem; }
.site-footer__in { display: grid; grid-template-columns: 1.4fr 1fr 1.6fr 1fr; gap: 36px; }
.site-footer__name { font: 700 1.35rem/1.2 var(--serif); color: var(--navy); margin: 0 0 .4em; }
.site-footer__brand p:last-child { color: #3b4048; max-width: 26em; }
.site-footer h2 { font: 700 12px/1.3 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--gold-ink); margin: .3em 0 .9em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer ul.cols { columns: 2; column-gap: 20px; }
.site-footer li { margin: 0 0 .5em; break-inside: avoid; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { color: var(--navy); text-decoration: underline; }
.site-footer__legal { margin: 2.2rem auto 0; padding-top: 1.2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
@media (max-width: 900px) { .site-footer__in { grid-template-columns: 1fr 1fr; } .site-footer__brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .site-footer__in { grid-template-columns: 1fr; gap: 26px; } }

@media print { .site-header, .site-footer, .hml-nl, .hml-nl-footer-wrap, .related, .comments, .mnav { display: none !important; } body { font-size: 12pt; } }
