/* IvyFit content blocks — admin-composed CMS sections. Tokens follow site.css. */

:root {
  --cb-line: #e7e5e4;
  --cb-ink: #111;
  --cb-muted: #78716c;
  --cb-soft: #fafaf9;
  --cb-lime: #dfff00;
}

.cb-stack {
  display: grid;
  gap: clamp(40px, 6vw, 76px);
}

.cb-section {
  display: grid;
  gap: 18px;
  scroll-margin-top: 96px;
}

.cb-eyebrow {
  color: #57534e;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.cb-section__title {
  margin: 0;
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  font-weight: 700;
  line-height: 1.3;
}

.cb-section__lead {
  margin: 0;
  max-width: 68ch;
  color: #57534e;
  line-height: 1.9;
}

.cb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  background: var(--cb-ink);
  color: #fff;
  border: 1px solid var(--cb-ink);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}

.cb-btn:hover { background: #2c2825; }
.cb-btn--outline { background: transparent; color: var(--cb-ink); }
.cb-btn--outline:hover { background: var(--cb-ink); color: #fff; }
.cb-btn--invert { background: #fff; color: var(--cb-ink); border-color: #fff; flex-shrink: 0; }
.cb-btn--invert:hover { background: var(--cb-lime); border-color: var(--cb-lime); color: var(--cb-ink); }

/* ---------- hero ---------- */

.cb-hero {
  display: grid;
  gap: 24px;
  align-items: center;
  padding: clamp(28px, 5vw, 56px) 0 0;
}

.cb-hero.has-media { grid-template-columns: 1fr; }

@media (min-width: 900px) {
  .cb-hero.has-media { grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); gap: 48px; }
}

.cb-hero.is-center { justify-items: center; text-align: center; }
.cb-hero.is-center .cb-section__lead,
.cb-hero.is-center .cb-hero__lead { margin-inline: auto; }
.cb-hero.is-center .cb-actions { justify-content: center; }
.cb-hero.is-center .cb-hero__copy {
  justify-items: center;
  width: 100%;
  max-width: 48rem;
}

/* Text-only heroes: always centered composition (no empty left/right void). */
.cb-hero:not(.has-media) {
  justify-items: center;
  text-align: center;
}
.cb-hero:not(.has-media) .cb-hero__copy {
  justify-items: center;
  width: 100%;
  max-width: 48rem;
}
.cb-hero:not(.has-media) .cb-hero__lead,
.cb-hero:not(.has-media) .cb-section__lead { margin-inline: auto; }
.cb-hero:not(.has-media) .cb-actions { justify-content: center; }

.cb-hero__copy { display: grid; gap: 16px; align-content: start; }

.cb-hero__title {
  margin: 0;
  font-size: clamp(1.75rem, 4.6vw, 3.1rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.cb-hero__lead {
  margin: 0;
  max-width: 58ch;
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  line-height: 1.9;
  color: #44403c;
}

.cb-hero__media {
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: linear-gradient(160deg, #ecebe7, #d6d3d1);
}

.cb-hero__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- cards ---------- */

.cb-cards { display: grid; gap: 14px; grid-template-columns: 1fr; }

@media (min-width: 640px) {
  .cb-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .cb-cards[data-columns="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cb-cards[data-columns="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.cb-card {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 22px 20px;
  border: 1px solid var(--cb-line);
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: border-color .18s ease, transform .18s ease;
}

a.cb-card:hover { border-color: var(--cb-ink); transform: translateY(-2px); }
.cb-card__icon { font-size: 1.5rem; line-height: 1; }
.cb-card__title { margin: 0; font-size: 1.05rem; font-weight: 700; }
.cb-card__body { margin: 0; color: #57534e; line-height: 1.85; font-size: 0.95rem; }
.cb-card__link { font-weight: 700; font-size: 0.9rem; margin-top: 4px; }

/* ---------- steps ---------- */

.cb-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
  counter-reset: cb-step;
}

@media (min-width: 768px) {
  .cb-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .cb-steps[data-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cb-steps[data-count="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cb-steps[data-count="5"],
  .cb-steps[data-count="6"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.cb-step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  padding: 22px 20px;
  position: relative;
  background: #fff;
  border: 1px solid var(--cb-line);
  min-height: 180px;
  align-content: start;
  transition: border-color .18s ease, transform .18s ease;
}

.cb-step:hover { border-color: var(--cb-ink); transform: translateY(-2px); }

.cb-step:not(:last-child)::before { content: none; }

.cb-step__num {
  width: 44px;
  height: 44px;
  border-radius: 0;
  background: var(--cb-ink);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1rem;
  position: relative;
  z-index: 1;
}

.cb-step__body { display: grid; gap: 6px; align-content: start; padding-top: 4px; }
.cb-step__body h3 { margin: 0; font-size: 1.05rem; font-weight: 700; }
.cb-step__body p { margin: 0; color: #57534e; line-height: 1.85; }
.cb-step__meta { font-size: 0.85rem; font-weight: 700; background: var(--cb-lime); padding: 2px 8px; justify-self: start; }

.cb-section:has(.cb-steps),
.cb-section:has(.cb-accordion) {
  padding: clamp(28px, 5vw, 48px) clamp(18px, 3vw, 28px);
  background: var(--cb-soft);
  border: 1px solid var(--cb-line);
}

.cb-section:has(.cb-steps) > .cb-section__title,
.cb-section:has(.cb-steps) > .cb-section__lead,
.cb-faq > .cb-section__title,
.cb-faq > .cb-section__lead {
  text-align: center;
  margin-inline: auto;
  justify-self: center;
}

.cb-faq {
  background: #fff;
  max-width: 820px;
  width: 100%;
  margin-inline: auto;
  justify-items: stretch;
}

.cb-faq .cb-accordion {
  border: 1px solid var(--cb-line);
  background: #fff;
  width: 100%;
  text-align: start;
}

.cb-faq .cb-accordion__item > summary {
  padding-inline: 18px;
  background: #fff;
}

.cb-faq .cb-accordion__panel {
  padding-inline: 18px;
  text-align: start;
}

.cb-faq__footer {
  text-align: center;
  justify-self: center;
}

/* ---------- accordion / faq ---------- */

.cb-accordion { border-top: 1px solid var(--cb-line); }

.cb-accordion__item { border-bottom: 1px solid var(--cb-line); }

.cb-accordion__item > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 4px;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
  min-height: 56px;
}

.cb-accordion__item > summary::-webkit-details-marker { display: none; }
.cb-accordion__item > summary:hover { color: #44403c; }

.cb-accordion__sign {
  position: relative;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.cb-accordion__sign::before,
.cb-accordion__sign::after {
  content: "";
  position: absolute;
  background: var(--cb-ink);
  inset-inline-start: 0;
  top: 50%;
  width: 14px;
  height: 1.5px;
  transform: translateY(-50%);
}

.cb-accordion__sign::after { transform: translateY(-50%) rotate(90deg); transition: transform .2s ease; }
.cb-accordion__item[open] .cb-accordion__sign::after { transform: translateY(-50%) rotate(0deg); }

.cb-accordion__panel { padding: 0 4px 20px; color: #57534e; }
.cb-faq__footer { color: var(--cb-muted); font-size: 0.92rem; }
.cb-faq__footer a { text-decoration: underline; font-weight: 700; color: inherit; }

/* ---------- table ---------- */

.cb-table-block__head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  justify-content: space-between;
}

.cb-table-block__head > div { display: grid; gap: 8px; }
.cb-table-block__caption { margin: 0; color: var(--cb-muted); font-size: 0.88rem; }
.cb-table-block .size-table th[scope="col"] { background: var(--cb-ink); color: #fff; }
.cb-table-block .size-table th[scope="row"] { background: var(--cb-soft); font-weight: 700; }
.cb-table-block .size-table tbody tr:hover td { background: #fffef0; }

/* ---------- callout ---------- */

.cb-callout {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  padding: 18px 18px;
  border: 1px solid var(--cb-line);
  background: var(--cb-soft);
  border-inline-start: 3px solid var(--cb-ink);
}

.cb-callout__icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: var(--cb-ink);
  color: #fff;
  font-size: 0.9rem;
}

.cb-callout__title { display: block; margin-bottom: 4px; }
.cb-callout--warn { background: #fffbeb; border-inline-start-color: #b45309; }
.cb-callout--warn .cb-callout__icon { background: #b45309; }
.cb-callout--success { background: #f0fdf4; border-inline-start-color: #166534; }
.cb-callout--success .cb-callout__icon { background: #166534; }

/* ---------- split image + text ---------- */

.cb-split { grid-template-columns: 1fr; gap: 24px; align-items: center; }

@media (min-width: 900px) {
  .cb-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 44px; }
  .cb-split.is-flipped .cb-split__media { order: 2; }
}

.cb-split__media { aspect-ratio: 4 / 3; overflow: hidden; background: #e7e5e4; }
.cb-split__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cb-split__placeholder { width: 100%; height: 100%; background: linear-gradient(160deg, #ecebe7, #c4c0bb); }
.cb-split__copy { display: grid; gap: 14px; align-content: center; }

/* ---------- cta banner ---------- */

.cb-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  padding: clamp(24px, 4vw, 44px);
}

.cb-cta.is-dark { background: var(--cb-ink); color: #fff; }
.cb-cta.is-lime { background: var(--cb-lime); color: var(--cb-ink); }
.cb-cta.is-lime .cb-btn--invert { background: var(--cb-ink); color: #fff; border-color: var(--cb-ink); }
.cb-cta.is-lime .cb-btn--invert:hover { background: #fff; color: var(--cb-ink); border-color: #fff; }
.cb-cta__copy { display: grid; gap: 8px; }
.cb-cta__copy h2 { margin: 0; font-size: clamp(1.25rem, 2.4vw, 1.75rem); font-weight: 700; }
.cb-cta__copy p { margin: 0; opacity: 0.85; line-height: 1.8; max-width: 60ch; }

/* ---------- contact channels ---------- */

.cb-channels { display: grid; gap: 12px; grid-template-columns: 1fr; }

@media (min-width: 768px) {
  .cb-channels { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.cb-channel {
  display: grid;
  gap: 4px;
  padding: 20px;
  border: 1px solid var(--cb-line);
  background: #fff;
}

.cb-channel__icon { font-size: 1.4rem; line-height: 1; }
.cb-channel__label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--cb-muted); font-weight: 700; }
.cb-channel__value { font-size: 1.05rem; font-weight: 700; color: inherit; text-decoration: none; }
a.cb-channel__value:hover { text-decoration: underline; }
.cb-channel__hours { font-size: 0.85rem; color: var(--cb-muted); }

/* ---------- legal ---------- */

.cb-legal { display: grid; gap: 28px; }

@media (min-width: 1024px) {
  .cb-legal.has-toc { grid-template-columns: 260px minmax(0, 1fr); gap: 48px; align-items: start; }
}

.cb-legal__toc {
  border: 1px solid var(--cb-line);
  background: var(--cb-soft);
  padding: 18px;
}

@media (min-width: 1024px) {
  .cb-legal__toc { position: sticky; top: 96px; max-height: calc(100vh - 130px); overflow-y: auto; }
}

.cb-legal__toc-title {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  margin-bottom: 12px;
}

.cb-legal__toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: toc; }
.cb-legal__toc li { counter-increment: toc; font-size: 0.92rem; line-height: 1.6; }
.cb-legal__toc li.is-sub { padding-inline-start: 14px; font-size: 0.86rem; }
.cb-legal__toc a { color: #44403c; text-decoration: none; }
.cb-legal__toc a:hover { color: var(--cb-ink); text-decoration: underline; }
.cb-legal__body { display: grid; gap: 20px; min-width: 0; }
.cb-legal__updated { margin: 0; font-size: 0.85rem; color: var(--cb-muted); }

.cms-prose--legal { max-width: 76ch; }
.cms-prose--legal h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 2em;
  margin-bottom: 0.6em;
  padding-top: 0.6em;
  border-top: 1px solid var(--cb-line);
  scroll-margin-top: 96px;
}
.cms-prose--legal h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.cms-prose--legal h3 { font-size: 1.03rem; font-weight: 700; margin-top: 1.4em; margin-bottom: 0.4em; scroll-margin-top: 96px; }

/* ---------- page header used by cms-page ---------- */

.cb-pagehead { display: grid; gap: 10px; }
.cb-pagehead h1 { margin: 0; font-size: clamp(1.6rem, 3.6vw, 2.6rem); font-weight: 700; line-height: 1.2; }
.cb-pagehead p { margin: 0; color: #57534e; max-width: 68ch; line-height: 1.9; }
