/* ============================================================
   THE EXMOOR JOURNAL — design system
   National-Park editorial: pine green, parchment, bracken gold.
   Fraunces (display, optical sizing) + Inter (UI/body).
   Mobile-first, fluid type, AA contrast, reduced-motion aware.
   ============================================================ */

:root {
  --pine: #14381f;        /* deepest brand green — headers, footer */
  --moss: #1e5631;        /* brand green — links, chips */
  --fern: #3d8b5a;        /* lighter green — hovers */
  --bracken: #c08a3e;     /* autumn gold accent */
  --parchment: #f8f4ec;   /* page background */
  --paper: #fffdf8;       /* card background */
  --ink: #1c211d;         /* body text */
  --soil: #5c635c;        /* secondary text */
  --line: #e6dfd2;
  --radius: 18px;
  --shadow: 0 8px 30px rgba(20, 56, 31, .08);
  --shadow-lift: 0 18px 48px rgba(20, 56, 31, .16);
  --wrap: 1220px;
  --pad: clamp(20px, 4vw, 48px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Inter-fallback', -apple-system, sans-serif;
  background: var(--parchment); color: var(--ink);
  line-height: 1.7; -webkit-font-smoothing: antialiased;
  font-size: clamp(15.5px, 1.05vw, 17px);
}
img { max-width: 100%; display: block; height: auto; }
a { color: var(--moss); }
::selection { background: var(--bracken); color: #fff; }
:focus-visible { outline: 2.5px solid var(--bracken); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-family: 'Fraunces', 'Fraunces-fallback', Georgia, serif;
  font-weight: 560; line-height: 1.06; letter-spacing: -.015em;
  font-variation-settings: 'opsz' 90;
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 5.8vw, 4.2rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.wrap-narrow { max-width: 960px; margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.kicker {
  font-size: .8rem; font-weight: 700; letter-spacing: .24em;
  text-transform: uppercase; color: var(--bracken); margin-bottom: 18px;
}
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 22px; margin-bottom: clamp(22px, 3vw, 38px); }
.sec-head p { color: var(--soil); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 200; border-bottom: 1px solid rgba(255,255,255,.08); }
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--pine) 94%, transparent);
  backdrop-filter: blur(14px);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 96px; }
.brand { display: flex; text-decoration: none; }
.logo-chip {
  display: inline-flex; align-items: center; background: #fff; border-radius: 14px;
  padding: 8px 14px; box-shadow: 0 2px 12px rgba(0,0,0,.18);
}
.logo-chip img { height: 62px; width: auto; display: block; }
.nav-links { display: flex; gap: clamp(16px, 2.2vw, 32px); align-items: center; }
.nav-links a {
  text-decoration: none; color: #e9e3d4; font-weight: 600; font-size: .93rem;
  position: relative; padding: 6px 0; white-space: nowrap;
}
.nav-links a:not(.btn-book)::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--bracken); transition: width .22s ease; border-radius: 2px;
}
.nav-links a:not(.btn-book):hover::after { width: 100%; }
.nav-links a.btn-book {
  background: var(--bracken); color: #fff !important; padding: 14px 32px; margin-left: 8px;
  border-radius: 999px; box-shadow: var(--shadow); font-size: .98rem;
  transition: transform .18s ease, background .18s ease;
}
.nav-links a.btn-book:hover { background: #a9762f; transform: translateY(-2px); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 10px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; border-radius: 2px; transition: transform .25s ease, opacity .25s ease; }

@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; inset: 96px 0 0 0; flex-direction: column; justify-content: center;
    gap: 10px; background: var(--pine); transform: translateX(100%);
    transition: transform .3s ease; z-index: 150;
  }
  .nav-links a { font-family: 'Fraunces', 'Fraunces-fallback', serif; font-size: 1.6rem; font-weight: 560; padding: 12px; }
  .nav-links .btn-book { margin-top: 16px; font-family: 'Inter', sans-serif; font-size: 1rem; }
  body.nav-open .nav-links { transform: none; }
  body.nav-open { overflow: hidden; }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- journal hero ---------- */
.journal-hero {
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(192, 138, 62, .14), transparent 60%),
    linear-gradient(180deg, #fdfbf5 0%, var(--parchment) 100%);
  padding: clamp(56px, 9vw, 120px) 0 clamp(36px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
}
.journal-hero h1 { max-width: 18ch; }
.journal-hero .lede { color: var(--soil); font-size: clamp(1.05rem, 1.5vw, 1.28rem); max-width: 52ch; margin-top: 20px; }

/* ---------- latest story split card ---------- */
.latest { padding: clamp(36px, 5vw, 64px) 0 0; }
.latest-card {
  display: grid; grid-template-columns: 1.15fr .85fr; border-radius: calc(var(--radius) + 6px);
  overflow: hidden; background: var(--pine); color: #fff; text-decoration: none;
  box-shadow: var(--shadow-lift); min-height: 420px;
}
.latest-card figure { position: relative; overflow: hidden; }
.latest-card figure img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.latest-card:hover figure img { transform: scale(1.04); }
.latest-body { padding: clamp(28px, 4vw, 56px); display: flex; flex-direction: column; gap: 16px; justify-content: center; }
.latest-body h2 { color: #fff; font-size: clamp(1.6rem, 2.8vw, 2.4rem); }
.latest-body p { color: #d9d2c3; max-width: 46ch; }
.read-on { color: var(--bracken); font-weight: 700; margin-top: 4px; }
.latest-card .card-meta { color: #b7c4ae; }
@media (max-width: 760px) {
  .latest-card { grid-template-columns: 1fr; min-height: 0; }
  .latest-card figure { aspect-ratio: 16 / 10; }
}

/* ---------- chips ---------- */
.chip {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--moss); background: color-mix(in srgb, var(--moss) 10%, transparent);
  padding: 5px 12px; border-radius: 999px; width: fit-content;
}
.chip-light { color: var(--bracken); background: rgba(192, 138, 62, .18); }
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: clamp(22px, 3vw, 34px); }
.chip-filter {
  font: inherit; font-size: .86rem; font-weight: 600; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--paper); color: var(--ink);
  padding: 9px 18px; border-radius: 999px; transition: all .18s ease;
}
.chip-filter i { font-style: normal; color: var(--soil); font-size: .78rem; margin-left: 4px; }
.chip-filter:hover { border-color: var(--fern); }
.chip-filter.is-active { background: var(--pine); color: #fff; border-color: var(--pine); }
.chip-filter.is-active i { color: #b7c4ae; }

/* ---------- cards ---------- */
.loved { padding: clamp(44px, 6vw, 80px) 0 0; }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(320px, 78vw);
  gap: 20px; overflow-x: auto; padding: 6px 4px 22px; scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.rail .card { scroll-snap-align: start; }
@media (min-width: 1000px) { .rail { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; } }

.all-posts { padding: clamp(44px, 6vw, 80px) 0 clamp(56px, 7vw, 96px); }
.grid { display: grid; gap: clamp(18px, 2.4vw, 28px); grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }

.card {
  display: flex; flex-direction: column; background: var(--paper); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.card figure { overflow: hidden; aspect-ratio: 16 / 10; background: #e8e2d4; }
.card figure img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover figure img { transform: scale(1.05); }
.card .noimg { width: 100%; height: 100%; background: linear-gradient(140deg, var(--moss), var(--pine)); }
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body h3 { font-size: 1.22rem; line-height: 1.2; }
.card-excerpt { color: var(--soil); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { color: var(--soil); font-size: .8rem; margin-top: auto; padding-top: 6px; }
.card.is-hidden { display: none; }

/* ---------- CTA band ---------- */
.cta-band {
  background:
    radial-gradient(900px 400px at 15% 120%, rgba(192, 138, 62, .25), transparent 60%),
    var(--pine);
  color: #fff; text-align: center; padding: clamp(56px, 8vw, 104px) 0;
}
.cta-band h2 { color: #fff; max-width: 22ch; margin: 0 auto 14px; }
.cta-band p { color: #cfc8b8; max-width: 52ch; margin: 0 auto 30px; }
.btn-cta {
  display: inline-block; background: var(--bracken); color: #fff; text-decoration: none;
  font-weight: 700; padding: 16px 36px; border-radius: 999px;
  transition: transform .18s ease, background .18s ease; box-shadow: var(--shadow-lift);
}
.btn-cta:hover { background: #a9762f; transform: translateY(-2px); }

/* ---------- article page ---------- */
.post { padding-top: clamp(28px, 4vw, 56px); }
.crumbs { margin-bottom: 26px; }
.crumbs a { text-decoration: none; font-weight: 600; font-size: .9rem; color: var(--soil); }
.crumbs a:hover { color: var(--moss); }
.post-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: clamp(24px, 3.5vw, 40px); }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.post-meta { color: var(--soil); font-size: .9rem; }
.post-hero { max-width: 1440px; margin: 0 auto clamp(28px, 4vw, 52px); padding: 0 var(--pad); }
.post-hero img { border-radius: calc(var(--radius) + 4px); box-shadow: var(--shadow-lift); aspect-ratio: 21 / 10; object-fit: cover; width: 100%; }

.post-toc {
  background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--bracken);
  border-radius: 14px; padding: 22px 26px; margin-bottom: clamp(28px, 4vw, 44px);
}
.toc-label { font-size: .78rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--bracken); }
.post-toc ol { margin: 12px 0 0 18px; display: grid; gap: 7px; }
.post-toc a { text-decoration: none; font-weight: 500; }
.post-toc a:hover { text-decoration: underline; }

/* classic-post typography — the 115 old posts get their looks entirely from here */
.post-body { font-size: clamp(1.02rem, 1.15vw, 1.13rem); }
.post-classic .post-body > p:first-of-type::first-letter {
  font-family: 'Fraunces', 'Fraunces-fallback', serif; font-size: 3.4em; float: left;
  line-height: .82; padding: 6px 10px 0 0; color: var(--moss); font-weight: 600;
}
.post-body p { margin-bottom: 1.25em; }
.post-body h2 { margin: 1.8em 0 .7em; scroll-margin-top: 100px; }
.post-body h3 { margin: 1.4em 0 .6em; font-size: 1.3rem; }
.post-body img { border-radius: 14px; box-shadow: var(--shadow); margin: 1.6em auto; }
.post-body figure { margin: 1.6em 0; }
.post-body figcaption { text-align: center; color: var(--soil); font-size: .85rem; margin-top: 10px; }
.post-body ul, .post-body ol { margin: 0 0 1.25em 1.4em; }
.post-body li { margin-bottom: .45em; }
.post-body blockquote {
  font-family: 'Fraunces', 'Fraunces-fallback', serif; font-size: 1.28em; line-height: 1.45; font-style: italic;
  border-left: 4px solid var(--bracken); padding: 6px 0 6px 24px; margin: 1.6em 0; color: var(--pine);
}
.post-body table {
  width: 100%; border-collapse: collapse; margin: 1.6em 0; background: var(--paper);
  border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); font-size: .93em;
}
.post-body th { background: var(--pine); color: #fff; text-align: left; padding: 12px 14px; }
.post-body td { padding: 11px 14px; border-bottom: 1px solid var(--line); }
.post-body tr:nth-child(even) td { background: color-mix(in srgb, var(--parchment) 55%, var(--paper)); }
.post-body iframe { max-width: 100%; border-radius: 12px; }
.post-body a { text-decoration-color: color-mix(in srgb, var(--moss) 40%, transparent); text-underline-offset: 3px; }

/* table scroll guard on phones */
@media (max-width: 700px) {
  .post-body table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* new-chrome posts keep their own inline-styled internals; just breathe */
.post-newchrome .post-body { font-size: 1rem; }

.related { padding: clamp(44px, 6vw, 80px) 0; border-top: 1px solid var(--line); margin-top: clamp(44px, 6vw, 72px); }

/* ---------- footer ---------- */
.site-footer { background: var(--pine); color: #cfc8b8; }
.foot-grid .wrap { display: grid; gap: 40px; grid-template-columns: 1.5fr repeat(4, 1fr); padding-top: 64px; padding-bottom: 52px; }
@media (max-width: 960px) { .foot-grid .wrap { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); } }
.foot-brand-col { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.foot-blurb { font-size: .93rem; max-width: 32ch; }
.foot-h { color: var(--bracken); font-size: .74rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer a { color: #e9e3d4; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.site-footer p { margin: 8px 0; font-size: .95rem; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.1); font-size: .84rem; color: #9aa694; }
.foot-bottom .wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 20px; padding-bottom: 20px; }
.foot-mark { font-size: .8rem; letter-spacing: .24em; text-transform: uppercase; }
.foot-mark em { font-family: 'Fraunces', 'Fraunces-fallback', serif; font-style: italic; text-transform: none; letter-spacing: 0; font-size: 1.05rem; color: #fff; }

/* ---------- reveal ---------- */
.rg-reveal { opacity: 0; transform: translateY(22px); transition: opacity .55s ease, transform .55s ease; }
.rg-reveal.in-view { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  .rg-reveal { opacity: 1; transform: none; }
}

/* curated homepage sections + archive */
.home-cat { padding: clamp(40px, 5.5vw, 72px) 0 0; }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.archive-link { padding: clamp(44px, 6vw, 72px) 0; text-align: center; }
.archive-cta {
  display: inline-block; font-family: 'Fraunces', 'Fraunces-fallback', serif; font-size: 1.3rem; font-weight: 560;
  color: var(--pine); text-decoration: none; border: 1.5px solid var(--line);
  background: var(--paper); padding: 18px 40px; border-radius: 999px;
  box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease;
}
.archive-cta:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.journal-hero-slim { padding: clamp(40px, 6vw, 72px) 0 clamp(28px, 4vw, 48px); }

/* ---------- hero mosaic (5 newest) ---------- */
.hero-mosaic { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(18px, 2.4vw, 30px); align-items: stretch; }
.hero-lead {
  display: flex; flex-direction: column; background: var(--pine); color: #fff;
  border-radius: calc(var(--radius) + 6px); overflow: hidden; text-decoration: none;
  box-shadow: var(--shadow-lift);
}
.hero-lead figure { overflow: hidden; aspect-ratio: 16 / 9; }
.hero-lead figure img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.hero-lead:hover figure img { transform: scale(1.04); }
.hero-lead-body { padding: clamp(22px, 3vw, 38px); display: flex; flex-direction: column; gap: 12px; }
.hero-lead-body h2 { color: #fff; font-size: clamp(1.5rem, 2.5vw, 2.15rem); }
.hero-lead-body p { color: #d9d2c3; max-width: 52ch; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-lead .card-meta { color: #b7c4ae; }
.hero-minis { display: flex; flex-direction: column; gap: 12px; }
.minis-label {
  font-size: .78rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: var(--bracken); padding: 2px 4px 4px;
}
.mini {
  display: grid; grid-template-columns: auto 96px 1fr; gap: 14px; align-items: center;
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
  padding: 12px 16px 12px 14px; text-decoration: none; color: inherit; flex: 1;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.mini:hover { transform: translateX(4px); box-shadow: var(--shadow); border-color: var(--fern); }
.mini-n { font-family: 'Fraunces', 'Fraunces-fallback', serif; font-size: 1.15rem; color: var(--bracken); font-weight: 600; }
.mini figure { width: 96px; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: #e8e2d4; }
.mini figure img { width: 100%; height: 100%; object-fit: cover; }
.mini .noimg { display: block; width: 100%; height: 100%; background: linear-gradient(140deg, var(--moss), var(--pine)); }
.mini-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mini-body em { font-style: normal; font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--moss); }
.mini-body strong { font-family: 'Fraunces', 'Fraunces-fallback', serif; font-weight: 560; font-size: 1.02rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini-body > span { font-size: .78rem; color: var(--soil); margin-top: 3px; }
@media (max-width: 900px) {
  .hero-mosaic { grid-template-columns: 1fr; }
  .mini figure { width: 76px; }
  .mini { grid-template-columns: auto 76px 1fr; }
}

/* ---------- hero slider ---------- */
.hero-slider { position: relative; border-radius: calc(var(--radius) + 8px); overflow: hidden; box-shadow: var(--shadow-lift); }
.slides {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.slides::-webkit-scrollbar { display: none; }
.slide {
  position: relative; flex: 0 0 100%; scroll-snap-align: start;
  height: clamp(520px, 74vh, 780px);
  display: flex; align-items: flex-end; text-decoration: none; color: #fff;
}
.slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(200deg, rgba(20,56,31,.05) 30%, rgba(12,26,16,.82) 100%);
}
.slide-body { position: relative; z-index: 2; padding: clamp(24px, 4vw, 56px); max-width: 720px; display: flex; flex-direction: column; gap: 12px; }
.slide-body h2 { color: #fff; font-size: clamp(1.55rem, 3.4vw, 2.7rem); text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.slide-body p { color: #e6e0d2; max-width: 56ch; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.slide-meta { color: var(--bracken); font-weight: 700; font-size: .88rem; }
.chip-glass { color: #fff; background: rgba(255,255,255,.16); backdrop-filter: blur(6px); }
.slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,253,248,.92); color: var(--pine); font-size: 1.7rem; line-height: 1;
  box-shadow: var(--shadow); transition: transform .18s ease, background .18s ease;
  display: grid; place-items: center; padding-bottom: 4px;
}
.slider-arrow:hover { background: #fff; transform: translateY(-50%) scale(1.06); }
.slider-arrow.prev { left: 18px; }
.slider-arrow.next { right: 18px; }
.slider-dots { position: absolute; bottom: 16px; right: clamp(20px, 4vw, 52px); z-index: 3; display: flex; gap: 8px; }
.slider-dots button {
  width: 9px; height: 9px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.45); transition: all .2s ease; padding: 0;
}
.slider-dots button.is-active { background: var(--bracken); width: 26px; border-radius: 6px; }
@media (max-width: 700px) {
  .slide { height: min(78vh, 640px); }
  .slider-arrow { display: none; }   /* native swipe on touch */
  .slider-dots { left: 50%; right: auto; transform: translateX(-50%); }
}

/* homepage: slider is now the opening element */
.latest-first { padding-top: clamp(18px, 2.6vw, 34px); }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.sr-only-block { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); }
.wrap-post-head { max-width: 1440px; margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.wrap-post-head h1 { max-width: none; text-wrap: initial; }

/* ---------- post layout with sidebar ---------- */
.wrap-post-layout {
  max-width: 1440px; margin: 0 auto; padding: 0 var(--pad);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 3.5vw, 56px);
}
.post-main { min-width: 0; max-width: 1020px; }
.post-side { display: none; }
@media (min-width: 1100px) {
  .wrap-post-layout { grid-template-columns: minmax(0, 1fr) 320px; }
  .post-side { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 106px; align-self: start; }
  .mobile-toc { display: none; }
}
.side-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
  padding: 22px 24px; display: flex; flex-direction: column; gap: 12px;
}
.side-kicker { font-size: .74rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--bracken); }
.side-toc { margin-bottom: 0; max-height: 44vh; overflow-y: auto; scrollbar-width: thin; }
.side-toc ol { gap: 6px; }
.side-toc a { color: var(--soil); font-size: .92rem; transition: color .15s ease; }
.side-toc li.is-current a { color: var(--pine); font-weight: 700; }
.side-stay { background: var(--pine); border-color: var(--pine); color: #d9d2c3; }
.side-stay .side-kicker { color: var(--bracken); }
.side-stay-line { font-size: .95rem; }
.btn-cta-small { padding: 12px 24px; font-size: .92rem; text-align: center; }
.side-phone { color: #b7c4ae; font-size: .85rem; text-decoration: none; text-align: center; }
.side-phone:hover { color: #fff; }
.side-mini { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; text-decoration: none; color: inherit; padding: 4px 0; }
.side-mini figure { width: 64px; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #e8e2d4; }
.side-mini img { width: 100%; height: 100%; object-fit: cover; }
.side-mini span { font-family: 'Fraunces', 'Fraunces-fallback', serif; font-weight: 560; font-size: .95rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.side-mini:hover span { color: var(--moss); }

/* ---------- social icons ---------- */
.soc-row { display: flex; gap: 10px; margin-top: 4px; }
.soc {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  color: #dbc9a4; background: rgba(255,255,255,.08); transition: all .18s ease;
}
.soc svg { width: 21px; height: 21px; }
.soc:hover { background: var(--bracken); color: #fff; transform: translateY(-2px); }
.side-follow .soc { background: color-mix(in srgb, var(--moss) 9%, transparent); color: var(--moss); }
.side-follow .soc:hover { background: var(--moss); color: #fff; }

/* ---------- legacy "advanced-wp-columns" grids (csRow/csColumn) ----------
   The old plugin's CSS is gone; its float+spacer-pixel layout collapses.
   Modernise: CSS grid, kill the 1x1 spacer gap columns. */
.post-body .csRow {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 18px; margin: 1.8em 0; align-items: start;
}
.post-body .csColumn { float: none !important; width: auto !important; }
.post-body .csColumnGap { display: none !important; }
.post-body img[src*="1x1-pixel"] { display: none !important; }
.post-body .csColumn img {
  width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: 12px; margin: 0 0 10px;
}
.post-body .csColumn a { font-weight: 600; text-decoration: none; }
.post-body .csColumn a:hover { text-decoration: underline; }
/* old-school caption blocks: centre and contain */
.post-body .wp-caption { max-width: 100%; margin: 1.4em auto; text-align: center; }
.post-body .wp-caption img { margin: 0 auto 8px; }
.post-body .wp-caption-text { color: var(--soil); font-size: .85rem; }

/* ---------- Keep exploring: arrowed rail (always horizontal) ---------- */
.rail-slider { position: relative; }
.rail-flow {
  grid-auto-flow: column !important; grid-template-columns: none !important;
  grid-auto-columns: min(300px, 74vw); overflow-x: auto !important;
  scroll-behavior: smooth;
}
.rail-arrow {
  position: absolute; top: 40%; z-index: 5; width: 46px; height: 46px;
  border-radius: 50%; border: 1px solid var(--line); cursor: pointer;
  background: var(--paper); color: var(--pine); font-size: 1.6rem; line-height: 1;
  box-shadow: var(--shadow); display: grid; place-items: center; padding-bottom: 3px;
  transition: transform .18s ease, background .18s ease, opacity .18s ease;
}
.rail-arrow:hover { background: #fff; transform: scale(1.07); }
.rail-arrow.prev { left: -14px; }
.rail-arrow.next { right: -14px; }
.rail-arrow[disabled] { opacity: .35; cursor: default; transform: none; }
@media (max-width: 700px) { .rail-arrow { display: none; } }  /* native swipe */

/* ---------- legacy Kadence "masonry" galleries (66 posts) ----------
   Their isotope JS is gone; tiles stacked full-width with stray gaps.
   Modern grid, honouring the original column count. */
.post-body .kad-wp-gallery {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 14px; margin: 1.8em 0;
}
.post-body .kad-wp-gallery.kt-gallery-column-4 { grid-template-columns: repeat(4, 1fr); }
.post-body .kad-wp-gallery.kt-gallery-column-2 { grid-template-columns: repeat(2, 1fr); }
.post-body .kad-wp-gallery [class*="tcol-"] { width: auto !important; float: none !important; margin: 0 !important; padding: 0 !important; }
.post-body .kad-wp-gallery .grid_item { margin: 0 !important; }
.post-body .kad-wp-gallery img {
  width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: 12px; margin: 0 !important; box-shadow: var(--shadow);
}
@media (max-width: 700px) {
  .post-body .kad-wp-gallery, .post-body .kad-wp-gallery.kt-gallery-column-4 { grid-template-columns: repeat(2, 1fr); }
}
.post-body p:empty { display: none; }

/* ---------- legacy Kadence image CAROUSELS (51 posts) ----------
   slick-slider JS never loads; slides stacked full-width thousands of px
   tall. The outer div reuses .kad-wp-gallery, so un-grid it and grid the
   slider's actual children instead. */
.post-body .carousel-outer-container { display: block !important; }
.post-body .kt-image-carousel, .post-body .slick-slider {
  display: grid !important; grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.post-body .kt-intrinsic { padding: 0 !important; height: auto !important; }
@media (max-width: 700px) {
  .post-body .kt-image-carousel, .post-body .slick-slider { grid-template-columns: repeat(2, 1fr); }
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 300;
  background: var(--pine); color: #fff; padding: 12px 20px;
  border-radius: 0 0 10px 0; text-decoration: none; font-weight: 600;
}
.skip-link:focus { left: 0; }
