/*
Theme Name: InferenceWeekly (Kadence Child)
Theme URI: https://inferenceweekly.com/
Description: A technical journal for working engineers: paper-white stock, one deep forest masthead rule, Newsreader headlines, small-caps section labels and a lead-story front page.
Author: InferenceWeekly
Template: kadence
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kadence-child
*/

/* ==========================================================================
   01. Tokens
   One direction, applied consistently: the technical journal.
   - paper stock, near-black ink, hairline rules
   - forest green for structure, violet for section labels, rust for accents
   ========================================================================== */

:root {
	--iw-green: #14342B;
	--iw-violet: #5A4A9C;
	--iw-rust: #9A3412;
	--iw-ink: #14110E;
	--iw-ink-soft: #45403A;
	--iw-ink-muted: #6B655C;
	--iw-paper: #FBFAF6;
	--iw-paper-alt: #F3F1E9;
	--iw-rule: #DCD7CA;
	--iw-rule-dark: rgba(255, 255, 255, 0.18);
	--iw-on-green: #F3F1E7;
	--iw-on-green-soft: #D9E0D7;
	--iw-on-green-accent: #F0C9AE;
	--iw-read: 45rem;      /* single-post reading width, ~70 characters */
	--iw-wide: 78rem;      /* front page and masthead width */
	--iw-rule-accent: 1px solid var(--iw-rule);
}

/* The journal grid: everything wider than the measure aligns to it. */
.iw-wrap {
	width: 100%;
	max-width: var(--iw-wide);
	margin-inline: auto;
	padding-inline: 1.25rem;
}

/* ==========================================================================
   02. Page stock and type
   ========================================================================== */

body {
	background-color: var(--iw-paper);
	color: var(--iw-ink);
	font-family: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
	font-size: 1.0625rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.site-title,
.iw-display {
	font-family: 'Newsreader', Georgia, 'Times New Roman', serif;
	font-weight: 600;
	color: var(--iw-ink);
	letter-spacing: -0.005em;
}

a {
	color: var(--iw-green);
	text-underline-offset: 0.15em;
}
a:hover,
a:focus {
	color: var(--iw-rust);
}

::selection {
	background: var(--iw-green);
	color: var(--iw-paper);
}

/* Section labels: small violet small-caps, the journal's running heads. */
.iw-label,
.entry-taxonomies,
.entry-taxonomies a,
.widget-title,
.iw-colophon .iw-footer-heading {
	font-family: 'Source Sans 3', system-ui, sans-serif;
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

/* ==========================================================================
   03. Masthead
   ========================================================================== */

#masthead {
	background-color: var(--iw-paper);
}

#masthead .site-header-row-container-inner {
	background-color: transparent;
	border-bottom: var(--iw-rule-accent);
}

#masthead .site-main-header-inner-wrap {
	min-height: 0;
	padding-block: 1.1rem;
}

/* The masthead mark.
   Drawn in this theme (assets/iw-mark.svg): three nodes converging into a
   single arrow on a forest green tile. The wordmark sits beside it in
   Newsreader, so the mark is sized as an imprint rather than a banner. */
.site-branding .brand.has-logo-image {
	display: block;
	overflow: visible;
}

.site-branding .brand.has-logo-image .custom-logo {
	display: block;
	width: 44px;
	height: 44px;
	max-width: 44px;
	max-height: 44px;
	margin: 0;
}

.site-branding .site-title-wrap {
	padding-left: 0.9rem;
}

.site-title {
	font-family: 'Newsreader', Georgia, serif;
	font-size: 1.6rem;
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: -0.01em;
}

/* The masthead carries the wordmark on desktop too: the header builder hides
   the text above the tablet breakpoint, and this theme overrides that. */
@media (min-width: 1025px) {
	.site-branding .site-title.vs-md-false {
		display: block !important;
	}
}

.site-title a,
.site-title a:hover {
	color: var(--iw-green);
	text-decoration: none;
}

.site-description {
	font-family: 'Source Sans 3', system-ui, sans-serif;
	font-size: 0.8rem;
	font-style: normal;
	color: var(--iw-ink-muted);
	line-height: 1.3;
}

/* Navigation: uppercase running heads, rust rule on hover. */
.header-navigation .primary-menu-container > ul > li > a,
.header-navigation .primary-menu-container > ul > li > .nav-drop-title-wrap > a {
	font-family: 'Source Sans 3', system-ui, sans-serif;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--iw-green);
	padding-block: 0.4rem;
}

.header-navigation .primary-menu-container > ul > li > a::after {
	content: "";
	display: block;
	height: 2px;
	margin-top: 0.2rem;
	background-color: var(--iw-rust);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 0.18s ease-out;
}

.header-navigation .primary-menu-container > ul > li:hover > a::after,
.header-navigation .primary-menu-container > ul > li.current-menu-item > a::after,
.header-navigation .primary-menu-container > ul > li > a:focus::after {
	transform: scaleX(1);
}

.header-navigation .primary-menu-container > ul > li > a:hover,
.header-navigation .primary-menu-container > ul > li > a:focus {
	color: var(--iw-rust);
}

.site-header .header-navigation .sub-menu,
.site-header .header-navigation .dropdown-navigation {
	border-top: 2px solid var(--iw-violet);
}

/* Mobile toggle uses the brand green, not the theme default. */
.mobile-navigation-toggle .nav-toggle-label,
button.mobile-toggle-open-container .menu-toggle-label {
	color: var(--iw-green);
}

/* Strapline bar under the masthead (printed by the child theme). */
.iw-strapline {
	background-color: var(--iw-green);
	color: var(--iw-on-green);
}

.iw-strapline-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.35rem 1.5rem;
	padding-block: 0.6rem;
}

.iw-strapline .iw-strapline-kicker,
.iw-strapline .iw-strapline-note {
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.iw-strapline .iw-strapline-kicker {
	color: var(--iw-on-green-accent);
}

.iw-strapline .iw-strapline-tagline {
	font-family: 'Newsreader', Georgia, serif;
	font-size: 1.02rem;
	font-style: italic;
	line-height: 1.4;
	color: #FFFFFF;
}

.iw-strapline .iw-strapline-note {
	margin-left: auto;
	color: var(--iw-on-green-soft);
}

/* ==========================================================================
   04. Front page: the listing
   A lead story across the measure, then a grid of cards under a rule.
   ========================================================================== */

#primary.content-area {
	padding-block: 2.5rem 4rem;
}

.archive-header,
.page-header {
	border-bottom: 2px solid var(--iw-green);
	padding-bottom: 1rem;
	margin-bottom: 2.5rem;
}

.archive-header .page-title,
.archive-header .archive-title {
	font-size: 1.5rem;
	margin: 0;
}

#archive-container.post-archive,
#archive-container.kadence-posts-list {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr);
	gap: 2.75rem 2rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 40rem) {
	#archive-container.post-archive,
	#archive-container.kadence-posts-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 64rem) {
	#archive-container.post-archive,
	#archive-container.kadence-posts-list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

#archive-container > .entry-list-item > .entry.loop-entry {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: transparent;
	box-shadow: none;
	border: 0;
	border-top: 2px solid var(--iw-green);
	padding: 1.1rem 0 0;
	margin: 0;
}

#archive-container .entry-content-wrap {
	padding: 0;
}

#archive-container .post-thumbnail {
	margin-bottom: 1rem;
	overflow: hidden;
	background-color: var(--iw-paper-alt);
}

#archive-container .post-thumbnail img {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	transition: transform 0.35s ease-out;
}

#archive-container .entry-list-item:hover .post-thumbnail img {
	transform: scale(1.03);
}

#archive-container .entry-title {
	margin: 0 0 0.5rem;
	font-size: 1.3rem;
	line-height: 1.22;
	overflow-wrap: anywhere;
}

#archive-container .entry-title a {
	color: var(--iw-ink);
	text-decoration: none;
}

#archive-container .entry-title a:hover,
#archive-container .entry-title a:focus {
	color: var(--iw-rust);
	text-decoration: underline;
	text-decoration-thickness: 2px;
}

#archive-container .entry-taxonomies {
	margin-bottom: 0.6rem;
}

#archive-container .entry-taxonomies a {
	color: var(--iw-violet);
	text-decoration: none;
}

#archive-container .entry-taxonomies a:hover {
	color: var(--iw-rust);
	text-decoration: underline;
}

#archive-container .entry-summary {
	font-size: 0.97rem;
	line-height: 1.6;
	color: var(--iw-ink-soft);
	margin: 0.35rem 0 0;
}

#archive-container .entry-summary p {
	margin-bottom: 0;
}

#archive-container .entry-meta,
#archive-container .entry-meta a {
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--iw-ink-muted);
	text-decoration: none;
}

#archive-container .entry-meta {
	margin-top: auto;
	padding-top: 0.85rem;
}

#archive-container .entry-meta a:hover {
	color: var(--iw-rust);
}

#archive-container .entry-footer {
	display: none; /* read more links duplicate the headline */
}

/* The lead story: full measure, room to breathe, hairline rule beneath. */
#archive-container.post-archive > .entry-list-item:first-child,
#archive-container.kadence-posts-list > .entry-list-item:first-child {
	grid-column: 1 / -1;
	padding-bottom: 2.75rem;
	border-bottom: var(--iw-rule-accent);
}

#archive-container > .entry-list-item:first-child > .entry.loop-entry {
	border-top: 0;
	border-top: 3px double var(--iw-green);
	padding-top: 1.25rem;
}

#archive-container > .entry-list-item:first-child .entry-taxonomies a {
	color: var(--iw-rust);
}

#archive-container > .entry-list-item:first-child .entry-title {
	font-size: clamp(1.85rem, 4.4vw, 2.85rem);
	line-height: 1.08;
	letter-spacing: -0.015em;
	margin-bottom: 0.75rem;
}

#archive-container > .entry-list-item:first-child .entry-summary {
	font-size: 1.08rem;
	line-height: 1.6;
	color: var(--iw-ink-soft);
	max-width: 48rem;
}

@media (min-width: 64rem) {
	#archive-container > .entry-list-item:first-child > .entry.loop-entry {
		display: grid;
		grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
		column-gap: 3rem;
		align-items: start;
	}

	#archive-container > .entry-list-item:first-child .post-thumbnail {
		grid-column: 1;
		grid-row: 1;
		margin-bottom: 0;
	}

	#archive-container > .entry-list-item:first-child .post-thumbnail img {
		aspect-ratio: 16 / 10;
	}

	#archive-container > .entry-list-item:first-child .entry-content-wrap {
		grid-column: 2;
		grid-row: 1;
	}
}

/* Pagination keeps the journal voice. */
.pagination .page-numbers {
	font-family: 'Source Sans 3', system-ui, sans-serif;
	font-weight: 700;
	letter-spacing: 0.08em;
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
	background-color: var(--iw-green);
	color: var(--iw-paper);
}

/* ==========================================================================
   05. Single post and page: the reading page
   ========================================================================== */

.single-post #main,
.page #main {
	max-width: var(--iw-read);
	margin-inline: auto;
}

.entry-header .entry-title {
	font-size: clamp(1.9rem, 4.2vw, 2.7rem);
	line-height: 1.1;
	letter-spacing: -0.015em;
	margin: 0 0 0.85rem;
}

.single-entry .entry-meta,
.single-entry .entry-meta a {
	font-size: 0.76rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--iw-ink-muted);
	text-decoration: none;
}

.single-entry .entry-taxonomies a {
	color: var(--iw-violet);
	text-decoration: none;
}

.single-entry .entry-taxonomies a:hover,
.single-entry .entry-meta a:hover {
	color: var(--iw-rust);
}

.single-entry .post-thumbnail {
	margin-block: 1.75rem 2rem;
	background-color: var(--iw-paper-alt);
}

.single-entry .post-thumbnail img {
	aspect-ratio: 16 / 9;
	object-fit: cover;
	width: 100%;
}

.entry-content {
	font-size: 1.06rem;
	line-height: 1.75;
	color: var(--iw-ink-soft);
}

.entry-content > p:first-of-type {
	font-size: 1.16rem;
	line-height: 1.65;
	color: var(--iw-ink);
}

.entry-content h2 {
	font-size: 1.55rem;
	line-height: 1.2;
	margin: 2.4em 0 0.6em;
	padding-top: 0.9rem;
	border-top: var(--iw-rule-accent);
}

.entry-content h3 {
	font-size: 1.2rem;
	font-weight: 700;
	margin: 2em 0 0.5em;
	color: var(--iw-green);
}

.entry-content a {
	color: var(--iw-green);
	text-decoration: underline;
	text-decoration-thickness: 1px;
}

.entry-content a:hover {
	color: var(--iw-rust);
}

.entry-content blockquote {
	margin: 2rem 0;
	padding: 1rem 1.4rem;
	border-left: 3px solid var(--iw-violet);
	background-color: var(--iw-paper-alt);
	font-family: 'Newsreader', Georgia, serif;
	font-size: 1.14rem;
	font-style: italic;
	color: var(--iw-ink);
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.3rem;
}

.entry-content li {
	margin-bottom: 0.45rem;
}

.entry-content code,
.entry-content pre {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.9em;
	background-color: var(--iw-paper-alt);
	color: var(--iw-ink);
}

.entry-content :not(pre) > code {
	padding: 0.1em 0.35em;
	border: 1px solid var(--iw-rule);
}

.entry-content pre {
	padding: 1rem 1.15rem;
	overflow-x: auto;
	border-left: 3px solid var(--iw-green);
}

.entry-content img,
.entry-content figure img {
	height: auto;
	max-width: 100%;
}

.entry-content figcaption {
	font-size: 0.82rem;
	color: var(--iw-ink-muted);
	text-align: left;
}

.entry-tags a,
.tag-links a {
	display: inline-block;
	margin: 0 0.4rem 0.4rem 0;
	padding: 0.15rem 0.6rem;
	border: 1px solid var(--iw-rule);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--iw-violet);
	text-decoration: none;
}

.entry-tags a:hover,
.tag-links a:hover {
	border-color: var(--iw-rust);
	color: var(--iw-rust);
}

/* ==========================================================================
   06. Colophon (printed by the child theme, above Kadence's bottom bar)
   ========================================================================== */

.iw-colophon {
	background-color: var(--iw-green);
	color: var(--iw-on-green);
	margin-top: 3rem;
}

.iw-colophon-inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 2rem;
	padding-block: 3rem;
}

@media (min-width: 48rem) {
	.iw-colophon-inner {
		grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
		gap: 3rem;
	}
}

.iw-colophon .iw-footer-title {
	font-family: 'Newsreader', Georgia, serif;
	font-size: 1.6rem;
	color: #FFFFFF;
	margin: 0 0 0.85rem;
}

.iw-colophon .iw-footer-title a {
	color: #FFFFFF;
	text-decoration: none;
}

.iw-colophon p {
	margin: 0 0 0.6rem;
	max-width: 38rem;
	color: var(--iw-on-green-soft);
	font-size: 0.98rem;
	line-height: 1.65;
}

.iw-colophon .iw-footer-heading {
	color: var(--iw-on-green-accent);
	margin: 0 0 0.85rem;
}

.iw-footer-menu ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.iw-footer-menu li {
	margin: 0;
}

.iw-footer-menu a {
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--iw-on-green);
	text-decoration: none;
}

.iw-footer-menu a:hover,
.iw-footer-menu a:focus {
	color: var(--iw-on-green-accent);
	text-decoration: underline;
}

/* Kadence's own bottom bar sits inside the same green plate. */
#colophon.site-footer {
	background-color: var(--iw-green);
	border-top: 1px solid var(--iw-rule-dark);
	color: var(--iw-on-green-soft);
}

#colophon .site-footer-row-container-inner {
	background-color: transparent;
	color: var(--iw-on-green-soft);
}

#colophon .site-bottom-footer-inner-wrap {
	min-height: 0;
	padding-block: 1.15rem;
	font-size: 0.78rem;
	letter-spacing: 0.04em;
}

#colophon a,
#colophon .site-footer a {
	color: var(--iw-on-green);
	text-decoration: none;
}

#colophon a:hover {
	color: var(--iw-on-green-accent);
	text-decoration: underline;
}

/* ==========================================================================
   07. Mobile: nothing overflows at 375px
   ========================================================================== */

@media (max-width: 47.99rem) {
	.site-branding .brand.has-logo-image .custom-logo {
		width: 38px;
		height: 38px;
		max-width: 38px;
		max-height: 38px;
	}

	.site-title {
		font-size: 1.3rem;
	}

	.iw-strapline .iw-strapline-note {
		margin-left: 0;
	}

	#primary.content-area {
		padding-block: 1.75rem 3rem;
	}

	#archive-container.post-archive,
	#archive-container.kadence-posts-list {
		gap: 2rem 1.25rem;
	}

	#archive-container > .entry-list-item:first-child .entry-title {
		font-size: 1.7rem;
	}
}

img,
video,
iframe,
table {
	max-width: 100%;
}

.entry-title,
.entry-content,
.iw-colophon p {
	overflow-wrap: break-word;
}
