/* =============================================================================
   Calumet AI section (body.cm-section-suite) + network map (inc/ai-network.php).
   Kept out of main.css so the section can move or change on its own.
   ============================================================================= */

/* Section accent ------------------------------------------------------------ */
body.cm-section-suite { --cm-sec: var(--cmt-blue); --cm-sec-deep: var(--cmt-navy); }
body.cm-section-suite:has(.cm-hero--red) { --cm-sec: var(--cmt-red); --cm-sec-deep: var(--cmt-red-deep); }
body.cm-section-suite:has(.cm-hero--purple) { --cm-sec: var(--cmt-purple); --cm-sec-deep: var(--cmt-purple-deep); }
.cm-section-suite .tb-core-page__block-subtitle::before { background: var(--cm-sec); }
.cm-section-suite .tb-accordion__eyebrow { color: var(--cm-sec); }
body.cm-section-suite .cm-band .tb-core-page__split-text ul { list-style: none; padding: 0; }
body.cm-section-suite .cm-band .tb-core-page__split-text li { position: relative; padding-left: 22px; margin-bottom: 6px; }
body.cm-section-suite .cm-band .tb-core-page__split-text li::before { content: ""; position: absolute; left: 0; top: .62em; width: 8px; height: 8px; background: #fff; }
.cm-section-suite .tb-core-page__block-text ul li::before { background: var(--cm-sec); }
.cm-section-suite .tb-core-page__column:not(.cm-steps *)::before { content: none; }
.cm-section-suite a.tb-core-page__column--linked:hover .tb-core-page__column-title,
.cm-section-suite a.tb-core-page__column--linked:hover::after { color: var(--cm-sec); }
.cm-section-suite .tb-core-page__block-inner--columns > .tb-core-page__columns { width: 100%; }
/* The accordion draws its own +/- and the theme adds a second one. */
.cm-section-suite .tb-accordion__icon { display: none; }

/* Overview hero: a longer headline needs a wider measure. */
body.tb-core-page--installed .cm-hero--suite.tb-core-page__block--tall-hero .tb-core-page__block-title { max-width: 19ch; font-size: clamp(40px, 5.6vw, 82px); }
.tb-core-page--installed .cm-hero--suite.tb-core-page__block { background-color: #050d24; background-position: center; }
.tb-core-page--installed .cm-hero--suite.tb-core-page__block::before {
	background: linear-gradient(90deg, rgba(1, 12, 38, .94) 0%, rgba(1, 12, 38, .78) 45%, rgba(1, 12, 38, .1) 100%);
}
@media (max-width: 800px) {
	.tb-core-page--installed .cm-hero--suite.tb-core-page__block::before { background: rgba(1, 12, 38, .78); }
}

/* Network: frame ------------------------------------------------------------ */
body.tb-core-page--installed .cm-net-block.tb-core-page__block { padding: 0; margin-block: clamp(56px, 7vw, 104px) 0; }
body.tb-core-page--installed .cm-subnav-block + .cm-net-block.tb-core-page__block { margin-top: 0; padding: 0 !important; }
body.tb-core-page--installed .cm-net-block.tb-core-page__block + .tb-core-page__block:not(.cm-band) { padding-top: clamp(64px, 8vw, 120px) !important; }
.cm-net-block :is(.tb-core-page__block-inner, .tb-core-page__block-text) { width: 100%; max-width: none; padding: 0; margin: 0; }

.cm-net {
	--net-line: rgba(143, 186, 255, .17);
	--net-glow: #35d3ff;
	position: relative; isolation: isolate; overflow: clip; /* not hidden: the caption is sticky */
	width: 100%;
	padding-block: clamp(56px, 6vw, 92px);
	background: var(--cmt-navy);
	color: #fff;
	font-family: var(--cmt-font-body);
	line-height: 1.4;
}
.cm-net::after {
	content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none;
	background-image: radial-gradient(rgba(255, 255, 255, .17) 1.1px, transparent 1.7px);
	background-size: 9px 9px;
	-webkit-mask-image: linear-gradient(205deg, #000 0%, transparent 34%);
	mask-image: linear-gradient(205deg, #000 0%, transparent 34%);
}
.cm-net__inner { width: min(100% - 40px, var(--cmt-width)); margin-inline: auto; }
body.cm .cm-net ul { list-style: none; margin: 0; padding: 0; }
body.cm .cm-net li { margin: 0; padding: 0; }
body.cm .cm-net li::before { content: none; }
.cm-net button { font: inherit; color: inherit; cursor: pointer; }
.cm-net [hidden] { display: none !important; }
.cm-net :focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

body.cm .cm-net .cm-net__eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 12.5px; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .72); }
.cm-net__eyebrow::before { content: ""; width: 36px; height: 3px; background: var(--cmt-tricolour); }
body.cm .cm-net .cm-net__title { margin: 0 0 14px; max-width: 20ch; color: #fff; font-size: clamp(34px, 4.4vw, 60px); }
body.cm .cm-net .cm-net__intro { margin: 0 0 28px; max-width: 58ch; font-family: var(--cmt-font-serif); font-size: clamp(18px, 1.5vw, 21px); color: rgba(255, 255, 255, .85); }

/* Controls ------------------------------------------------------------------ */
.cm-net__controls { display: none; }
.cm-net.is-ready .cm-net__controls { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 36px; margin-bottom: 18px; }
.cm-net__group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cm-net__group-label { margin-right: 8px; font-family: var(--cmt-font-serif); font-style: italic; font-size: 18px; }
.cm-net__pill {
	min-height: 40px; padding: 7px 16px; border: 1px solid rgba(255, 255, 255, .28); border-radius: var(--cmt-pill);
	background: transparent; font-size: 14.5px !important; font-weight: 600 !important; transition: background-color .2s, color .2s, border-color .2s;
}
.cm-net__pill:hover { border-color: #fff; }
.cm-net .cm-net__pill[aria-pressed="true"] { background: #fff; border-color: #fff; color: var(--cmt-navy); }

/* Caption ------------------------------------------------------------------- */
.cm-net__panel { display: none; }
.cm-net.is-ready .cm-net__panel {
	display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px 28px;
	min-height: 132px; padding: 18px 24px; background: var(--cmt-card); color: var(--cmt-ink);
	position: sticky; z-index: 3; top: var(--cm-masthead-h, 72px);
}
body.cm .cm-net .cm-net__copy p { margin: 0; max-width: 78ch; }
body.cm .cm-net .cm-net__count { font-family: var(--cmt-font-serif); font-style: italic; font-size: 15px; color: var(--cmt-muted); }
body.cm .cm-net .cm-net__count:empty { display: none; }
body.cm .cm-net .cm-net__step-title { font-size: clamp(20px, 2vw, 27px); font-weight: 760; letter-spacing: -.025em; line-height: 1.12; margin-block: 2px 6px; color: var(--cmt-ink); }
body.cm .cm-net .cm-net__step-text { font-size: 16px; color: var(--cmt-ink-soft); }
.cm-net__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; }
body.cm .cm-net a.cm-net__link { margin-right: 10px; font-weight: 700; color: var(--cmt-blue-ink); text-decoration: none; white-space: nowrap; }
body.cm .cm-net a.cm-net__link:hover { text-decoration: underline; }
.cm-net__step { min-width: 42px; min-height: 42px; padding: 6px 12px; border: 1px solid var(--cmt-rule); border-radius: var(--cmt-pill); background: transparent; color: var(--cmt-ink) !important; }
.cm-net__step:hover { border-color: var(--cmt-ink); }
.cm-net__toggle { min-width: 92px; font-size: 14px !important; font-weight: 600 !important; }
.cm-net__panel :focus-visible { outline-color: var(--cmt-blue); }

/* Stage --------------------------------------------------------------------- */
.cm-net__stage {
	position: relative; display: grid; align-items: center;
	grid-template-columns: minmax(0, 1fr) minmax(220px, 24%) minmax(0, 1fr);
	gap: 0 clamp(28px, 4vw, 72px); padding-block: 40px 28px;
}
body.cm .cm-net svg.cm-net__wires { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; max-width: none; pointer-events: none; overflow: visible; }
.cm-net__side, .cm-net__centre { position: relative; z-index: 1; }
.cm-net__side { display: grid; gap: 24px; }
.cm-net__cluster { --c: #6ea5ff; }
.cm-net__cluster--air { --c: #c08be6; }
.cm-net__cluster--produce { --c: #f2c46d; }
.cm-net__cluster--reach { --c: #ff6b81; }
.cm-net__cluster--earn { --c: #35d58a; }
.cm-net__cluster--platform { --c: #c9d4e8; }
.cm-net__cluster--focus { --c: var(--net-glow); }
body.cm .cm-net .cm-net__label { margin: 0 0 9px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--c); }
.cm-net__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.cm-net--focus .cm-net__list { grid-template-columns: minmax(0, 1fr); gap: 14px; }

.cm-net .cm-net__node {
	position: relative; display: flex; align-items: center; gap: 9px;
	width: 100%; min-height: 44px; padding: 6px 12px;
	border: 1px solid rgba(255, 255, 255, .2); border-radius: var(--cmt-radius-sm);
	background: #0a2150; text-align: left; font-size: 14px; font-weight: 550; line-height: 1.15;
	transition: opacity .3s, border-color .3s, background-color .3s, box-shadow .3s;
}
.cm-net.is-ready .cm-net__node { height: 100%; }
.cm-net__node::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--net-glow)); }
.cm-net .cm-net__node.has-page { background: #12326f; border-color: rgba(255, 255, 255, .55); font-weight: 750; }
.cm-net__node.has-page::after { content: "\2197"; margin-left: auto; opacity: .7; }
.cm-net .cm-net__node:hover { border-color: #fff; }
.cm-net .cm-net__node.is-done { border-color: var(--net-glow); }
.cm-net .cm-net__node.is-current { border-color: var(--net-glow); background: var(--net-glow); color: var(--cmt-navy); box-shadow: 0 0 0 4px rgba(53, 211, 255, .2), 0 0 28px rgba(53, 211, 255, .45); }
.cm-net__node.is-current::before { background: var(--cmt-navy); }
.cm-net__node.is-off { opacity: .28; }

.cm-net__centre { align-self: stretch; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 44px; }
.cm-net .cm-net__core {
	position: relative; flex: none; width: min(100%, 236px); aspect-ratio: 1; padding: 0; border-radius: 50%;
	border: 2px solid var(--net-glow); background: var(--cmt-navy);
	box-shadow: 0 0 0 9px rgba(53, 211, 255, .1), 0 0 60px rgba(30, 112, 234, .55);
}
body.cm .cm-net__core img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.cm-net__core::after { content: ""; position: absolute; inset: -2px; border: 2px solid var(--net-glow); border-radius: 50%; opacity: 0; pointer-events: none; }
.cm-net__core.is-current::after { animation: cm-net-pulse 1.8s ease-out infinite; }
.cm-net__outputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; width: 100%; }
.cm-net__outputs .cm-net__node { border-style: dashed; border-radius: var(--cmt-pill); justify-content: center; text-align: center; font-size: 13px; }
.cm-net__outputs .cm-net__node::before { display: none; }
.cm-net__subject { width: 100%; }
.cm-net__subject .cm-net__node { justify-content: center; min-height: 56px; font-size: 17px; }
.cm-net__subject .cm-net__node::after { display: none; }

/* Benefits read as a list without JS; with JS the caption carries them. */
body.cm .cm-net .cm-net__benefit { display: block; padding: 5px 2px 8px; font-size: 13px; color: rgba(255, 255, 255, .78); }
body.cm .cm-net .cm-net__benefit a { color: #fff; text-decoration: underline; }
.cm-net.is-ready .cm-net__benefit { display: none !important; }

/* Beyond media -------------------------------------------------------------- */
.cm-net__more { position: relative; z-index: 1; border-top: 1px solid rgba(255, 255, 255, .22); padding-top: 18px; }
.cm-net__more summary { cursor: pointer; font-weight: 700; }
.cm-net__more summary span { margin-left: 10px; font-family: var(--cmt-font-serif); font-style: italic; font-weight: 400; color: rgba(255, 255, 255, .72); }
.cm-net__more .cm-net__list { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 14px !important; }

/* Wires --------------------------------------------------------------------- */
.cm-net__wire, .cm-net__beam, .cm-net__spark { fill: none; stroke-linecap: round; }
.cm-net__wire { stroke: var(--net-line); stroke-width: 1; }
.cm-net__wire.is-off { opacity: .2; }
.cm-net__beam { stroke: var(--net-glow); stroke-width: 1.5; opacity: .42; }
.cm-net__beam.is-current { stroke-width: 2.5; opacity: .9; }
.cm-net__spark { stroke: #fff; stroke-width: 5; stroke-dasharray: 3 97; animation: cm-net-flow 1.5s linear infinite; }

@keyframes cm-net-flow { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
@keyframes cm-net-pulse { from { transform: scale(1); opacity: .8; } to { transform: scale(1.22); opacity: 0; } }

/* Narrow: wires give way to a stacked map with the caption pinned in view. */
@media (max-width: 999px) {
	body.cm .cm-net svg.cm-net__wires { display: none; }
	.cm-net__stage { grid-template-columns: minmax(0, 1fr); gap: 26px; }
	.cm-net__centre { order: -1; gap: 22px; }
	.cm-net .cm-net__core { width: 164px; }
	.cm-net__outputs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.cm-net__more .cm-net__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 599px) {
	.cm-net__group-label { width: 100%; }
	.cm-net__pill { padding-inline: 13px; }
	.cm-net.is-ready .cm-net__panel { grid-template-columns: minmax(0, 1fr); align-content: space-between; gap: 8px; padding: 12px 14px; min-height: 196px; }
	body.cm .cm-net .cm-net__step-title { font-size: 19px; }
	body.cm .cm-net .cm-net__step-text { font-size: 14.5px; }
	.cm-net__actions { justify-content: flex-end; flex-wrap: nowrap; gap: 5px; }
	body.cm .cm-net a.cm-net__link { margin-right: auto; font-size: 14px; }
	.cm-net__step { min-width: 40px; min-height: 40px; padding: 5px 8px; }
	.cm-net__toggle { min-width: 64px; }
	.cm-net::after { opacity: .4; }
	.cm-net__outputs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.cm-net .cm-net__node { font-size: 13px; padding-inline: 9px; }
	.cm-net__more summary span { display: block; margin: 4px 0 0; }
}
@media (prefers-reduced-motion: reduce) {
	.cm-net__spark { display: none; }
	.cm-net__core.is-current::after { animation: none; }
	.cm-net * { transition: none !important; }
}
