/* =========================================================================
   Ridge Haven Homestead — Modern theme
   Paired with themes/modern/*.php templates (all classes prefixed m-).
   style.css still loads first for shared post-content styling; this file
   sets the page chrome and layout, and tunes that content to match.

   Palette: the original greens kept as brand colours (#5a8f3c accent,
   #93c193 sage) on a warm cream base, with deep forest green replacing
   the old black for dark surfaces.
   ========================================================================= */

.theme-modern {
    --cream: #f7f4ed;
    --cream-2: #efe9dc;
    --paper: #ffffff;
    --sage: #93c193;
    --sage-soft: #e7efdf;
    --green: #5a8f3c;
    --green-dark: #3f6b2a;
    --forest: #1d2a1b;
    --forest-2: #263826;
    --ink: #1c211a;
    --text: #4a4a40;
    --muted: #7d7a6f;
    --line: rgba(29, 42, 27, 0.1);
    --line-strong: rgba(29, 42, 27, 0.18);

    /* keep shared style.css tokens in step */
    --text-strong: var(--ink);
    --link: var(--ink);
    --body-bg: var(--cream);
    --surface: var(--paper);
    --surface-alt: #f6f3ec;
    --border: var(--line);
    --accent: var(--green);
    --accent-dark: var(--green-dark);
    --accent-soft: var(--sage-soft);
    --meta-color: var(--muted);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;

    --display: "Fraunces", Georgia, "Times New Roman", serif;
    --sans: "Inter", -apple-system, "system-ui", "Segoe UI", sans-serif;

    --r-sm: 10px;
    --r-md: 16px;
    --r-lg: 24px;
    --r-xl: 32px;
    --shadow-1: 0 1px 2px rgba(29, 42, 27, 0.05), 0 0 0 1px rgba(29, 42, 27, 0.06);
    --shadow-2: 0 24px 48px -24px rgba(29, 42, 27, 0.35), 0 0 0 1px rgba(29, 42, 27, 0.06);
    --shadow-3: 0 40px 80px -30px rgba(29, 42, 27, 0.45);
    --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
    --header-h: 76px;
    --gutter: clamp(16px, 4vw, 40px);
}

/* -------------------------------------------------------------------------
   Base
   ------------------------------------------------------------------------- */
html:has(.theme-modern) { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
html.m-lock { overflow: hidden; }

body.theme-modern {
    margin: 0;
    background: var(--cream);
    color: var(--text);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
.theme-modern h1, .theme-modern h2, .theme-modern h3, .theme-modern h4 {
    font-family: var(--display);
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.02em;
    font-optical-sizing: auto;
}
.theme-modern ::selection { background: #cfe3c0; color: var(--ink); }
.theme-modern :focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }
.theme-modern .m-icon { flex: none; display: block; }

.m-container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); box-sizing: border-box; }
.m-container--narrow { max-width: calc(760px + 2 * var(--gutter)); }
.m-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.m-skip {
    position: absolute; left: 16px; top: -60px; z-index: 200;
    background: var(--forest); color: #fff; padding: 10px 16px; border-radius: 999px; font-weight: 600;
}
.m-skip:focus { top: 12px; }

.m-eyebrow {
    display: inline-flex; align-items: center; gap: 0.7em;
    margin: 0 0 0.9rem;
    font-family: var(--sans);
    font-size: 0.75rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--green);
}
.m-eyebrow::before { content: ""; width: 26px; height: 2px; border-radius: 2px; background: currentColor; }
.m-eyebrow--light { color: var(--sage); }

/* Buttons */
.m-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
    padding: 0.85em 1.5em;
    border: 1px solid transparent; border-radius: 999px;
    font-family: var(--sans); font-size: 0.95rem; font-weight: 600; line-height: 1.1;
    text-decoration: none; cursor: pointer; white-space: nowrap;
    transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.m-btn:hover { transform: translateY(-1px); }
.m-btn .m-icon { transition: transform 0.25s var(--ease); }
.m-btn:hover .m-icon { transform: translateX(3px); }
.m-btn--sm { padding: 0.65em 1.15em; font-size: 0.85rem; }
.m-btn--primary { background: var(--forest); color: #fff; }
.m-btn--primary:hover { background: var(--green-dark); box-shadow: 0 10px 22px -10px rgba(63, 107, 42, 0.7); }
.m-btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.m-btn--ghost:hover { border-color: var(--ink); }
.m-btn--light { background: #fff; color: var(--forest); }
.m-btn--light:hover { background: var(--sage-soft); }
.m-btn--ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.m-btn--ghost-light:hover { border-color: #fff; }

.m-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; padding: 0;
    border: 1px solid var(--line); border-radius: 50%;
    background: var(--paper); color: var(--ink); cursor: pointer;
    transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.m-icon-btn:hover, .m-icon-btn[aria-expanded="true"] { border-color: var(--line-strong); background: var(--sage-soft); }

.m-link-arrow {
    display: inline-flex; align-items: center; gap: 0.4em;
    font-size: 0.92rem; font-weight: 600; color: var(--green-dark); text-decoration: none; white-space: nowrap;
}
.m-link-arrow .m-icon { transition: transform 0.25s var(--ease); }
.m-link-arrow:hover .m-icon { transform: translateX(4px); }
.m-link-arrow--light { color: var(--sage); }

/* -------------------------------------------------------------------------
   Header
   ------------------------------------------------------------------------- */
.m-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 120; pointer-events: none; }
.m-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--sage)); transform-origin: left; transform: scaleX(0); }

.m-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(247, 244, 237, 0.86);
    -webkit-backdrop-filter: saturate(1.5) blur(16px);
    backdrop-filter: saturate(1.5) blur(16px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.m-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 8px 24px -18px rgba(29, 42, 27, 0.4); }
.m-header__inner { display: flex; align-items: center; gap: 2rem; height: var(--header-h); }

.m-brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--forest); flex: none; }
.m-brand__mark { width: 40px; height: 40px; color: var(--forest); flex: none; }
.m-brand__text { display: flex; flex-direction: column; line-height: 1; }
.m-brand__name { font-family: var(--display); font-size: 1.32rem; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.m-brand__sub { margin-top: 4px; font-size: 0.66rem; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--green); }
.m-brand--light .m-brand__mark { color: var(--sage); }
.m-brand--light .m-brand__name { color: #fff; }
.m-brand--light .m-brand__sub { color: var(--sage); }

.m-nav { margin-left: auto; }
.m-nav__list { display: flex; align-items: center; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.m-nav__list > li { position: relative; }
.m-nav__list > li > a, .m-nav__trigger {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.55rem 0.9rem; border-radius: 999px;
    border: 0; background: none; cursor: pointer;
    font-family: var(--sans); font-size: 0.93rem; font-weight: 500; color: var(--ink); text-decoration: none;
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.m-nav__list > li > a:hover, .m-nav__trigger:hover, .m-nav__trigger[aria-expanded="true"] { background: rgba(29, 42, 27, 0.06); }
.m-nav__list > li > a[aria-current="page"] { color: var(--green-dark); background: var(--sage-soft); }
.m-nav__trigger .m-icon { transition: transform 0.25s var(--ease); }
.m-nav__trigger[aria-expanded="true"] .m-icon { transform: rotate(180deg); }

.m-header__actions { display: flex; align-items: center; gap: 0.6rem; }
.m-menu-btn { display: none; }

/* Mega menu */
.m-mega {
    position: absolute; top: calc(100% + 14px); left: 50%;
    width: min(760px, calc(100vw - 32px));
    padding: 1rem;
    background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow-3), 0 0 0 1px var(--line);
    opacity: 0; visibility: hidden; transform: translate(-50%, 8px);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
}
.m-mega.is-open { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.m-mega__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.25rem; }
.m-mega__item { color: inherit; display: flex; align-items: center; gap: 0.9rem; padding: 0.6rem; border-radius: var(--r-md); text-decoration: none; transition: background 0.2s var(--ease); }
.m-mega__item:hover { background: var(--cream); }
.m-mega__thumb { flex: none; width: 58px; height: 58px; border-radius: 14px; overflow: hidden; background: var(--sage-soft); }
.m-mega__thumb img { width: 100%; height: 100%; object-fit: cover; }
.m-mega__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.m-mega__text strong { font-family: var(--display); font-size: 1.05rem; font-weight: 600; color: var(--ink); }
.m-mega__text small { font-size: 0.8rem; line-height: 1.4; color: var(--muted); }
.m-mega__foot {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    margin-top: 0.75rem; padding: 0.9rem 0.75rem 0.25rem; border-top: 1px solid var(--line);
    font-size: 0.85rem; color: var(--muted);
}
.m-mega__foot a { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 600; color: var(--green-dark); text-decoration: none; }

/* Search panel */
.m-search {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--cream); border-bottom: 1px solid var(--line); box-shadow: 0 20px 40px -24px rgba(29, 42, 27, 0.4);
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
}
.m-search.is-open { opacity: 1; visibility: visible; transform: none; }
.m-search__form { display: flex; align-items: center; gap: 0.9rem; padding-top: 1.1rem; padding-bottom: 1.1rem; color: var(--muted); }
.m-search__form input {
    flex: 1; min-width: 0; border: 0; background: none; outline: none;
    font-family: var(--display); font-size: clamp(1.2rem, 2.4vw, 1.6rem); color: var(--ink);
}

/* Mobile drawer */
.m-drawer {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 90;
    background: var(--cream); overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
}
.m-drawer.is-open { opacity: 1; visibility: visible; transform: none; }
.m-drawer__inner { display: flex; flex-direction: column; padding: 1.25rem var(--gutter) 6rem; }
.m-drawer__link {
    padding: 0.95rem 0; border-bottom: 1px solid var(--line);
    font-family: var(--display); font-size: 1.5rem; font-weight: 500; color: var(--ink); text-decoration: none;
}
.m-drawer__label { margin: 1.75rem 0 0.75rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--green); }
.m-drawer__topics { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.m-drawer__topics a { padding: 0.55rem 0.95rem; border-radius: 999px; background: var(--paper); box-shadow: var(--shadow-1); font-size: 0.92rem; font-weight: 500; color: var(--ink); text-decoration: none; }
.m-drawer__cta { margin-top: 2rem; }

/* -------------------------------------------------------------------------
   Sections
   ------------------------------------------------------------------------- */
.m-section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.m-section--tight { padding-top: clamp(2rem, 4vw, 3rem); }
.m-section--tint { background: var(--cream-2); }
.m-section--listing { padding-top: clamp(1.5rem, 3vw, 2.5rem); }
.m-section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: clamp(1.75rem, 3vw, 2.5rem); }
.m-section__head .m-eyebrow { margin-bottom: 0.6rem; }
.m-section__title { margin: 0; font-size: clamp(1.9rem, 3.6vw, 2.75rem); line-height: 1.08; }

/* -------------------------------------------------------------------------
   Homepage hero
   ------------------------------------------------------------------------- */
.m-hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 6vw, 5rem); overflow: hidden; }
.m-hero__inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.m-hero__title {
    margin: 0;
    font-size: clamp(2.8rem, 6.4vw, 5.6rem);
    font-weight: 600; line-height: 0.98; letter-spacing: -0.035em;
    text-wrap: balance;
}
.m-hero__title span { font-weight: 400; color: var(--green); }
.m-hero__title em { font-style: italic; font-weight: 500; color: var(--green-dark); }
.m-hero__lede { max-width: 34rem; margin: 1.6rem 0 0; font-size: clamp(1.05rem, 1.4vw, 1.2rem); line-height: 1.7; color: var(--text); }
.m-hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.m-hero__verse { max-width: 30rem; margin: 2.25rem 0 0; padding-left: 1rem; border-left: 2px solid var(--sage); font-family: var(--display); font-style: italic; font-size: 0.98rem; line-height: 1.55; color: var(--muted); }
.m-hero__verse span { font-style: normal; font-family: var(--sans); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; color: var(--green); white-space: nowrap; }

.m-hero__visual { position: relative; }
.m-hero__photo { aspect-ratio: 4 / 5; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-3); background: var(--forest); }
.m-hero__photo img { width: 100%; height: 100%; object-fit: cover; animation: m-drift 30s ease-in-out infinite alternate; }
@keyframes m-drift { from { transform: scale(1.02); } to { transform: scale(1.1) translate(-1.5%, -1%); } }
.m-hero__author {
    position: absolute; left: clamp(-2.5rem, -3vw, -1rem); bottom: 2.25rem;
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.6rem 1.2rem 0.6rem 0.6rem;
    background: var(--paper); border-radius: 999px; box-shadow: var(--shadow-2);
    text-decoration: none; transition: transform 0.3s var(--ease);
}
.m-hero__author:hover { transform: translateY(-3px); }
.m-hero__author img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.m-hero__author span { display: flex; flex-direction: column; line-height: 1.25; }
.m-hero__author strong { font-family: var(--display); font-size: 1.02rem; color: var(--ink); }
.m-hero__author small { font-size: 0.78rem; color: var(--muted); }
.m-hero__stat {
    position: absolute; right: -1rem; top: 2rem;
    display: flex; flex-direction: column; align-items: flex-start;
    padding: 1rem 1.2rem; max-width: 9.5rem;
    background: var(--forest); color: #dbe6d3; border-radius: var(--r-md); box-shadow: var(--shadow-2);
}
.m-hero__stat strong { font-family: var(--display); font-size: 2rem; font-weight: 600; line-height: 1; color: #fff; }
.m-hero__stat span { margin-top: 0.35rem; font-size: 0.78rem; line-height: 1.35; }

/* -------------------------------------------------------------------------
   Cards
   ------------------------------------------------------------------------- */
.m-card {
    position: relative; display: flex; flex-direction: column;
    background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow-1);
    overflow: hidden;
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.m-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-2); }
.m-card__media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--sage-soft); }
.m-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.m-card:hover .m-card__media img { transform: scale(1.05); }
.m-card__placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; background: radial-gradient(circle at 30% 20%, #f3f7ee, var(--sage-soft)); }
.m-card__placeholder .m-brand__mark { width: 56px; height: 56px; color: var(--sage); }
.m-card__body { display: flex; flex-direction: column; gap: 0.55rem; flex: 1; padding: 1.3rem 1.4rem 1.4rem; }
.m-card__cat {
    position: relative; z-index: 2; align-self: flex-start;
    font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--green); text-decoration: none;
}
.m-card__cat:hover { color: var(--green-dark); text-decoration: underline; text-underline-offset: 3px; }
.m-card__title { margin: 0; font-size: 1.32rem; line-height: 1.22; letter-spacing: -0.015em; text-wrap: balance; }
.m-card__title a { color: inherit; text-decoration: none; }
.m-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.m-card__title a:focus-visible { outline: none; }
.m-card:has(.m-card__title a:focus-visible) { outline: 2px solid var(--green); outline-offset: 3px; }
.m-card__excerpt {
    margin: 0; font-size: 0.95rem; line-height: 1.65; color: var(--text);
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.m-card__meta { margin-top: auto; padding-top: 0.4rem; font-size: 0.82rem; color: var(--muted); }

/* Lead card */
.m-card--lead .m-card__media { aspect-ratio: 16 / 10; }
.m-card--lead .m-card__body { padding: 1.75rem 2rem 2rem; gap: 0.75rem; }
.m-card--lead .m-card__title { font-size: clamp(1.7rem, 2.8vw, 2.4rem); line-height: 1.1; letter-spacing: -0.025em; }
.m-card--lead .m-card__excerpt { font-size: 1.04rem; -webkit-line-clamp: 3; }

/* Row card */
.m-card--row { flex-direction: row; align-items: center; gap: 0; border-radius: var(--r-md); }
.m-card--row .m-card__media { flex: 0 0 38%; aspect-ratio: 1 / 1; align-self: stretch; }
.m-card--row .m-card__body { padding: 1rem 1.2rem; gap: 0.35rem; }
.m-card--row .m-card__title { font-size: 1.08rem; line-height: 1.28; }
.m-card--row .m-card__meta { padding-top: 0.15rem; }

/* Grids */
.m-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.25rem, 2.4vw, 2rem); }
.m-latest { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(1.25rem, 2.4vw, 2rem); align-items: stretch; }
.m-latest__list { display: grid; grid-template-rows: repeat(4, 1fr); gap: 1rem; }

/* -------------------------------------------------------------------------
   Topics
   ------------------------------------------------------------------------- */
.m-topics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.m-topic {
    position: relative; display: flex; align-items: flex-end;
    aspect-ratio: 4 / 5; border-radius: var(--r-lg); overflow: hidden;
    background: var(--forest-2); color: #fff; text-decoration: none;
    isolation: isolate;
}
.m-topic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 0.8s var(--ease); }
.m-topic::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(20, 28, 18, 0) 30%, rgba(20, 28, 18, 0.85) 100%); transition: background 0.35s var(--ease); }
.m-topic:hover img { transform: scale(1.06); }
.m-topic:hover::after { background: linear-gradient(180deg, rgba(20, 28, 18, 0.15) 0%, rgba(20, 28, 18, 0.92) 100%); }
.m-topic__body { display: flex; flex-direction: column; gap: 0.3rem; padding: 1.3rem; }
.m-topic__count { align-self: flex-start; padding: 0.25rem 0.65rem; border-radius: 999px; background: rgba(255, 255, 255, 0.18); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: 0.72rem; font-weight: 600; }
.m-topic__label { font-family: var(--display); font-size: 1.45rem; font-weight: 600; line-height: 1.15; letter-spacing: -0.015em; }
.m-topic__blurb { font-size: 0.85rem; line-height: 1.45; color: rgba(255, 255, 255, 0.82); max-height: 0; opacity: 0; overflow: hidden; transition: max-height 0.4s var(--ease), opacity 0.4s var(--ease); }
.m-topic:hover .m-topic__blurb, .m-topic:focus-visible .m-topic__blurb { max-height: 5em; opacity: 1; }
@media (hover: none) { .m-topic__blurb { max-height: none; opacity: 1; } }

/* -------------------------------------------------------------------------
   Blog-hop band
   ------------------------------------------------------------------------- */
.m-hops { padding: 0 clamp(8px, 1.5vw, 16px); }
.m-hops__inner {
    display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(2rem, 5vw, 5rem);
    max-width: 1320px;
    padding-top: clamp(3rem, 6vw, 5rem); padding-bottom: clamp(3rem, 6vw, 5rem);
    border-radius: var(--r-xl);
    background:
        radial-gradient(90% 120% at 100% 0%, rgba(147, 193, 147, 0.2) 0%, rgba(147, 193, 147, 0) 55%),
        var(--forest);
    color: #c8d5c0;
    padding-left: clamp(1.5rem, 5vw, 4.5rem); padding-right: clamp(1.5rem, 5vw, 4.5rem);
}
.theme-modern .m-hops__title { margin: 0; font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.05; color: #fff; }
.m-hops__title a { color: inherit; text-decoration: none; }
.m-hops__title a:hover { text-decoration: underline; text-decoration-color: var(--sage); text-underline-offset: 6px; text-decoration-thickness: 2px; }
.m-hops__text { max-width: 34rem; margin: 1.25rem 0 0; font-size: 1.05rem; line-height: 1.7; }
.m-hops__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.m-hops__schedule { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.m-hops__schedule div { display: flex; flex-direction: column; gap: 0.2rem; padding: 1rem 1.1rem; border-radius: var(--r-md); background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.08); }
.m-hops__schedule strong { font-family: var(--display); font-size: 1.02rem; font-weight: 600; color: #fff; line-height: 1.25; }
.m-hops__schedule span { font-size: 0.82rem; color: var(--sage); }
.m-hops__label { margin: 1.75rem 0 0.4rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(200, 213, 192, 0.7); }
.m-hops__list { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.m-hops__list a { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.85rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.09); text-decoration: none; }
.m-hops__list a span { color: #eef3ea; font-weight: 500; line-height: 1.35; }
.m-hops__list a:hover span { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.m-hops__list time { flex: none; font-size: 0.8rem; color: rgba(200, 213, 192, 0.7); }

/* -------------------------------------------------------------------------
   About band
   ------------------------------------------------------------------------- */
.m-about { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.m-about__photo { position: relative; aspect-ratio: 1; max-width: 420px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 10px var(--paper), 0 0 0 11px var(--line), var(--shadow-3); justify-self: center; width: 100%; }
.m-about__photo img { width: 100%; height: 100%; object-fit: cover; }
.m-about__title { margin: 0 0 1rem; font-size: clamp(2.2rem, 4.5vw, 3.4rem); line-height: 1.05; }
.m-about__copy p { max-width: 36rem; font-size: 1.06rem; line-height: 1.75; }
.m-about__copy .m-btn { margin-top: 0.75rem; }

/* -------------------------------------------------------------------------
   Subscribe band + form
   ------------------------------------------------------------------------- */
.m-subscribe { padding: clamp(3rem, 6vw, 5rem) 0; background: var(--sage-soft); border-top: 1px solid var(--line); }
.m-subscribe__inner { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.m-subscribe .m-eyebrow { color: var(--green); }
.m-subscribe__title { margin: 0; font-size: clamp(2.1rem, 4.2vw, 3.2rem); line-height: 1.05; }
.m-subscribe__title em { font-style: italic; font-weight: 500; color: var(--green-dark); }
.m-subscribe__copy p:last-child { max-width: 30rem; margin: 1rem 0 0; font-size: 1.04rem; line-height: 1.7; }
.m-subscribe-form { display: flex; gap: 0.5rem; padding: 0.5rem; background: var(--paper); border-radius: 999px; box-shadow: var(--shadow-2); }
.m-subscribe-form input {
    flex: 1; min-width: 0; padding: 0.85rem 1.1rem;
    border: 0; border-radius: 999px; background: transparent;
    font-family: var(--sans); font-size: 0.98rem; color: var(--ink); outline: none;
}
.m-subscribe-form input + input { border-left: 1px solid var(--line); border-radius: 0; }
.m-subscribe-form input:focus { background: var(--cream); border-radius: 999px; }

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */
.m-footer { padding: clamp(3.5rem, 6vw, 5rem) 0 2rem; background: var(--forest); color: #b6c4ae; }
.m-footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.1fr; gap: clamp(2rem, 4vw, 3.5rem); }
.m-footer__verse { margin: 1.5rem 0 0; max-width: 22rem; font-family: var(--display); font-style: italic; font-size: 1.05rem; line-height: 1.55; color: #dbe6d3; }
.m-footer__verse cite { display: block; margin-top: 0.6rem; font-family: var(--sans); font-style: normal; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--sage); }
.theme-modern .m-footer__heading { margin: 0 0 1rem; font-family: var(--sans); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--sage); }
.m-footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.m-footer__links a { color: #dbe6d3; text-decoration: none; font-size: 0.95rem; }
.m-footer__links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.m-footer__note { margin: 0 0 1rem; font-size: 0.92rem; line-height: 1.6; }
.m-footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-top: clamp(2.5rem, 5vw, 4rem); padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 0.82rem; color: rgba(182, 196, 174, 0.7); }

/* -------------------------------------------------------------------------
   Article
   ------------------------------------------------------------------------- */
.m-article__head { padding-top: clamp(2.5rem, 6vw, 4.5rem); text-align: center; }
.m-crumbs { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.m-crumbs a { color: var(--green); text-decoration: none; }
.m-crumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }
.m-article__title { margin: 0 auto; max-width: 18em; font-size: clamp(2.3rem, 5.2vw, 4rem); line-height: 1.05; letter-spacing: -0.03em; text-wrap: balance; }
.m-article__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.5rem 0.75rem; margin-top: 1.6rem; font-size: 0.9rem; color: var(--muted); }
.m-article__meta a { color: var(--ink); font-weight: 600; text-decoration: none; }
.m-article__meta a:hover { color: var(--green-dark); }
.m-article__avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--sage); }
.m-dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.6; }
.m-article__tools { margin-top: 1.5rem; }

.m-article__hero { margin: clamp(2rem, 4vw, 3rem) auto 0; }
.m-article__hero img { width: 100%; max-height: 640px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-xl); box-shadow: var(--shadow-2); }
.m-article__hero--banner img { max-height: 420px; }

.m-article__layout {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 760px) minmax(0, 1fr);
    column-gap: 2rem;
    margin-top: clamp(2.5rem, 5vw, 4rem);
}
.m-article__rail { grid-column: 1; justify-self: end; }
.m-article__body { grid-column: 2; min-width: 0; }

.m-rail { position: sticky; top: calc(var(--header-h) + 2rem); display: flex; flex-direction: column; align-items: center; gap: 0.6rem; }
.m-rail__label { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); writing-mode: vertical-rl; transform: rotate(180deg); margin-bottom: 0.4rem; }
.m-rail .share-buttons--compact { flex-direction: column; gap: 0.5rem; }
.m-rail .share-btn--compact { width: 40px; height: 40px; opacity: 1; box-shadow: var(--shadow-1); }
.m-rail .share-btn--compact svg { width: 16px; height: 16px; }
.m-rail__copy { position: relative; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--ink); cursor: pointer; }
.m-rail__copy:hover { background: var(--sage-soft); }
.m-rail__copied { position: absolute; left: calc(100% + 8px); padding: 0.3rem 0.6rem; border-radius: 6px; background: var(--forest); color: #fff; font-size: 0.75rem; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.m-rail__copy.is-copied .m-rail__copied { opacity: 1; }

/* Article typography (on top of the shared .entry-content styles) */
.theme-modern .m-article__body { font-size: 1.12rem; line-height: 1.85; color: #3d3c34; }
.theme-modern .m-article__body > *:first-child { margin-top: 0; }
.theme-modern .m-article__body p { margin: 0 0 1.5rem; }
.theme-modern .m-article__body h2 { margin: 2.6rem 0 0.9rem; font-size: clamp(1.6rem, 2.6vw, 2rem); line-height: 1.2; }
.theme-modern .m-article__body h3 { margin: 2.2rem 0 0.7rem; font-size: clamp(1.3rem, 2vw, 1.55rem); line-height: 1.25; }
.theme-modern .m-article__body h4 { margin: 1.8rem 0 0.6rem; font-size: 1.15rem; }
.theme-modern .m-article__body ul, .theme-modern .m-article__body ol { margin: 0 0 1.5rem; padding-left: 1.4rem; }
.theme-modern .m-article__body li { margin: 0.45em 0; }
.theme-modern .m-article__body li::marker { color: var(--green); }
.theme-modern .m-article__body a:not(.btn):not(.share-btn):not(.m-btn) {
    color: var(--green-dark); text-decoration: underline;
    text-decoration-color: rgba(90, 143, 60, 0.35); text-decoration-thickness: 1.5px; text-underline-offset: 3px;
    transition: text-decoration-color 0.2s;
}
.theme-modern .m-article__body a:not(.btn):not(.share-btn):not(.m-btn):hover { text-decoration-color: currentColor; }
.theme-modern .m-article__body blockquote {
    margin: 2.25rem 0; padding: 1.5rem 1.75rem;
    border-left: 3px solid var(--sage); border-radius: 0 var(--r-md) var(--r-md) 0;
    background: var(--sage-soft);
    font-family: var(--display); font-size: 1.25rem; font-style: italic; line-height: 1.6; color: var(--ink);
}
.theme-modern .m-article__body blockquote p:last-child { margin-bottom: 0; }
.theme-modern .m-article__body img { border-radius: var(--r-md); }
.theme-modern .m-article__body figure { margin-left: auto; margin-right: auto; }
.theme-modern .m-article__body figure.wp-block-image,
.theme-modern .m-article__body figure.wp-caption { border-radius: var(--r-md); box-shadow: var(--shadow-1); }
.theme-modern .m-article__body figure.wp-block-image img,
.theme-modern .m-article__body figure.wp-caption img { border-radius: 0; }
.theme-modern .m-article__body figcaption,
.theme-modern .m-article__body .wp-caption-text { font-size: 0.85rem; background: var(--paper); }
.theme-modern .m-article__body hr { margin: 3rem auto; width: 80px; border: 0; border-top: 2px solid var(--sage); }
.theme-modern .m-article__body .mini-form { max-width: 420px; padding: 1.5rem; background: var(--paper); border-radius: var(--r-md); box-shadow: var(--shadow-1); }
.theme-modern .m-article__body .mini-form input { padding: 0.7em 0.9em; border-radius: var(--r-sm); background: var(--cream); border-color: transparent; }

/* Article footer */
.m-article__foot { margin-top: 3rem; }
.m-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin: 0 0 2rem; padding: 0; }
.m-tags li { padding: 0.35rem 0.8rem; border-radius: 999px; background: var(--paper); box-shadow: var(--shadow-1); font-size: 0.82rem; color: var(--muted); }
.theme-modern .m-article__foot .share-widget { margin-top: 0; padding: 1.75rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.theme-modern .m-article__foot .share-widget-title { font-family: var(--sans); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.theme-modern .m-article__foot .share-btn { padding: 0.6em 1.1em; font-family: var(--sans); font-weight: 600; border-radius: 999px; }
.theme-modern .m-article__foot .share-widget .share-buttons li:nth-last-child(-n+2) .share-btn { background: var(--forest); }

.m-author { display: grid; grid-template-columns: 96px 1fr; gap: 1.5rem; align-items: start; margin-top: 2.5rem; padding: 2rem; background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.m-author img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--sage); }
.m-author .m-eyebrow { margin-bottom: 0.3rem; }
.m-author__name { margin: 0 0 0.5rem; font-size: 1.6rem; }
.m-author p:not(.m-eyebrow) { margin: 0 0 0.9rem; font-size: 0.98rem; line-height: 1.7; }

/* Prev / next */
.m-prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2.5rem; margin-bottom: clamp(3rem, 6vw, 5rem); }
.m-prevnext__link { color: inherit; display: flex; flex-direction: column; gap: 0.4rem; padding: 1.3rem 1.5rem; background: var(--paper); border-radius: var(--r-md); box-shadow: var(--shadow-1); text-decoration: none; transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.m-prevnext__link:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.m-prevnext__link--next { text-align: right; align-items: flex-end; }
.m-prevnext__label { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--green); }
.m-prevnext__title { font-family: var(--display); font-size: 1.12rem; font-weight: 600; line-height: 1.3; color: var(--ink); }

/* Comments */
.m-comments-wrap { padding-top: clamp(3rem, 6vw, 5rem); padding-bottom: clamp(3rem, 6vw, 5rem); }
.theme-modern .comments-section { margin: 0; padding: clamp(1.5rem, 4vw, 2.5rem); background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.theme-modern .comments-title { font-size: 1.6rem; }
.theme-modern .comment { border-color: var(--line); }
.theme-modern .comment-avatar { width: 2.5rem; height: 2.5rem; background: var(--sage); color: var(--forest); font-family: var(--display); font-size: 1rem; }
.theme-modern .comment-author { color: var(--ink); }
.theme-modern .comment-content { font-size: 0.98rem; line-height: 1.7; }

/* Related */
.m-related { margin-top: 0; }

/* -------------------------------------------------------------------------
   Listing pages
   ------------------------------------------------------------------------- */
.m-pagehead { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.5rem, 3vw, 2.25rem); border-bottom: 1px solid var(--line); }
.m-pagehead__title { margin: 0; font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1; letter-spacing: -0.035em; }
.m-pagehead__blurb { max-width: 38rem; margin: 1rem 0 0; font-size: 1.12rem; line-height: 1.65; color: var(--text); }

.m-chips { display: flex; gap: 0.5rem; margin-top: 2rem; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.m-chips::-webkit-scrollbar { display: none; }
.m-chip { flex: none; padding: 0.55rem 1rem; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 0.88rem; font-weight: 500; color: var(--ink); text-decoration: none; transition: background 0.2s, border-color 0.2s, color 0.2s; }
.m-chip:hover { border-color: var(--ink); }
.m-chip.is-active { background: var(--forest); border-color: var(--forest); color: #fff; }

.m-listbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.75rem; }
.m-listbar__count { font-size: 0.88rem; color: var(--muted); }
.m-segmented { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--cream-2); }
.m-segmented a { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.55rem 1rem; border-radius: 999px; font-size: 0.88rem; font-weight: 600; color: var(--text); text-decoration: none; transition: background 0.2s, color 0.2s; }
.m-segmented a span { font-size: 0.75rem; font-weight: 500; color: var(--muted); }
.m-segmented a:hover { color: var(--ink); }
.m-segmented a.is-active { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-1); }

.m-pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.75rem; margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.m-pagination__pages { display: flex; align-items: center; gap: 0.35rem; }
.m-pagination__num { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 0.5rem; border-radius: 999px; font-weight: 600; font-size: 0.92rem; color: var(--ink); text-decoration: none; box-sizing: border-box; }
.m-pagination__num:hover { background: var(--cream-2); }
.m-pagination__num.is-current { background: var(--forest); color: #fff; }
.m-pagination__gap { color: var(--muted); padding: 0 0.25rem; }
.m-pagination__step { display: inline-flex; align-items: center; gap: 0.4rem; height: 44px; padding: 0 1.1rem; border-radius: 999px; border: 1px solid var(--line-strong); font-weight: 600; font-size: 0.9rem; color: var(--ink); text-decoration: none; }
.m-pagination__step:hover { border-color: var(--ink); }

.m-inline-search { display: flex; align-items: center; gap: 0.6rem; max-width: 640px; margin-top: 2rem; padding: 0.45rem 0.45rem 0.45rem 1.2rem; background: var(--paper); border-radius: 999px; box-shadow: var(--shadow-2); color: var(--muted); }
.m-inline-search input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-family: var(--sans); font-size: 1.05rem; color: var(--ink); }

.m-empty { padding: clamp(3rem, 8vw, 6rem) 0; text-align: center; }
.m-empty .m-inline-search { margin-left: auto; margin-right: auto; }
.m-empty__title { margin: 0 0 0.75rem; font-size: clamp(2rem, 4vw, 2.8rem); }
.m-empty p { margin: 0 0 1.5rem; }

/* Fallback content from classic templates (e.g. a 404 rendered by core) */
.m-main > .post-card { max-width: 760px; margin: 4rem auto; padding: 0 var(--gutter); font-size: 1.1rem; }

/* Switcher: keep clear of the mobile CTA area */
.theme-modern .theme-switcher { z-index: 110; }

/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */
@media (max-width: 1180px) {
    .m-article__layout { grid-template-columns: minmax(0, 760px); justify-content: center; }
    .m-article__rail { display: none; }
    .m-article__body { grid-column: 1; }
}

@media (max-width: 1080px) {
    .m-nav { display: none; }
    .m-menu-btn { display: inline-flex; }
    .m-header__actions { margin-left: auto; }
    .m-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .m-topic { aspect-ratio: 16 / 11; }
    .m-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
    .m-hero__inner { grid-template-columns: 1fr; }
    .m-hero__visual { max-width: 560px; width: 100%; margin: 0 auto; }
    .m-hero__photo { aspect-ratio: 5 / 4; }
    .m-hero__author { left: 1rem; bottom: 1rem; }
    .m-hero__stat { right: 1rem; top: 1rem; }
    .m-latest { grid-template-columns: 1fr; }
    .m-latest__list { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
    .m-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .m-hops__inner, .m-about, .m-subscribe__inner { grid-template-columns: 1fr; }
    .m-about__photo { max-width: 280px; }
}

@media (max-width: 640px) {
    :root:has(.theme-modern) { --header-h: 64px; }
    body.theme-modern { font-size: 16px; }
    .m-header__cta { display: none; }
    .m-brand__mark { width: 36px; height: 36px; }
    .m-brand__name { font-size: 1.18rem; }
    .m-hero { padding-top: 1.75rem; }
    .m-hero__stat { display: none; }
    .m-section__head { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .m-grid, .m-latest__list { grid-template-columns: 1fr; }
    .m-card--lead .m-card__body { padding: 1.4rem 1.4rem 1.6rem; }
    .m-topics { gap: 0.75rem; }
    .m-topic { aspect-ratio: 4 / 5; }
    .m-topic__body { padding: 1rem; }
    .m-topic__label { font-size: 1.15rem; }
    .m-hops__schedule { grid-template-columns: 1fr; }
    .m-subscribe-form { flex-direction: column; border-radius: var(--r-lg); }
    .m-subscribe-form input + input { border-left: 0; border-top: 1px solid var(--line); border-radius: 0; }
    .m-footer__grid { grid-template-columns: 1fr; }
    .m-footer__bottom { padding-bottom: 3.5rem; }
    .m-article__head { text-align: left; }
    .m-crumbs, .m-article__meta { justify-content: flex-start; }
    .m-article__hero { padding: 0; }
    .m-article__hero img { border-radius: 0; aspect-ratio: 4 / 3; }
    .theme-modern .m-article__body { font-size: 1.06rem; line-height: 1.8; }
    .m-author { grid-template-columns: 1fr; padding: 1.5rem; }
    .m-prevnext { grid-template-columns: 1fr; }
    .m-prevnext__link--next { text-align: left; align-items: flex-start; }
    .m-segmented { width: 100%; }
    .m-segmented a { flex: 1; justify-content: center; padding: 0.55rem 0.5rem; }
    .m-pagination__step span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .theme-modern *, .theme-modern *::before, .theme-modern *::after { animation: none !important; transition: none !important; }
}

@media print {
    .m-header, .m-drawer, .m-progress, .m-subscribe, .m-footer, .m-article__rail, .m-related, .m-prevnext, .m-comments-wrap, .m-author, .share-widget, .m-skip { display: none !important; }
    body.theme-modern { background: #fff; }
    .m-article__layout { display: block; }
    .m-article__hero img { box-shadow: none; max-height: 360px; }
}
