/*
 * CourseForge Site blocks - self-contained styles for the [cf_*] shortcodes.
 *
 * Theme it by setting any of these custom properties on :root, a page, an Elementor section or a single block:
 *   --cf-primary        #0F6CBD   brand blue (buttons, active chips, numbers, bars)
 *   --cf-primary-hover  #0C5A9E
 *   --cf-primary-soft   #E8F1FB   icon discs, highlighted boxes
 *   --cf-secondary      #2563EB   player blue (second accent)
 *   --cf-on-primary     #FFFFFF   text on primary
 *   --cf-bg             #FFFFFF   card / window background
 *   --cf-surface        #F5F7FA   tinted panels, image placeholder
 *   --cf-text           #1A1F29
 *   --cf-muted          #5B6475
 *   --cf-line           #E3E6EC
 *   --cf-dark           #141821   background of theme="dark" variants
 *   --cf-radius         14px
 *   --cf-shadow         soft drop shadow of windows and cards
 *   --cf-font           inherit   font family
 * Every value has a fallback, so the blocks look right with no theme styles at all.
 */
.cfs {
	--_p: var(--cf-primary, #0f6cbd);
	--_ph: var(--cf-primary-hover, #0c5a9e);
	--_ps: var(--cf-primary-soft, #e8f1fb);
	--_s: var(--cf-secondary, #2563eb);
	--_on: var(--cf-on-primary, #fff);
	--_bg: var(--cf-bg, #fff);
	--_sf: var(--cf-surface, #f5f7fa);
	--_tx: var(--cf-text, #1a1f29);
	--_mu: var(--cf-muted, #5b6475);
	--_ln: var(--cf-line, #e3e6ec);
	--_dk: var(--cf-dark, #141821);
	--_r: var(--cf-radius, 14px);
	--_sh: var(--cf-shadow, 0 1px 2px rgba(20, 24, 33, .06), 0 12px 32px -12px rgba(20, 24, 33, .22));
	--_focus: 0 0 0 3px var(--_bg), 0 0 0 5px var(--_p);
	font-family: var(--cf-font, inherit);
	color: var(--_tx);
	line-height: 1.5;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}
.cfs *, .cfs *::before, .cfs *::after { box-sizing: border-box; }
.cfs :is(h3, p, ul, ol, dl, dd, figure, figcaption, table), .cfs:is(ul, ol, dl, figure) { margin: 0; padding: 0; }
.cfs:is(ul, ol) { list-style: none; }
.cfs :is(ul, ol) { list-style: none; }
.cfs img { max-width: 100%; height: auto; border: 0; box-shadow: none; border-radius: 0; }
.cfs a { text-decoration: none; }
.cfs :focus-visible { outline: none; box-shadow: var(--_focus); border-radius: 8px; }
.cfs .cfs-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.cfs-note { padding: 12px 16px; background: #fff7d6; border-radius: 8px; color: #6b4e00; }

/* Shared button reset (themes and Elementor kits style <button> globally). */
.cfs button {
	font: inherit; text-transform: none; letter-spacing: normal; text-shadow: none;
	margin: 0; min-height: 0; min-width: 0; width: auto; line-height: 1;
	-webkit-appearance: none; appearance: none; cursor: pointer;
}

/* ---------- framed app window ---------- */
.cfs .cfs-window { background: var(--_bg); border: 1px solid var(--_ln); border-radius: var(--_r); box-shadow: var(--_sh); overflow: hidden; }
.cfs .cfs-window__bar { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; background: var(--_sf); border-bottom: 1px solid var(--_ln); font-size: 12.5px; color: var(--_mu); }
.cfs .cfs-window__bar span { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #d4d8e0; }
.cfs .cfs-window__bar span:first-child { background: var(--_p); }
.cfs .cfs-window__bar em { font-style: normal; margin-left: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cfs .cfs-window__img { display: block; line-height: 0; cursor: zoom-in; }
.cfs .cfs-window__img img { display: block; width: 100%; height: auto; }
.cfs.cfs-shot figcaption { margin-top: 12px; font-size: 14px; line-height: 1.5; color: var(--_mu); text-align: center; }
.cfs.cfs-shot--plain .cfs-window { border-radius: 10px; }
.cfs.cfs-shot--none .cfs-window { border: 0; box-shadow: none; border-radius: 0; background: transparent; }

/* ---------- feature gallery ---------- */
.cfs.cfs-gallery { position: relative; }
.cfs .cfs-gallery__stage { position: relative; border-radius: var(--_r); }
.cfs .cfs-gallery__stage:focus-visible { box-shadow: var(--_focus); }
.cfs .cfs-slide { margin: 0; }
.cfs .cfs-slide[hidden] { display: none; }
.cfs .cfs-slide.is-anim { animation: cfs-in .45s ease both; }
@keyframes cfs-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.cfs .cfs-slide .cfs-window__img { aspect-ratio: var(--cfs-ratio, 16 / 9); background: var(--_sf); display: flex; align-items: center; justify-content: center; }
.cfs .cfs-slide .cfs-window__img img { width: 100%; height: 100%; object-fit: contain; }
.cfs .cfs-slide__caption { display: grid; gap: 4px; max-width: 820px; margin: 22px auto 0; text-align: center; padding: 0 8px; min-height: 6.2em; }
.cfs .cfs-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--_p); }
.cfs .cfs-slide__title { font-size: clamp(19px, 2.2vw, 26px); line-height: 1.25; color: var(--_tx); font-weight: 650; }
.cfs .cfs-slide__text { font-size: 15.5px; line-height: 1.55; color: var(--_mu); }
.cfs.cfs-gallery--nocaption .cfs-slide__caption { display: none; }

.cfs .cfs-gallery__arrow {
	position: absolute; top: calc(50% - 60px); z-index: 2; left: 12px;
	width: 46px; height: 46px; padding: 0; border-radius: 50%;
	display: grid; place-items: center;
	background: var(--_bg); color: var(--_tx); border: 1px solid var(--_ln); box-shadow: var(--_sh);
	transition: background-color .15s, color .15s;
}
.cfs .cfs-gallery__arrow--next { left: auto; right: 12px; }
.cfs .cfs-gallery__arrow:hover { background: var(--_p); border-color: var(--_p); color: var(--_on); }
.cfs .cfs-gallery__arrow:focus-visible, .cfs .cfs-gallery__play:focus-visible, .cfs .cfs-chip:focus-visible { box-shadow: var(--_focus); }
.cfs .cfs-gallery__arrow svg, .cfs .cfs-gallery__play svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.cfs.cfs-gallery--noarrows .cfs-gallery__arrow { display: none; }
.cfs.cfs-gallery--nocaption .cfs-gallery__arrow { top: calc(50% - 40px); }

.cfs .cfs-gallery__controls { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 10px; }
.cfs .cfs-gallery__play { width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 1px solid var(--_ln); background: var(--_bg); color: var(--_tx); display: grid; place-items: center; flex: none; }
.cfs .cfs-gallery__play:hover { border-color: var(--_p); color: var(--_p); background: var(--_bg); }
.cfs .cfs-gallery__play svg { width: 16px; height: 16px; }
.cfs .cfs-gallery__play .i-play { fill: currentColor; stroke: none; display: none; }
.cfs.cfs-gallery.is-paused .cfs-gallery__play .i-pause { display: none; }
.cfs.cfs-gallery.is-paused .cfs-gallery__play .i-play { display: block; }
.cfs .cfs-gallery__dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; }
.cfs .cfs-gallery__dots button { width: 22px; height: 24px; padding: 0; border: 0; border-radius: 6px; background: transparent; display: grid; place-items: center; }
.cfs .cfs-gallery__dots button:hover { background: transparent; }
.cfs .cfs-gallery__dots button::before { content: ""; width: 8px; height: 8px; border-radius: 99px; background: #c3c8d2; transition: width .2s, background-color .2s; }
.cfs .cfs-gallery__dots button[aria-current="true"]::before { width: 22px; background: var(--_p); }
.cfs .cfs-gallery__dots button:focus-visible { box-shadow: var(--_focus); }
.cfs .cfs-gallery__count { font-size: 13px; color: var(--_mu); font-variant-numeric: tabular-nums; flex: none; }

.cfs .cfs-gallery__filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; }
.cfs.cfs-gallery--nofilters .cfs-gallery__filters { display: none; }
.cfs .cfs-chip {
	font-size: 14px; font-weight: 600; padding: 10px 14px; border-radius: 99px;
	background: var(--_bg); color: var(--_tx); border: 1px solid var(--_ln); box-shadow: none;
	transition: none;
}
.cfs .cfs-chip span { font-weight: 500; color: var(--_mu); margin-left: 4px; font-size: 12.5px; }
.cfs .cfs-chip:hover { border-color: var(--_p); color: var(--_p); background: var(--_bg); }
.cfs .cfs-chip.is-active, .cfs .cfs-chip.is-active:hover { background: var(--_p); border-color: var(--_p); color: var(--_on); }
.cfs .cfs-chip.is-active span { color: var(--_on); opacity: .9; }

@media (max-width: 700px) {
	.cfs .cfs-gallery__arrow { width: 38px; height: 38px; top: calc(50% - 95px); left: 6px; }
	.cfs .cfs-gallery__arrow--next { left: auto; right: 6px; }
	.cfs .cfs-window__bar { height: 26px; }
	.cfs .cfs-window__bar em { display: none; }
	.cfs .cfs-slide__caption { min-height: 0; margin-top: 16px; }
	.cfs .cfs-slide__text { font-size: 14.5px; }
	.cfs .cfs-gallery__filters { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding: 4px 2px 10px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
	.cfs .cfs-chip { flex: none; scroll-snap-align: start; }
}
@media (max-width: 900px) { .cfs .cfs-gallery__dots { display: none; } }

/* ---------- stats ---------- */
.cfs.cfs-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 28px 24px; }
.cfs.cfs-stats.cfs-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cfs.cfs-stats.cfs-cols-8 { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 20px; }
.cfs.cfs-stats li { display: grid; gap: 6px; align-content: start; }
.cfs .cfs-stats__n { font-size: clamp(30px, 3.4vw, 46px); line-height: 1; font-weight: 700; color: var(--_p); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.cfs.cfs-cols-8 .cfs-stats__n { font-size: clamp(26px, 2.6vw, 40px); }
.cfs .cfs-stats__l { font-size: 14.5px; line-height: 1.4; color: var(--_mu); }
.cfs.cfs-stats--dark { background: var(--_dk); border-radius: var(--_r); padding: clamp(20px, 3vw, 36px); }
.cfs.cfs-stats--dark .cfs-stats__n { color: #8cc4ff; }
.cfs.cfs-stats--dark .cfs-stats__l { color: #c9cfda; }
@media (max-width: 1100px) { .cfs.cfs-stats.cfs-cols-8 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) { .cfs.cfs-stats.cfs-cols-8, .cfs.cfs-stats.cfs-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- cards ---------- */
.cfs.cfs-cards { display: grid; gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cfs.cfs-cards.cfs-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cfs.cfs-cards.cfs-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cfs .cfs-card { background: var(--_bg); border: 1px solid var(--_ln); border-radius: var(--_r); padding: 24px; box-shadow: 0 1px 2px rgba(20, 24, 33, .04); display: flex; flex-direction: column; gap: 10px; transition: transform .2s, box-shadow .2s; }
.cfs .cfs-card:hover { transform: translateY(-2px); box-shadow: var(--_sh); }
.cfs .cfs-card__icon { width: 52px; height: 52px; border-radius: 50%; background: var(--_ps); display: grid; place-items: center; flex: none; }
.cfs .cfs-card__icon img { width: 28px; height: 28px; }
.cfs .cfs-card__title { margin-top: 4px; font-size: 18px; line-height: 1.3; color: var(--_tx); font-weight: 650; }
.cfs .cfs-card__text { font-size: 15px; line-height: 1.55; color: var(--_mu); }
.cfs .cfs-card__tech { margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--_ln); font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12px; line-height: 1.5; color: var(--_tx); opacity: .85; }
.cfs.cfs-cards.cfs-cols-1 { grid-template-columns: 1fr; gap: 12px; }
.cfs.cfs-cols-1 .cfs-card { display: grid; grid-template-columns: 44px 1fr; column-gap: 16px; row-gap: 4px; padding: 16px 18px; align-items: start; }
.cfs.cfs-cols-1 .cfs-card__icon { width: 44px; height: 44px; grid-row: span 3; }
.cfs.cfs-cols-1 .cfs-card__icon img { width: 24px; height: 24px; }
.cfs.cfs-cols-1 .cfs-card__title { margin: 0; font-size: 16px; }
.cfs.cfs-cols-1 .cfs-card__text { font-size: 14px; }
.cfs.cfs-cols-1 .cfs-card__tech { margin-top: 6px; padding-top: 8px; }
.cfs.cfs-cards--dark .cfs-card { background: #222a38; border-color: #333c4d; }
.cfs.cfs-cards--dark .cfs-card__title { color: #fff; }
.cfs.cfs-cards--dark .cfs-card__text { color: #c9cfda; }
.cfs.cfs-cards--dark .cfs-card__tech { color: #e2e6ee; border-top-color: #3a4456; }
.cfs.cfs-cards--dark .cfs-card__icon { background: rgba(255, 255, 255, .08); }
@media (max-width: 1000px) { .cfs.cfs-cards, .cfs.cfs-cards.cfs-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) {
	.cfs.cfs-cards, .cfs.cfs-cards.cfs-cols-2, .cfs.cfs-cards.cfs-cols-4 { grid-template-columns: 1fr; }
	.cfs.cfs-cards .cfs-card { display: grid; grid-template-columns: 40px 1fr; column-gap: 14px; row-gap: 4px; padding: 16px; }
	.cfs.cfs-cards .cfs-card__icon { width: 40px; height: 40px; grid-row: span 3; }
	.cfs.cfs-cards .cfs-card__icon img { width: 22px; height: 22px; }
	.cfs.cfs-cards .cfs-card__title { margin: 0; font-size: 16.5px; }
	.cfs.cfs-cards .cfs-card__tech { margin-top: 6px; padding-top: 8px; }
}

/* ---------- publish pipeline ---------- */
.cfs .cfs-pipeline__stages { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.cfs .cfs-pipeline__stages li { position: relative; background: var(--_sf); border: 1px solid var(--_ln); border-radius: 10px; padding: 14px 10px; text-align: center; display: grid; gap: 4px; align-content: center; min-height: 84px; }
.cfs .cfs-pipeline__stages li.is-src { background: var(--_dk); border-color: var(--_dk); color: #fff; }
.cfs .cfs-pipeline__stages li.is-src span { color: #c9cfda; }
.cfs .cfs-pipeline__stages li:not(:last-child)::after { content: ""; position: absolute; right: -9px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-top: 2px solid #9aa3b2; border-right: 2px solid #9aa3b2; transform: rotate(45deg); z-index: 1; }
.cfs .cfs-pipeline__stages strong { font-size: 15px; }
.cfs .cfs-pipeline__stages span { font-size: 12.5px; color: var(--_mu); line-height: 1.35; }
.cfs .cfs-pipeline__targets { margin-top: 14px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.cfs .cfs-pipeline__targets li { background: var(--_p); color: var(--_on); border-radius: 10px; padding: 14px 12px; display: grid; gap: 6px; align-content: start; }
.cfs .cfs-pipeline__targets strong { font-size: 15.5px; }
.cfs .cfs-pipeline__targets span { font-size: 12.5px; line-height: 1.4; }
@media (max-width: 1000px) {
	.cfs .cfs-pipeline__stages { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.cfs .cfs-pipeline__stages li:nth-child(4n)::after { display: none; }
	.cfs .cfs-pipeline__targets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
	.cfs .cfs-pipeline__stages, .cfs .cfs-pipeline__targets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.cfs .cfs-pipeline__stages li::after { display: none; }
}

/* ---------- bars ---------- */
.cfs .cfs-bars__title { font-size: 14px; font-weight: 600; color: var(--_mu); margin-bottom: 12px; text-align: left; }
.cfs .cfs-bars__table { width: 100%; border-collapse: collapse; border: 0; background: transparent; }
.cfs .cfs-bars__table :is(tr, th, td) { border: 0; background: transparent; }
.cfs .cfs-bars__table :is(th, td) { padding: 9px 0; vertical-align: middle; }
.cfs .cfs-bars__table th { text-align: left; width: 38%; padding-right: 14px; font-weight: 400; }
.cfs .cfs-bars__label { display: block; font-size: 14.5px; color: var(--_tx); font-weight: 600; }
.cfs .cfs-bars__detail { display: block; font-size: 12.5px; color: var(--_mu); font-variant-numeric: tabular-nums; }
.cfs .cfs-bars__bar { display: block; height: 20px; width: var(--w); background: var(--_p); border-radius: 0 4px 4px 0; transform-origin: left; }
.cfs.cfs-bars.is-pending .cfs-bars__bar { transform: scaleX(0); }
.cfs.cfs-bars.is-in .cfs-bars__bar { transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
.cfs .cfs-bars__value { width: 56px; text-align: right; font-weight: 700; font-size: 15px; color: var(--_tx); font-variant-numeric: tabular-nums; }
.cfs .cfs-bars__table tr:hover .cfs-bars__bar { background: var(--_ph); }

/* ---------- numbers ---------- */
.cfs.cfs-numbers { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 22px 28px; }
.cfs.cfs-numbers > div { border-left: 3px solid var(--_p); padding-left: 14px; }
.cfs.cfs-numbers dt { font-size: clamp(22px, 2.4vw, 28px); font-weight: 700; color: var(--_tx); font-variant-numeric: tabular-nums; line-height: 1.15; }
.cfs.cfs-numbers dd { margin-top: 4px; font-size: 14px; line-height: 1.45; color: var(--_mu); }

/* ---------- tech stack ---------- */
.cfs.cfs-stack { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.cfs .cfs-stack__group { background: var(--_sf); border-radius: var(--_r); padding: 22px; }
.cfs .cfs-stack__group h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 16.5px; line-height: 1.3; color: var(--_tx); font-weight: 650; }
.cfs .cfs-stack__group ul { display: flex; flex-wrap: wrap; gap: 6px; }
.cfs .cfs-stack__group li { background: var(--_bg); border: 1px solid var(--_ln); border-radius: 99px; padding: 5px 11px; font-size: 13.5px; color: var(--_tx); }
@media (max-width: 1000px) { .cfs.cfs-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .cfs.cfs-stack { grid-template-columns: 1fr; } }

/* ---------- architecture ---------- */
.cfs.cfs-arch { display: grid; gap: 14px; }
.cfs .cfs-arch__row { display: grid; grid-template-columns: 130px 1fr; gap: 16px; align-items: center; }
.cfs .cfs-arch__layer { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--_mu); }
.cfs .cfs-arch__boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.cfs .cfs-arch__box { border: 1px solid var(--_ln); background: var(--_bg); border-radius: 10px; padding: 14px 16px; display: grid; gap: 4px; }
.cfs .cfs-arch__box strong { font-size: 15px; color: var(--_tx); }
.cfs .cfs-arch__box span { font-size: 13px; color: var(--_mu); line-height: 1.4; }
.cfs .cfs-arch__box.is-dark { background: var(--_dk); border-color: var(--_dk); }
.cfs .cfs-arch__box.is-dark strong { color: #fff; }
.cfs .cfs-arch__box.is-dark span { color: #c9cfda; }
.cfs .cfs-arch__box.is-core { background: var(--_ps); border-color: var(--_p); }
.cfs .cfs-arch__legend { margin-top: 6px; font-size: 13.5px; color: var(--_mu); display: flex; gap: 8px; align-items: center; }
.cfs .cfs-arch__swatch { width: 16px; height: 16px; flex: none; border-radius: 4px; background: var(--_ps); border: 1px solid var(--_p); }
@media (max-width: 620px) { .cfs .cfs-arch__row { grid-template-columns: 1fr; gap: 8px; } }

/* ---------- icons ---------- */
.cfs-icon { width: 32px; height: 32px; vertical-align: middle; }
.cfs-icon--sm { width: 24px; height: 24px; }

@media (prefers-reduced-motion: reduce) {
	.cfs *, .cfs *::before { animation: none !important; transition: none !important; }
	.cfs.cfs-bars.is-pending .cfs-bars__bar { transform: none; }
}
.cfs.cfs-gallery.has-many .cfs-gallery__dots { display: none; }
.cfs.cfs-gallery.is-ready .cfs-chip { transition: background-color .15s, color .15s, border-color .15s; }
