/*
Theme Name: Growth in Minutes
Theme URI: https://youtube.com/@growth_in_mins
Author: Glenn Pace
Description: An editorial blog theme for Growth in Minutes — leadership and communication lessons you can read in minutes. Features reading-time badges, series navigation, a branded hero, YouTube and newsletter call-outs, and light/dark support.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: growth-in-minutes
Tags: blog, one-column, two-columns, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready
*/

/* ---------- Tokens ---------- */
:root {
	--gim-ink: #10201a;
	--gim-ink-soft: #3d4f46;
	--gim-muted: #6b7c73;
	--gim-paper: #f6f3ec;
	--gim-card: #ffffff;
	--gim-line: #e2ddd1;
	--gim-green: #1f7a4d;
	--gim-green-deep: #0f3d28;
	--gim-lime: #c8f169;
	--gim-lime-ink: #1c2a08;

	--gim-font-display: "Fraunces", Georgia, "Times New Roman", serif;
	--gim-font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--gim-font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

	--gim-wrap: 1160px;
	--gim-read: 700px;
	--gim-radius: 14px;
	--gim-gutter: clamp(16px, 4vw, 32px);
}

@media (prefers-color-scheme: dark) {
	:root {
		--gim-ink: #eef2ee;
		--gim-ink-soft: #c3cdc6;
		--gim-muted: #8fa097;
		--gim-paper: #0d1612;
		--gim-card: #14211b;
		--gim-line: #24352c;
		--gim-green: #5fd398;
		--gim-green-deep: #0a2a1b;
	}
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--gim-paper);
	color: var(--gim-ink);
	font-family: var(--gim-font-body);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}
img, video, iframe { max-width: 100%; height: auto; display: block; }
a { color: var(--gim-green); text-underline-offset: 3px; }
a:hover { color: var(--gim-ink); }
h1, h2, h3, h4 {
	font-family: var(--gim-font-display);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.015em;
	margin: 0 0 .5em;
}
:focus-visible { outline: 3px solid var(--gim-lime); outline-offset: 2px; }

.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 {
	clip: auto; clip-path: none; height: auto; width: auto; z-index: 100000;
	top: 8px; left: 8px; padding: 12px 18px; background: var(--gim-lime); color: var(--gim-lime-ink);
}

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

/* ---------- Chips ---------- */
.gim-time {
	display: inline-flex; align-items: center; gap: 6px;
	font-family: var(--gim-font-mono);
	font-size: 12px; font-weight: 600; letter-spacing: .02em;
	background: var(--gim-lime); color: var(--gim-lime-ink);
	padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
.gim-time svg { width: 13px; height: 13px; }
.gim-series {
	font-family: var(--gim-font-mono);
	font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
	color: var(--gim-green); text-decoration: none;
}
.gim-series:hover { color: var(--gim-ink); }
.gim-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; font-size: 14px; color: var(--gim-muted); }

/* ---------- Header ---------- */
.gim-topbar {
	background: var(--gim-green-deep); color: #e9f5ee;
	font-family: var(--gim-font-mono); font-size: 12px; letter-spacing: .04em;
	text-align: center; padding: 8px var(--gim-gutter);
}
.gim-topbar a { color: var(--gim-lime); }
.gim-header { border-bottom: 1px solid var(--gim-line); background: var(--gim-paper); position: sticky; top: 0; z-index: 50; }
.admin-bar .gim-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .gim-header { top: 0; position: relative; } }
.gim-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; }
.gim-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--gim-ink); }
.gim-brand__mark {
	width: 38px; height: 38px; border-radius: 10px; flex: none;
	background: var(--gim-green-deep); display: grid; place-items: center;
}
.gim-brand__mark svg { width: 22px; height: 22px; }
.gim-brand__name { font-family: var(--gim-font-display); font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.gim-brand__tag { display: block; font-family: var(--gim-font-mono); font-size: 11px; color: var(--gim-muted); margin-top: 4px; letter-spacing: .04em; }
.custom-logo { max-height: 48px; width: auto; }

.gim-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.gim-nav a {
	display: block; padding: 8px 12px; border-radius: 8px;
	color: var(--gim-ink); text-decoration: none; font-size: 15px; font-weight: 500;
}
.gim-nav a:hover, .gim-nav .current-menu-item > a { background: var(--gim-line); }
.gim-nav .sub-menu { display: none; }

.gim-menu-toggle {
	display: none; background: none; border: 1px solid var(--gim-line); border-radius: 8px;
	padding: 8px 12px; color: var(--gim-ink); font: 600 14px var(--gim-font-body); cursor: pointer;
}

@media (max-width: 860px) {
	.gim-menu-toggle { display: inline-block; }
	.gim-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--gim-paper); border-bottom: 1px solid var(--gim-line); padding: 8px var(--gim-gutter) 16px; }
	.gim-nav.is-open { display: block; }
	.gim-nav ul { flex-direction: column; }
	.gim-brand__tag { display: none; }
}

/* ---------- Series bar ---------- */
.gim-seriesbar { border-bottom: 1px solid var(--gim-line); }
.gim-seriesbar__inner { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0; scrollbar-width: none; }
.gim-seriesbar__inner::-webkit-scrollbar { display: none; }
.gim-seriesbar a {
	flex: none; text-decoration: none; font-size: 14px; font-weight: 500;
	color: var(--gim-ink-soft); border: 1px solid var(--gim-line); border-radius: 999px; padding: 6px 14px;
}
.gim-seriesbar a:hover, .gim-seriesbar a.is-active { background: var(--gim-ink); color: var(--gim-paper); border-color: var(--gim-ink); }

/* ---------- Hero ---------- */
.gim-hero { padding: clamp(48px, 8vw, 96px) 0 clamp(36px, 6vw, 64px); }
.gim-hero__eyebrow { margin-bottom: 18px; }
.gim-hero__title { font-size: clamp(40px, 7vw, 76px); max-width: 15ch; margin-bottom: 20px; }
.gim-hero__title em { font-style: italic; color: var(--gim-green); }
.gim-hero__lede { font-size: clamp(18px, 2.2vw, 21px); color: var(--gim-ink-soft); max-width: 46ch; margin: 0 0 28px; }
.gim-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.gim-btn {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: 15px;
	text-decoration: none; border: 2px solid var(--gim-ink); color: var(--gim-ink); background: transparent; cursor: pointer;
}
.gim-btn:hover { background: var(--gim-ink); color: var(--gim-paper); }
.gim-btn--solid { background: var(--gim-ink); color: var(--gim-paper); }
.gim-btn--solid:hover { background: var(--gim-green); border-color: var(--gim-green); color: #fff; }

.gim-stat {
	display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
	background: var(--gim-line); border: 1px solid var(--gim-line); border-radius: var(--gim-radius); overflow: hidden; margin-top: 48px;
}
.gim-stat > div { background: var(--gim-card); padding: 20px 22px; }
.gim-stat b { display: block; font-family: var(--gim-font-display); font-size: clamp(26px, 4vw, 38px); line-height: 1.1; }
.gim-stat span { font-size: 14px; color: var(--gim-muted); }
@media (max-width: 640px) { .gim-stat { grid-template-columns: 1fr; } }

/* ---------- Sections ---------- */
.gim-section { padding: 40px 0 64px; }
.gim-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-top: 2px solid var(--gim-ink); padding-top: 14px; margin-bottom: 28px; }
.gim-section__head h2 { font-size: 26px; margin: 0; }
.gim-section__head span { font-family: var(--gim-font-mono); font-size: 12px; color: var(--gim-muted); text-transform: uppercase; letter-spacing: .08em; }

/* ---------- Featured ---------- */
.gim-featured { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(24px, 4vw, 48px); align-items: center; margin-bottom: 56px; }
.gim-featured__media { display: block; border-radius: var(--gim-radius); overflow: hidden; aspect-ratio: 4/3; background: var(--gim-green-deep); }
.gim-featured__media img { width: 100%; height: 100%; object-fit: cover; }
.gim-featured__title { font-size: clamp(28px, 4vw, 44px); margin: 12px 0; }
.gim-featured__title a { color: var(--gim-ink); text-decoration: none; }
.gim-featured__title a:hover { color: var(--gim-green); }
.gim-featured p { color: var(--gim-ink-soft); }
@media (max-width: 820px) { .gim-featured { grid-template-columns: 1fr; } }

/* ---------- Card grid ---------- */
.gim-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 960px) { .gim-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .gim-grid { grid-template-columns: 1fr; } }

.gim-card { display: flex; flex-direction: column; background: var(--gim-card); border: 1px solid var(--gim-line); border-radius: var(--gim-radius); overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.gim-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px -18px rgba(16,32,26,.45); }
.gim-card__media { aspect-ratio: 16/10; background: var(--gim-green-deep); overflow: hidden; }
.gim-card__media img { width: 100%; height: 100%; object-fit: cover; }
.gim-card__placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--gim-lime); font-family: var(--gim-font-display); font-size: 44px; font-style: italic; }
.gim-card__body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.gim-card__title { font-size: 21px; margin: 0; }
.gim-card__title a { color: var(--gim-ink); text-decoration: none; }
.gim-card__title a::after { content: ""; position: absolute; inset: 0; }
.gim-card { position: relative; }
.gim-card__title a:hover { color: var(--gim-green); }
.gim-card__excerpt { color: var(--gim-ink-soft); font-size: 15px; margin: 0; }
.gim-card__excerpt p { margin: 0; }
.gim-card .gim-meta { margin-top: auto; padding-top: 6px; }
.gim-card .gim-series { position: relative; z-index: 1; }

/* ---------- Callout band ---------- */
.gim-band { background: var(--gim-green-deep); color: #eef6f1; border-radius: calc(var(--gim-radius) + 6px); padding: clamp(28px, 5vw, 56px); display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center; margin: 24px 0 64px; }
.gim-band h2 { color: #fff; font-size: clamp(26px, 3.5vw, 38px); }
.gim-band p { color: #c6dcd0; margin: 0; }
.gim-band .gim-btn { border-color: var(--gim-lime); color: var(--gim-lime); }
.gim-band .gim-btn:hover { background: var(--gim-lime); color: var(--gim-lime-ink); }
.gim-band .gim-btn--solid { background: var(--gim-lime); color: var(--gim-lime-ink); }
.gim-band__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
@media (max-width: 760px) { .gim-band { grid-template-columns: 1fr; } .gim-band__actions { justify-content: flex-start; } }

/* ---------- Archive header ---------- */
.gim-archive-head { padding: 56px 0 32px; }
.gim-archive-head h1 { font-size: clamp(34px, 5vw, 56px); }
.gim-archive-head .archive-description { color: var(--gim-ink-soft); max-width: 60ch; font-size: 18px; }

/* ---------- Single ---------- */
.gim-progress { position: fixed; top: 0; left: 0; height: 4px; width: 0; background: var(--gim-lime); z-index: 100; }
.gim-article { padding: 56px 0 24px; }
.gim-article__head { max-width: var(--gim-read); margin: 0 auto 32px; }
.gim-article__title { font-size: clamp(34px, 5.5vw, 58px); margin: 14px 0 18px; }
.gim-article__dek { font-size: 20px; color: var(--gim-ink-soft); margin: 0 0 22px; }
.gim-article__hero { max-width: 1000px; margin: 0 auto 40px; border-radius: var(--gim-radius); overflow: hidden; }
.gim-article__hero img { width: 100%; }
.gim-author-inline { display: flex; align-items: center; gap: 10px; }
.gim-author-inline img { width: 34px; height: 34px; border-radius: 50%; }
.gim-author-inline strong { color: var(--gim-ink); font-weight: 600; }

.entry-content { max-width: var(--gim-read); margin: 0 auto; font-size: 19px; line-height: 1.75; }
.entry-content > * { margin-top: 0; margin-bottom: 1.25em; }
.entry-content h2 { font-size: 32px; margin-top: 1.8em; }
.entry-content h3 { font-size: 24px; margin-top: 1.6em; }
.entry-content blockquote {
	margin: 2em 0; padding: 4px 0 4px 24px; border-left: 4px solid var(--gim-lime);
	font-family: var(--gim-font-display); font-size: 26px; line-height: 1.35; font-style: italic; color: var(--gim-ink);
}
.entry-content blockquote cite { display: block; font: 600 14px var(--gim-font-body); font-style: normal; color: var(--gim-muted); margin-top: 10px; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li { margin-bottom: .4em; }
.entry-content li::marker { color: var(--gim-green); font-weight: 700; }
.entry-content code { font-family: var(--gim-font-mono); font-size: .85em; background: var(--gim-line); padding: 2px 6px; border-radius: 5px; }
.entry-content pre { background: var(--gim-green-deep); color: #e6f2ea; padding: 20px; border-radius: 10px; overflow-x: auto; font-size: 15px; }
.entry-content pre code { background: none; padding: 0; }
.entry-content hr { border: 0; height: 1px; background: var(--gim-line); margin: 2.5em 0; }
.entry-content img { border-radius: 10px; }
.entry-content figcaption, .wp-caption-text { font-size: 14px; color: var(--gim-muted); text-align: center; 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(--gim-line); padding: 10px 8px; text-align: left; }
.entry-content .alignwide { max-width: 1000px; margin-left: 50%; transform: translateX(-50%); width: min(1000px, 92vw); }
.entry-content .alignfull { width: 100vw; max-width: 100vw; margin-left: 50%; transform: translateX(-50%); }
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.sticky, .gallery-caption, .bypostauthor { }

/* "Key takeaway" box — add the class gim-takeaway to any Group block */
.gim-takeaway, .entry-content .gim-takeaway {
	background: var(--gim-card); border: 1px solid var(--gim-line); border-left: 5px solid var(--gim-green);
	border-radius: 10px; padding: 20px 24px; font-size: 17px;
}
.gim-takeaway::before { content: "THE 60-SECOND VERSION"; display: block; font: 600 12px var(--gim-font-mono); letter-spacing: .08em; color: var(--gim-green); margin-bottom: 8px; }

.gim-tags { max-width: var(--gim-read); margin: 32px auto 0; display: flex; flex-wrap: wrap; gap: 8px; }
.gim-tags a { font-size: 13px; text-decoration: none; color: var(--gim-ink-soft); border: 1px solid var(--gim-line); border-radius: 999px; padding: 4px 12px; }
.gim-tags a:hover { border-color: var(--gim-ink); color: var(--gim-ink); }

.gim-authorbox { max-width: var(--gim-read); margin: 48px auto; display: flex; gap: 20px; padding: 24px; background: var(--gim-card); border: 1px solid var(--gim-line); border-radius: var(--gim-radius); }
.gim-authorbox img { width: 72px; height: 72px; border-radius: 50%; flex: none; }
.gim-authorbox h3 { font-size: 20px; margin-bottom: 4px; }
.gim-authorbox p { margin: 0; color: var(--gim-ink-soft); font-size: 15px; }
@media (max-width: 520px) { .gim-authorbox { flex-direction: column; } }

.gim-postnav { max-width: var(--gim-read); margin: 0 auto 48px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.gim-postnav a { display: block; padding: 18px 20px; border: 1px solid var(--gim-line); border-radius: 12px; text-decoration: none; color: var(--gim-ink); background: var(--gim-card); }
.gim-postnav a:hover { border-color: var(--gim-ink); }
.gim-postnav small { display: block; font: 600 11px var(--gim-font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--gim-muted); margin-bottom: 6px; }
.gim-postnav .next { text-align: right; }
@media (max-width: 560px) { .gim-postnav { grid-template-columns: 1fr; } .gim-postnav .next { text-align: left; } }

/* ---------- Pagination ---------- */
.gim-pagination { margin-top: 48px; }
.gim-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.gim-pagination .page-numbers { min-width: 42px; height: 42px; display: inline-grid; place-items: center; padding: 0 14px; border: 1px solid var(--gim-line); border-radius: 999px; text-decoration: none; color: var(--gim-ink); font-weight: 600; }
.gim-pagination .page-numbers.current, .gim-pagination .page-numbers:hover { background: var(--gim-ink); color: var(--gim-paper); border-color: var(--gim-ink); }

/* ---------- Comments ---------- */
.gim-comments { max-width: var(--gim-read); margin: 0 auto 64px; }
.gim-comments ol { list-style: none; padding: 0; }
.gim-comments .children { padding-left: 28px; }
.gim-comments .comment-body { padding: 18px 0; border-bottom: 1px solid var(--gim-line); }
.gim-comments .comment-author img { border-radius: 50%; float: left; margin-right: 12px; }
.gim-comments .comment-metadata { font-size: 13px; }
.gim-comments .comment-metadata a { color: var(--gim-muted); }
.gim-comments .reply a { font-size: 14px; font-weight: 600; }
.comment-form label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }

/* ---------- Forms ---------- */
input[type="text"], input[type="email"], input[type="url"], input[type="search"], textarea {
	width: 100%; font: inherit; font-size: 16px; color: var(--gim-ink);
	background: var(--gim-card); border: 1px solid var(--gim-line); border-radius: 10px; padding: 12px 14px;
}
input:focus, textarea:focus { border-color: var(--gim-green); outline: none; }
button, input[type="submit"] {
	font: 600 15px var(--gim-font-body); background: var(--gim-ink); color: var(--gim-paper);
	border: 0; border-radius: 999px; padding: 12px 22px; cursor: pointer;
}
button:hover, input[type="submit"]:hover { background: var(--gim-green); color: #fff; }
.search-form { display: flex; gap: 8px; max-width: 520px; }
.search-form label { flex: 1; }

/* ---------- Footer ---------- */
.gim-footer { background: var(--gim-green-deep); color: #c6dcd0; padding: 64px 0 32px; margin-top: 40px; }
.gim-footer a { color: #eef6f1; text-decoration: none; }
.gim-footer a:hover { color: var(--gim-lime); }
.gim-footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; }
.gim-footer .gim-brand { color: #fff; }
.gim-footer .gim-brand__mark { background: var(--gim-lime); }
.gim-footer .gim-brand__mark path { stroke: var(--gim-lime-ink); }
.gim-footer h4 { color: #fff; font-family: var(--gim-font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 14px; }
.gim-footer ul { list-style: none; padding: 0; margin: 0; }
.gim-footer li { margin-bottom: 8px; font-size: 15px; }
.gim-footer__bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 48px; padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13px; }
.gim-social { display: flex; gap: 10px; margin-top: 18px; }
.gim-social a { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; }
.gim-social a:hover { background: var(--gim-lime); border-color: var(--gim-lime); }
.gim-social a:hover svg { fill: var(--gim-lime-ink); }
.gim-social svg { width: 17px; height: 17px; fill: #eef6f1; }
.gim-footer .widget { margin-bottom: 24px; }
@media (max-width: 760px) { .gim-footer__grid { grid-template-columns: 1fr; } }

/* ---------- 404 / empty ---------- */
.gim-empty { text-align: center; padding: 96px 0; }
.gim-empty h1 { font-size: clamp(48px, 9vw, 110px); }
.gim-empty .search-form { margin: 24px auto 0; }
