.ccf-cornerstone-guide {
  --guide-container: min(1180px, calc(100% - 40px));
  --guide-reading: 760px;
  color: var(--wp--preset--color--ink);
  background: var(--wp--preset--color--paper);
}

.ccf-cornerstone-guide * { box-sizing: border-box; }
.ccf-cornerstone-guide > .alignfull + .alignfull { margin-block-start: 0 !important; }
.ccf-cornerstone-guide .ccf-guide-container { width: var(--guide-container); margin-inline: auto; }
.ccf-cornerstone-guide .ccf-guide-reading { max-width: var(--guide-reading); }
.ccf-cornerstone-guide h1,
.ccf-cornerstone-guide h2,
.ccf-cornerstone-guide h3 { letter-spacing: -.035em; line-height: 1.08; }
.ccf-cornerstone-guide h1 { max-width: 760px; font-size: clamp(2.65rem, 5.2vw, 5rem); }
.ccf-cornerstone-guide h2 { max-width: 820px; font-size: clamp(2rem, 3.5vw, 3.35rem); }
.ccf-cornerstone-guide p { margin-block: 0; }
.ccf-cornerstone-guide .ccf-guide-kicker { color: var(--wp--preset--color--accent-2); font-size: .78rem; font-weight: 800; letter-spacing: .08em; }
.ccf-cornerstone-guide .ccf-guide-lead { max-width: 720px; font-size: clamp(1.08rem, 1rem + .3vw, 1.28rem); line-height: 1.72; }

.ccf-cornerstone-guide .ccf-guide-hero { padding: clamp(72px, 9vw, 124px) 0; color: #fff; background: var(--wp--preset--color--forest); }
.ccf-cornerstone-guide .ccf-guide-hero h1 { margin: 18px 0 24px; color: #fff; }
.ccf-cornerstone-guide .ccf-guide-hero .ccf-guide-lead { color: #d9e6e2; }
.ccf-cornerstone-guide .ccf-guide-hero__grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); align-items: center; gap: clamp(42px, 7vw, 96px); }
.ccf-cornerstone-guide .ccf-guide-hero__visual { position: relative; min-height: 410px; }
.ccf-cornerstone-guide .ccf-guide-hero__visual figure { position: absolute; overflow: hidden; margin: 0; border: 1px solid rgba(255,255,255,.18); border-radius: var(--wp--custom--radius--default); background: #fff; box-shadow: var(--wp--custom--shadow--default); }
.ccf-cornerstone-guide .ccf-guide-hero__visual figure:first-child { inset: 0 54px 54px 0; }
.ccf-cornerstone-guide .ccf-guide-hero__visual figure:last-child { right: 0; bottom: 0; width: 48%; aspect-ratio: 1; border: 8px solid var(--wp--preset--color--forest); }
.ccf-cornerstone-guide .ccf-guide-hero__visual img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.ccf-cornerstone-guide .ccf-guide-hero .wp-block-buttons { margin-top: 30px; }

.ccf-cornerstone-guide .ccf-guide-section { padding: clamp(72px, 8vw, 112px) 0; }
.ccf-cornerstone-guide .ccf-guide-section--cream { background: var(--wp--preset--color--cream); }
.ccf-cornerstone-guide .ccf-guide-section--forest { color: #fff; background: var(--wp--preset--color--ink); }
.ccf-cornerstone-guide .ccf-guide-section--forest h2,
.ccf-cornerstone-guide .ccf-guide-section--forest h3 { color: #fff; }
.ccf-cornerstone-guide .ccf-guide-section--forest p { color: #cad9d5; }
.ccf-cornerstone-guide .ccf-guide-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .72fr); align-items: end; gap: 48px; margin-bottom: 44px; }
.ccf-cornerstone-guide .ccf-guide-head > * { margin: 0; }
.ccf-cornerstone-guide .ccf-guide-head p { color: var(--wp--preset--color--muted); line-height: 1.72; }

.ccf-cornerstone-guide .ccf-guide-taxonomy,
.ccf-cornerstone-guide .ccf-guide-example-grid,
.ccf-cornerstone-guide .ccf-guide-check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.ccf-cornerstone-guide .ccf-guide-taxonomy article,
.ccf-cornerstone-guide .ccf-guide-check,
.ccf-cornerstone-guide .ccf-guide-example { overflow: hidden; border: 1px solid var(--wp--preset--color--line); border-radius: var(--wp--custom--radius--small); background: #fff; }
.ccf-cornerstone-guide .ccf-guide-taxonomy article,
.ccf-cornerstone-guide .ccf-guide-check { padding: 28px; }
.ccf-cornerstone-guide .ccf-guide-taxonomy h3,
.ccf-cornerstone-guide .ccf-guide-check h3 { margin: 0 0 10px; }
.ccf-cornerstone-guide .ccf-guide-taxonomy p,
.ccf-cornerstone-guide .ccf-guide-check p { color: var(--wp--preset--color--muted); }

.ccf-cornerstone-guide .ccf-guide-example figure { aspect-ratio: 4 / 3; margin: 0; background: #fff; }
.ccf-cornerstone-guide .ccf-guide-example img { width: 100%; height: 100%; object-fit: contain; }
.ccf-cornerstone-guide .ccf-guide-example__body { padding: 24px; }
.ccf-cornerstone-guide .ccf-guide-example__body h3 { margin: 0 0 8px; }
.ccf-cornerstone-guide .ccf-guide-example__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.ccf-cornerstone-guide .ccf-guide-example__meta span { padding: 6px 10px; border-radius: 999px; color: var(--wp--preset--color--forest); background: var(--wp--preset--color--soft-green); font-size: .82rem; font-weight: 700; }

.ccf-cornerstone-guide .ccf-guide-table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--wp--preset--color--line); border-radius: var(--wp--custom--radius--small); background: #fff; -webkit-overflow-scrolling: touch; }
.ccf-cornerstone-guide .ccf-guide-table-wrap table { width: 100%; min-width: 820px; margin: 0; border-collapse: collapse; }
.ccf-cornerstone-guide .ccf-guide-table-wrap th,
.ccf-cornerstone-guide .ccf-guide-table-wrap td { padding: 18px; border: 0; border-bottom: 1px solid var(--wp--preset--color--line); text-align: left; vertical-align: top; }
.ccf-cornerstone-guide .ccf-guide-table-wrap th { color: #fff; background: var(--wp--preset--color--forest); font-size: .86rem; }
.ccf-cornerstone-guide .ccf-guide-table-wrap tr:last-child td { border-bottom: 0; }

.ccf-cornerstone-guide .ccf-guide-measure { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(280px, .75fr); align-items: center; gap: clamp(36px, 6vw, 76px); }
.ccf-cornerstone-guide .ccf-guide-measure__figure { position: relative; overflow: hidden; margin: 0; padding: 30px 30px 78px; border: 1px solid var(--wp--preset--color--line); border-radius: var(--wp--custom--radius--default); background: #fff; }
.ccf-cornerstone-guide .ccf-guide-measure__figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; }
.ccf-cornerstone-guide .ccf-guide-measure__line { position: absolute; right: 12%; bottom: 48px; left: 12%; height: 2px; color: var(--wp--preset--color--forest); background: currentColor; }
.ccf-cornerstone-guide .ccf-guide-measure__line::before,
.ccf-cornerstone-guide .ccf-guide-measure__line::after { position: absolute; top: -5px; width: 10px; height: 10px; border-top: 2px solid currentColor; border-left: 2px solid currentColor; content: ""; }
.ccf-cornerstone-guide .ccf-guide-measure__line::before { left: 0; transform: rotate(-45deg); }
.ccf-cornerstone-guide .ccf-guide-measure__line::after { right: 0; transform: rotate(135deg); }
.ccf-cornerstone-guide .ccf-guide-measure__label { position: absolute; right: 10%; bottom: 18px; left: 10%; color: var(--wp--preset--color--forest); font-size: .88rem; font-weight: 800; text-align: center; }
.ccf-cornerstone-guide .ccf-guide-measure__copy h2 { margin-top: 0; }
.ccf-cornerstone-guide .ccf-guide-measure__copy p + p { margin-top: 18px; }

.ccf-cornerstone-guide .ccf-guide-faq { display: grid; gap: 12px; max-width: 900px; }
.ccf-cornerstone-guide .ccf-guide-faq details,
.ccf-cornerstone-guide .ccf-guide-faq details[open] { height: auto; border: 1px solid var(--wp--preset--color--line); border-radius: var(--wp--custom--radius--small); background: #fff; }
.ccf-cornerstone-guide .ccf-guide-faq summary { min-height: 60px; padding: 18px 52px 18px 20px; color: var(--wp--preset--color--forest); font-weight: 750; cursor: pointer; }
.ccf-cornerstone-guide .ccf-guide-faq details > p { padding: 0 20px 22px; color: var(--wp--preset--color--muted); }

.ccf-cornerstone-guide .ccf-guide-cta { padding: clamp(64px, 8vw, 100px) 0; }
.ccf-cornerstone-guide .ccf-guide-cta__box { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 32px; padding: clamp(34px, 5vw, 60px); border-radius: var(--wp--custom--radius--default); color: #fff; background: var(--wp--preset--color--forest); }
.ccf-cornerstone-guide .ccf-guide-cta__box h2 { margin: 0; color: #fff; }
.ccf-cornerstone-guide .ccf-guide-cta__box p { max-width: 680px; margin-top: 14px; color: #d2e1dd; }

@media (max-width: 900px) {
  .ccf-cornerstone-guide .ccf-guide-hero__grid,
  .ccf-cornerstone-guide .ccf-guide-head,
  .ccf-cornerstone-guide .ccf-guide-measure { grid-template-columns: 1fr; }
  .ccf-cornerstone-guide .ccf-guide-hero__visual { min-height: 370px; }
  .ccf-cornerstone-guide .ccf-guide-head { gap: 18px; }
  .ccf-cornerstone-guide .ccf-guide-cta__box { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .ccf-cornerstone-guide { --guide-container: min(100% - 28px, 1180px); }
  .ccf-cornerstone-guide .ccf-guide-hero { padding: 58px 0 68px; }
  .ccf-cornerstone-guide .ccf-guide-hero__visual { min-height: 300px; }
  .ccf-cornerstone-guide .ccf-guide-hero__visual figure:first-child { inset: 0 32px 38px 0; }
  .ccf-cornerstone-guide .ccf-guide-hero__visual figure:last-child { width: 46%; border-width: 5px; }
  .ccf-cornerstone-guide .ccf-guide-section { padding: 64px 0; }
  .ccf-cornerstone-guide .ccf-guide-taxonomy,
  .ccf-cornerstone-guide .ccf-guide-example-grid,
  .ccf-cornerstone-guide .ccf-guide-check-grid { grid-template-columns: 1fr; }
  .ccf-cornerstone-guide .ccf-guide-measure__figure { padding: 18px 18px 72px; }
  .ccf-cornerstone-guide .ccf-guide-table-wrap th,
  .ccf-cornerstone-guide .ccf-guide-table-wrap td { padding: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .ccf-cornerstone-guide *,
  .ccf-cornerstone-guide *::before,
  .ccf-cornerstone-guide *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Phase 4D visual refinement: use the theme wide grid while keeping body copy readable. */
.wp-block-post-content > .ccf-cornerstone-guide {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}
.ccf-cornerstone-guide .ccf-guide-container {
  width: min(var(--wp--style--global--wide-size, 1380px), calc(100% - 64px));
  max-width: var(--wp--style--global--wide-size, 1380px);
}
.ccf-cornerstone-guide { font-size: 1rem; line-height: 1.62; }
.ccf-cornerstone-guide p,
.ccf-cornerstone-guide li { font-size: 1rem; line-height: 1.62; }
.ccf-cornerstone-guide .ccf-guide-hero { padding-block: clamp(76px, 8vw, 108px); }
.ccf-cornerstone-guide .ccf-guide-hero__grid { grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr); gap: clamp(44px, 6vw, 88px); }
.ccf-cornerstone-guide .ccf-guide-hero__visual { min-height: 500px; }
.ccf-cornerstone-guide .ccf-guide-hero__visual figure:first-child { inset: 0 72px 72px 0; }
.ccf-cornerstone-guide .ccf-guide-hero__visual figure:last-child { width: 40%; }
.ccf-cornerstone-guide .ccf-guide-hero__visual { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); align-items: center; gap: 20px; }
.ccf-cornerstone-guide .ccf-guide-hero__visual figure,
.ccf-cornerstone-guide .ccf-guide-hero__visual figure:first-child,
.ccf-cornerstone-guide .ccf-guide-hero__visual figure:last-child { position: static; inset: auto; width: 100%; aspect-ratio: 4 / 3; border: 0; }
.ccf-cornerstone-guide .ccf-guide-hero__visual figure:last-child { aspect-ratio: 1; }
.ccf-cornerstone-guide .ccf-guide-section { padding-block: clamp(72px, 7vw, 96px); }
.ccf-cornerstone-guide .ccf-guide-head { display: block; max-width: 980px; margin-bottom: 32px; }
.ccf-cornerstone-guide .ccf-guide-head p { max-width: 760px; margin-top: 16px; font-size: 1rem; }
.ccf-cornerstone-guide h2 { font-size: clamp(2.3rem, 3.2vw, 3.5rem); }
.ccf-cornerstone-guide h3 { font-size: clamp(1.2rem, 1.3vw, 1.45rem); }
.ccf-cornerstone-guide .ccf-guide-taxonomy,
.ccf-cornerstone-guide .ccf-guide-check-grid { gap: 24px; }
.ccf-types-guide .ccf-guide-trio { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ccf-cornerstone-guide .ccf-guide-taxonomy article,
.ccf-cornerstone-guide .ccf-guide-check { padding: 32px; }
.ccf-cornerstone-guide .ccf-guide-taxonomy p,
.ccf-cornerstone-guide .ccf-guide-check p { font-size: .98rem; line-height: 1.6; }
.ccf-cornerstone-guide .ccf-guide-table-wrap th,
.ccf-cornerstone-guide .ccf-guide-table-wrap td { padding: 17px 16px; font-size: .94rem; line-height: 1.5; }
.ccf-cornerstone-guide .ccf-guide-example-grid { gap: 24px; }
.ccf-cornerstone-guide .ccf-guide-example figure { aspect-ratio: 5 / 3; }
.ccf-cornerstone-guide .ccf-guide-example__body { padding: 28px; }
.ccf-cornerstone-guide .ccf-guide-example__body p { font-size: .98rem; }
.ccf-cornerstone-guide .ccf-guide-example__meta { gap: 10px; }
.ccf-cornerstone-guide .ccf-guide-example__meta span { font-size: .88rem; }
.ccf-cornerstone-guide .ccf-guide-measure { grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr); gap: clamp(42px, 6vw, 84px); }
.ccf-cornerstone-guide .ccf-guide-measure__figure { padding: 34px 34px 86px; }
.ccf-cornerstone-guide .ccf-guide-measure__copy p { font-size: 1rem; }
.ccf-cornerstone-guide .ccf-guide-measure__line { height: 4px; }
.ccf-cornerstone-guide .ccf-guide-measure__line::before,
.ccf-cornerstone-guide .ccf-guide-measure__line::after { top: -6px; width: 13px; height: 13px; border-width: 3px 0 0 3px; }
.ccf-cornerstone-guide .ccf-guide-measure__label { right: auto; left: 50%; width: max-content; max-width: calc(100% - 36px); padding: 5px 12px; border-radius: 999px; color: var(--wp--preset--color--ink); background: var(--wp--preset--color--accent); font-size: .92rem; transform: translateX(-50%); }
.ccf-cornerstone-guide .ccf-guide-route-section,
.ccf-cornerstone-guide .ccf-guide-structure-section { background: var(--wp--preset--color--cream); }
.ccf-cornerstone-guide .ccf-guide-section--forest { color: var(--wp--preset--color--ink); background: var(--wp--preset--color--cream); }
.ccf-cornerstone-guide .ccf-guide-section--forest h2,
.ccf-cornerstone-guide .ccf-guide-section--forest h3 { color: var(--wp--preset--color--ink); }
.ccf-cornerstone-guide .ccf-guide-section--forest p { color: var(--wp--preset--color--muted); }
.ccf-cornerstone-guide .ccf-guide-section--forest a { color: var(--wp--preset--color--forest); font-weight: 800; }
.ccf-cornerstone-guide .ccf-guide-route-grid,
.ccf-cornerstone-guide .ccf-guide-structure-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 32px; }
.ccf-cornerstone-guide .ccf-guide-structure-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ccf-cornerstone-guide .ccf-guide-route-card,
.ccf-cornerstone-guide .ccf-guide-structure-card { padding: 30px; border: 1px solid var(--wp--preset--color--line); border-top: 4px solid var(--wp--preset--color--accent); border-radius: var(--wp--custom--radius--small); background: #fff; }
.ccf-cornerstone-guide .ccf-guide-route-card h3,
.ccf-cornerstone-guide .ccf-guide-structure-card h3 { margin: 0 0 12px; }
.ccf-cornerstone-guide .ccf-guide-route-card p,
.ccf-cornerstone-guide .ccf-guide-structure-card p { color: var(--wp--preset--color--muted); }
.ccf-cornerstone-guide .ccf-guide-route-card a { display: inline-block; margin-top: 18px; font-weight: 800; }
.ccf-cornerstone-guide .ccf-guide-checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; max-width: 1040px; margin: 30px 0 0; padding: 30px; border: 1px solid var(--wp--preset--color--line); border-radius: var(--wp--custom--radius--default); background: var(--wp--preset--color--cream); list-style: none; }
.ccf-cornerstone-guide .ccf-guide-checklist li { position: relative; min-height: 48px; padding: 10px 12px 10px 42px; border-radius: 10px; background: #fff; }
.ccf-cornerstone-guide .ccf-guide-checklist li::before { position: absolute; top: 10px; left: 12px; display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; color: #fff; background: var(--wp--preset--color--forest); content: "✓"; font-size: .75rem; font-weight: 900; }
.ccf-size-guide .ccf-guide-steps { counter-reset: guide-step; }
.ccf-size-guide .ccf-guide-steps .ccf-guide-check { position: relative; padding-top: 68px; counter-increment: guide-step; }
.ccf-size-guide .ccf-guide-steps .ccf-guide-check::before { position: absolute; top: 24px; left: 30px; color: var(--wp--preset--color--forest); content: "0" counter(guide-step); font-size: 1.1rem; font-weight: 900; }
.ccf-size-guide .ccf-guide-size-labels { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 30px; }
.ccf-size-guide .ccf-guide-size-labels span { padding: 18px 10px; border: 1px solid var(--wp--preset--color--line); border-radius: 12px; background: #fff; font-weight: 800; text-align: center; }
.ccf-size-guide .ccf-guide-size-rule { max-width: 760px; margin-top: 18px; padding: 18px 22px; border-left: 5px solid var(--wp--preset--color--accent); background: var(--wp--preset--color--soft-green); font-size: 1.05rem; font-weight: 800; }
.ccf-cornerstone-guide .ccf-guide-faq { max-width: 1020px; }
.ccf-cornerstone-guide .ccf-guide-faq summary { min-height: 64px; padding: 19px 56px 19px 24px; font-size: 1rem; }
.ccf-cornerstone-guide .ccf-guide-faq details > p { padding: 0 24px 24px; font-size: 1rem; }
.ccf-cornerstone-guide .ccf-guide-cta { padding-block: clamp(64px, 7vw, 92px); }
.ccf-cornerstone-guide .ccf-guide-cta__box { padding: clamp(38px, 5vw, 56px); }

@media (max-width: 900px) {
  .ccf-cornerstone-guide .ccf-guide-hero__grid,
  .ccf-cornerstone-guide .ccf-guide-measure { grid-template-columns: 1fr; }
  .ccf-cornerstone-guide .ccf-guide-hero__visual { min-height: 420px; }
  .ccf-types-guide .ccf-guide-trio,
  .ccf-cornerstone-guide .ccf-guide-structure-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .wp-block-post-content > .ccf-cornerstone-guide { width: 100%; margin-inline: 0; }
  .ccf-cornerstone-guide .ccf-guide-container { width: calc(100% - 28px); }
  .ccf-cornerstone-guide .ccf-guide-hero__visual { min-height: 320px; }
  .ccf-cornerstone-guide .ccf-guide-hero__visual figure:first-child { inset: 0 34px 42px 0; }
  .ccf-cornerstone-guide .ccf-guide-hero__visual figure:last-child { width: 44%; }
  .ccf-cornerstone-guide .ccf-guide-taxonomy article,
  .ccf-cornerstone-guide .ccf-guide-check { padding: 24px; }
  .ccf-cornerstone-guide .ccf-guide-table-wrap th,
  .ccf-cornerstone-guide .ccf-guide-table-wrap td { padding: 14px; font-size: .92rem; }
  .ccf-cornerstone-guide .ccf-guide-example__body { padding: 22px; }
  .ccf-cornerstone-guide .ccf-guide-measure__figure { padding: 20px 20px 74px; }
  .ccf-cornerstone-guide h2 { font-size: clamp(2rem, 10vw, 2.45rem); }
  .ccf-cornerstone-guide .ccf-guide-route-grid,
  .ccf-cornerstone-guide .ccf-guide-structure-grid,
  .ccf-cornerstone-guide .ccf-guide-checklist { grid-template-columns: 1fr; }
  .ccf-cornerstone-guide .ccf-guide-route-card,
  .ccf-cornerstone-guide .ccf-guide-structure-card { padding: 24px; }
  .ccf-cornerstone-guide .ccf-guide-checklist { padding: 16px; }
  .ccf-size-guide .ccf-guide-size-labels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ccf-size-guide .ccf-guide-size-labels span:last-child { grid-column: 1 / -1; }
  .ccf-cornerstone-guide .ccf-guide-measure__label { width: calc(100% - 36px); border-radius: 10px; white-space: normal; }
}

/* Phase 4D.2 iteration 1: align guide components to the site rail. */
.ccf-cornerstone-guide .ccf-guide-checklist,
.ccf-cornerstone-guide .ccf-guide-faq,
.ccf-size-guide .ccf-guide-size-rule { max-width: none; }

.ccf-cornerstone-guide .ccf-guide-section:has(.ccf-guide-faq) .ccf-guide-container {
  display: grid;
  grid-template-columns: minmax(280px, .7fr) minmax(0, 1.3fr);
  gap: 24px clamp(42px, 7vw, 116px);
  align-items: start;
}

.ccf-cornerstone-guide .ccf-guide-section:has(.ccf-guide-faq) .ccf-guide-container > h2 {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
}

.ccf-cornerstone-guide .ccf-guide-section:has(.ccf-guide-faq) .ccf-guide-faq {
  grid-column: 2;
  grid-row: 1;
}

.ccf-types-guide .ccf-guide-example-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Group related sections using only existing theme background tokens. */
.ccf-types-guide .ccf-guide-section:nth-of-type(2),
.ccf-types-guide .ccf-guide-section:nth-of-type(5),
.ccf-types-guide .ccf-guide-section:nth-of-type(6),
.ccf-size-guide .ccf-guide-section:nth-of-type(2),
.ccf-size-guide .ccf-guide-section:nth-of-type(6),
.ccf-size-guide .ccf-guide-section:nth-of-type(7) {
  background: var(--wp--preset--color--base);
}

.ccf-types-guide .ccf-guide-section:nth-of-type(3),
.ccf-types-guide .ccf-guide-section:nth-of-type(4),
.ccf-types-guide .ccf-guide-section:nth-of-type(8),
.ccf-types-guide .ccf-guide-section:nth-of-type(9),
.ccf-size-guide .ccf-guide-section:nth-of-type(3),
.ccf-size-guide .ccf-guide-section:nth-of-type(4),
.ccf-size-guide .ccf-guide-section:nth-of-type(9),
.ccf-size-guide .ccf-guide-section:nth-of-type(10) {
  background: var(--wp--preset--color--cream);
}

.ccf-cornerstone-guide .ccf-guide-section--forest:has(.ccf-guide-route-grid),
.ccf-size-guide .ccf-guide-section--forest:has(.ccf-guide-structure-grid) {
  color: #fff;
  background: var(--wp--preset--color--forest);
}

.ccf-cornerstone-guide .ccf-guide-section--forest:has(.ccf-guide-route-grid) h2,
.ccf-size-guide .ccf-guide-section--forest:has(.ccf-guide-structure-grid) h2 {
  color: #fff;
}

.ccf-cornerstone-guide .ccf-guide-section--forest:has(.ccf-guide-route-grid) > .ccf-guide-container > p,
.ccf-size-guide .ccf-guide-section--forest:has(.ccf-guide-structure-grid) > .ccf-guide-container > p {
  color: rgba(255, 255, 255, .76);
}

@media (max-width: 1199px) {
  .ccf-types-guide .ccf-guide-example-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .ccf-cornerstone-guide .ccf-guide-section:has(.ccf-guide-faq) .ccf-guide-container { display: block; }
  .ccf-cornerstone-guide .ccf-guide-section:has(.ccf-guide-faq) .ccf-guide-faq { margin-top: 28px; }
}

@media (max-width: 600px) {
  .ccf-types-guide .ccf-guide-example-grid { grid-template-columns: 1fr; }
}

/* Phase 4D.3 manual-criteria repair: align both guides with the measured site system. */
.ccf-cornerstone-guide .ccf-guide-hero {
  color: var(--wp--preset--color--ink);
  background: var(--wp--preset--color--paper);
  padding-block: clamp(72px, 8vw, 112px);
}
.ccf-cornerstone-guide .ccf-guide-hero h1 { color: var(--wp--preset--color--ink); }
.ccf-cornerstone-guide .ccf-guide-hero .ccf-guide-lead { color: var(--wp--preset--color--muted); }
.ccf-cornerstone-guide .ccf-guide-hero__grid { grid-template-columns: minmax(0, 1fr) minmax(460px, .9fr); }
.ccf-cornerstone-guide .ccf-guide-hero__visual { display: block; min-height: 0; }
.ccf-cornerstone-guide .ccf-guide-hero__media-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; position: relative; padding: 14px; border: 1px solid var(--wp--preset--color--line); border-radius: var(--wp--custom--radius--default); background: var(--wp--preset--color--cream); box-shadow: var(--wp--custom--shadow--default); }
.ccf-cornerstone-guide .ccf-guide-hero__media-panel figure, .ccf-cornerstone-guide .ccf-guide-hero__visual .ccf-guide-hero__media-panel figure { position: static; inset: auto; width: auto; aspect-ratio: 1 / 1; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; margin: 0; border: 1px solid var(--wp--preset--color--line); border-radius: var(--wp--custom--radius--small); background: #fff; }
.ccf-cornerstone-guide .ccf-guide-hero__media-panel img { width: 100%; height: calc(100% - 34px); object-fit: contain; }
.ccf-cornerstone-guide .ccf-guide-hero__media-panel figcaption { padding: 6px 8px 9px; color: var(--wp--preset--color--forest); font-size: .76rem; font-weight: 800; text-align: center; }
.ccf-cornerstone-guide .ccf-guide-hero__media-label { grid-column: 1 / -1; color: var(--wp--preset--color--forest); font-size: .76rem; font-weight: 800; letter-spacing: .04em; text-align: center; }
.ccf-cornerstone-guide .ccf-guide-hero__media-panel--single { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
.ccf-cornerstone-guide .ccf-guide-hero__media-panel--single figure { aspect-ratio: 4 / 3; }
.ccf-cornerstone-guide .ccf-guide-hero__media-panel--single img { height: calc(100% - 38px); }
.ccf-cornerstone-guide .ccf-guide-hero__media-panel--single figcaption { font-size: .84rem; }
.ccf-cornerstone-guide h2 { font-size: clamp(2.15rem, 3.1vw, 3.6rem); line-height: 1.1; }
.ccf-cornerstone-guide .ccf-guide-head p, .ccf-cornerstone-guide .ccf-guide-reading { font-size: 1rem; line-height: 1.65; }
.ccf-cornerstone-guide .ccf-guide-taxonomy, .ccf-cornerstone-guide .ccf-guide-example-grid, .ccf-cornerstone-guide .ccf-guide-check-grid { align-items: stretch; }
.ccf-cornerstone-guide .ccf-guide-taxonomy article, .ccf-cornerstone-guide .ccf-guide-check, .ccf-cornerstone-guide .ccf-guide-example { height: 100%; }
.ccf-cornerstone-guide .ccf-guide-example { display: flex; flex-direction: column; }
.ccf-cornerstone-guide .ccf-guide-example__body { display: flex; flex: 1; flex-direction: column; }
.ccf-cornerstone-guide .ccf-guide-example__meta { margin-top: auto; }
.ccf-cornerstone-guide .ccf-guide-table-wrap table { min-width: 0; table-layout: fixed; }
.ccf-cornerstone-guide .ccf-guide-table-wrap th, .ccf-cornerstone-guide .ccf-guide-table-wrap td { padding: 16px 14px; line-height: 1.45; }
.ccf-cornerstone-guide .ccf-guide-table-wrap th { min-height: 54px; vertical-align: middle; }
.ccf-cornerstone-guide .ccf-guide-table-wrap td { height: 82px; }
.ccf-cornerstone-guide .ccf-guide-section--forest:has(.ccf-guide-structure-grid) { color: var(--wp--preset--color--ink); background: var(--wp--preset--color--cream); }
.ccf-cornerstone-guide .ccf-guide-section--forest:has(.ccf-guide-structure-grid) h2, .ccf-cornerstone-guide .ccf-guide-section--forest:has(.ccf-guide-structure-grid) h3 { color: var(--wp--preset--color--ink); }
.ccf-cornerstone-guide .ccf-guide-section--forest:has(.ccf-guide-structure-grid) p { color: var(--wp--preset--color--muted); }
.ccf-cornerstone-guide .ccf-guide-section--forest:has(.ccf-guide-route-grid) a { color: var(--wp--preset--color--accent-2); text-decoration-thickness: 2px; }
.ccf-cornerstone-guide .ccf-guide-section--forest:has(.ccf-guide-route-grid) .ccf-guide-route-card a { color: var(--wp--preset--color--forest); }
.ccf-cornerstone-guide .ccf-guide-route-card, .ccf-cornerstone-guide .ccf-guide-structure-card { height: 100%; }
.ccf-cornerstone-guide .ccf-guide-check-grid { grid-auto-rows: 1fr; }
.ccf-cornerstone-guide .ccf-guide-checklist { align-items: stretch; }
.ccf-size-guide .ccf-guide-size-rule { color: var(--wp--preset--color--ink); background: var(--wp--preset--color--cream); }
.ccf-size-guide .ccf-guide-section--forest:has(.ccf-guide-structure-grid) > .ccf-guide-container > p { color: var(--wp--preset--color--ink); }
.ccf-size-guide .ccf-guide-structure-grid,
.ccf-size-guide .ccf-guide-steps { align-items: stretch; grid-auto-rows: 1fr; }
.ccf-size-guide .ccf-guide-structure-grid > *,
.ccf-size-guide .ccf-guide-steps > * { align-self: stretch; height: 100%; margin-block-start: 0 !important; }
.ccf-size-guide .ccf-guide-table-wrap th,
.ccf-size-guide .ccf-guide-table-wrap td { vertical-align: middle; }
.ccf-types-guide .ccf-guide-taxonomy,
.ccf-types-guide .ccf-guide-example-grid,
.ccf-types-guide .ccf-guide-trio { grid-auto-rows: 1fr; }
.ccf-types-guide .ccf-guide-taxonomy > *,
.ccf-types-guide .ccf-guide-example-grid > *,
.ccf-types-guide .ccf-guide-trio > * { align-self: stretch; margin-block-start: 0 !important; }
@media (max-width: 1199px) { .ccf-cornerstone-guide .ccf-guide-hero__grid { grid-template-columns: minmax(0, 1fr) minmax(380px, .9fr); gap: 44px; } }
@media (max-width: 900px) {
  .ccf-cornerstone-guide .ccf-guide-hero__grid { grid-template-columns: 1fr; }
  .ccf-cornerstone-guide .ccf-guide-hero__media-panel { max-width: 620px; margin-inline: auto; }
  .ccf-cornerstone-guide .ccf-guide-table-wrap { overflow-x: auto; }
  .ccf-cornerstone-guide .ccf-guide-table-wrap table { min-width: 680px; }
  .ccf-cornerstone-guide .ccf-guide-table-wrap.ccf-measurement-brief table,
  .ccf-cornerstone-guide .ccf-guide-table-wrap.ccf-model-lengths table { min-width: 0; }
}
@media (max-width: 600px) { .ccf-cornerstone-guide .ccf-guide-hero { padding-block: 58px 68px; } .ccf-cornerstone-guide .ccf-guide-hero__media-panel { gap: 10px; padding: 10px; } .ccf-cornerstone-guide .ccf-guide-hero__media-panel figcaption { font-size: .7rem; } .ccf-cornerstone-guide .ccf-guide-table-wrap table { min-width: 640px; } .ccf-cornerstone-guide .ccf-guide-table-wrap th, .ccf-cornerstone-guide .ccf-guide-table-wrap td { padding: 13px 11px; } .ccf-types-guide .ccf-guide-taxonomy, .ccf-types-guide .ccf-guide-example-grid, .ccf-types-guide .ccf-guide-trio { grid-auto-rows: auto; } .ccf-types-guide .ccf-guide-trio { grid-template-columns: 1fr; } }
