/* ── Blog ──────────────────────────────────────────────────────────────────
   Loaded ONLY on /blog/ pages, on top of styles.css. Deliberately a second
   stylesheet rather than more of the first: the homepage is the page whose
   Core Web Vitals matter commercially, and it should not download the article
   layout to render a quote form.

   Tokens (--bg, --fg, --card, --navy, --border, --muted, --serif, --sans,
   --radius, --wrap, --wrap-narrow) all come from styles.css. Do not redeclare
   them here — see the token table at the top of that file.
   ───────────────────────────────────────────────────────────────────────── */

/* ── Breadcrumbs ───────────────────────────────────────────────────────── */

/* No max-width here on purpose. The crumbs are always placed inside a .wrap or
   .wrap-narrow, which owns the measure and the gutter; constraining them again
   here centred them inside their own parent on the index page, so the trail
   floated into the middle of a left-aligned column. */
.crumbs {
  padding: 1.6rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.crumbs a {
  color: var(--muted);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--fg);
  text-decoration: underline;
}

.crumbs span[aria-current] {
  color: var(--fg);
}

/* ── Article head ──────────────────────────────────────────────────────── */

.post-head {
  padding-top: 1.4rem;
  padding-bottom: 1.6rem;
}

.post-head h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 1.3rem + 2.8vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0.5rem 0 0;
}

.post-meta {
  margin: 0.9rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ── Banner ────────────────────────────────────────────────────────────── */

.post-banner {
  margin: 0 auto 2.4rem;
  max-width: var(--wrap);
  padding: 0 1.2rem;
}

.post-banner img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}

.post-banner figcaption,
.post-fig figcaption,
.post-gallery figcaption {
  margin-top: 0.6rem;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ── Body ──────────────────────────────────────────────────────────────── */

/* 66ch is the readable measure. The .wrap-narrow 760px that the rest of the
   site uses is right for a form and slightly wide for 1,400 words of prose. */
.post-body {
  padding-bottom: 3.5rem;
  font-size: 1.06rem;
  line-height: 1.78;
}

.post-body > p,
.post-body > ul,
.post-body > ol,
.post-body > blockquote {
  margin: 0 0 1.25rem;
}

.post-body h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.55rem, 1.2rem + 1.4vw, 2.1rem);
  line-height: 1.2;
  margin: 2.8rem 0 0.9rem;
  scroll-margin-top: 5rem;
}

.post-body h3 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: 0.01em;
  margin: 2rem 0 0.6rem;
}

.post-body ul,
.post-body ol {
  padding-left: 1.3rem;
}

.post-body li {
  margin-bottom: 0.5rem;
}

.post-body a {
  color: var(--navy);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

.post-body hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.6rem 0;
}

.post-body blockquote {
  border-left: 3px solid var(--border);
  padding-left: 1.1rem;
  color: var(--muted);
  font-style: italic;
}

/* ── Table of contents ─────────────────────────────────────────────────── */

.post-toc {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  margin: 0 0 2.2rem;
}

.post-toc-h {
  margin: 0 0 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.post-toc ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.94rem;
}

.post-toc li {
  margin-bottom: 0.3rem;
}

/* ── Figures ───────────────────────────────────────────────────────────── */

.post-fig {
  margin: 2rem 0;
}

.post-fig img,
.post-gallery img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  display: block;
}

.post-fig-full img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

/* Half-column floats. They collapse to full width on a phone in the media
   query at the foot of this file — a 48% float at 390px is unreadable. */
.post-fig-left,
.post-fig-right {
  width: 48%;
  margin-top: 0.4rem;
}

.post-fig-left {
  float: left;
  margin-right: 1.6rem;
}

.post-fig-right {
  float: right;
  margin-left: 1.6rem;
}

.post-fig-left img,
.post-fig-right img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* A floated figure must not hang out of the section it belongs to. */
.post-body h2,
.post-body .post-pull,
.post-body .post-cta,
.post-body .post-menu,
.post-body .post-faq {
  clear: both;
}

.post-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.post-gallery figure {
  margin: 0;
}

.post-gallery img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* ── Pull quote ────────────────────────────────────────────────────────── */

.post-pull {
  margin: 2.6rem 0;
  padding: 0 0 0 1.4rem;
  border-left: 3px solid var(--navy);
}

.post-pull p {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 1.1rem + 0.9vw, 1.7rem);
  line-height: 1.38;
  margin: 0;
}

.post-pull cite {
  display: block;
  margin-top: 0.6rem;
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.82rem;
  color: var(--muted);
}

/* ── Callout and takeaways ─────────────────────────────────────────────── */

.post-callout,
.post-takeaways {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  margin: 2.2rem 0;
}

.post-takeaways {
  border-left: 3px solid var(--navy);
}

.post-callout-h,
.post-takeaways-h {
  margin: 0 0 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.post-takeaways-h {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.post-callout p:last-child,
.post-takeaways ul {
  margin-bottom: 0;
}

.post-takeaways ul {
  padding-left: 1.1rem;
  font-size: 0.97rem;
}

/* ── Menu cards ────────────────────────────────────────────────────────── */

.post-menu {
  display: grid;
  gap: 1rem;
  margin: 2.2rem 0;
}

.post-menu-item {
  display: flex;
  gap: 1rem;
  align-items: stretch;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.post-menu-item img {
  width: 34%;
  max-width: 190px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

.post-menu-body {
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.post-menu-name {
  margin: 0;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}

.post-menu-price {
  color: var(--navy);
  font-weight: 700;
  white-space: nowrap;
  font-size: 0.92rem;
}

.post-menu-note {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--muted);
}

/* ── Steps ─────────────────────────────────────────────────────────────── */

.post-steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 2.2rem 0;
  display: grid;
  gap: 1rem;
}

.post-steps li {
  counter-increment: step;
  position: relative;
  padding-left: 3rem;
  margin: 0;
}

.post-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.post-step-h {
  margin: 0.25rem 0 0.2rem;
  font-weight: 700;
}

.post-steps p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ── FAQ ───────────────────────────────────────────────────────────────── */

.post-faq {
  margin-top: 3rem;
}

.post-faq details {
  border-top: 1px solid var(--border);
  padding: 0.2rem 0;
}

.post-faq details:last-of-type {
  border-bottom: 1px solid var(--border);
}

.post-faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 2rem 1rem 0;
  position: relative;
  font-family: var(--serif);
  font-size: 1.15rem;
}

.post-faq summary::-webkit-details-marker {
  display: none;
}

.post-faq summary::after {
  content: "+";
  position: absolute;
  right: 0.2rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--navy);
  font-family: var(--sans);
  font-size: 1.2rem;
}

.post-faq details[open] summary::after {
  content: "\2212";
}

.post-faq .ans {
  padding: 0 2rem 1rem 0;
  font-size: 0.98rem;
  color: var(--muted);
}

.post-faq .ans p {
  margin: 0;
}

/* ── CTA ───────────────────────────────────────────────────────────────── */

.post-cta {
  background: var(--navy);
  color: #f5f1ea;
  border-radius: var(--radius);
  padding: 1.7rem 1.8rem;
  margin: 2.6rem 0;
}

.post-cta-h {
  margin: 0 0 0.4rem;
  font-family: var(--serif);
  font-size: 1.5rem;
}

.post-cta p {
  margin: 0 0 1.1rem;
  color: #d8d2c6;
  font-size: 0.97rem;
}

.post-cta .btn-solid {
  background: #f5f1ea;
  color: var(--navy);
  border-color: #f5f1ea;
}

.post-cta .btn-solid:hover {
  background: #fff;
  color: var(--navy);
}

/* ── Tables ────────────────────────────────────────────────────────────── */

.post-table-wrap {
  overflow-x: auto;
  margin: 2rem 0;
}

.post-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.post-table th,
.post-table td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--border);
}

.post-table th {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

/* ── Prev / next ───────────────────────────────────────────────────────── */

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding-bottom: 3rem;
}

.post-nav a {
  display: block;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  text-decoration: none;
  color: var(--fg);
  font-weight: 700;
  font-size: 0.97rem;
  line-height: 1.45;
}

.post-nav a:hover {
  border-color: var(--navy);
}

.post-nav a span {
  display: block;
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.post-nav-next {
  text-align: right;
}

/* ── Card grids ────────────────────────────────────────────────────────── */

.post-more {
  padding: 3rem 1.2rem;
  border-top: 1px solid var(--border);
}

.post-more h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.8rem;
  margin: 0 0 1.6rem;
}

.post-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.4rem;
}

/* The index is a fixed three-up rather than auto-fit. auto-fit stretches a
   single card to the full 1140px measure, and one post at full bleed reads as a
   broken page rather than as a blog with one post in it. */
.post-cards-index {
  margin-top: 2.4rem;
  grid-template-columns: repeat(3, 1fr);
  text-align: left;
}

@media (max-width: 900px) {
  .post-cards-index {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .post-cards-index {
    grid-template-columns: 1fr;
  }
}

.post-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  text-decoration: none;
  color: var(--fg);
  transition: border-color 0.12s ease, transform 0.12s ease;
}

.post-card:hover {
  border-color: var(--navy);
  transform: translateY(-2px);
}

.post-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.post-card-body {
  padding: 1rem 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.post-card-cluster {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.post-card-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.22rem;
  line-height: 1.25;
}

.post-card-excerpt {
  margin: 0;
  font-size: 0.89rem;
  color: var(--muted);
  line-height: 1.6;
}

.post-card-date {
  margin: auto 0 0;
  padding-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--muted);
}

/* ── Phone ─────────────────────────────────────────────────────────────── */

@media (max-width: 700px) {

  .post-fig-left,
  .post-fig-right {
    float: none;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .post-menu-item {
    flex-direction: column;
  }

  .post-menu-item img {
    width: 100%;
    max-width: none;
    aspect-ratio: 16 / 9;
  }

  .post-nav {
    grid-template-columns: 1fr;
  }

  .post-nav-next {
    text-align: left;
  }
}

@media print {

  .post-cta,
  .post-nav,
  .post-more,
  .post-toc {
    display: none;
  }
}

/* The index centres its heading block; the breadcrumb above it stays left. */
.crumbs-left {
  text-align: left;
}
