/*
Theme Name: WordMag Ledger
Description: "The Ledger" design for The Biz Op Magazine. A child of WordMag that owns all front-end markup and styles.
Template: wordmag
Version: 1.0.0
Text Domain: wordmag-ledger
*/

:root {
	--bg: #F2F3EE;
	--surface: #FFFFFF;
	--ink: #16211B;
	--ink-2: #3A4A40;
	--muted: #66746B;
	--rule: #C9CFC6;
	--accent: #1E7A4C;
	--accent-ink: #0F4A2C;
	--band: #16211B;
	--band-ink: #EEF1EA;
	--band-2: #B9C3BB;
	--band-rule: #3A463E;
	--band-accent: #9FD7B7;
	--head: "Archivo", Arial, sans-serif;
	--body: "Source Serif 4", Georgia, serif;
	--wrap: 1200px;
	--gutter: 24px;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--body);
	font-size: 18px;
	line-height: 1.6;
	text-rendering: optimizeLegibility;
}
:where(h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote) { margin: 0; }
:where(ul, ol) { padding: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

html, body { overflow-x: clip; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* Google auto ads and Ad Inserter blocks stay inside the layout */
.google-auto-placed, .code-block, ins.adsbygoogle { max-width: 100% !important; overflow: hidden; }
.google-auto-placed { margin: 24px auto !important; }
.google-auto-placed iframe, .code-block iframe { max-width: 100% !important; }
.hl {
	font-family: var(--head);
	font-weight: 800;
	letter-spacing: -0.01em;
	line-height: 1.1;
	color: inherit;
}
a .hl, a.hl { text-decoration-color: transparent; transition: text-decoration-color .15s; }
a:hover .hl, a:focus-visible .hl {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
	text-decoration-color: var(--accent);
}
.meta {
	display: block;
	font-family: var(--head);
	font-weight: 500;
	font-size: 13px;
	color: var(--muted);
	letter-spacing: .01em;
	line-height: 1.4;
}
.meta .sep { margin: 0 4px; color: var(--rule); }
.kicker {
	display: block;
	font-family: var(--head);
	font-weight: 600;
	font-size: 13px;
	line-height: 1.3;
	color: var(--accent);
	margin-bottom: 6px;
}
.btn, .search-submit, .signup-form button, .signup-form input[type="submit"], .form-submit .submit {
	display: inline-block;
	font-family: var(--head);
	font-weight: 600;
	font-size: 15px;
	line-height: 1.2;
	background: var(--accent);
	color: #fff;
	padding: 12px 20px;
	border: 0;
	border-radius: 3px;
	white-space: nowrap;
	cursor: pointer;
}
.btn:hover, .search-submit:hover, .signup-form button:hover, .signup-form input[type="submit"]:hover, .form-submit .submit:hover { background: var(--accent-ink); color: #fff; }

.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;
}
.skip-link:focus {
	clip: auto; clip-path: none; height: auto; width: auto; margin: 0;
	left: 8px; top: 8px; z-index: 100000; padding: 12px 16px;
	background: var(--surface); color: var(--ink); font-family: var(--head);
}

/* Image slots */
.img { position: relative; overflow: hidden; background: #D9DED6; }
.img img { width: 100%; height: 100%; object-fit: cover; }
.img.ph {
	display: flex; align-items: flex-end; padding: 14px;
	background: var(--accent); color: #DCEFE3;
	font-family: var(--head); font-weight: 800; font-size: 22px; line-height: 1;
}

/* Header */
.site-head .top {
	display: flex; justify-content: space-between; align-items: center; gap: 16px;
	padding: 12px 0;
	font-family: var(--head); font-size: 13px; color: var(--muted);
}
.site-head .social .menu { display: flex; gap: 18px; list-style: none; }
.site-head .social a:hover { color: var(--accent); }
.mast {
	display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
	padding: 14px 0 16px;
	border-bottom: 3px solid var(--ink);
}
.brand {
	font-family: var(--head); font-weight: 800;
	font-size: clamp(34px, 5vw, 58px); line-height: .95; letter-spacing: -0.03em;
	margin: 0;
}
.brand span { color: var(--accent); }
.tag { font-family: var(--body); font-style: italic; color: var(--ink-2); font-size: 17px; margin-top: 8px; }
.mast-actions { display: flex; align-items: center; gap: 12px; }
.search-form { display: flex; gap: 0; }
.search-field {
	width: 200px; min-width: 0;
	font-family: var(--head); font-size: 15px;
	padding: 11px 12px;
	background: var(--surface);
	border: 1px solid var(--rule); border-right: 0;
	border-radius: 3px 0 0 3px;
}
.search-form .search-submit { border-radius: 0 3px 3px 0; background: var(--ink); }
.search-form .search-submit:hover { background: var(--accent-ink); }
.mast-actions .search-form .search-submit { background: var(--surface); color: var(--ink); border: 1px solid var(--rule); }
.mast-actions .search-form .search-submit:hover { background: var(--bg); color: var(--ink); }

nav.sections { border-bottom: 1px solid var(--rule); }
nav.sections .menu {
	display: flex; gap: 28px; list-style: none;
	padding: 12px 0;
	font-family: var(--head); font-weight: 600; font-size: 15px;
	overflow-x: auto; scrollbar-width: none; white-space: nowrap;
}
nav.sections .menu::-webkit-scrollbar { display: none; }
nav.sections a:hover, nav.sections .current-menu-item > a, nav.sections .current-cat > a { color: var(--accent); }
nav.sections .menu-scam a, nav.sections a[href*="scam-watch"] { color: var(--accent); }

/* Section heads */
.sec-head {
	display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
	border-bottom: 3px solid var(--ink);
	padding-bottom: 10px; margin-bottom: 26px;
}
.sec-head h2 { font-size: 28px; }
.sec-head a { font-family: var(--head); font-weight: 600; font-size: 15px; color: var(--accent); white-space: nowrap; }
.sec-head a:hover { text-decoration: underline; text-underline-offset: 3px; }
.block { padding-top: 56px; }

/* Lead */
.lead {
	display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 40px;
	padding: 32px 0 44px;
}
.lead-story .img { aspect-ratio: 16 / 10; }
.lead-story h2 { font-size: clamp(30px, 3.4vw, 46px); line-height: 1.05; margin: 18px 0 12px; max-width: 22ch; }
.dek { font-size: 20px; line-height: 1.5; color: var(--ink-2); margin: 0 0 12px; max-width: 60ch; }

/* Ranked list */
.rank-h {
	font-family: var(--head); font-weight: 800; font-size: 15px;
	padding-bottom: 10px; border-bottom: 3px solid var(--ink);
}
.rank ol { list-style: none; counter-reset: r; }
.rank li {
	counter-increment: r;
	display: grid; grid-template-columns: 44px 1fr; gap: 6px;
	padding: 16px 0; border-bottom: 1px solid var(--rule);
}
.rank li::before {
	content: counter(r);
	font-family: var(--head); font-weight: 800; font-size: 30px; line-height: 1;
	color: var(--accent);
}
.rank .hl { display: block; font-size: 19px; line-height: 1.2; }
.rank .kicker { margin: 6px 0 0; color: var(--muted); font-weight: 500; }

/* Scam watch band */
.band { background: var(--band); color: var(--band-ink); padding: 48px 0 52px; margin-top: 8px; }
.band .sec-head { border-bottom: 1px solid var(--band-rule); }
.band .sec-head h2 { font-size: 34px; }
.band .sec-head a { color: var(--band-accent); }
.band-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 40px; }
.band .big .img { aspect-ratio: 3 / 2; }
.band .big h3 { font-size: 30px; margin: 16px 0 10px; }
.band p { color: var(--band-2); }
.band .side { display: flex; flex-direction: column; gap: 28px; }
.band .row { display: grid; grid-template-columns: 140px 1fr; gap: 18px; align-items: start; }
.band .row .img { aspect-ratio: 1 / 1; }
.band .row h3 { font-size: 21px; margin-bottom: 8px; }
.band .tip { border-top: 1px solid var(--band-rule); padding-top: 22px; }
.band .tip p { font-size: 17px; }
.band .tip .tip-h { font-family: var(--head); font-weight: 600; color: var(--band-accent); font-size: 13px; margin-bottom: 6px; }
.band a:hover .hl { text-decoration-color: var(--band-accent); }
.band .row p { color: var(--band-2); }

/* Start and fund */
.fund { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
.fund .feature .img { aspect-ratio: 4 / 3; }
.fund .feature h3 { font-size: 28px; margin: 16px 0 10px; }
.fund .feature p { color: var(--ink-2); margin-bottom: 8px; }
.stack { list-style: none; }
.stack li { padding: 20px 0; border-bottom: 1px solid var(--rule); }
.stack li:first-child { padding-top: 0; }
.stack h3 { font-size: 22px; margin-bottom: 8px; }
.stack p { color: var(--ink-2); font-size: 17px; margin-bottom: 6px; }

/* Image-left rows */
.rows.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.row { display: grid; grid-template-columns: 180px 1fr; gap: 20px; }
.rows .row { padding: 22px 0; border-top: 1px solid var(--rule); }
.rows.two .row:nth-child(-n+2) { border-top: 0; padding-top: 0; }
.row .img { aspect-ratio: 4 / 3; }
.row h3, .row h2 { font-size: 21px; margin-bottom: 8px; }
.row p { font-size: 16px; color: var(--ink-2); margin-bottom: 6px; }

/* More stories */
.latest { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.latest li { border-top: 1px solid var(--rule); padding: 18px 0; }
.latest li:nth-child(-n+2) { border-top: 0; padding-top: 0; }
.latest h3 { font-size: 20px; margin-bottom: 6px; }

/* Newsletter */
.signup {
	margin-top: 60px;
	background: var(--surface);
	border-top: 3px solid var(--accent);
	padding: 36px 40px;
	display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: center;
}
.signup h2 { font-size: 30px; margin-bottom: 8px; }
.signup p { color: var(--ink-2); }
.signup-form form, .signup-form .wp-block-jetpack-subscriptions__form { display: flex; gap: 10px; flex-wrap: wrap; margin: 0; }
.signup-form p { margin: 0 !important; }
.signup-form p:has(input[type="email"]) { flex: 1 1 220px; }
.signup-form input[type="email"] {
	width: 100% !important; min-width: 0;
	font-family: var(--head) !important; font-size: 16px !important;
	padding: 12px 14px !important;
	border: 1px solid var(--rule) !important; border-radius: 3px !important;
	background: var(--bg) !important; color: var(--ink) !important;
}
.signup-form button, .signup-form input[type="submit"] { margin: 0 !important; border-radius: 3px !important; background: var(--accent) !important; color: #fff !important; padding: 12px 20px !important; font-family: var(--head) !important; font-weight: 600 !important; font-size: 15px !important; }
.signup-form .success, .signup-form .error { font-family: var(--head); font-size: 15px; }

/* List pages */
.page-head { padding: 36px 0 24px; border-bottom: 3px solid var(--ink); margin-bottom: 32px; }
.page-head h1 { font-size: clamp(32px, 4vw, 48px); line-height: 1.05; }
.page-desc { margin-top: 10px; color: var(--ink-2); max-width: 65ch; }
.with-aside { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; align-items: start; }
.list .list-row { padding: 24px 0; border-top: 1px solid var(--rule); }
.list .list-row:first-child { border-top: 0; padding-top: 0; }
.list .row-link { display: grid; grid-template-columns: 240px 1fr; gap: 24px; }
.list .row-link .img { aspect-ratio: 4 / 3; }
.list h2 { font-size: 24px; margin-bottom: 8px; }
.list p { font-size: 17px; color: var(--ink-2); margin-bottom: 8px; }
.empty { padding: 8px 0 24px; }
.empty h2 { font-size: 26px; margin-bottom: 8px; }
.empty p { margin-bottom: 16px; color: var(--ink-2); }
.empty .search-field { width: 280px; }
.empty .search-form { margin-bottom: 20px; }

.pagination { margin-top: 32px; padding-top: 20px; border-top: 3px solid var(--ink); }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; font-family: var(--head); font-weight: 600; font-size: 15px; }
.pagination .page-numbers { padding: 8px 12px; border: 1px solid var(--rule); border-radius: 3px; background: var(--surface); }
.pagination .page-numbers.current { background: var(--ink); border-color: var(--ink); color: var(--band-ink); }
.pagination a.page-numbers:hover { border-color: var(--accent); color: var(--accent); }
.pagination .dots { border: 0; background: none; }

/* Single story */
.story-head { padding: 40px 0 28px; max-width: 900px; }
.story-head .kicker { font-size: 14px; margin-bottom: 12px; }
.story-head .kicker:hover { text-decoration: underline; text-underline-offset: 3px; }
.story-head h1 { font-size: clamp(32px, 4.4vw, 54px); line-height: 1.04; letter-spacing: -0.02em; margin-bottom: 16px; }
.story-head .dek { font-size: 22px; }
.byline { font-size: 14px; margin-top: 14px; }
.story-img { margin-bottom: 36px; }
.story-img img { width: 100%; max-height: 620px; object-fit: cover; }
.page-story .story-head { border-bottom: 3px solid var(--ink); margin-bottom: 32px; padding-bottom: 20px; }

.story-body { max-width: 720px; }
.entry-content { font-size: 19px; line-height: 1.65; }
.entry-content > * + * { margin-top: 1.1em; }
.entry-content h2, .entry-content h3, .entry-content h4 {
	font-family: var(--head); font-weight: 800; line-height: 1.15; letter-spacing: -0.01em;
	margin-top: 1.8em;
}
.entry-content h2 { font-size: 28px; }
.entry-content h3 { font-size: 23px; }
.entry-content h4 { font-size: 19px; }
.entry-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.entry-content a:hover { color: var(--accent-ink); text-decoration-thickness: 2px; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li + li { margin-top: .4em; }
.entry-content li::marker { color: var(--accent); font-family: var(--head); font-weight: 700; }
.entry-content blockquote {
	border-left: 3px solid var(--accent); padding: 4px 0 4px 22px;
	font-style: italic; color: var(--ink-2); font-size: 21px;
}
.entry-content img { height: auto; }
.entry-content figure, .entry-content .wp-caption { max-width: 100%; }
.entry-content figcaption, .entry-content .wp-caption-text { font-family: var(--head); font-size: 13px; color: var(--muted); margin-top: 8px; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 16px; }
.entry-content th, .entry-content td { border-bottom: 1px solid var(--rule); padding: 10px 8px; text-align: left; }
.entry-content th { font-family: var(--head); font-weight: 700; border-bottom: 2px solid var(--ink); }
.entry-content hr { border: 0; border-top: 1px solid var(--rule); }
.alignleft { float: left; margin: .3em 1.4em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.4em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.entry-content::after { content: ""; display: table; clear: both; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin-top: 32px; font-family: var(--head); font-size: 14px; }
.tags a { display: inline-block; padding: 6px 10px; border: 1px solid var(--rule); border-radius: 3px; }
.tags a:hover { border-color: var(--accent); color: var(--accent); }

.story-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 40px; padding-top: 18px; border-top: 3px solid var(--ink); }
.story-nav .next { text-align: right; grid-column: 2; }
.story-nav .hl { display: block; font-size: 18px; margin-top: 4px; }

/* Sidebar widgets */
.sidebar { position: sticky; top: 24px; }
.sidebar .widget { margin-bottom: 40px; }
.sidebar .widget-header { border-bottom: 3px solid var(--ink); padding-bottom: 8px; margin-bottom: 14px; }
.sidebar .widget-title { font-family: var(--head); font-weight: 800; font-size: 15px; }
.sidebar ul { list-style: none; }
.sidebar li { padding: 10px 0; border-bottom: 1px solid var(--rule); font-family: var(--head); font-weight: 600; font-size: 16px; line-height: 1.3; }
.sidebar li a:hover { color: var(--accent); }
.sidebar .search-field { width: 100%; }
.sidebar .search-form { width: 100%; }
.admin-bar .sidebar { top: 56px; }

/* Related */
.related { padding-bottom: 8px; }

/* Comments (parent comments.php markup) */
.comments-area { margin-top: 48px; padding-top: 18px; border-top: 3px solid var(--ink); }
.comments-title, .comment-reply-title { font-family: var(--head); font-weight: 800; font-size: 24px; margin-bottom: 18px; }
.comment-list { list-style: none; }
.comment-list .children { list-style: none; padding-left: 24px; }
.comment-body { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.comment-meta { font-family: var(--head); font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.comment-author .avatar { display: none; }
.comment-form label { display: block; font-family: var(--head); font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 3px; background: var(--surface);
}
.comment-form p { margin-bottom: 16px; }
.comment-notes, .logged-in-as { font-size: 15px; color: var(--muted); }

/* Footer */
.site-foot { margin-top: 72px; border-top: 3px solid var(--ink); padding: 32px 0 40px; }
.site-foot .cols { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr)); gap: 32px; }
.site-foot .brand { font-size: 30px; }
.foot-h { font-family: var(--head); font-weight: 800; font-size: 14px; margin-bottom: 10px; }
.foot-list { list-style: none; font-family: var(--head); font-size: 15px; line-height: 2; }
.foot-list a:hover { color: var(--accent); }
.foot-list + .foot-list { margin-top: 8px; }
.legal { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--rule); }

/* Responsive */
@media (max-width: 1024px) {
	.with-aside { grid-template-columns: minmax(0, 1fr) 280px; gap: 40px; }
	.search-field { width: 150px; }
}
@media (max-width: 900px) {
	.lead, .band-grid, .fund, .signup, .site-foot .cols, .with-aside { grid-template-columns: 1fr; }
	.rows.two, .latest { grid-template-columns: 1fr; }
	.rows.two .row:nth-child(2), .latest li:nth-child(2) { border-top: 1px solid var(--rule); padding-top: 22px; }
	.mast { flex-direction: column; align-items: flex-start; }
	.mast-actions { width: 100%; }
	.mast-actions .search-form { flex: 1; }
	.mast-actions .search-field { width: 100%; }
	.sidebar { position: static; }
	.story-body { max-width: none; }
	.signup { padding: 28px 20px; }
	.list .row-link { grid-template-columns: 180px 1fr; }
}
@media (max-width: 560px) {
	:root { --gutter: 16px; }
	body { font-size: 17px; }
	.entry-content { font-size: 18px; }
	.site-head .top-tag { display: none; }
	.mast-actions { display: none; }
	.tag { font-size: 16px; }
	.band .row, .row, .list .row-link { grid-template-columns: 110px 1fr; gap: 14px; }
	.row h3, .row h2, .list h2 { font-size: 18px; }
	.list p, .row p { display: none; }
	.story-nav { grid-template-columns: 1fr; }
	.story-nav .next { grid-column: 1; text-align: left; }
	.alignleft, .alignright { float: none; margin: 1em 0; }
}
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; }
}
