/* Hero Layout: Facts (3.3.9, CUSTOM-TEMPLATE.md D8). A ledger: title and promise, then the proof as two to four big
   figures in a hairline-ruled grid, with an optional tall photo. Restyle with Branding (colors, fonts, --img-radius)
   and a site's css/screen.css; --ct6-accent colors the figures. */
.ct2-hero-facts { --ct6-accent: var(--color-main); }
.ct2-hero-facts.is-dark, .ct2-hero-facts.ct2-hp-main { --ct6-accent: currentColor; }
.ct2-hero-facts.is-full { min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; box-sizing: border-box; }
.ct2-hero-facts .ct6-fx { padding-bottom: clamp(56px, 7vw, 120px); --rule: color-mix(in srgb, currentColor 28%, transparent); }
.ct6-fx-head, .ct6-fx-title, .ct6-fx-lead { min-width: 0; }
.ct6-fx-lead .ct2-hero-sentence { margin-top: 0; max-width: 30em; }
.ct6-fx-title + .ct6-fx-lead:not(:empty) { margin-top: 0; }
.ct6-fx-note-editor { margin: 40px 0 0; font-size: 15px; opacity: .75; }

/* no photo: head in two columns (sentence + buttons bottom right), figures ruled across the full width */
.ct6-fx-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 32px clamp(40px, 6vw, 120px); align-items: end; }
.ct6-fx-lead .ct2-hero-buttons { margin-top: 28px; }
.ct6-fx-figures { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); margin: clamp(56px, 7vw, 120px) 0 0; border-top: 1px solid var(--rule); }
.ct6-fx-fig { display: flex; flex-direction: column-reverse; justify-content: flex-end; min-width: 0; container-type: inline-size; margin: 0; padding: clamp(20px, 2vw, 32px) clamp(16px, 2vw, 32px) 0; border-left: 1px solid var(--rule); }
.ct6-fx-fig:first-child { border-left: 0; padding-left: 0; }
:where(body:not(.cc-look-hold-3-6-9)) .ct6-fx-num { margin: 0; font-family: var(--font-data-numbers, var(--font-headlines, var(--font-titles))); font-size: clamp(calc(var(--fs-huge) * 0.55), 6.25vw, var(--fs-huge)); line-height: .95; font-variant-numeric: tabular-nums lining-nums; letter-spacing: -.02em; color: var(--ct6-accent); white-space: nowrap; }
:where(body.cc-look-hold-3-6-9) .ct6-fx-num { margin: 0; font-family: var(--font-data-numbers, var(--font-headlines, var(--font-titles))); font-size: min(clamp(48px, 6.2vw, 120px), 24cqi); line-height: .95; font-variant-numeric: tabular-nums lining-nums; letter-spacing: -.02em; color: var(--ct6-accent); white-space: nowrap; }
:where(body:not(.cc-look-hold-3-6-9)) .ct6-fx-label { margin: 12px 0 0; max-width: 18ch; font-family: var(--font-body); font-size: var(--fs-small); line-height: 1.4; opacity: .8; }
:where(body.cc-look-hold-3-6-9) .ct6-fx-label { margin: 12px 0 0; max-width: 18ch; font-family: var(--font-body); font-size: 16px; line-height: 1.4; opacity: .8; }

/* with a photo: one tall photo in column 2, head and figures stacked in column 1 */
.ct6-fx--photo { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 0 clamp(40px, 6vw, 120px); }
.ct6-fx--photo .ct6-fx-head { grid-column: 1; grid-row: 1; grid-template-columns: minmax(0, 1fr); }
.ct6-fx--photo .ct6-fx-figures { grid-column: 1; grid-row: 2; grid-template-columns: repeat(2, minmax(0, 1fr)); align-self: end; }
.ct6-fx--photo .ct6-fx-note-editor { grid-column: 1; grid-row: 2; }
.ct6-fx--photo .ct6-fx-media { grid-column: 2; grid-row: 1 / span 2; align-self: stretch; margin: 0; display: flex; flex-direction: column; }
.ct6-fx--photo.ct6-fx--photo-left { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); }
.ct6-fx--photo.ct6-fx--photo-left .ct6-fx-head, .ct6-fx--photo.ct6-fx--photo-left .ct6-fx-figures, .ct6-fx--photo.ct6-fx--photo-left .ct6-fx-note-editor { grid-column: 2; }
.ct6-fx--photo.ct6-fx--photo-left .ct6-fx-media { grid-column: 1; }
.ct6-fx-img { display: block; width: 100%; height: 100%; min-height: 420px; flex: 1 1 auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--img-radius, 0); }
:where(body:not(.cc-look-hold-3-6-9)) .ct6-fx-credit { margin: 12px 0 0; font-size: var(--fs-small); line-height: 1.4; opacity: .7; }
:where(body.cc-look-hold-3-6-9) .ct6-fx-credit { margin: 12px 0 0; font-size: 14px; line-height: 1.4; opacity: .7; }
/* 2x2 ruled cross-grid: a rule above every cell, a rule left of the even ones; a lone last cell spans both */
.ct6-fx--photo .ct6-fx-fig, .ct6-fx--photo .ct6-fx-fig:first-child { border-left: 0; border-top: 1px solid var(--rule); padding: clamp(20px, 2vw, 32px) clamp(16px, 2vw, 32px) clamp(20px, 2vw, 32px) 0; }
.ct6-fx--photo .ct6-fx-fig:nth-child(even) { border-left: 1px solid var(--rule); padding-left: clamp(16px, 2vw, 32px); }
.ct6-fx--photo .ct6-fx-figures { border-top: 0; margin-top: clamp(28px, 3vw, 48px); }
.ct2-hero-facts .ct6-fx.ct6-fx--photo { padding-bottom: clamp(40px, 4vw, 72px); }
/* 2 or 3 figures with a photo sit in one ruled row (the 2 x 2 cross grid is for 4); phones keep the cross grid */
@media (min-width: 768px) {
	.ct6-fx--photo.ct6-fx--n2 .ct6-fx-figures, .ct6-fx--photo.ct6-fx--n3 .ct6-fx-figures { grid-template-columns: repeat(var(--n), minmax(0, 1fr)); border-top: 1px solid var(--rule); }
	.ct6-fx--photo.ct6-fx--n2 .ct6-fx-fig, .ct6-fx--photo.ct6-fx--n3 .ct6-fx-fig, .ct6-fx--photo.ct6-fx--n2 .ct6-fx-fig:first-child, .ct6-fx--photo.ct6-fx--n3 .ct6-fx-fig:first-child { border-top: 0; border-left: 1px solid var(--rule); padding: clamp(20px, 2vw, 32px) clamp(12px, 1.4vw, 24px) 0; }
	.ct6-fx--photo.ct6-fx--n2 .ct6-fx-fig:first-child, .ct6-fx--photo.ct6-fx--n3 .ct6-fx-fig:first-child { border-left: 0; padding-left: 0; }
}
.ct6-fx--photo:not(.ct6-fx--n3) .ct6-fx-fig:last-child:nth-child(odd):not(:first-child) { grid-column: 1 / -1; }
:where(body:not(.cc-look-hold-3-6-9)) .ct6-fx--photo .ct6-fx-num { font-size: clamp(calc(var(--fs-huge) * 0.55), 6.25vw, var(--fs-huge)); }
:where(body.cc-look-hold-3-6-9) .ct6-fx--photo .ct6-fx-num { font-size: min(clamp(44px, 4.8vw, 96px), 24cqi); }

@media (max-width: 1024px) {
	.ct6-fx--photo { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 0 40px; }
	.ct6-fx--photo.ct6-fx--photo-left { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
}
@media (max-width: 767px) {
	.ct6-fx-head, .ct6-fx--photo .ct6-fx-head { grid-template-columns: minmax(0, 1fr); }
	.ct6-fx-figures, .ct6-fx--photo .ct6-fx-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	/* the same cross-grid for every figure count */
	.ct6-fx-fig, .ct6-fx-fig:first-child { border-left: 0; border-top: 1px solid var(--rule); padding: clamp(20px, 2vw, 32px) 16px clamp(20px, 2vw, 32px) 0; }
	.ct6-fx-fig:nth-child(even) { border-left: 1px solid var(--rule); padding-left: 16px; }
	.ct6-fx-fig:last-child:nth-child(odd):not(:first-child) { grid-column: 1 / -1; }
	.ct6-fx-figures { border-top: 0; }
}
@media (max-width: 900px) {
	/* photo moves between the head and the figures */
	.ct6-fx--photo, .ct6-fx--photo.ct6-fx--photo-left { display: flex; flex-direction: column; }
	.ct6-fx--photo .ct6-fx-head { order: 1; }
	.ct6-fx--photo .ct6-fx-media { order: 2; margin-top: 40px; }
	.ct6-fx--photo .ct6-fx-figures, .ct6-fx--photo .ct6-fx-note-editor { order: 3; }
	.ct6-fx--photo .ct6-fx-media .ct6-fx-img { height: auto; min-height: 0; aspect-ratio: 16 / 7; flex: none; }
	.ct6-fx--photo .ct6-fx-figures { margin-top: 40px; align-self: stretch; width: 100%; }
}
/* under 900px the figures take the full width; 3 figures stay one ruled row (1 column on small phones) */
@media (min-width: 481px) and (max-width: 900px) {
	.ct6-fx--photo.ct6-fx--n3 .ct6-fx-figures { grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
	.ct6-fx--photo.ct6-fx--n3 .ct6-fx-fig:last-child:nth-child(odd):not(:first-child) { grid-column: auto; }
	.ct6-fx--photo.ct6-fx--n3 .ct6-fx-fig, .ct6-fx--photo.ct6-fx--n3 .ct6-fx-fig:first-child { grid-column: auto; border-top: 0; border-left: 1px solid var(--rule); padding: clamp(20px, 2vw, 32px) clamp(12px, 1.4vw, 24px) 0; }
	.ct6-fx--photo.ct6-fx--n3 .ct6-fx-fig:first-child { border-left: 0; padding-left: 0; }
}
@media (max-width: 480px) {
	.ct6-fx--photo.ct6-fx--n3 .ct6-fx-figures { grid-template-columns: minmax(0, 1fr); }
	.ct6-fx--photo.ct6-fx--n3 .ct6-fx-fig, .ct6-fx--photo.ct6-fx--n3 .ct6-fx-fig:nth-child(even) { grid-column: auto; border-left: 0; padding-left: 0; }
}
:where(body:not(.cc-look-hold-3-6-9)) .ct2-hero.ct2-hero-facts .ct2-hero-title { font-size: clamp(calc(var(--fs-hero) * 0.5), 5.5vw, var(--fs-hero)); }

/* A Full phone photo must retain a visible track between the text and figures.
   If those cannot fit together, keep the content intact for the design audit. */
@media (max-width: 767px) {
 body:where(:not(.cc-look-hold-3-6-10)) header.ct2-hero.ct2-hero-facts:is(.is-full, .cc-fit):not(.ct2-hero-zoom) {
  height: var(--ct-hero-h); grid-template-rows: minmax(0, 1fr);
 }
 body:where(:not(.cc-look-hold-3-6-10)) header.ct2-hero.ct2-hero-facts:is(.is-full, .cc-fit) .ct6-fx--photo .ct6-fx-media { min-height: 120px; }
}

/* Late look hold (3.6.18, inc/look-baseline.php): 3.6.7 rules a later release removed, kept for sites that update from below that release. */
@media (max-width: 1024px) { :where(body.cc-look-hold-3-6-9) .ct6-fx-num { font-size: min(clamp(44px, 5.4vw, 72px), 24cqi); } }
@media (max-width: 767px) { :where(body.cc-look-hold-3-6-9) .ct6-fx-num, :where(body.cc-look-hold-3-6-9) .ct6-fx--photo .ct6-fx-num { font-size: min(clamp(40px, 11vw, 56px), 24cqi); } }
