/**
 * Madsheets Blog
 * Every class is namespaced .msb-* so nothing collides with Hello Elementor or Elementor widgets.
 */

.msb {
	--msb-green: #2BA24C;
	--msb-green-dark: #218A3F;
	--msb-green-text: #1E7D39;   /* accessible green for small text (5.0:1 on white) */
	--msb-mint: #EAFDEF;
	--msb-heading: #444444;
	--msb-body: #555555;
	--msb-muted: #6A736E;
	--msb-line: #E6EBE8;
	--msb-font: 'Urbanist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--msb-radius: 16px;
	--msb-wrap: 1180px;
	--msb-read: 920px;           /* article measure */
	--msb-gap-top: 40px;         /* breathing room below the floating header pill */
	--msb-gap-bottom: 16px;      /* white sliver between the CTA and the mint footer */
	--msb-shadow: 0 2px 4px rgba(17,38,24,.04), 0 12px 28px rgba(17,38,24,.06);
	--msb-shadow-hover: 0 6px 12px rgba(17,38,24,.06), 0 24px 48px rgba(17,38,24,.12);

	font-family: var(--msb-font);
	color: var(--msb-body);
}

.msb *,
.msb *::before,
.msb *::after { box-sizing: border-box; }

.msb img { max-width: 100%; height: auto; display: block; }
.msb a { text-decoration: none; color: inherit; }

.msb-wrap { max-width: var(--msb-wrap); margin: 0 auto; padding: 0 24px; }
.msb-section { padding: 74px 0; }
.msb-section--feat { padding: 48px 0 0; }
/* When only one post exists the grid section is empty, so the CTA lands directly
   against the featured card. Restore the gap in that case. */
.msb-section--feat + .msb-cta { margin-top: 74px; }
.msb-empty { font-size: 17px; color: var(--msb-muted); text-align: center; padding: 8px 0; }

/* The header is a floating pill sitting 32px from the top of the page. Without
   this, the full-bleed mint hero butts straight into its rounded bottom edge. */
.msb-listing > .msb-hero:first-child,
.msb-archive > .msb-hero:first-child { margin-top: var(--msb-gap-top); }

.msb-dot {
	display: inline-block; width: 4px; height: 4px; border-radius: 50%;
	background: #C6D2CA; vertical-align: middle; flex: 0 0 4px;
}

/* ---------- buttons ---------- */
.msb-btn {
	display: inline-flex; align-items: center; gap: 9px;
	font: 700 16px/1 var(--msb-font);
	padding: 15px 30px; border-radius: 50px; border: 0;
	cursor: pointer; transition: .18s ease; text-align: center;
}
.msb-btn--primary {
	background: var(--msb-green); color: #fff;
	box-shadow: 0 6px 16px rgba(43,162,76,.25);
}
.msb-btn--primary:hover,
.msb-btn--primary:focus-visible {
	background: var(--msb-green-dark); color: #fff;
	transform: translateY(-2px); box-shadow: 0 10px 24px rgba(43,162,76,.32);
}
.msb-btn--ghost { background: #fff; color: var(--msb-green-text); border: 1.5px solid var(--msb-green); }
.msb-btn--ghost:hover, .msb-btn--ghost:focus-visible { background: var(--msb-mint); }
.msb-btn[disabled] { opacity: .55; cursor: default; transform: none; }
.msb-arrow { transition: transform .18s; flex: 0 0 auto; }
.msb-btn:hover .msb-arrow, .msb-more:hover .msb-arrow { transform: translateX(4px); }

.msb :focus-visible { outline: 3px solid var(--msb-green); outline-offset: 3px; border-radius: 4px; }

/* ---------- hero ---------- */
.msb-hero {
	background: var(--msb-mint); padding: 76px 0 84px;
	text-align: center; position: relative; overflow: hidden;
}
.msb-hero--sm { padding: 56px 0 60px; }
.msb-hero::after {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background-image:
		linear-gradient(rgba(43,162,76,.05) 1px, transparent 1px),
		linear-gradient(90deg, rgba(43,162,76,.05) 1px, transparent 1px);
	background-size: 38px 38px;
	-webkit-mask-image: radial-gradient(ellipse 70% 100% at 50% 0%, #000, transparent 75%);
	mask-image: radial-gradient(ellipse 70% 100% at 50% 0%, #000, transparent 75%);
}
.msb-hero > .msb-wrap { position: relative; z-index: 1; }
.msb-eyebrow {
	display: inline-flex; align-items: center; gap: 8px;
	background: #fff; color: var(--msb-green-text);
	font: 700 12.5px/1 var(--msb-font); letter-spacing: .1em; text-transform: uppercase;
	padding: 9px 16px; border-radius: 50px; box-shadow: 0 2px 8px rgba(17,38,24,.06);
}
.msb-hero__title {
	font: 800 clamp(34px, 5vw, 54px)/1.14 var(--msb-font);
	color: var(--msb-heading); margin: 22px auto 16px;
	max-width: 21ch; letter-spacing: -.02em; text-wrap: balance;
}
.msb-hero__text {
	font: 400 clamp(16px, 2vw, 19px)/1.65 var(--msb-font);
	color: var(--msb-body); margin: 0 auto;
	/* Wider than the 21ch heading on purpose, so short subtitles sit on one line
	   instead of wrapping into a narrow stack under a wide headline. */
	max-width: 78ch;
	text-wrap: balance;
}
.msb-hero__text p:last-child { margin-bottom: 0; }

/* ---------- category chips ---------- */
.msb-filters { border-bottom: 1px solid var(--msb-line); background: #fff; }
.msb-filters__inner {
	display: flex; gap: 10px; overflow-x: auto;
	padding: 22px 24px; scrollbar-width: none;
}
.msb-filters__inner::-webkit-scrollbar { display: none; }
.msb-chip {
	flex: 0 0 auto; font: 600 14.5px/1 var(--msb-font);
	color: var(--msb-body); background: #F5F8F6;
	padding: 11px 20px; border-radius: 50px;
	border: 1px solid transparent; transition: .15s; white-space: nowrap;
}
.msb-chip:hover { background: var(--msb-mint); color: var(--msb-green-text); }
.msb-chip[aria-current="true"] { background: var(--msb-green); color: #fff; }
.msb-chip span { opacity: .7; font-weight: 500; margin-left: 5px; }

/* ---------- image wrapper / placeholder ---------- */
.msb-ph {
	position: relative; display: block; overflow: hidden;
	background: linear-gradient(135deg, #DFF3E6, #C9EAD6 55%, #EAFDEF);
}
.msb-ph--empty::before {
	content: ""; position: absolute; inset: 0;
	background-image:
		linear-gradient(rgba(43,162,76,.14) 1px, transparent 1px),
		linear-gradient(90deg, rgba(43,162,76,.14) 1px, transparent 1px);
	background-size: 26px 26px;
}
.msb-ph img {
	position: absolute; inset: 0;
	width: 100%; height: 100%; object-fit: cover;
	transition: transform .4s ease;
}
.msb-card:hover .msb-ph img,
.msb-feat:hover .msb-ph img { transform: scale(1.03); }

/* ---------- section heading ---------- */
.msb-sechead {
	display: flex; align-items: flex-end; justify-content: space-between;
	gap: 24px; margin-bottom: 34px;
}
.msb-sechead__title {
	font: 800 clamp(22px, 2.4vw, 27px)/1.24 var(--msb-font);
	color: var(--msb-heading); margin: 0; letter-spacing: -.005em;
}
.msb-sechead p { margin: 7px 0 0; font-size: 15.5px; color: var(--msb-muted); }
.msb-sechead a { font: 700 15px/1 var(--msb-font); color: var(--msb-green-text); white-space: nowrap; }
.msb-sechead a:hover { text-decoration: underline; }

/* ---------- category pill ---------- */
.msb-tag {
	display: inline-block; align-self: flex-start;
	font: 700 11.5px/1 var(--msb-font); letter-spacing: .09em; text-transform: uppercase;
	color: var(--msb-green-text); background: var(--msb-mint);
	padding: 7px 13px; border-radius: 50px;
}
.msb-tag:hover { background: #DDF7E4; }

/* ---------- meta line ---------- */
.msb-meta {
	display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
	font: 500 13.5px/1 var(--msb-font); color: var(--msb-muted);
}

/* ---------- featured card ---------- */
.msb-feat {
	display: grid; grid-template-columns: 1.15fr 1fr; align-items: stretch;
	border: 1px solid var(--msb-line); border-radius: var(--msb-radius);
	overflow: hidden; background: #fff; box-shadow: var(--msb-shadow); transition: .2s;
}
.msb-feat:hover { box-shadow: var(--msb-shadow-hover); }
.msb-feat > * { min-width: 0; }
/* No aspect-ratio: the grid sets the width, the text column sets the height,
   and object-fit:cover crops the image to fit. */
.msb-feat__media { display: block; height: 100%; }
.msb-feat__media .msb-ph { height: 100%; min-height: 360px; }
.msb-feat__body { padding: 40px 44px; display: flex; flex-direction: column; justify-content: center; }
.msb-feat__title {
	font: 800 clamp(26px, 3.2vw, 38px)/1.22 var(--msb-font);
	color: var(--msb-heading); margin: 18px 0 14px; letter-spacing: -.018em;
}
.msb-feat__title a:hover { color: var(--msb-green-text); }
.msb-feat__excerpt { font: 400 16.5px/1.7 var(--msb-font); color: var(--msb-body); margin: 0 0 24px; }
.msb-more {
	margin-top: 24px; font: 700 15px/1 var(--msb-font); color: var(--msb-green-text);
	display: inline-flex; gap: 7px; align-items: center; align-self: flex-start;
}

/* ---------- grid ---------- */
.msb-grid { display: grid; gap: 30px; }
.msb-grid--1 { grid-template-columns: 1fr; }
.msb-grid--2 { grid-template-columns: repeat(2, 1fr); }
.msb-grid--3 { grid-template-columns: repeat(3, 1fr); }
.msb-grid--4 { grid-template-columns: repeat(4, 1fr); }

.msb-card {
	display: flex; flex-direction: column; background: #fff;
	border: 1px solid var(--msb-line); border-radius: var(--msb-radius);
	overflow: hidden; transition: .2s ease;
}
.msb-card:hover { transform: translateY(-5px); box-shadow: var(--msb-shadow-hover); border-color: #D6E4DB; }
.msb-card__media { display: block; }
.msb-card__media .msb-ph { aspect-ratio: 16 / 9; }
.msb-card__body { padding: 26px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.msb-card__title {
	font: 700 20px/1.35 var(--msb-font); color: var(--msb-heading);
	margin: 16px 0 10px; text-wrap: balance;
}
.msb-card:hover .msb-card__title { color: var(--msb-green-text); }
.msb-card__excerpt { font: 400 15px/1.65 var(--msb-font); color: var(--msb-body); margin: 0 0 20px; flex: 1; }
.msb-card__body .msb-meta { padding-top: 18px; border-top: 1px solid var(--msb-line); }

/* ---------- load more ---------- */
.msb-loadwrap { text-align: center; margin-top: 52px; }
.msb-count { display: block; margin-top: 16px; font: 500 13.5px/1 var(--msb-font); color: var(--msb-muted); }

/* ---------- pagination ---------- */
.msb-pagination { display: flex; justify-content: center; gap: 8px; margin-top: 52px; flex-wrap: wrap; }
.msb-pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 42px; height: 42px; padding: 0 14px; border-radius: 50px;
	background: #F5F8F6; color: var(--msb-body);
	font: 600 14.5px/1 var(--msb-font); transition: .15s;
}
.msb-pagination .page-numbers:hover { background: var(--msb-mint); color: var(--msb-green-text); }
.msb-pagination .page-numbers.current { background: var(--msb-green); color: #fff; }
.msb-pagination .page-numbers.dots { background: transparent; }

/* ---------- CTA band ---------- */
/* The site footer is also mint, so the two merge into one block without a break.
   A white sliver reads better than a hairline. Applied here so it's identical on
   the listing, single posts and archives. */
.msb-cta {
	background: var(--msb-mint);
	padding: 64px 0;
	margin-bottom: var(--msb-gap-bottom);
}
.msb-cta__inner {
	display: flex; align-items: center; justify-content: space-between;
	gap: 40px; flex-wrap: wrap;
}
.msb-cta__inner > div { flex: 1 1 460px; }
.msb-cta__title {
	font: 800 clamp(24px, 3vw, 34px)/1.22 var(--msb-font);
	color: var(--msb-heading); margin: 0 0 10px; letter-spacing: -.01em; text-wrap: balance;
}
.msb-cta__text { margin: 0; font-size: 17px; line-height: 1.6; color: var(--msb-body); max-width: 56ch; }

/* ============================================================
   SINGLE POST
   ============================================================ */
.msb-crumbs { padding-top: var(--msb-gap-top); font: 500 13.5px/1.5 var(--msb-font); color: var(--msb-muted); }
.msb-crumbs a { color: var(--msb-green-text); }
.msb-crumbs a:hover { text-decoration: underline; }
.msb-crumbs__sep { margin: 0 9px; opacity: .5; }

.msb-posthead { max-width: var(--msb-read); margin: 0 auto; padding: 34px 24px 0; text-align: center; }
.msb-posthead .msb-tag { align-self: center; }
.msb-posthead__title {
	font: 800 clamp(30px, 4.4vw, 52px)/1.16 var(--msb-font);
	color: var(--msb-heading); margin: 20px auto 18px;
	letter-spacing: -.02em; max-width: 22ch; text-wrap: balance;
}
.msb-byline {
	display: flex; align-items: center; justify-content: center;
	gap: 12px; flex-wrap: wrap; font: 500 14.5px/1 var(--msb-font); color: var(--msb-muted);
}
.msb-avatar {
	width: 40px; height: 40px; border-radius: 50%;
	background: var(--msb-green); color: #fff;
	display: grid; place-items: center; font: 800 15px/1 var(--msb-font); flex: 0 0 40px;
}
.msb-avatar--lg { width: 58px; height: 58px; font-size: 20px; flex: 0 0 58px; }

/* hero image stays at full container width even though the text is narrower */
.msb-posthero { max-width: var(--msb-wrap); margin: 38px auto 0; padding: 0 24px; }
.msb-posthero img { width: 100%; border-radius: var(--msb-radius); }

.msb-article {
	max-width: var(--msb-read); margin: 0 auto; padding: 52px 24px 20px;
	font: 400 19px/1.8 var(--msb-font); color: var(--msb-body);
}
.msb-article > * + * { margin-top: 1.45em; }
.msb-article > :first-child { margin-top: 0; }
.msb-article h2 {
	font: 800 32px/1.26 var(--msb-font); color: var(--msb-heading);
	margin-top: 2.2em; letter-spacing: -.015em;
}
.msb-article h3 { font: 700 23px/1.34 var(--msb-font); color: var(--msb-heading); margin-top: 2em; }
.msb-article h4 { font: 700 20px/1.4 var(--msb-font); color: var(--msb-heading); margin-top: 1.8em; }
.msb-article a { color: var(--msb-green-text); font-weight: 600; border-bottom: 1.5px solid rgba(43,162,76,.35); }
.msb-article a:hover { border-bottom-color: var(--msb-green); }
.msb-article ul, .msb-article ol { padding-left: 1.3em; }
.msb-article li + li { margin-top: .6em; }
.msb-article li::marker { color: var(--msb-green); }
.msb-article blockquote {
	margin: 2em 0; padding: 24px 30px; background: var(--msb-mint);
	border-left: 4px solid var(--msb-green); border-radius: 0 12px 12px 0;
	font: 600 19px/1.6 var(--msb-font); color: var(--msb-heading);
}
.msb-article blockquote > :first-child { margin-top: 0; }
.msb-article blockquote > :last-child { margin-bottom: 0; }
.msb-article figure { margin: 2.2em 0; }
.msb-article figure img, .msb-article img { border-radius: 12px; }
.msb-article figcaption {
	margin-top: 12px; font: 500 14px/1.5 var(--msb-font);
	color: var(--msb-muted); text-align: center;
}
.msb-article code {
	background: #F2F6F3; border: 1px solid var(--msb-line); border-radius: 5px;
	padding: 2px 7px; font: 500 .88em/1 ui-monospace, 'SFMono-Regular', Menlo, monospace;
	color: #1d6b34; overflow-wrap: break-word;
}
.msb-article pre {
	background: #F2F6F3; border: 1px solid var(--msb-line); border-radius: 12px;
	padding: 20px 22px; overflow-x: auto; font-size: 15px;
}
.msb-article pre code { background: none; border: 0; padding: 0; }
.msb-article table { width: 100%; border-collapse: collapse; font-size: 16px; }
.msb-article th, .msb-article td { padding: 12px 14px; border: 1px solid var(--msb-line); text-align: left; }
.msb-article th { background: #F7FBF8; color: var(--msb-heading); font-weight: 700; }

.msb-share {
	max-width: var(--msb-read); margin: 0 auto; padding: 34px 24px;
	border-top: 1px solid var(--msb-line);
	display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.msb-share > span { font: 700 14.5px/1 var(--msb-font); color: var(--msb-heading); }
.msb-sbtn {
	width: 40px; height: 40px; border-radius: 50%;
	background: #F5F8F6; color: var(--msb-body); border: 0; cursor: pointer;
	display: grid; place-items: center; transition: .15s;
}
.msb-sbtn:hover { background: var(--msb-green); color: #fff; }
.msb-copied { font: 600 13.5px/1 var(--msb-font); color: var(--msb-green-text); }

.msb-authorbox { max-width: var(--msb-read); margin: 8px auto 0; padding: 0 24px; }
.msb-authorbox__inner {
	display: flex; gap: 20px; align-items: flex-start; padding: 28px;
	background: #fff; border: 1px solid var(--msb-line); border-radius: var(--msb-radius);
}
.msb-authorbox__name { margin: 0 0 6px; font: 800 17.5px/1.2 var(--msb-font); color: var(--msb-heading); }
.msb-authorbox p { margin: 0; font-size: 15.5px; line-height: 1.65; }

.msb-comments { padding: 56px 24px 0; }
.msb-pagelinks { margin-top: 2em; font-weight: 600; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
	.msb-feat { grid-template-columns: 1fr; }
	.msb-feat__media .msb-ph { min-height: 0; aspect-ratio: 1200 / 630; }
	.msb-feat__body { padding: 32px 30px; }
	.msb-grid--3, .msb-grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
	.msb-grid--2, .msb-grid--3, .msb-grid--4 { grid-template-columns: 1fr; }
	.msb-section { padding: 52px 0; }
	.msb-hero { padding: 56px 0 60px; }
	.msb-sechead { flex-direction: column; align-items: flex-start; }
	.msb-cta__inner { flex-direction: column; align-items: flex-start; }
	/* In a column flex container, flex-basis controls HEIGHT — so the desktop
	   `flex: 1 1 460px` was forcing a 460px-tall text block on mobile. */
	.msb-cta__inner > div { flex: 0 1 auto; }
	.msb-cta { padding: 48px 0; }
	.msb-article { font-size: 17px; }
	.msb-article h2 { font-size: 25px; }
	.msb-article h3 { font-size: 21px; }
	.msb-article blockquote { padding: 20px 22px; font-size: 17.5px; }
	.msb-authorbox__inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
	.msb *, .msb *::before, .msb *::after {
		transition-duration: .01ms !important;
		animation-duration: .01ms !important;
	}
	.msb-card:hover { transform: none; }
}

/* ============================================================
   THEME OVERRIDE ARMOUR
   Elementor's Theme Style writes `.elementor-kit-N a` and
   `.elementor-kit-N h1..h6` — specificity (0,1,1) — which beats a
   single class like `.msb-tag` (0,1,0) and silently greys out every
   link in this plugin. These rules restate the same values at
   (0,2,x) so they win outright, regardless of stylesheet order.
   Nothing here is new design; it is the same values, made to stick.
   ============================================================ */

/* Links inherit their container's colour unless stated below. */
.msb a { color: inherit; }

/* Buttons */
.msb a.msb-btn--primary,
.msb button.msb-btn--primary { background: var(--msb-green); color: #fff; }
.msb a.msb-btn--primary:hover,
.msb a.msb-btn--primary:focus-visible,
.msb button.msb-btn--primary:hover { background: var(--msb-green-dark); color: #fff; }
.msb a.msb-btn--ghost,
.msb button.msb-btn--ghost { background: #fff; color: var(--msb-green-text); }
.msb a.msb-btn--ghost:hover,
.msb button.msb-btn--ghost:hover { background: var(--msb-mint); color: var(--msb-green-text); }

/* Green small text */
.msb a.msb-tag { color: var(--msb-green-text); }
.msb a.msb-more { color: var(--msb-green-text); }
.msb .msb-sechead a { color: var(--msb-green-text); }
.msb .msb-crumbs a { color: var(--msb-green-text); }
.msb .msb-article a { color: var(--msb-green-text); }
.msb .msb-copied { color: var(--msb-green-text); }

/* Chips */
.msb a.msb-chip { color: var(--msb-body); }
.msb a.msb-chip:hover { color: var(--msb-green-text); }
.msb a.msb-chip[aria-current="true"] { background: var(--msb-green); color: #fff; }

/* Card + featured titles keep the heading colour, not the global link colour */
.msb .msb-card__title,
.msb .msb-card__title a { color: var(--msb-heading); }
.msb .msb-card:hover .msb-card__title,
.msb .msb-card:hover .msb-card__title a { color: var(--msb-green-text); }
.msb .msb-feat__title,
.msb .msb-feat__title a { color: var(--msb-heading); }
.msb .msb-feat__title a:hover { color: var(--msb-green-text); }

/* Share buttons */
.msb a.msb-sbtn,
.msb button.msb-sbtn { color: var(--msb-body); background: #F5F8F6; }
.msb a.msb-sbtn:hover,
.msb button.msb-sbtn:hover { color: #fff; background: var(--msb-green); }

/* Headings */
.msb .msb-hero__title,
.msb .msb-posthead__title,
.msb .msb-sechead__title,
.msb .msb-cta__title,
.msb .msb-authorbox__name,
.msb .msb-article h2,
.msb .msb-article h3,
.msb .msb-article h4 { color: var(--msb-heading); }

/* The [[bracketed]] part of a heading, rendered brand green */
.msb .msb-accent { font-style: normal; color: var(--msb-green); }

/* Pagination */
.msb .msb-pagination a.page-numbers { color: var(--msb-body); }
.msb .msb-pagination a.page-numbers:hover { color: var(--msb-green-text); }
.msb .msb-pagination .page-numbers.current { background: var(--msb-green); color: #fff; }
