/**
 * VMT Reading Guide — editorial styling (divi-child 1.6.2 visual refinement).
 *
 * Warm & inviting, editorial, modern — an independent-bookshop feel rather than
 * a SaaS dashboard. Keeps the brand palette (teal #0d6976, gold #cc8614) but
 * warms the surfaces to cream, leans on the gold accent, uses a web-safe serif
 * for titles/headings, and gives every grid card a consistent fixed cover box.
 *
 * Scoped under .vmt-rg so it coexists with Divi. Structure/markup unchanged from
 * 1.6.x — this pass is styling only.
 *
 * @package divi-child
 */

.vmt-rg {
	/* Brand */
	--rg-teal: #0d6976;
	--rg-teal-dark: #094e58;
	--rg-gold: #cc8614;
	--rg-gold-deep: #a96c0d;
	--rg-gold-tint: rgba(204, 134, 20, 0.12);

	/* Warm neutrals */
	--rg-cream: #f6f1e8;        /* page background */
	--rg-card: #fffdf9;         /* card / panel surface */
	--rg-cover-frame: #efe8da;  /* consistent frame behind contained covers */
	--rg-ink: #33302b;
	--rg-muted: #7c7466;
	--rg-line: #e7dfd0;

	--rg-radius: 10px;
	--rg-radius-sm: 7px;
	/* Warm-toned shadows (brown cast, not cool blue) */
	--rg-shadow: 0 12px 30px rgba(120, 92, 45, 0.14);
	--rg-shadow-sm: 0 4px 14px rgba(120, 92, 45, 0.09);

	--rg-serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, serif;

	color: var(--rg-ink);
}

/* Warm page background on the Reading Guide templates (collection + book).
   Divi paints the visible page surface on <body>; the inner wrappers are
   transparent, so the cream goes on the body (scoped to these templates). */
body.page-template-page-reading-guide,
body.single-reading_guide_book {
	/* Literal (not var(--rg-cream)): the vars are scoped to .vmt-rg, not body. */
	background-color: #f6f1e8;
}

/* Green "Reading Guide" hero bar on book pages — matches the Divi Theme Builder
   bar on the collection pages EXACTLY (measured on /finance-fundraising/): a
   full-bleed #0d6976 section with 10px top padding, whose inner row (Divi
   `.container`: 1024px wide, left 128, max 1200) carries 40px top + 32px bottom
   padding, and a 74px / 700 heading — white, line-height 1, left-aligned, 10px
   below it. Font-family is inherited (Divi's global Manrope, already loaded on
   book pages), same as the Divi module. Total bar height ≈ 166px, identical to
   the Divi section. Responsive font steps mirror Divi's module exactly:
   74 / 40 / 25 px at desktop / ≤980 / ≤767. The title stays a <span> (not an
   <h1>) so the book title remains the page's only H1. */
.vmt-rg-topbar {
	background-color: #0d6976;
	padding-top: 10px;
}
.vmt-rg-topbar .container {
	padding-top: 40px;
	padding-bottom: 32px;
}
.vmt-rg-topbar__title {
	display: block;
	margin: 0;
	color: #fff;
	font-size: 74px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: normal;
	padding-bottom: 10px;
}
@media (max-width: 980px) {
	.vmt-rg-topbar__title { font-size: 40px; }
}
@media (max-width: 767px) {
	.vmt-rg-topbar__title { font-size: 25px; }
}

/* ------------------------------------------------------------------ */
/* Breadcrumb                                                          */
/* ------------------------------------------------------------------ */
.vmt-rg-breadcrumb {
	font-size: 13.5px;
	color: var(--rg-muted);
	margin: 24px 0 30px;
	line-height: 1.6;
	letter-spacing: 0.01em;
}
.vmt-rg-breadcrumb a { color: var(--rg-teal); text-decoration: none; border-bottom: 1px solid transparent; }
.vmt-rg-breadcrumb a:hover { color: var(--rg-gold-deep); border-bottom-color: var(--rg-gold); }
.vmt-rg-breadcrumb .sep { margin: 0 9px; color: #cabfa8; }
.vmt-rg-breadcrumb .current { color: var(--rg-ink); }

/* ------------------------------------------------------------------ */
/* Book detail page — balanced, centered editorial column             */
/* ------------------------------------------------------------------ */
/* Book content shares the exact Divi `.container` width + left edge as the
   collection pages (A–Z etc.), so the two line up. The 2-column layout below
   (fixed 220px cover + fluid body) fills the width with no right-hand void, so
   no editorial max-width cap is needed — it was what pushed the book column
   narrower and 42px to the right of the collection column and the green bar.
   padding-top matches the collection pages' top rhythm — the `#main-content`
   prefix is needed to out-specify Divi's own
   `body:not(.et-tb) #main-content .container { padding-top: 58px }` (1,2,1). */
#main-content .container.vmt-rg.vmt-rg-book { padding-top: 40px; }
.vmt-rg.vmt-rg-book { padding-bottom: 72px; }

.vmt-rg-book__layout {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr);
	gap: 48px;
	align-items: start;
	margin-bottom: 64px;
}
.vmt-rg-book__media { position: sticky; top: 32px; }

.vmt-rg-book__cover {
	border-radius: var(--rg-radius);
	overflow: hidden;
	box-shadow: var(--rg-shadow);
	background: var(--rg-cover-frame);
	aspect-ratio: 2 / 3;
	display: flex;
	align-items: center;
	justify-content: center;
}
/* General rule for ALL covers (no per-book handling): `contain` + centered on
   the matte frame, so the whole cover always shows. True-portrait covers (~2:3)
   fill the box edge-to-edge and look unchanged; landscape / square / near-square
   covers sit centered as framed art on the matte instead of being cropped by
   `object-fit: cover`. `width/height: auto` lets the <img> box shrink to the
   contained pixels so the shadow reads as a frame, not the whole panel. */
.vmt-rg-book__cover-img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
}

/* Recessive fallback: muted, warm, quiet serif + a faint open-book mark. */
.vmt-rg-book__cover-fallback,
.vmt-rg-card__cover-fallback {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 22px 18px;
	text-align: center;
	background: linear-gradient(170deg, #efe8da 0%, #e6dccb 100%);
	color: #8a8069;
	border: 1px solid var(--rg-line);
}
.vmt-rg-book__cover-fallback::before,
.vmt-rg-card__cover-fallback::before {
	content: "";
	width: 34px;
	height: 34px;
	background: no-repeat center / contain
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b3a68c' stroke-width='1.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 6C9.5 4.5 6.5 4.5 3.5 5.6v12.2c3-1.1 6-1.1 8.5.4'/%3E%3Cpath d='M12 6c2.5-1.5 5.5-1.5 8.5-.4v12.2c-3-1.1-6-1.1-8.5.4'/%3E%3Cline x1='12' y1='6' x2='12' y2='18.2'/%3E%3C/svg%3E");
	opacity: 0.85;
}
.vmt-rg-book__cover-fallback-title,
.vmt-rg-card__cover-fallback-title {
	font-family: var(--rg-serif);
	font-size: 17px;
	line-height: 1.3;
	color: #6f6653;
	font-weight: 400;
}
.vmt-rg-book__cover-fallback-author { font-size: 13px; opacity: 0.8; }
.vmt-rg-book__cover-fallback::after,
.vmt-rg-card__cover-fallback::after {
	content: "Cover coming";
	font-size: 10.5px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #a99c82;
	margin-top: 2px;
}

.vmt-rg-btn {
	display: block;
	text-align: center;
	margin-top: 18px;
	padding: 13px 18px;
	border-radius: var(--rg-radius-sm);
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
	transition: background-color 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
}
.vmt-rg-btn--buy { background: var(--rg-gold); color: #fff; box-shadow: var(--rg-shadow-sm); }
.vmt-rg-btn--buy:hover { background: var(--rg-gold-deep); color: #fff; box-shadow: var(--rg-shadow); }
.vmt-rg-btn--buy:active { transform: translateY(1px); }
.vmt-rg-book__buy-note {
	display: block;
	text-align: center;
	margin-top: 8px;
	font-size: 12px;
	color: var(--rg-muted);
}

/* Head */
.vmt-rg-tag {
	display: inline-block;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--rg-gold-deep);
	background: var(--rg-gold-tint);
	padding: 5px 13px;
	border-radius: 999px;
	text-decoration: none;
	margin-bottom: 16px;
}
.vmt-rg-tag:hover { background: rgba(204, 134, 20, 0.2); color: var(--rg-gold-deep); }

.vmt-rg-book__title {
	font-family: var(--rg-serif);
	font-size: 40px;
	line-height: 1.15;
	font-weight: 700;
	color: var(--rg-ink);
	margin: 0 0 10px;
	letter-spacing: -0.01em;
}
.vmt-rg-book__author { font-size: 19px; color: var(--rg-muted); margin: 0 0 8px; font-style: italic; }

.vmt-rg-book__section { margin-top: 42px; }
.vmt-rg-book__h {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--rg-gold-deep);
	margin: 0 0 16px;
	padding-bottom: 11px;
	border-bottom: 2px solid var(--rg-line);
}
.vmt-rg-prose { font-size: 18px; line-height: 1.8; color: #45403a; }
.vmt-rg-prose p { margin: 0 0 1.1em; }
.vmt-rg-prose p:last-child { margin-bottom: 0; }

/* Also-appears-in chips */
.vmt-rg-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
/* Divi's Theme-Builder content rule
   `#left-area ul, .entry-content ul, .et-l--body ul { list-style: disc }` (0,1,1)
   outranks a bare `.vmt-rg-chips`/`.vmt-rg-parts { list-style:none }` (0,1,0) on
   the collection pages (which render INSIDE the TB body), painting black dots.
   Re-assert none at higher specificity. The intentional `.vmt-rg-provides` intro
   bullets are deliberately excluded and keep their gold marker. */
.vmt-rg ul.vmt-rg-chips,
.vmt-rg ul.vmt-rg-parts { list-style: none; padding-left: 0; }
.vmt-rg-chip {
	display: inline-block;
	font-size: 14px;
	color: var(--rg-teal-dark);
	background: var(--rg-card);
	border: 1px solid var(--rg-line);
	padding: 8px 15px;
	border-radius: 999px;
	text-decoration: none;
	transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
/* Only genuine links (anchors) get the interactive button hover. Pure-label
   chips are rendered as <span class="vmt-rg-chip--plain"> (e.g. the Essential
   Twelve "Together, these twelve cover" labels), so they stay static and
   non-clickable — no hover state, default cursor (set on --plain below). */
a.vmt-rg-chip:hover { border-color: var(--rg-gold); background: var(--rg-gold-tint); color: var(--rg-gold-deep); }

/* ------------------------------------------------------------------ */
/* Book card (collection views)                                       */
/* ------------------------------------------------------------------ */
.vmt-rg-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 26px;
	align-items: stretch;
	/* Every card matches the tallest in the grid: 1fr row tracks all take the
	   max row height, and the flex-column card (height:100% + body flex:1)
	   fills it — shorter blurbs get bottom whitespace instead of a short card. */
	grid-auto-rows: 1fr;
}
.vmt-rg-card { height: 100%; }
.vmt-rg-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--rg-card);
	border: 1px solid var(--rg-line);
	border-radius: var(--rg-radius);
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	box-shadow: var(--rg-shadow-sm);
	transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.vmt-rg-card__link:hover {
	box-shadow: var(--rg-shadow);
	transform: translateY(-4px);
	border-color: #ddd2bd;
}

/* Fixed, consistent cover box — every card's cover fills the same frame. */
.vmt-rg-card__cover {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 152px;
	padding: 14px;
	background: var(--rg-cover-frame);
	border-bottom: 1px solid var(--rg-line);
}
.vmt-rg-card__img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
	box-shadow: 0 3px 10px rgba(120, 92, 45, 0.18);
	border-radius: 3px;
}
/* Fallback fills the same fixed box, quietly. */
.vmt-rg-card__cover-fallback {
	height: 100%;
	padding: 14px;
	border: none;
	gap: 7px;
}
.vmt-rg-card__cover-fallback::before { width: 26px; height: 26px; }
.vmt-rg-card__cover-fallback-title { font-size: 14px; }
.vmt-rg-card__cover-fallback::after { font-size: 9.5px; }

.vmt-rg-card__body { padding: 15px 16px 18px; display: flex; flex-direction: column; gap: 5px; flex: 1 1 auto; }
.vmt-rg-card__title {
	font-family: var(--rg-serif);
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--rg-ink);
	text-underline-offset: 3px;
}
.vmt-rg-card__link:hover .vmt-rg-card__title {
	text-decoration: underline;
	text-decoration-color: var(--rg-gold);
	text-decoration-thickness: 2px;
}
.vmt-rg-card__author { font-size: 13px; color: var(--rg-muted); font-style: italic; }
.vmt-rg-card__pull {
	font-size: 14px;
	color: #55504a;
	line-height: 1.55;
	margin-top: 5px;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ================================================================== */
/* Collection views (hub, A–Z, Essential, Founders, Mentors, Part)     */
/* ================================================================== */
.vmt-rg-collection { padding-bottom: 60px; }

.vmt-rg-hero { margin: 8px 0 34px; }
.vmt-rg-hero__eyebrow {
	display: block;
	font-size: 12.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
	color: var(--rg-gold-deep); margin-bottom: 10px;
}
.vmt-rg-hero__title {
	font-family: var(--rg-serif);
	font-size: 42px; line-height: 1.12; font-weight: 700; color: var(--rg-ink); margin: 0;
	letter-spacing: -0.01em;
}
.vmt-rg-hero__lead { font-size: 19px; color: var(--rg-muted); margin: 14px 0 0; max-width: 62ch; line-height: 1.55; }

/* Intro block */
.vmt-rg-intro { max-width: 70ch; margin: 0 0 44px; }
.vmt-rg-intro .vmt-rg-prose { font-size: 18px; }
/* Clean bulleted list (overrides Divi's `ul{list-style:none}` reset); no
   decorative quote mark. Gold bullet marker keeps it on-brand. */
.vmt-rg-provides { margin: 20px 0; padding-left: 1.4em; list-style: disc; }
.vmt-rg-provides li {
	list-style: disc;
	font-size: 16px;
	line-height: 1.6;
	color: #45403a;
	margin-bottom: 8px;
}
.vmt-rg-provides li::marker { color: var(--rg-gold); }

/* Founder / mentor split — warmed, with a gold accent + arrow */
.vmt-rg-split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 0 0 34px; }
.vmt-rg-split__card {
	position: relative;
	display: flex; flex-direction: column; gap: 9px;
	padding: 30px 30px 32px;
	border-radius: var(--rg-radius);
	text-decoration: none;
	background: linear-gradient(150deg, #147985 0%, var(--rg-teal-dark) 100%);
	color: #fff;
	border-bottom: 3px solid var(--rg-gold);
	box-shadow: var(--rg-shadow-sm);
	overflow: hidden;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.vmt-rg-split__card:hover { transform: translateY(-4px); box-shadow: var(--rg-shadow); color: #fff; }
.vmt-rg-split__card::after {
	content: "\2192";
	position: absolute; right: 26px; bottom: 24px;
	color: var(--rg-gold); font-size: 26px; line-height: 1;
	transform: translateX(-4px); opacity: 0.85;
	transition: transform 0.2s ease, opacity 0.2s ease;
}
.vmt-rg-split__card:hover::after { transform: translateX(0); opacity: 1; }
.vmt-rg-split__title { font-family: var(--rg-serif); font-size: 24px; font-weight: 700; }
.vmt-rg-split__desc { font-size: 15px; opacity: 0.92; line-height: 1.5; max-width: 34ch; }

/* Quicklinks row */
.vmt-rg-quicklinks { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 48px; }

/* Parts list */
.vmt-rg-parts { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); gap: 14px; }
.vmt-rg-parts__item a {
	display: flex; flex-direction: column; gap: 3px;
	padding: 19px 21px; border: 1px solid var(--rg-line); border-radius: var(--rg-radius);
	background: var(--rg-card); text-decoration: none;
	box-shadow: var(--rg-shadow-sm);
	transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.vmt-rg-parts__item a:hover { border-color: var(--rg-gold); box-shadow: var(--rg-shadow); transform: translateY(-2px); }
.vmt-rg-parts__label { font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--rg-gold-deep); }
.vmt-rg-parts__name { font-family: var(--rg-serif); font-size: 18px; font-weight: 700; color: var(--rg-ink); }
/* Theme line reads as a clearly-secondary tagline. */
.vmt-rg-parts__theme { font-size: 13.5px; color: var(--rg-muted); font-style: italic; line-height: 1.4; }
.vmt-rg-parts__count { font-size: 12px; color: #a99c82; margin-top: 5px; letter-spacing: 0.02em; }

/* Landing tiles */
.vmt-rg-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 340px)); gap: 24px; }
.vmt-rg-tile {
	display: flex; flex-direction: column; gap: 10px; padding: 30px;
	border: 1px solid var(--rg-line); border-radius: var(--rg-radius); background: var(--rg-card);
	text-decoration: none; box-shadow: var(--rg-shadow-sm);
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.vmt-rg-tile:hover { transform: translateY(-4px); box-shadow: var(--rg-shadow); border-color: var(--rg-gold); }
.vmt-rg-tile__icon { font-size: 34px; }
.vmt-rg-tile__title { font-family: var(--rg-serif); font-size: 22px; font-weight: 700; color: var(--rg-ink); }
.vmt-rg-tile__desc { font-size: 15px; color: var(--rg-muted); line-height: 1.55; }
.vmt-rg-tile__cta { margin-top: 6px; font-weight: 600; color: var(--rg-gold-deep); }

/* Sections (founders / mentors / part) */
.vmt-rg-sec { margin: 46px 0; scroll-margin-top: 90px; }
.vmt-rg-sec__title { font-family: var(--rg-serif); font-size: 26px; font-weight: 700; color: var(--rg-ink); margin: 0 0 6px; }
.vmt-rg-sec__sub { font-size: 16px; color: var(--rg-muted); margin: 0 0 22px; max-width: 70ch; line-height: 1.55; }

/* "Together these cover" (essential) */
.vmt-rg-together { margin-top: 50px; padding-top: 34px; border-top: 2px solid var(--rg-line); }
.vmt-rg-chips--static { margin-top: 18px; }
.vmt-rg-chip--plain { background: var(--rg-gold-tint); border-color: transparent; color: var(--rg-gold-deep); cursor: default; }

.vmt-rg-empty { color: var(--rg-muted); font-style: italic; }

/* ------------------------------------------------------------------ */
/* Responsive                                                         */
/* ------------------------------------------------------------------ */
@media (max-width: 782px) {
	.vmt-rg-book__layout { grid-template-columns: 1fr; gap: 28px; }
	.vmt-rg-book__media { position: static; max-width: 220px; margin: 0 auto; }
	.vmt-rg-book__title { font-size: 31px; }
	.vmt-rg-hero__title { font-size: 31px; }
	.vmt-rg-prose { font-size: 17px; }
	.vmt-rg-split { grid-template-columns: 1fr; }
	.vmt-rg-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; }
	.vmt-rg-card__cover { height: 132px; padding: 11px; }
}
