:root {
  --forest: #1a3828;
  --teal: #1b8c8a;
  --teal-hover: #156f6d;
  --aqua: #7bcfcc;
  --warm-white: #f7f5f0;
  --golden: #e8a84a;
  --blush: #f4c2d0;
  --slate: #64748b;

  --border: rgba(26, 56, 40, 0.1);
  --border-subtle: rgba(26, 56, 40, 0.08);

  --shadow-sm: 0 4px 12px rgba(26, 56, 40, 0.06);
  --shadow-md: 0 10px 24px rgba(26, 56, 40, 0.08);
  --shadow-lg: 0 16px 40px rgba(26, 56, 40, 0.07);
  --shadow-xl: 0 20px 48px rgba(26, 56, 40, 0.11);

  --radius: 9px;
  --radius-md: 14px;
  --radius-lg: 18px;

  /* Context tokens. Components read these instead of raw palette colours, so a
     dark section flips them once and everything inside follows. */
  --text: var(--forest);
  --accent: var(--teal);
  --rule: var(--border);
  --btn-bg: var(--forest);
  --btn-fg: var(--warm-white);

  --inner: 1160px;
  --pad: clamp(1.25rem, 5vw, 3.5rem);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Montserrat", Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--warm-white);
  line-height: 1.6;
}

a {
  color: var(--teal);
}
a:hover {
  color: var(--teal-hover);
}

.page {
  /* blocks manage their own layout */
}

.blk {
  margin-block: 0;
}

/* ── NAV ──────────────────────────────────────────── */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px var(--pad);
  background: rgba(247, 245, 240, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border-subtle);
}
.nav-logo {
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: 22px;
  color: var(--forest);
  text-decoration: none;
}
.nav-links {
  display: flex;
  gap: 36px;
  align-items: center;
}
.nav-link {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--forest);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-link:hover,
.nav-link.active {
  color: var(--teal);
}
.nav-link.muted {
  opacity: 0.6;
  font-size: 13px;
}
.nav-link.nav-account {
  color: var(--teal);
}

.nav-account-menu {
  position: relative;
}
.nav-account-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 0;
  color: var(--teal);
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
}
.nav-dropdown {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  min-width: 160px;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 20;
}
.nav-account-menu [x-cloak] {
  display: none;
}
.nav-dropdown a {
  padding: 9px 12px;
  border-radius: 7px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--forest);
  text-decoration: none;
}
.nav-dropdown a:hover {
  background: var(--warm-white);
  color: var(--teal);
}
.nav-dropdown-current {
  display: block;
  padding: 9px 12px;
  border-radius: 7px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--teal);
  background: var(--warm-white);
}
.nav-toggle,
.nav-drawer-close {
  display: none;
}
.nav-backdrop {
  display: none;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 4px;
    color: var(--forest);
    cursor: pointer;
  }
  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(26, 56, 40, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 100;
  }
  .nav-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(78vw, 320px);
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 64px 20px 24px;
    box-shadow: var(--shadow-xl);
    transform: translateX(100%);
    z-index: 101;
    overflow-y: auto;
  }
  /* Only animate the slide when JS explicitly toggles it (click/Escape) —
     never as a side effect of this media query switching on during a
     browser resize, which would otherwise animate a "jump" transition. */
  .nav-links.nav-animate {
    transition: transform 0.25s ease;
  }
  .nav-links.is-open {
    transform: translateX(0);
  }
  .nav-links .nav-link {
    width: 100%;
    padding: 12px 4px;
  }
  .nav-links .nav-account-menu {
    width: 100%;
  }
  .nav-links .nav-account-btn {
    width: 100%;
    justify-content: space-between;
    padding: 12px 4px;
  }
  .nav-dropdown {
    position: static;
    box-shadow: none;
    border: none;
    padding: 4px 0 0;
    min-width: 0;
  }
  .nav-drawer-close {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    color: var(--forest);
    cursor: pointer;
  }
}

/* ── FOOTER ───────────────────────────────────────── */
.footer {
  padding: 64px var(--pad) 40px;
  background: var(--forest);
  color: var(--warm-white);
  margin-top: 40px;
}
.footer-inner {
  max-width: var(--inner);
  margin: 0 auto;
}
.footer-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 64px;
  margin-bottom: 48px;
}
.footer-brand {
  flex: 1.4 1 260px;
}
.footer-col {
  flex: 1 1 160px;
}
.footer-logo {
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: 24px;
  margin-bottom: 14px;
}
.footer-tagline {
  font-size: 14px;
  line-height: 1.65;
  opacity: 0.8;
  max-width: 300px;
  margin: 0;
}
.footer-col-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--aqua);
  margin-bottom: 16px;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 11px;
  font-size: 14px;
  opacity: 0.85;
}
.footer-links a {
  color: inherit;
  text-decoration: none;
}
.footer-links a:hover {
  opacity: 1;
  text-decoration: underline;
}
.footer-bottom {
  border-top: 1px solid rgba(247, 245, 240, 0.15);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  align-items: center;
}
.footer-credit {
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-size: 15px;
  opacity: 0.85;
}
/* Signature treatment: the credit line closes the page like a signed note,
   with a single drawn flourish underneath instead of trailing into fine print. */
.footer-credit-signature {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  font-size: 17px;
}
.footer-signature-flourish { color: var(--golden); }

/* ── BUTTONS ──────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
  border: none;
  line-height: 1;
}
.btn.primary {
  background: var(--btn-bg);
  color: var(--btn-fg);
}
.btn.primary:hover {
  background: var(--btn-bg); filter: brightness(1.12);
  color: var(--btn-fg);
}
.btn.teal {
  background: var(--teal);
  color: #fff;
}
.btn.teal:hover {
  background: var(--teal-hover);
  color: #fff;
}
.btn.outline {
  background: transparent;
  border: 1.5px solid var(--text);
  color: var(--text);
  padding: 12px 28px;
}
.btn.outline:hover {
  background: var(--btn-bg);
  color: var(--btn-fg);
}
.btn.golden {
  background: var(--golden);
  color: #fff;
}
.btn.golden:hover {
  background: #c98a2f;
  color: #fff;
}

/* ── BADGES ───────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}
.badge.teal {
  background: rgba(27, 140, 138, 0.1);
  color: var(--teal);
}
.badge.golden {
  background: rgba(232, 168, 74, 0.15);
  color: #a97418;
}
.badge.aqua {
  background: var(--aqua);
  color: var(--forest);
}
.badge.published {
  background: #dcfce7;
  color: #166534;
}
.badge.draft {
  background: #fef9c3;
  color: #854d0e;
}

/* ── HERO ─────────────────────────────────────────── */
.blk.hero {
  position: relative;
  padding: 96px var(--pad);
  text-align: center;
}
/* Size steps. The background image is inset into the section, so the vertical
   padding is what sets the banner's height — it moves with the type scale so a
   small hero can't end up with a landing-page-sized title. "lg" restates the
   defaults above so the three steps read as one scale. */
.blk.hero.hero-xl { padding: 128px var(--pad); }
.blk.hero.hero-lg { padding: 96px var(--pad); }
.blk.hero.hero-md { padding: 64px var(--pad); }
.blk.hero.hero-sm { padding: 40px var(--pad); }
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}
.hero-inner {
  position: relative;
  max-width: var(--inner);
  margin: 0 auto;
}
.hero-inner h1 {
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  line-height: 1.15;
  color: var(--text);
  max-width: 720px;
  margin: 0 auto 24px;
}
.blk.hero.hero-xl .hero-inner h1 {
  /* Same measurement as the Title block's xl, the one step where a hero
     heading and a page heading legitimately meet. */
  font-size: clamp(3rem, 6vw, 5rem);
  max-width: 860px;
  margin-bottom: 28px;
}
.blk.hero.hero-md .hero-inner h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  max-width: 640px;
  margin-bottom: 18px;
}
.blk.hero.hero-sm .hero-inner h1 {
  font-size: clamp(1.625rem, 3vw, 2.125rem);
  max-width: 560px;
  margin-bottom: 14px;
}
.hero-sub {
  font-size: 18px;
  color: var(--text);
  opacity: 0.7;
  margin: 0 auto 40px;
  max-width: 460px;
  line-height: 1.6;
}
.blk.hero.hero-xl .hero-sub { font-size: clamp(1.1rem, 2vw, 1.375rem); margin-bottom: 44px; max-width: 520px; }
.blk.hero.hero-md .hero-sub { font-size: 16.5px; margin-bottom: 30px; }
.blk.hero.hero-sm .hero-sub { font-size: 15.5px; margin-bottom: 22px; max-width: 420px; }
.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── PAGE HEADER ──────────────────────────────────── */
.blk.page-header {
  padding: 52px var(--pad);
  max-width: calc(var(--inner) + 2 * var(--pad));
  margin: 0 auto;
}
.blk.page-header h1 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 2.75rem); /* lg default */
  margin: 0 0 0.5rem;
  color: var(--text);
  line-height: 1.15;
}
.page-header-sub {
  font-size: 1rem;
  color: var(--text);
  opacity: 0.7;
  line-height: 1.6;
  max-width: 560px;
  margin: 0;
}

/* Size variants */
.blk.page-header.ph-xl h1  { font-size: clamp(3rem,   6vw, 5rem);     margin-bottom: 1.75rem; }
.blk.page-header.ph-xl .page-header-sub { font-size: clamp(1.1rem, 2vw, 1.375rem); }

.blk.page-header.ph-lg h1  { font-size: clamp(2rem,   4vw, 2.75rem);  margin-bottom: 1.25rem; }
.blk.page-header.ph-lg .page-header-sub { font-size: clamp(1rem, 1.5vw, 1.125rem); }

.blk.page-header.ph-md h1  { font-size: clamp(1.5rem, 3vw, 2rem);     margin-bottom: 0.625rem; }
.blk.page-header.ph-md .page-header-sub { font-size: 0.9375rem; }

.blk.page-header.ph-sm h1  { font-size: clamp(1.1rem, 2vw, 1.375rem); margin-bottom: 0.375rem; }
.blk.page-header.ph-sm .page-header-sub { font-size: 0.875rem; }

/* Alignment variants */
.blk.page-header.ph-center { text-align: center; }
.blk.page-header.ph-center .page-header-sub { margin: 0 auto; }
.blk.page-header.ph-right  { text-align: right; }
.blk.page-header.ph-right  .page-header-sub { margin: 0 0 0 auto; }

/* Color variants — applied to text */
.blk.page-header.ph-var-white      h1,
.blk.page-header.ph-var-white      .page-header-sub { color: #fff; opacity: 1; }
.blk.page-header.ph-var-warm-white h1,
.blk.page-header.ph-var-warm-white .page-header-sub { color: var(--warm-white); opacity: 1; }
.blk.page-header.ph-var-teal       h1,
.blk.page-header.ph-var-teal       .page-header-sub { color: var(--teal); opacity: 1; }
.blk.page-header.ph-var-forest     h1,
.blk.page-header.ph-var-forest     .page-header-sub { color: var(--forest); opacity: 1; }
.blk.page-header.ph-var-golden     h1,
.blk.page-header.ph-var-golden     .page-header-sub { color: var(--golden); opacity: 1; }
.blk.page-header.ph-var-blush      h1,
.blk.page-header.ph-var-blush      .page-header-sub { color: var(--blush); opacity: 1; }

/* ── EMAIL CAPTURE ────────────────────────────────── */
.blk.email-capture {
  padding: 28px var(--pad);
}
.blk.email-capture,
.email-capture-fields-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.email-capture [x-cloak] { display: none; }
/* The confirmed state renders the message and the form together so the
   5s revert is a client-side toggle. Grid-stacking them in the same cell
   means the opacity crossfade overlaps instead of both taking up flex
   space at once — which is what made the swap look broken mid-transition. */
.blk.email-capture.email-capture--stack {
  display: grid;
  grid-template-columns: 1fr;
}
.email-capture--stack > .ec-confirm,
.email-capture--stack > .email-capture-fields-wrap {
  grid-area: 1 / 1;
  width: 100%;
  min-width: 0;
}
.ec-confirm {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 22px 28px;
  background: rgba(27, 140, 138, 0.08);
  border: 1px solid rgba(27, 140, 138, 0.25);
  border-radius: 14px;
  text-align: center;
}
.ec-confirm .email-capture-text h3 { color: var(--teal); font-size: 16px; }
.ec-confirm .email-capture-text p { opacity: 0.75; }
.email-capture-text h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
  font-family: inherit;
}
.email-capture-text p {
  font-size: 12.5px;
  color: var(--text);
  opacity: 0.6;
  margin: 0;
}
.email-capture-fields {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}
.blk.email-capture input {
  width: 220px;
  min-width: 0;
  flex: 1 1 auto;
  padding: 11px 14px;
  border: 1.5px solid rgba(26, 56, 40, 0.2);
  background-color: #fff;
  border-radius: 8px;
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
  color: var(--forest);
}
.blk.email-capture input:focus {
  border-color: var(--teal);
}
.email-capture-fields .btn { flex: 0 0 auto; white-space: nowrap; }

@media (max-width: 768px) {
  .blk.email-capture,
  .email-capture-fields-wrap {
    flex-direction: column;
    align-items: stretch;
  }
  .email-capture-text { text-align: center; }
  .email-capture-fields {
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    width: 100%;
  }
  .blk.email-capture input { width: 100%; }
  .email-capture-fields .btn { width: 100%; }
}

/* ── BUTTON ───────────────────────────────────────── */
.blk.button-wrap {
  display: flex;
  padding: 0.5rem var(--pad);
  max-width: calc(var(--inner) + 2 * var(--pad));
  margin: 0 auto;
}
.blk.button-wrap.btn-align-left   { justify-content: flex-start; }
.blk.button-wrap.btn-align-center { justify-content: center; }
.blk.button-wrap.btn-align-right  { justify-content: flex-end; }
.btn-block {
  display: inline-block;
  font-family: inherit;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius);
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  cursor: pointer;
  /* default: medium primary */
  padding: 14px 28px;
  font-size: 15px;
  background: var(--teal);
  color: #fff;
  border: 2px solid var(--teal);
}
.btn-block:hover { background: var(--teal-hover); border-color: var(--teal-hover); color: #fff; }
/* Styles */
.btn-block.btn-secondary { background: #fff; color: var(--forest); border-color: var(--rule); }
.btn-block.btn-secondary:hover { background: var(--warm-white); }
.btn-block.btn-ghost { background: transparent; color: var(--text); border-color: transparent; }
.btn-block.btn-ghost:hover { background: rgba(26,56,40,0.06); }
/* Sizes */
.btn-block.btn-sz-small  { padding: 9px 18px; font-size: 13px; }
.btn-block.btn-sz-large  { padding: 18px 40px; font-size: 17px; border-radius: var(--radius-md); }
/* Inside stack/grid — remove the wrapper padding so it flows naturally */
.stack-body > .blk.button-wrap,
.grid-body  > .blk.button-wrap { padding: 0; max-width: none; }

/* ── AUTHOR NOTE ──────────────────────────────────── */
.blk.author-note {
  padding: 64px var(--pad);
  max-width: calc(var(--inner) + 2 * var(--pad));
  margin: 0 auto;
}
.author-note-inner {
  display: flex;
  gap: 48px;
  align-items: center;
}
.author-photo {
  width: 160px;
  height: 160px;
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  background: var(--warm-white);
}
.author-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.author-content {
  flex: 1;
}
.author-eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  opacity: 0.5;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.author-body {
  font-size: 15.5px;
  color: var(--text);
  opacity: 0.8;
  line-height: 1.75;
  margin: 0 0 14px;
}
.author-credit {
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-size: 15px;
  color: var(--text);
  opacity: 0.7;
}

/* ── BUTTON GROUP ─────────────────────────────────── */
.blk.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: calc(var(--inner) + 2 * var(--pad));
  margin: 0 auto;
  padding: 0 var(--pad);
}
.blk.button-group.bg-align-center { justify-content: center; }
.blk.button-group.bg-align-right  { justify-content: flex-end; }
.blk.button-group.bg-align-left,
.blk.button-group:not([class*="bg-align"]) { justify-content: flex-start; }

.btn-group-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2rem;
  border-radius: 0.75rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s, box-shadow 0.15s;
}
.btn-group-item:hover { opacity: 0.88; }
.btn-group-item.btn-primary  { background: var(--teal); color: #fff; border: 2px solid var(--teal); }
.btn-group-item.btn-secondary { background: transparent; color: var(--text); border: 2px solid var(--text); }
.btn-group-item.btn-ghost    { background: transparent; color: var(--text); border: 2px solid transparent; }

@media (max-width: 768px) {
  .blk.button-group { flex-direction: column; }
  .btn-group-item   { width: 100%; }
}

/* ── SPACER ───────────────────────────────────────── */
.blk.spacer-small  { height: 1.5rem; }
.blk.spacer-medium { height: 3rem; }
.blk.spacer-large  { height: 5rem; }
.blk.spacer-xlarge { height: 8rem; }

/* ── STAT ─────────────────────────────────────────── */
.blk.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem 0;
}
.stat-value {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 0.4rem;
}
.stat-label {
  font-size: 1rem;
  color: var(--text);
  opacity: 0.55;
  line-height: 1.4;
}

/* ── CALLOUT BAND ────────────────────────────────── */
.blk.callout {
  padding: 0 var(--pad) 72px;
  max-width: calc(var(--inner) + 2 * var(--pad));
  margin: 0 auto;
}
.callout-card {
  border-radius: 16px;
  padding: 40px 48px;
  display: flex;
  gap: 40px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.callout-card.callout-align-center {
  flex-direction: column;
  justify-content: center;
  text-align: center;
  gap: 28px;
}
.callout-copy { flex: 1 1 320px; min-width: 0; }
.callout-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px 48px;
  flex: 1 1 auto;
  width: 100%;
}
.callout-column .callout-text { opacity: 0.9; }
.callout-eyebrow {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.65;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 12px;
}
.callout-heading {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: 28px;
  line-height: 1.25;
  margin: 0 0 12px;
}
.callout-text {
  font-size: 16px;
  line-height: 1.65;
  margin: 0;
}
.callout-actions { display: flex; gap: 12px; flex-wrap: wrap; flex: none; }
/* Background variants — aqua is the band's signature, the rest come from the
   shared brand palette (see paletteVariants in Go). */
.callout-card.bg-aqua       { background: var(--aqua);       color: var(--forest); }
.callout-card.bg-white      { background: #fff;              color: var(--forest); border: 1px solid var(--rule); }
.callout-card.bg-warm-white { background: var(--warm-white); color: var(--forest); }
.callout-card.bg-teal       { background: var(--teal);       color: #fff; }
.callout-card.bg-forest     { background: var(--forest);     color: #fff; }
.callout-card.bg-golden     { background: var(--golden);     color: var(--forest); }
.callout-card.bg-blush      { background: var(--blush);      color: var(--forest); }
/* On dark bands the outlined button styles need to flip to stay visible. */
@media (max-width: 780px) {
  .callout-card { padding: 28px 24px; gap: 24px; }
  .callout-actions { width: 100%; }
}

/* ── PROSE (RICH TEXT) ────────────────────────────── */
.blk.prose {
  max-width: calc(var(--inner) + 2 * var(--pad));
  margin: 2.5rem auto;
  padding: 0 var(--pad);
  font-size: 16px;
  line-height: 1.8;
  /* Contain floats: an image taller than the text beside it would otherwise
     escape the block and overlap whatever section comes next. */
  display: flow-root;
}
/* Headings match the rest of the site: Fraunces 500 in forest, same as
   .blk.page-header h1 / .callout-heading / .card-title. All six levels, since
   the editor's Styles menu offers all six. */
.blk.prose h1,
.blk.prose h2,
.blk.prose h3,
.blk.prose h4,
.blk.prose h5,
.blk.prose h6 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  color: var(--text);
  line-height: 1.2;
  margin: 2.25rem 0 0.75rem;
}
.blk.prose h1 { font-size: clamp(1.9rem, 3.5vw, 2.4rem); }
.blk.prose h2 { font-size: clamp(1.6rem, 3vw, 2rem); }
.blk.prose h3 { font-size: 1.4rem; }
.blk.prose h4 { font-size: 1.15rem; }
.blk.prose h5,
.blk.prose h6 { font-size: 1rem; }
.blk.prose h6 { opacity: 0.75; }

.blk.prose p {
  margin: 0 0 1.25rem;
}
.blk.prose ul,
.blk.prose ol {
  margin: 0 0 1.25rem;
  padding-left: 1.4rem;
}
.blk.prose li {
  margin-bottom: 0.4rem;
}
.blk.prose blockquote {
  margin: 1.75rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 3px solid var(--accent);
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-size: 17px;
  color: var(--text);
  opacity: 0.85;
}
.blk.prose hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2.5rem 0;
}
/* Tables and code blocks — both insertable from the toolbar, so both need to
   look like the site rather than browser defaults. */
.blk.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.75rem 0;
  font-size: 15px;
}
.blk.prose th,
.blk.prose td {
  border: 1px solid var(--rule);
  padding: 0.6rem 0.75rem;
  text-align: left;
}
.blk.prose th {
  /* A tint rather than warm-white, so the header row still reads on a
     warm-white or coloured section background. */
  background: rgba(26, 56, 40, 0.05);
  font-weight: 700;
}
.blk.prose code {
  font-size: 0.9em;
  background: rgba(26, 56, 40, 0.06);
  padding: 0.15em 0.4em;
  border-radius: 5px;
}
.blk.prose pre {
  background: var(--forest);
  color: var(--warm-white);
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  margin: 1.75rem 0;
  font-size: 13.5px;
  line-height: 1.65;
  /* Long lines scroll inside the block instead of widening the page. */
  overflow-x: auto;
}
.blk.prose pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}
.blk.prose :first-child {
  margin-top: 0;
}
/* flow-root stops the last child's margin collapsing out of the block, which
   would otherwise stack on top of the wrapper's own 2.5rem. */
.blk.prose > :last-child {
  margin-bottom: 0;
}
.blk.prose img {
  max-width: 100%;
  height: auto;
}
/* Text wrapping around an image. Pick "Float left/right" in the image dialog's
   class list — that puts img-left/img-right on the <img>, which is deterministic,
   unlike the align-left/right toolbar buttons (those only float an image when the
   image itself is selected, and otherwise just set text-align on the paragraph).
   A captioned image is wrapped in <figure class="image"> with the class still on
   the inner <img>, so the figure is what floats and the img resets. */
.blk.prose img.img-left,
.blk.prose figure.image:has(img.img-left) {
  float: left;
  max-width: 48%;
  margin: 0.4rem 1.75rem 1rem 0;
}
.blk.prose img.img-right,
.blk.prose figure.image:has(img.img-right) {
  float: right;
  max-width: 48%;
  margin: 0.4rem 0 1rem 1.75rem;
}
.blk.prose figure.image img.img-left,
.blk.prose figure.image img.img-right {
  float: none;
  max-width: 100%;
  margin: 0;
}
/* The align-left/right buttons still work when an image is genuinely selected,
   via an inline float (both spacings — the editor serialises with a space, hand
   written HTML often without) or an align-* class on a figure. */
.blk.prose img[style*="float: left"],
.blk.prose img[style*="float:left"],
.blk.prose figure.image.align-left {
  float: left;
  max-width: 48%;
  margin: 0.4rem 1.75rem 1rem 0;
}
.blk.prose img[style*="float: right"],
.blk.prose img[style*="float:right"],
.blk.prose figure.image.align-right {
  float: right;
  max-width: 48%;
  margin: 0.4rem 0 1rem 1.75rem;
}
.blk.prose figure.image {
  margin: 1.75rem 0;
  display: table;
}
.blk.prose figure.image img {
  margin: 0;
}
.blk.prose figure.image figcaption {
  display: table-caption;
  caption-side: bottom;
  padding-top: 0.5rem;
  font-size: 13.5px;
  line-height: 1.5;
  opacity: 0.65;
}
.blk.prose figure.image.align-center {
  margin-inline: auto;
}
/* A new section never collides with a float above it; `.clear` is the manual
   escape hatch, exposed as "Clear floats" in the editor's Styles menu. */
.blk.prose h2,
.blk.prose h3,
.blk.prose .clear {
  clear: both;
}
@media (max-width: 640px) {
  .blk.prose img[style*="float"],
  .blk.prose img.img-left,
  .blk.prose img.img-right,
  .blk.prose figure.image.align-left,
  .blk.prose figure.image.align-right,
  .blk.prose figure.image:has(img.img-left),
  .blk.prose figure.image:has(img.img-right) {
    float: none !important;
    max-width: 100%;
    margin: 1.5rem 0;
  }
}
.blk.prose a {
  color: var(--accent);
}
/* On dark section backgrounds, links can't be teal — inherit white and underline */
.blk.section.bg-teal   .blk.prose a,
.blk.section.bg-forest .blk.prose a { text-decoration: underline; }

/* ── IMAGE ────────────────────────────────────────── */
.blk.image {
  max-width: calc(var(--inner) + 2 * var(--pad));
  margin: 2.5rem auto;
  padding: 0 var(--pad);
}
/* Width variants */
.blk.image.w-full  { max-width: calc(var(--inner) + 2 * var(--pad)); }
.blk.image.w-large { max-width: 900px; }
.blk.image.w-medium { max-width: 640px; }
.blk.image.w-small { max-width: 380px; }
/* Alignment (only meaningful when width < full) */
.blk.image.align-left   { margin-left: 0; margin-right: auto; }
.blk.image.align-center { margin-left: auto; margin-right: auto; }
.blk.image.align-right  { margin-left: auto; margin-right: 0; }
.blk.image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  display: block;
  object-fit: cover;
}
/* Crop ratios — the same named ratios cards use, so images and card media
   line up when they sit next to each other. */
.blk.image.img-16x9 img { aspect-ratio: 16 / 9; }
.blk.image.img-4x3  img { aspect-ratio: 4 / 3; }
.blk.image.img-1x1  img { aspect-ratio: 1 / 1; }
.blk.image.img-auto img { aspect-ratio: auto; object-fit: contain; }
.blk.image figcaption {
  color: var(--text);
  opacity: 0.55;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  text-align: center;
}

/* ── STACK ────────────────────────────────────────── */
.blk.stack {
  padding: 0 var(--pad);
  max-width: calc(var(--inner) + 2 * var(--pad));
  margin: 0 auto;
}
.stack-body {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 1.5rem;
}
.blk.stack.dir-column .stack-body { flex-direction: column; }
.blk.stack.gap-none   .stack-body { gap: 0; }
.blk.stack.gap-small  .stack-body { gap: 0.75rem; }
.blk.stack.gap-medium .stack-body { gap: 1.5rem; }
.blk.stack.gap-large  .stack-body { gap: 3rem; }
.blk.stack.align-start   .stack-body { align-items: flex-start; }
.blk.stack.align-center  .stack-body { align-items: center; }
.blk.stack.align-end     .stack-body { align-items: flex-end; }
.blk.stack.align-stretch .stack-body { align-items: stretch; }
.blk.stack.wrap .stack-body { flex-wrap: wrap; }
/* Reset child block margins inside stack */
.stack-body > .blk { margin: 0; padding: 0; max-width: none; flex: 1 1 0; min-width: 0; }

/* ── GRID ─────────────────────────────────────────── */
.blk.grid {
  padding: 0 var(--pad);
  max-width: calc(var(--inner) + 2 * var(--pad));
  margin: 0 auto;
}
.blk.grid:has(.grid-heading) {
  padding-top: 72px;
  padding-bottom: 72px;
}
.grid-heading h2 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: 24px;
  color: var(--text);
  margin: 0 0 4px;
}
.grid-sub {
  font-size: 13.5px;
  color: var(--text);
  opacity: 0.55;
  margin: 0 0 24px;
}
.grid-body {
  display: grid;
  /* minmax(0, 1fr), not bare 1fr: a plain 1fr track's implicit minimum is
     "auto" (content-based), so columns with longer content grow wider than
     columns with shorter content instead of splitting the row evenly. */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}
.blk.grid.cols-2 .grid-body { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.blk.grid.cols-3 .grid-body { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.blk.grid.cols-4 .grid-body { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.blk.grid.gap-none   .grid-body { gap: 0; }
.blk.grid.gap-small  .grid-body { gap: 0.75rem; }
.blk.grid.gap-medium .grid-body { gap: 1.5rem; }
.blk.grid.gap-large  .grid-body { gap: 3rem; }
/* Reset child block margin/max-width inside grid. Individual block types
   (e.g. .blk.card) set their own centering margin/max-width for standalone
   placement; ".blk.grid .grid-body > .blk" out-specifies those two-class
   selectors (4 classes vs. 2) so it wins the cascade on its own merits,
   without !important. min-width: 0 overrides the grid item's own default
   auto min-width, which is otherwise based on the item's content and can
   keep it from shrinking to the column's actual width. padding is
   intentionally left alone: it's each block's own internal spacing (e.g.
   .blk.card's 20px), not a standalone-placement concern, so it must keep
   cascading normally. */
.blk.grid .grid-body > .blk { margin: 0; max-width: none; min-width: 0; }
/* Responsive: collapse to single column on mobile */
@media (max-width: 768px) {
  .stack-body { flex-direction: column !important; align-items: stretch !important; }
  .stack-body > .blk { flex: none !important; width: 100% !important; }
  .grid-body  { grid-template-columns: 1fr !important; }
}

/* ── QUOTE ────────────────────────────────────────── */
.blk.quote {
  max-width: 720px;
  margin: 2.5rem auto;
  padding: 0.5rem 0 0.5rem 1.5rem;
  border-left: 3px solid var(--accent);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text);
}
.blk.quote cite {
  display: block;
  font-style: normal;
  font-size: 0.95rem;
  opacity: 0.6;
  margin-top: 0.5rem;
}
.blk.quote cite::before {
  content: "— ";
}

/* ── FAQ ──────────────────────────────────────────── */
.blk.faq {
  max-width: 760px;
  margin: 2.5rem auto;
  padding: 0 var(--pad);
}
.blk.faq h2 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: 28px;
  margin: 0 0 24px;
  color: var(--text);
}
.blk.faq dl {
  display: grid;
  gap: 0.25rem;
}
.blk.faq dt {
  font-weight: 700;
  margin-top: 1rem;
  color: var(--text);
}
.blk.faq dd {
  margin: 0;
  opacity: 0.75;
}

/* ── SECTION (container) ──────────────────────────── */
.blk.section {
  max-width: calc(var(--inner) + 2 * var(--pad));
  margin: 0 auto;
}
.blk.section.full-width {
  max-width: none;
  margin: 0;
}
.section-inner {
  padding: 2rem var(--pad);
}
.blk.section.full-width .section-inner {
  max-width: calc(var(--inner) + 2 * var(--pad));
  margin: 0 auto;
}
/* Vertical padding variants */
.blk.section.pad-none   .section-inner { padding-top: 0;      padding-bottom: 0; }
.blk.section.pad-small  .section-inner { padding-top: 1rem;   padding-bottom: 1rem; }
.blk.section.pad-large  .section-inner { padding-top: 4rem;   padding-bottom: 4rem; }
/* Horizontal padding variants */
.blk.section.padx-none  .section-inner { padding-left: 0;     padding-right: 0; }
.blk.section.padx-small .section-inner { padding-left: 1rem;  padding-right: 1rem; }
.blk.section.padx-large .section-inner { padding-left: 6rem;  padding-right: 6rem; }
/* Background colour variants */
.blk.section.bg-white      { background: #fff; }
.blk.section.bg-warm-white { background: var(--warm-white); }
.blk.section.bg-teal       { background: var(--teal); color: #fff; }
.blk.section.bg-forest     { background: var(--forest); color: #fff; }
.blk.section.bg-golden     { background: var(--golden); }
.blk.section.bg-blush      { background: var(--blush); }

/* ── GRAIN ────────────────────────────────────────────
   A tiling fractal-noise SVG, inline as a data URI — no request, no image file,
   and it scales to any viewport. `--grain` is the shared texture; everything
   that uses it differs only in how hard it pushes it.

   The three strengths below are the taste knobs — the only numbers worth
   touching. They differ because the blend mode behaves differently on each
   ground, not arbitrarily:

     page  multiply on the warm white. This tile is light (mean 246/255) and
           low-contrast (sd 15), so it needs a far higher opacity than it looks
           like it should — at 0.08 the page varies by 3 levels out of 255,
           which is invisible. 0.35 gives ~14 levels, which reads as grain.
           Multiply only ever darkens, but the tile is light enough that the
           cost is small: 0.35 takes #f7f5f0 to #f4f2ed. Roughly 40 levels of
           spread per 1.0 of opacity if you want to re-derive it.
     mid   soft-light on golden and blush. Soft-light modulates a mid-tone
           harder than anything else, so this is the tier that needs the least.
     dark  soft-light on forest, teal and the footer. Near-black compresses the
           blend, so it takes the most to show at all.

   Raise or lower them together to keep the page feeling like one surface. */
:root {
  --grain: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='150' height='150'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/></filter><rect width='150' height='150' filter='url(%23g)'/></svg>");

  --grain-page: 0.35;
  --grain-mid: 0.4;
  --grain-dark: 0.7;
}

/* Behind the content, not over it. A negative z-index puts this above the page
   background but below everything drawn on it, so grain is a property of the
   ground rather than a sheet laid over the site: cards, images and text sit on
   the texture and cover it, the way ink sits on paper. At `z-index: 0` it
   instead tinted every card and photograph on the page. */
.site-grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: var(--grain-page);
  mix-blend-mode: multiply;
  background-image: var(--grain);
  background-size: 150px 150px;
}

/* Any ground with a colour of its own carries its own grain. `.site-grain` is
   tuned for the warm white and vanishes on anything more saturated, so each
   coloured ground re-applies the texture at a strength that suits it.

   Each ground picks up one of the tiers defined at the top of this file rather
   than a number of its own — the tier is the only thing that differs between
   them. Adding a colour means pointing it at a tier and adding it to the lists
   below. */
.blk.section.bg-forest,
.blk.section.bg-teal,
.footer {
  --grain-strength: var(--grain-dark);
}
.blk.section.bg-golden,
.blk.section.bg-blush {
  --grain-strength: var(--grain-mid);
}

.blk.section.bg-forest,
.blk.section.bg-teal,
.blk.section.bg-golden,
.blk.section.bg-blush,
.footer {
  position: relative;
  /* Keeps the blend from reaching through to whatever is behind. */
  isolation: isolate;
}
.blk.section.bg-forest::after,
.blk.section.bg-teal::after,
.blk.section.bg-golden::after,
.blk.section.bg-blush::after,
.footer::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: var(--grain-strength);
  mix-blend-mode: soft-light;
  background-image: var(--grain);
  background-size: 150px 150px;
}
/* A coloured ground's own content has to sit above its grain. */
.blk.section.bg-forest > *,
.blk.section.bg-teal > *,
.blk.section.bg-golden > *,
.blk.section.bg-blush > *,
.footer > * {
  position: relative;
  z-index: 1;
}

/* Grain costs a little contrast, which is exactly what someone asking for more
   of it can't spare. They get a flat ground. */
@media (prefers-contrast: more) {
  .site-grain,
  .blk.section.bg-forest::after,
  .blk.section.bg-teal::after,
  .blk.section.bg-golden::after,
  .blk.section.bg-blush::after,
  .footer::after {
    display: none;
  }
}

/* ── COLOUR CONTEXTS ──────────────────────────────────
   A dark ground flips the tokens once; everything inside adapts. */
.blk.section.bg-teal,
.blk.section.bg-forest,
.blk.section.section-overlay-dark,
.callout-card.bg-teal,
.callout-card.bg-forest {
  --text: #fff;
  --accent: var(--aqua);
  --rule: rgba(255, 255, 255, 0.28);
  --btn-bg: var(--warm-white);
  --btn-fg: var(--forest);
}
/* ...and any light surface nested inside one flips them back, so a white card
   on a forest section keeps dark text. */
.blk.section.bg-white,
.blk.section.bg-warm-white,
.blk.section.bg-golden,
.blk.section.bg-blush,
.blk.section.section-overlay-light,
.callout-card.bg-white,
.callout-card.bg-warm-white,
.callout-card.bg-aqua,
.callout-card.bg-golden,
.callout-card.bg-blush,
.blk.card,
.bf-card:not(.bf-flat):not(.bf-hero),
.oc-card,
.acct-card,
.download-row,
.gated-notice,
.carousel-nav,
.nav-dropdown,
.accordion--boxed .accordion-panel,
.badge.aqua,
.blk.email-capture input {
  --text: var(--forest);
  --accent: var(--teal);
  --rule: var(--border);
  --btn-bg: var(--forest);
  --btn-fg: var(--warm-white);
}
/* Background image — the URL itself is set inline by the block, since it is
   per-section content. The overlay keeps text readable over a busy photo. */
.blk.section.has-bg-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}
.blk.section.has-bg-image .section-inner { position: relative; z-index: 1; }
.blk.section.section-overlay-dark::before,
.blk.section.section-overlay-light::before {
  content: "";
  position: absolute;
  inset: 0;
}
.blk.section.section-overlay-dark::before  { background: rgba(26, 56, 40, 0.55); }
.blk.section.section-overlay-light::before { background: rgba(255, 255, 255, 0.72); }
.blk.section.section-overlay-dark { color: #fff; }
/* Inherit text colour on dark backgrounds for headings */
.section-body > .blk { margin-left: 0; margin-right: 0; max-width: none; padding-left: 0; padding-right: 0; }
.section-body > .blk:first-child { margin-top: 0; }

/* ── NOT FOUND ────────────────────────────────────── */
.not-found {
  max-width: 520px;
  margin: 0 auto;
  min-height: 60vh;
  padding: 96px var(--pad);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.not-found-illustration {
  width: 220px;
  height: 200px;
  margin: 0 auto 32px;
  border-radius: var(--radius-md);
  object-fit: cover;
}
.not-found-eyebrow {
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: 22px;
  color: var(--forest);
  opacity: 0.35;
  margin-bottom: 10px;
}
.not-found h1 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: 32px;
  line-height: 1.25;
  margin: 0 0 16px;
  color: var(--forest);
}
.not-found p {
  font-size: 15.5px;
  color: var(--forest);
  opacity: 0.7;
  line-height: 1.65;
  margin: 0 0 36px;
}
.not-found-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── UTILITIES ────────────────────────────────────── */
code {
  background: rgba(26, 56, 40, 0.06);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.9em;
}

/* Downloads panel (resource detail pages) */
.downloads-panel { padding: 2rem 1.25rem; }
.downloads-inner { max-width: 48rem; margin: 0 auto; }
.downloads-inner h2 { margin: 0 0 1rem; }
.downloads-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.download-row {
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
  padding: 0.75rem 1rem; background: #fff;
  border: 1px solid rgba(26, 56, 40, 0.12); border-radius: 10px;
}
.download-title { font-weight: 500; font-size: 0.9rem; flex: 1; min-width: 12rem; }
.download-tags { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.download-tags .badge {
  text-transform: capitalize;
  font-weight: 500;
  font-size: 11px;
  padding: 4px 10px;
}
.access-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex: none;
}
.access-icon-paid { background: rgba(232, 168, 74, 0.18); color: #a97418; }
.access-icon-registered { background: var(--aqua, #7bcfcc); color: var(--forest, #1a3828); }
.access-icon-ok { background: rgba(27, 140, 138, 0.15); color: var(--teal, #1b8c8a); }
.download-btn { padding: 8px 18px; font-size: 13px; }

/* ── TOOLTIP (custom, replaces native title=) ────────
   Usage: add class="tooltip" + data-tooltip="text" to any element. */
.tooltip {
  position: relative;
}
.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 9px);
  left: 50%;
  transform: translate(-50%, 4px);
  background: var(--forest);
  color: var(--warm-white);
  font-family: "Montserrat", Helvetica, Arial, sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease, transform 0.12s ease;
  z-index: 30;
}
.tooltip::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--forest);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
  z-index: 30;
}
.tooltip:hover::after,
.tooltip:focus-visible::after,
.tooltip:hover::before,
.tooltip:focus-visible::before {
  opacity: 1;
  transform: translate(-50%, 0);
}
.tooltip:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* Image carousel block */
.carousel { max-width: 46rem; margin: 1.5rem auto; }
.carousel [x-cloak] { display: none; }
.carousel-viewport {
  position: relative;
  aspect-ratio: 4 / 3;          /* fixed height so absolute slides don't collapse it */
  background: var(--aqua-bg, #eef6f5);
  border-radius: 14px;
  overflow: hidden;
}
/* Slides stack on top of each other so switching cross-fades in place
   instead of pushing layout around (no two-image flash / jump). */
.carousel-slide { position: absolute; inset: 0; margin: 0; }
.carousel-slide .carousel-img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.carousel-img { display: block; }
.carousel-single .carousel-img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: 14px; max-width: 46rem; margin: 1.5rem auto;
}
.carousel-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 2.25rem; height: 2.25rem;
  display: flex; align-items: center; justify-content: center;
  background: #fff; color: var(--forest, #1a3828);
  border: none; border-radius: 10px;
  font-size: 1.35rem; line-height: 1; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.carousel-nav:hover { background: var(--warm-white, #f7f5f0); }
.carousel-nav.prev { left: 0.75rem; }
.carousel-nav.next { right: 0.75rem; }
.carousel-thumbs {
  display: flex; gap: 0.6rem; margin-top: 0.75rem;
  overflow-x: auto; padding-bottom: 0.25rem;
}
.carousel-thumb {
  flex: 0 0 auto; width: 5.5rem; height: 4.25rem;
  padding: 0; border: 2px solid transparent; border-radius: 10px;
  overflow: hidden; background: none; cursor: pointer;
  opacity: 0.7; transition: opacity 0.15s, border-color 0.15s;
}
.carousel-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.carousel-thumb:hover { opacity: 1; }
.carousel-thumb.active { opacity: 1; border-color: var(--teal, #1b8c8a); }

/* Bundle feature block (flagship bundle card). Uses the same
   max-width/padding formula as every other block (grid, quote, image,
   section…) so its content edges line up with the rest of the page. */
.bundle-feature { max-width: calc(var(--inner) + 2 * var(--pad)); margin: 2.5rem auto; padding: 0 var(--pad); }
.bf-card {
  display: flex; gap: 48px; align-items: center;
  background: #fff; border: 1px solid rgba(26,56,40,.1);
  border-radius: 18px; box-shadow: 0 16px 40px rgba(26,56,40,.07);
  padding: 44px;
}
.bf-card.bf-flat,
.bf-card.bf-hero { background: none; border: none; box-shadow: none; padding: 0; }
.bf-eyebrow {
  display: block;
  font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--golden); margin-bottom: 14px;
}
a.bf-eyebrow { text-decoration: none; }
a.bf-eyebrow:hover { text-decoration: underline; }
.bf-card.bf-hero .bf-btn { background: var(--teal); }
.bf-card.bf-hero .bf-btn:hover { background: var(--teal-hover); }
.bf-note-inline { font-size: 13px; color: var(--text); opacity: .55; }
.bf-cover { position: relative; width: 260px; flex: none; }
.bf-cover img {
  width: 100%; height: 320px; object-fit: cover;
  border-radius: 12px; box-shadow: 0 12px 28px rgba(26,56,40,.15);
}
.bf-cover .card-overlay { border-radius: 12px; }
.bf-body { flex: 1; min-width: 0; }
.bf-title {
  font-family: "Fraunces", Georgia, serif; font-style: italic; font-weight: 500;
  font-size: 36px; line-height: 1.2; margin-bottom: 16px; color: var(--text);
}
.bf-desc { font-size: 16px; color: var(--text); opacity: .7; line-height: 1.65; margin-bottom: 18px; max-width: 440px; }
.bf-tags { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.bf-tag { padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 700; }
/* Tag pill colors are keyed by type (see tagTypeClass in bundle_feature.go),
   not picked per-tag, so every "Age" tag etc. matches across all bundles. */
.bf-tag-age    { background: rgba(232,168,74,.18); color: #92620b; }
.bf-tag-casel  { background: rgba(27,140,138,.12); color: var(--teal); }
.bf-tag-topic  { background: rgba(244,194,208,.4);  color: #9c3f5e; }
.bf-tag-format { background: rgba(26,56,40,.1);     color: var(--forest); }
.bf-tag-other  { background: rgba(100,116,139,.14); color: var(--slate); }
.bf-included-wrap { margin-bottom: 26px; }
.bf-included-label {
  font-size: 11.5px; font-weight: 700; color: var(--text); opacity: .55;
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px;
}
.bf-included { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
.bf-item { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text); }
.bf-check { flex: none; }
.bf-note { font-size: 12px; color: var(--text); opacity: .5; margin-top: 12px; }
.bf-cta { display: flex; gap: 20px; align-items: center; }
.bf-btn {
  padding: 13px 28px; background: var(--btn-bg); color: var(--btn-fg); font-size: 14.5px;
  font-weight: 700; border-radius: 9px; text-decoration: none; display: inline-block;
}
.bf-btn:hover { background: var(--btn-bg); filter: brightness(1.12); color: var(--btn-fg); }
.bf-btn-disabled { background: var(--rule); color: var(--text); opacity: .55; cursor: default; }
.bf-price {
  display: flex; flex-direction: column; align-items: center;
  padding: 8px 22px; border: 1.5px solid var(--rule); border-radius: 9px;
}
.bf-price-amount { font-family: "Fraunces", Georgia, serif; font-size: 22px; font-weight: 600; color: var(--text); line-height: 1.1; }
.bf-price-label { font-size: 10px; color: var(--text); opacity: .5; text-transform: uppercase; letter-spacing: .04em; }
@media (max-width: 768px) {
  .bf-card { flex-direction: column; align-items: flex-start; padding: 24px; }
  .bf-cover { width: 100%; }
  .bf-cover img { height: 260px; }
  .bf-included { grid-template-columns: 1fr; }
}

/* Flexible content card block */
.blk.card {
  display: flex; flex-direction: column; gap: 18px;
  background: #fff; border: 1px solid var(--rule);
  border-radius: var(--radius-md); padding: 20px;
  max-width: var(--inner); margin: 1.25rem auto;
  box-shadow: var(--shadow-sm);
}
.blk.card.card-link { text-decoration: none; color: inherit; transition: box-shadow .15s, transform .15s; }
.blk.card.card-link:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.blk.card.card--media-left  { flex-direction: row; align-items: center; }
.blk.card.card--media-right { flex-direction: row-reverse; align-items: center; }
.blk.card.card--media-left .card-media,
.blk.card.card--media-right .card-media { flex: 0 0 42%; }
.blk.card.card--media-left .card-body,
.blk.card.card--media-right .card-body { flex: 1; }

.card-media { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--warm-white); }
.card-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card-overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(15, 23, 42, .55);
}
.card-overlay span {
  color: #fff; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  padding: 6px 14px; border: 1px solid rgba(255, 255, 255, .5); border-radius: 999px;
}
.card-overlay-badge {
  align-self: flex-start; background: rgba(15, 23, 42, .85); color: #fff;
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  padding: 4px 10px; border-radius: 999px;
}
.card-aspect-16x9 img { aspect-ratio: 16 / 9; }
.card-aspect-4x3  img { aspect-ratio: 4 / 3; }
.card-aspect-1x1  img { aspect-ratio: 1 / 1; }
/* auto → intrinsic image height */

.card-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card-eyebrow {
  font: 700 11px "Montserrat", sans-serif; text-transform: uppercase;
  letter-spacing: .07em; color: var(--accent);
}
.card-title { font-family: "Fraunces", Georgia, serif; font-weight: 500; font-size: 22px; margin: 0; color: var(--text); line-height: 1.25; }
.card-subtitle { font-size: 15px; color: var(--text); opacity: .7; line-height: 1.55; }
.card-text { font-size: 14.5px; color: var(--text); opacity: .85; line-height: 1.6; }
.card-text :first-child { margin-top: 0; }
.card-text :last-child { margin-bottom: 0; }
.card-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.card-tag { padding: 5px 12px; background: rgba(27,140,138,.12); color: var(--accent); border-radius: 20px; font-size: 12px; font-weight: 700; }
.card-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }

@media (max-width: 768px) {
  .blk.card.card--media-left, .blk.card.card--media-right { flex-direction: column; align-items: stretch; }
  .blk.card.card--media-left .card-media, .blk.card.card--media-right .card-media { flex: none; }
}

/* Column block — width-controlled flex item for a row Stack.
   Higher specificity than `.stack-body > .blk { flex: 1 1 0 }` so span wins. */
.blk.column { min-width: 0; }
.blk.column.col-span-1 { flex: 1 1 0; }
.blk.column.col-span-2 { flex: 2 1 0; }
.blk.column.col-span-3 { flex: 3 1 0; }
.blk.column.col-span-4 { flex: 4 1 0; }
.blk.column.col-span-5 { flex: 5 1 0; }
.blk.column.col-span-6 { flex: 6 1 0; }
.column-body { display: flex; flex-direction: column; gap: 1.5rem; }
/* Child blocks fill the column (drop their own page-width/margins). */
.column-body > .blk { margin: 0; max-width: none; padding: 0; }
@media (max-width: 768px) {
  /* Rows containing columns wrap; each column goes full width. */
  .blk.stack.dir-row .stack-body:has(> .blk.column) { flex-wrap: wrap; }
  .blk.stack.dir-row .stack-body > .blk.column { flex: 1 1 100%; }
}

/* Order confirmation page (post-checkout). */
.oc-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 72px 24px 80px;
  text-align: center;
}
.oc-check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(27, 140, 138, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}
.oc-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: 32px;
  margin-bottom: 14px;
  color: var(--forest);
}
.oc-thanks {
  font-size: 15.5px;
  color: var(--forest);
  opacity: 0.7;
  line-height: 1.6;
  margin-bottom: 8px;
}
.oc-receipt {
  font-size: 13.5px;
  color: var(--forest);
  opacity: 0.55;
  margin-bottom: 40px;
}
.oc-card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 32px;
  text-align: left;
}
.oc-item {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
}
.oc-cover {
  width: 64px;
  height: 84px;
  flex: none;
  border-radius: 10px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--aqua), var(--teal));
}
.oc-item-title {
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 18px;
  line-height: 1.3;
  color: var(--forest);
  margin-bottom: 4px;
}
.oc-item-meta {
  font-size: 12px;
  color: var(--forest);
  opacity: 0.6;
}
.oc-downloads-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--forest);
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}
.oc-download-row {
  background: var(--warm-white);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
  text-decoration: none;
  transition: box-shadow 0.15s;
}
.oc-download-row:hover {
  box-shadow: var(--shadow-sm);
}
.oc-download-icon {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 8px;
  background: rgba(27, 140, 138, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}
.oc-download-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--forest);
}
.oc-download-meta {
  font-size: 11.5px;
  color: var(--forest);
  opacity: 0.55;
}
.oc-download-btn {
  padding: 8px 18px;
  border: 1.5px solid var(--teal);
  color: var(--teal);
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 7px;
  white-space: nowrap;
}
.oc-download-row:hover .oc-download-btn {
  background: var(--teal);
  color: #fff;
}
.oc-continue {
  margin-top: 32px;
  font-size: 13.5px;
}
.oc-continue a {
  color: var(--teal);
  font-weight: 700;
  text-decoration: none;
}

/* Account settings page. */
.acct-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}
.acct-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: 32px;
  color: var(--forest);
  margin-bottom: 28px;
}
.acct-card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 28px 32px;
  margin-bottom: 24px;
}
.acct-card-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: 19px;
  color: var(--forest);
  margin-bottom: 18px;
}
.acct-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.acct-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.acct-field-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--forest);
  opacity: 0.75;
}
.acct-input {
  padding: 11px 13px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  /* Explicitly white. Left transparent, a field takes the warm white of the
     page behind it — the same colour as :disabled below, which is what made
     every enabled field read as greyed out. */
  background-color: #fff;
  font-size: 14px;
  font-family: inherit;
  color: var(--forest);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.acct-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(27, 140, 138, 0.15);
}
.acct-input:disabled {
  background: var(--warm-white);
  opacity: 0.65;
}
.acct-btn {
  align-self: flex-start;
  padding: 11px 22px;
  background: var(--teal);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.acct-btn:hover {
  background: var(--teal-hover);
}
.acct-success {
  color: var(--teal-hover);
  background: rgba(27, 140, 138, 0.1);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 14px;
}
.acct-error {
  color: #b3261e;
  background: rgba(179, 38, 30, 0.08);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 14px;
}
.acct-empty {
  font-size: 14px;
  color: var(--forest);
  opacity: 0.65;
}
.acct-empty a {
  color: var(--teal);
  font-weight: 700;
  text-decoration: none;
}
.acct-purchase {
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}
.acct-purchase:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}
.acct-purchase-header {
  display: flex;
  gap: 14px;
  margin-bottom: 14px;
}
.acct-purchase-cover {
  width: 52px;
  height: 68px;
  flex: none;
  border-radius: 8px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--aqua), var(--teal));
}
.acct-purchase-title {
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 16px;
  color: var(--forest);
  margin-bottom: 4px;
}
.acct-purchase-meta {
  font-size: 12px;
  color: var(--forest);
  opacity: 0.6;
}

/* ── CARD: ICON + META + CENTERED ─────────────────── */
/* An icon badge stands in for the media slot when a card has no image — this is
   what the old feature-card block rendered, now a variant of Card. */
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  background: rgba(27, 140, 138, 0.12);
  border-radius: 16px;
  margin-bottom: 0.5rem;
  flex-shrink: 0;
}
.card-icon img,
.card-icon svg { width: 36px; height: 36px; object-fit: contain; }
.card-meta { font-size: 13px; color: var(--text); opacity: 0.55; }
.blk.card.card--center {
  align-items: center;
  text-align: center;
}
.blk.card.card--center .card-body { align-items: center; }
.blk.card.card--center .card-tags,
.blk.card.card--center .card-actions { justify-content: center; }

/* ── DIVIDER ──────────────────────────────────────── */
.blk.divider {
  max-width: calc(var(--inner) + 2 * var(--pad));
  margin: 0 auto;
  padding: 2rem var(--pad);
  display: flex;
  justify-content: center;
}
.blk.divider.divider-sp-small  { padding-block: 1rem; }
.blk.divider.divider-sp-large  { padding-block: 4rem; }
.divider-rule {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}
.blk.divider.divider-dotted .divider-rule { border-top-style: dotted; border-top-width: 2px; }
.blk.divider.divider-w-wide   .divider-rule { max-width: 720px; }
.blk.divider.divider-w-narrow .divider-rule { max-width: 280px; }
.divider-mark {
  color: var(--accent);
  opacity: 0.5;
  font-size: 20px;
  line-height: 1;
}

/* ── EMBED (VIDEO / AUDIO) ────────────────────────── */
.blk.embed {
  max-width: calc(var(--inner) + 2 * var(--pad));
  margin: 2.5rem auto;
  padding: 0 var(--pad);
}
.blk.embed.embed-w-large  { max-width: 900px; }
.blk.embed.embed-w-medium { max-width: 640px; }
.embed-frame {
  position: relative;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--forest);
  box-shadow: var(--shadow-sm);
}
.blk.embed.embed-16x9 .embed-frame { aspect-ratio: 16 / 9; }
.blk.embed.embed-4x3  .embed-frame { aspect-ratio: 4 / 3; }
.blk.embed.embed-1x1  .embed-frame { aspect-ratio: 1 / 1; }
.embed-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ── ACTIVITY ─────────────────────────────────────────
   Something to do together. The metadata row comes first on purpose: a parent
   deciding at 8pm filters on time and materials before reading the steps. */
.blk.activity { padding: 2rem 1.25rem; }
.activity-card {
  max-width: 44rem; margin: 0 auto;
  padding: 1.75rem; background: #fff;
  border: 1px solid rgba(26, 56, 40, 0.12); border-radius: var(--radius-md, 14px);
  box-shadow: var(--shadow-sm);
}
.activity-heading {
  font-family: "Fraunces", Georgia, serif; font-weight: 500;
  font-size: 26px; margin: 0 0 0.6rem; color: var(--text);
}
.activity-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem; }
.activity-chip {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 4px 11px; border-radius: 999px;
  background: rgba(27, 140, 138, 0.1); color: var(--teal, #1b8c8a);
  font-size: 12px; font-weight: 500; text-transform: capitalize;
}
.activity-intro { margin: 0 0 1.25rem; opacity: 0.8; }
.activity-materials { margin-bottom: 1.25rem; }
.activity-materials h3 {
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; opacity: 0.5; margin: 0 0 0.5rem;
}
.activity-materials ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.activity-materials li {
  padding: 4px 11px; border-radius: 999px;
  border: 1px solid var(--rule, rgba(26, 56, 40, 0.14));
  font-size: 13px;
}
.activity-steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.activity-steps li {
  counter-increment: step; position: relative;
  padding: 0 0 1rem 2.5rem;
}
.activity-steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: -1px;
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--teal, #1b8c8a); color: #fff;
  font-size: 13px; font-weight: 600;
}
.activity-step-text { display: block; }
.activity-step-detail { display: block; margin-top: 0.25rem; font-size: 0.9rem; opacity: 0.65; }
.activity-tip {
  display: flex; gap: 0.5rem; margin-top: 0.5rem;
  padding: 0.875rem 1rem; border-radius: 10px;
  background: rgba(232, 168, 74, 0.12);
  font-size: 0.9rem;
}
.activity-tip strong { flex: none; color: #a97418; }

/* ── RESOURCE FACTS ───────────────────────────────────
   The "what is this and who is it for" panel. Three layouts off one markup:
   card stands alone, inline drops the chrome for a section that already has a
   background, strip is the chip row only — for sitting directly above a
   worksheet builder that already says the rest.

   The chip and materials rules deliberately match .activity-chip and
   .activity-materials: this is the same component as Activity's metadata row,
   and the two should converge on one class once Activity is next touched. */
.blk.rf { padding: 1.5rem 1.25rem; }
/* Spans the site content width like .blk.card, not the 44rem reading column
   .activity-card uses — that cap is there because activity is a column of
   steps to read in order, and this is a panel to scan. Inside a grid column or
   a section the container is narrower, so max-width only ever caps. */
.rf-inner { max-width: var(--inner); margin: 0 auto; }
.rf--card .rf-inner {
  padding: 1.75rem; background: #fff;
  border: 1px solid rgba(26, 56, 40, 0.12); border-radius: var(--radius-md, 14px);
  box-shadow: var(--shadow-sm);
  display: flex; gap: 1.25rem; align-items: flex-start;
}
.rf--card .rf-cover { flex: none; width: 92px; }
.rf--card .rf-cover img {
  width: 100%; aspect-ratio: 2 / 3; object-fit: cover;
  border-radius: var(--radius, 9px); display: block;
}
.rf-body { min-width: 0; flex: 1; }
/* Inline borrows a hairline instead of a box, so it reads as part of the
   section it sits in rather than as a second card on top of one. */
.rf--inline .rf-inner {
  border-left: 3px solid var(--accent, #1b8c8a); padding-left: 1.1rem;
}
.rf--inline .rf-cover { display: none; }
/* Strip has no heading, prose or materials to space out — only the chips. */
.blk.rf.rf--strip { padding: 0.5rem 1.25rem; }
.rf--strip .rf-meta { margin: 0; }

.rf-heading {
  font-family: "Fraunces", Georgia, serif; font-weight: 500;
  font-size: 24px; margin: 0 0 0.6rem; color: var(--text);
}
.rf-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem; }
.rf-chip {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 4px 11px; border-radius: 999px;
  background: rgba(27, 140, 138, 0.1); color: #156f6d;
  font-size: 12px; font-weight: 500; text-transform: capitalize;
}
/* Feelings are a different kind of fact from time and age — they say what it is
   about, not who it fits — so they get the warm tint rather than the teal. */
.rf-chip-feeling { background: rgba(232, 168, 74, 0.16); color: #8a5d0a; }
/* The panel spans the full width; the prose inside it does not. At 1160px a
   description would run to about 160 characters a line, which is roughly twice
   a comfortable measure. */
.rf-intro { margin: 0 0 1.25rem; color: var(--text); max-width: 62ch; }
.rf-materials { margin-bottom: 1rem; }
.rf-materials h3 {
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: #5f7267; margin: 0 0 0.5rem;
}
.rf-materials ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.rf-materials li {
  padding: 4px 11px; border-radius: 999px;
  border: 1px solid var(--rule, rgba(26, 56, 40, 0.14));
  font-size: 13px;
}
.rf-note {
  display: flex; gap: 0.5rem; margin-top: 0.5rem;
  padding: 0.875rem 1rem; border-radius: 10px;
  background: rgba(232, 168, 74, 0.12);
  font-size: 0.9rem;
}
.rf-note strong { flex: none; color: #8a5d0a; }

@media (max-width: 640px) {
  .rf--card .rf-inner { flex-direction: column; }
  .rf--card .rf-cover { width: 100%; max-width: 140px; }
}

/* ── AUDIO PLAYER ─────────────────────────────────────
   Own transport controls instead of the native <audio controls>, which every
   browser draws differently. Shared by the embed block and the audio playlist
   block; behaviour lives in /static/audio-player.js. */
.blk.audio-block { padding: 2rem 1.25rem; }
.audio-inner { max-width: 48rem; margin: 0 auto; }
.audio-inner h2 { margin: 0 0 1rem; }
.audio-player [x-cloak] { display: none; }
.ap-bar {
  display: flex; align-items: center; gap: 0.875rem;
  padding: 0.75rem 1rem; background: #fff;
  border: 1px solid rgba(26, 56, 40, 0.12); border-radius: 10px;
}
.ap-btn {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0;
  border: 0; border-radius: 50%; cursor: pointer;
  background: var(--teal, #1b8c8a); color: #fff;
  transition: background 0.15s ease;
}
.ap-btn:hover { background: var(--forest, #1a3828); }
.ap-seek {
  flex: 1; min-width: 4rem; height: 4px; margin: 0;
  accent-color: var(--teal, #1b8c8a); cursor: pointer;
}
.ap-seek:disabled { cursor: default; opacity: 0.5; }
.ap-time {
  flex: none; font-size: 0.8rem; font-variant-numeric: tabular-nums;
  color: var(--text); opacity: 0.6;
}
.ap-list { list-style: none; margin: 0.5rem 0 0; padding: 0; counter-reset: none; }
.ap-track {
  display: flex; align-items: center; gap: 0.75rem; width: 100%;
  padding: 0.6rem 1rem; margin: 0; text-align: left;
  background: none; border: 0; border-radius: 8px;
  font: inherit; font-size: 0.9rem; color: var(--text);
}
button.ap-track { cursor: pointer; }
button.ap-track:hover { background: rgba(26, 56, 40, 0.05); }
.ap-track.active { background: rgba(27, 140, 138, 0.1); font-weight: 500; }
.ap-track.locked { opacity: 0.6; }
.ap-num { flex: none; width: 1.25rem; opacity: 0.45; font-variant-numeric: tabular-nums; }
.ap-title { flex: 1; }
.ap-state { flex: none; font-size: 0.75rem; color: var(--teal, #1b8c8a); }
@media (max-width: 480px) {
  .ap-time { display: none; }
}
.blk.embed figcaption {
  color: var(--text);
  opacity: 0.55;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  text-align: center;
}

/* ── ACCORDION ────────────────────────────────────── */
.blk.accordion {
  max-width: 760px;
  margin: 2.5rem auto;
  padding: 0 var(--pad);
}
.accordion-heading {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: 28px;
  margin: 0 0 24px;
  color: var(--text);
}
.accordion-panel { border-bottom: 1px solid var(--rule); }
.accordion--boxed .accordion-panel {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
}
.accordion-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: var(--text);
}
.accordion--boxed .accordion-summary { padding: 1rem 1.25rem; }
.accordion-summary::-webkit-details-marker { display: none; }
.accordion-summary:hover .accordion-title { color: var(--accent); }
.accordion-chevron {
  flex: none;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--teal);
  border-bottom: 2px solid var(--teal);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.15s ease;
}
.accordion-panel[open] > .accordion-summary .accordion-chevron {
  transform: rotate(225deg) translate(-2px, -2px);
}
.accordion-content { padding: 0 0 1rem; }
.accordion--boxed .accordion-content { padding: 0 1.25rem 1rem; }
/* Nested blocks manage their own width; inside a panel they should fill it. */
.accordion-content > .blk { margin: 0.75rem 0; padding-left: 0; padding-right: 0; max-width: none; }
.accordion-content > .blk:first-child { margin-top: 0; }
.accordion-content > .blk:last-child { margin-bottom: 0; }

/* ── GATED CONTENT ────────────────────────────────── */
.gated-teaser { position: relative; }
/* Fade the teaser out at the bottom so it reads as an excerpt, not a full stop. */
.gated--locked .gated-teaser::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 120px;
  background: linear-gradient(to bottom, rgba(247, 245, 240, 0), var(--warm-white));
  pointer-events: none;
}
.gated-notice {
  max-width: 640px;
  margin: 0 auto 2.5rem;
  padding: 32px var(--pad);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.gated-icon { color: var(--accent); }
.gated-message {
  margin: 0;
  font-size: 15px;
  color: var(--text);
  opacity: 0.8;
  line-height: 1.6;
}
.gated-btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius);
  background: var(--teal);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}
.gated-btn:hover { background: var(--teal-hover); color: #fff; }

/* --- Worksheet builder ----------------------------------------------------
   Choices on the left, a live preview of the real PDF on the right. The
   preview is an <iframe> holding the actual file, and a PDF has no intrinsic
   size a browser can report, so the aspect ratio has to be stated: US Letter,
   matching the page size the generator draws at. */
.worksheet-builder {
  /* Same shape as every other block: the gutter lives on the block, not on a
     wrapper, so it keeps its margins at every width. */
  max-width: calc(1120px + 2 * var(--pad));
  margin: 0 auto;
  padding: 0 var(--pad);
  box-sizing: border-box;
}
.worksheet-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 14px;
}
.worksheet-intro h2 {
  margin: 0 0 16px;
  max-width: 640px;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}
.worksheet-intro p {
  margin: 0 0 36px;
  max-width: 560px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  opacity: 0.7;
}
.worksheet-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.worksheet-card-body {
  display: flex;
  align-items: stretch;
}
/* Flex items default to min-width:auto, which refuses to shrink below their
   content — that's what pushes a row of chips past a narrow screen instead of
   wrapping it. */
.worksheet-card-body > *,
.worksheet-field,
.worksheet-chips { min-width: 0; }
.worksheet-controls {
  flex: 1;
  min-width: 0;
  padding: 40px;
  border-right: 1px solid var(--border-subtle);
}
.worksheet-field {
  padding: 10px 12px;
  margin: -10px -12px 18px;
  border-radius: 10px;
  transition: background 0.15s;
}
.worksheet-field:hover { background: rgba(26, 56, 40, 0.035); }
.worksheet-field-label {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  /* was --text at opacity .6 — 3.65:1 on the warm-white panel, under the floor
     for 12.5px. Solid, and it reads the same. */
  color: #4a5c50;
  margin-bottom: 12px;
}
.worksheet-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.worksheet-chip {
  padding: 10px 20px;
  border: 1.5px solid rgba(26, 56, 40, 0.18);
  border-radius: 8px;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s, transform 0.1s;
}
.worksheet-chip:hover { border-color: var(--teal); color: var(--teal); }
.worksheet-chip.is-on {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
  font-weight: 700;
  transform: translateY(-1px);
}
.worksheet-text {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid rgba(26, 56, 40, 0.2);
  border-radius: 8px;
  /* background-color, not the shorthand: .worksheet-select layers its chevron
     on top as a background-image. */
  background-color: #fff;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.worksheet-text:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(27, 140, 138, 0.15); }
/* A border-colour shift alone is not a focus indicator. */
.worksheet-text:focus-visible,
.worksheet-chip:focus-visible,
.worksheet-regen:focus-visible {
  outline: 2px solid var(--teal-hover);
  outline-offset: 2px;
}
textarea.worksheet-text { resize: vertical; line-height: 1.5; max-width: 100%; }
.worksheet-number { width: 7rem; }

/* Theme picker. Ten themes is past the point where a wrapped chip row reads as
   a list of choices, so this one control is a native select — it collapses to
   one line, and the platform gives it keyboard, type-ahead and single-select
   semantics for free. */
.worksheet-select {
  max-width: 22rem;
  padding-right: 40px;
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231a3828' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
@media (max-width: 768px) {
  .worksheet-select { max-width: 100%; }
}
.worksheet-actions { margin-top: 32px; }
.worksheet-cta {
  display: inline-block;
  padding: 15px 32px;
  border-radius: 9px;
  background: var(--teal);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
}
.worksheet-cta:hover { background: var(--teal-hover); color: #fff; }
.worksheet-cta:active { transform: scale(0.98); }

.worksheet-preview-panel {
  width: 320px;
  flex: none;
  box-sizing: border-box;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
/* No border-radius here: this is an <iframe>, so a radius clips the PDF being
   rendered inside it and shaves the corners off the sheet's own border. Square
   corners are also what a page actually looks like — the shadow is what makes
   it read as paper. */
.worksheet-preview {
  display: block;
  width: 220px;
  max-width: 100%;
  aspect-ratio: 216 / 279;
  border: 0;
  background: #fff;
  box-shadow: 0 8px 24px rgba(26, 56, 40, 0.12);
}
.worksheet-preview-title {
  margin-top: 16px;
  font-size: 13.5px;
  font-weight: 700;
  text-align: center;
}
.worksheet-preview-summary {
  margin-top: 4px;
  font-size: 12.5px;
  text-align: center;
  line-height: 1.5;
  color: var(--text);
  opacity: 0.6;
}
.worksheet-preview-note {
  margin: 20px 0 12px;
  font-size: 11.5px;
  text-align: center;
  line-height: 1.5;
  color: var(--text);
  opacity: 0.55;
}
.worksheet-regen {
  padding: 9px 20px;
  border: 1.5px solid var(--forest);
  border-radius: 8px;
  background: transparent;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--forest);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.worksheet-regen:hover { background: var(--forest); color: var(--warm-white); }
.worksheet-card-foot {
  padding: 16px 40px;
  border-top: 1px solid var(--border-subtle);
  font-size: 12.5px;
  color: var(--text);
  opacity: 0.55;
}

/* The two columns stack before the preview gets too narrow to read. */
@media (max-width: 820px) {
  .worksheet-card-body { flex-direction: column; }
  .worksheet-controls {
    border-right: 0;
    border-bottom: 1px solid var(--border-subtle);
    padding: 28px;
  }
  .worksheet-preview-panel { width: auto; padding: 28px; }
  .worksheet-card-foot { padding: 16px 28px; }
}
