/*
 * CourseForge Backlog 2.0 - Material Design 3, using the site's --md-sys-* tokens
 * (site/mu-plugins/courseforge-core.css). Fallback values are the same MD3 light scheme (seed #0F6CBD),
 * so the plugin still looks right on a site without the design layer.
 * Tonal roles, used the same way everywhere: Done = primary, In progress = secondary, Planned = tertiary.
 */
.cfb, .cfb-sum {
	--cfb-primary: var(--md-sys-color-primary, #0f6cbd);
	--cfb-primary-text: var(--md-sys-color-primary-text, #0060ab);
	--cfb-on-primary: var(--md-sys-color-on-primary, #fff);
	--cfb-primary-c: var(--md-sys-color-primary-container, #d3e3ff);
	--cfb-on-primary-c: var(--md-sys-color-on-primary-container, #00315c);
	--cfb-secondary: var(--md-sys-color-secondary, #486080);
	--cfb-secondary-c: var(--md-sys-color-secondary-container, #d8e3f8);
	--cfb-on-secondary-c: var(--md-sys-color-on-secondary-container, #23324a);
	--cfb-tertiary: var(--md-sys-color-tertiary, #6b5778);
	--cfb-tertiary-c: var(--md-sys-color-tertiary-container, #f2daff);
	--cfb-on-tertiary-c: var(--md-sys-color-on-tertiary-container, #251431);
	--cfb-surface: var(--md-sys-color-surface, #f8f9ff);
	--cfb-on-surface: var(--md-sys-color-on-surface, #191c21);
	--cfb-on-surface-v: var(--md-sys-color-on-surface-variant, #414751);
	--cfb-lowest: var(--md-sys-color-surface-container-lowest, #fff);
	--cfb-low: var(--md-sys-color-surface-container-low, #f2f3fb);
	--cfb-high: var(--md-sys-color-surface-container-high, #e6e8ef);
	--cfb-highest: var(--md-sys-color-surface-container-highest, #e0e2e9);
	--cfb-outline: var(--md-sys-color-outline, #717783);
	--cfb-outline-v: var(--md-sys-color-outline-variant, #c1c7d3);
	--cfb-xs: var(--md-sys-shape-corner-extra-small, 4px);
	--cfb-sm: var(--md-sys-shape-corner-small, 8px);
	--cfb-md: var(--md-sys-shape-corner-medium, 12px);
	--cfb-full: var(--md-sys-shape-corner-full, 9999px);
	--cfb-ease: var(--md-sys-motion-easing-emphasized, cubic-bezier(.2, 0, 0, 1));
	--cfb-ease-std: var(--md-sys-motion-easing-standard, cubic-bezier(.2, 0, 0, 1));
	--cfb-hover: var(--md-sys-state-hover, .08);
	--cfb-press: var(--md-sys-state-pressed, .12);
	--cfb-top: var(--cf-topbar, 64px);
	--cfb-bg: var(--cfb-surface);         /* colour behind the sticky bar (the band it sits on) */
}
.cf-band--low .cfb { --cfb-bg: var(--cfb-low); }
.cfb { color: var(--cfb-on-surface-v); line-height: 1.5; }
.cfb *, .cfb-sum * { box-sizing: border-box; }
.cfb .screen-reader-text, .cfb-sum .screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; margin: -1px; padding: 0; border: 0;
}
.cfb svg { flex: none; }
.cfb button { font-family: inherit; }

/* Shared state layer (MD3: 8 % hover, 12 % pressed, on the content colour) */
.cfb-chip, .cfb-textbtn, .cfb-tonalbtn, .cfb-more, .cfb-field__clear, .cfb-sum a { position: relative; isolation: isolate; overflow: hidden; }
.cfb-chip::before, .cfb-textbtn::before, .cfb-tonalbtn::before, .cfb-more::before, .cfb-field__clear::before, .cfb-sum a::before {
	content: ""; position: absolute; inset: 0; z-index: -1; background: currentColor; opacity: 0; border-radius: inherit;
	transition: opacity 200ms var(--cfb-ease-std);
}
.cfb-chip:hover::before, .cfb-textbtn:hover::before, .cfb-tonalbtn:hover::before, .cfb-more:hover::before, .cfb-field__clear:hover::before, .cfb-sum a:hover::before { opacity: var(--cfb-hover); }
.cfb-chip:active::before, .cfb-textbtn:active::before, .cfb-tonalbtn:active::before, .cfb-more:active::before, .cfb-field__clear:active::before, .cfb-sum a:active::before { opacity: var(--cfb-press); }

/* ---------- Controls (hidden until the script runs) ---------- */
.cfb:not(.cfb-js) .cfb-bar, .cfb:not(.cfb-js) .cfb-filters { display: none; }

.cfb-bar {
	position: sticky; top: var(--cfb-top); z-index: 20; background: var(--cfb-bg);
	padding: 12px 0 8px; margin-bottom: 4px;
	transition: box-shadow 300ms var(--cfb-ease-std);
}
.admin-bar .cfb-bar { top: calc(var(--cfb-top) + 32px); }
.cfb-bar.is-stuck { box-shadow: 0 1px 0 var(--cfb-outline-v); }
.cfb-bar__row { display: flex; gap: 12px; align-items: center; }
.cfb-bar__status { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; margin-top: 8px; }
.cfb-count { margin: 0 !important; font-size: .9375rem; font-weight: 500; color: var(--cfb-on-surface); font-variant-numeric: tabular-nums; }

/* MD3 search bar: 56 px pill on surface-container-high, leading icon, trailing clear button */
.cfb-field {
	flex: 1 1 auto; min-width: 0; position: relative; display: flex; align-items: center; gap: 4px;
	height: 56px; padding: 0 4px 0 16px; border-radius: var(--cfb-full); background: var(--cfb-high); color: var(--cfb-on-surface-v);
	transition: box-shadow 200ms var(--cfb-ease-std), background-color 200ms var(--cfb-ease-std);
}
.cfb-field:hover { background: color-mix(in srgb, var(--cfb-high), var(--cfb-on-surface) 6%); }
.cfb-field:focus-within { box-shadow: inset 0 0 0 2px var(--cfb-primary); background: var(--cfb-high); }
.cfb-field > svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
body .cfb .cfb-field input.cfb-field__input.cfb-field__input {
	flex: 1 1 auto; min-width: 0; height: 100%; margin: 0; padding: 0 8px 0 12px; border: 0; background: transparent; box-shadow: none;
	font-family: inherit; font-weight: 400; font-size: 1rem; line-height: 1.5; color: var(--cfb-on-surface); border-radius: 0; outline: none;
	-webkit-appearance: none; appearance: none;
}
.cfb-field__input::placeholder { color: var(--cfb-on-surface-v); opacity: 1; text-overflow: ellipsis; }
.cfb-field__input::-webkit-search-cancel-button, .cfb-field__input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
body .cfb .cfb-field input.cfb-field__input.cfb-field__input:focus-visible { outline: none; }
body .cfb button.cfb-field__clear {
	width: 48px; height: 48px; display: grid; place-items: center; padding: 0; border: 0; border-radius: var(--cfb-full);
	background: transparent; color: var(--cfb-on-surface-v); flex: none;
}
.cfb-field__clear svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
body .cfb button.cfb-field__clear:hover, body .cfb button.cfb-field__clear:focus { background: transparent; color: var(--cfb-on-surface); }
.cfb-field__clear[hidden] { display: none !important; }

/* MD3 outlined select (label in the notch) */
.cfb-select { position: relative; flex: 0 0 220px; margin: 0; display: block; }
.cfb-select__label {
	position: absolute; left: 12px; top: -8px; padding: 0 4px; background: var(--cfb-bg); z-index: 1;
	font-size: .75rem; line-height: 16px; font-weight: 500; color: var(--cfb-on-surface-v); pointer-events: none;
}
body .cfb .cfb-select select.cfb-sel.cfb-sel {
	width: 100%; height: 56px; margin: 0; padding: 0 44px 0 16px; border: 1px solid var(--cfb-outline); border-radius: var(--cfb-xs);
	background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z' fill='%23414751'/%3E%3C/svg%3E") no-repeat right 12px center / 24px;
	font-family: inherit; font-weight: 400; font-size: 1rem; line-height: 1.5; color: var(--cfb-on-surface); -webkit-appearance: none; appearance: none; cursor: pointer;
}
body .cfb .cfb-select select.cfb-sel.cfb-sel:hover { border-color: var(--cfb-on-surface); }
body .cfb .cfb-select select.cfb-sel.cfb-sel:focus-visible { outline: none; border-color: var(--cfb-primary); box-shadow: inset 0 0 0 1px var(--cfb-primary); }
.cfb-select:focus-within .cfb-select__label { color: var(--cfb-primary-text); }

/* Buttons */
body .cfb button.cfb-textbtn {
	min-height: 40px; padding: 0 12px; border: 0; border-radius: var(--cfb-full); background: transparent;
	color: var(--cfb-primary-text); font-family: inherit; font-weight: 500; font-size: .9375rem; line-height: 20px; letter-spacing: .01em;
}
body .cfb button.cfb-textbtn:hover, body .cfb button.cfb-textbtn:focus { background: transparent; color: var(--cfb-primary-text); }
body .cfb button.cfb-tonalbtn {
	min-height: 40px; padding: 0 24px; border: 0; border-radius: var(--cfb-full); background: var(--cfb-secondary-c);
	color: var(--cfb-on-secondary-c); font-family: inherit; font-weight: 500; font-size: .9375rem; line-height: 20px; letter-spacing: .01em;
}
body .cfb button.cfb-tonalbtn:hover, body .cfb button.cfb-tonalbtn:focus { background: var(--cfb-secondary-c); color: var(--cfb-on-secondary-c); }

/* ---------- Filter chips (same look as the Home gallery chips) ---------- */
.cfb-filters { display: grid; gap: 12px; margin: 4px 0 24px; }
.cfb-group { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 8px 16px; align-items: start; }
.cfb-group__label { font-size: .875rem; font-weight: 500; line-height: 20px; color: var(--cfb-on-surface); padding-top: 10px; }
.cfb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
body .cfb button.cfb-chip {
	display: inline-flex; align-items: center; gap: 6px; height: 40px; margin: 0; padding: 0 16px;
	border: 0; border-radius: var(--cfb-sm); box-shadow: inset 0 0 0 1px var(--cfb-outline-v); background: transparent;
	font-family: inherit; font-weight: 500; font-size: .9375rem; line-height: 20px; letter-spacing: .01em; color: var(--cfb-on-surface-v); white-space: nowrap;
	transition: background-color 250ms var(--cfb-ease), color 250ms var(--cfb-ease), box-shadow 250ms var(--cfb-ease), padding 250ms var(--cfb-ease);
}
body .cfb button.cfb-chip:hover, body .cfb button.cfb-chip:focus { background: transparent; color: var(--cfb-on-surface); }
.cfb-chip__check { width: 0; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: width 250ms var(--cfb-ease); margin-right: -6px; }
.cfb-chip__n { font-size: .8125rem; font-weight: 500; opacity: .8; margin-left: 2px; font-variant-numeric: tabular-nums; }
body .cfb button.cfb-chip[aria-pressed="true"] {
	padding-left: 8px; background: var(--cfb-secondary-c); color: var(--cfb-on-secondary-c); box-shadow: none;
}
.cfb-chip[aria-pressed="true"] .cfb-chip__check { width: 18px; margin-right: 0; }
body .cfb button.cfb-chip:focus-visible { outline: 0; box-shadow: 0 0 0 3px var(--cfb-primary); }

/* ---------- Table (desktop) ---------- */
.cfb-table {
	width: 100%; margin: 0; border-collapse: separate; border-spacing: 0; table-layout: fixed;
	background: var(--cfb-lowest); border: 1px solid var(--cfb-outline-v); border-radius: var(--cfb-md); overflow: hidden;
}
.cfb-table[hidden] { display: none; }
.cfb-table th, .cfb-table td { padding: 16px; text-align: left; vertical-align: top; border: 0; border-top: 1px solid var(--cfb-outline-v); background: transparent; }
.cfb-table thead th {
	border-top: 0; padding-block: 14px; background: var(--cfb-low); font-size: .875rem; font-weight: 500; line-height: 20px;
	color: var(--cfb-on-surface-v); letter-spacing: .01em; white-space: nowrap;
}
.cfb-table col, .cfb-table .c-id { width: 76px; }
.cfb-table .c-area { width: 172px; }
.cfb-table .c-type { width: 128px; }
.cfb-table .c-prio { width: 116px; }
.cfb-table .c-status { width: 120px; }
.cfb-table .c-more { width: 64px; padding-left: 4px; padding-right: 12px; text-align: right; }
.cfb-table td.c-more { padding-top: 16px; }
.cfb-item.has-more .c-item { cursor: default; }
.cfb-table td.c-id { color: var(--cfb-on-surface-v); font-size: .875rem; font-variant-numeric: tabular-nums; padding-top: 18px; white-space: nowrap; }
.cfb-table td.c-area, .cfb-table td.c-type { font-size: .9375rem; color: var(--cfb-on-surface-v); padding-top: 17px; }
.cfb-table td.c-prio, .cfb-table td.c-status { padding-top: 15px; }
.cfb-table tbody th { font-weight: 400; }
.cfb-table th.c-item:focus { outline: none; }
.cfb-table th.c-item:focus-visible { outline: 3px solid var(--cfb-primary); outline-offset: -3px; }
.cfb-item { transition: background-color 600ms var(--cfb-ease-std); }
.cfb-item.is-hit { background: var(--cfb-primary-c); }
.cfb-item.is-hit > * { background: transparent; }

.cfb-title { display: block; font-size: 1.0625rem; line-height: 24px; font-weight: 500; color: var(--cfb-on-surface); text-wrap: pretty; }
.cfb-meta { display: none; font-size: .875rem; line-height: 20px; color: var(--cfb-on-surface-v); margin-top: 2px; }
.cfb-desc {
	display: block; margin-top: 6px; font-size: .9375rem; line-height: 1.55; color: var(--cfb-on-surface-v); overflow-wrap: anywhere;
	display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; line-clamp: 1; overflow: hidden; max-width: 78ch;
}
.cfb-item.is-open .cfb-desc { -webkit-line-clamp: unset; line-clamp: none; overflow: visible; }
.cfb-desc code {
	font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .8125rem; padding: 1px 6px; border-radius: var(--cfb-xs);
	background: var(--cfb-low); color: var(--cfb-on-surface); box-shadow: inset 0 0 0 1px var(--cfb-high);
}
body .cfb button.cfb-more {
	width: 40px; height: 40px; display: grid; place-items: center; margin: -8px 0 -8px; padding: 0; border: 0; border-radius: var(--cfb-full);
	background: transparent; color: var(--cfb-on-surface-v);
}
body .cfb button.cfb-more:hover, body .cfb button.cfb-more:focus { background: transparent; color: var(--cfb-on-surface); }
.cfb-more svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 300ms var(--cfb-ease); }
.cfb-item.is-open .cfb-more svg { transform: rotate(180deg); }
.cfb-more[hidden] { visibility: hidden; }

/* Status: tonal chips. Priority: neutral label with a three-bar signal. */
.cfb-tag {
	display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: var(--cfb-sm);
	font-size: .8125rem; font-weight: 500; line-height: 16px; letter-spacing: .01em; white-space: nowrap;
	background: var(--cfb-high); color: var(--cfb-on-surface);
}
.cfb-tag--done { background: var(--cfb-primary-c); color: var(--cfb-on-primary-c); }
.cfb-tag--in-progress { background: var(--cfb-secondary-c); color: var(--cfb-on-secondary-c); }
.cfb-tag--planned { background: var(--cfb-tertiary-c); color: var(--cfb-on-tertiary-c); }
.cfb-prio { display: inline-flex; align-items: center; gap: 8px; height: 28px; font-size: .875rem; font-weight: 500; color: var(--cfb-on-surface); white-space: nowrap; }
.cfb-prio svg { width: 16px; height: 14px; fill: var(--cfb-primary); }
.cfb-prio svg .off { fill: var(--cfb-outline-v); }

/* "Show more items" (rows are shown 40 at a time) */
.cfb-pager { display: flex; justify-content: center; margin-top: 24px; }
.cfb-pager[hidden], .cfb:not(.cfb-js) .cfb-pager { display: none; }

/* Empty state */
.cfb-empty { text-align: center; padding: 56px 24px; border-radius: var(--cfb-md); background: var(--cfb-low); }
.cfb-empty[hidden] { display: none; }
.cfb-empty svg { width: 48px; height: 48px; fill: none; stroke: var(--cfb-on-surface-v); stroke-width: 1.6; stroke-linecap: round; margin: 0 auto 12px; display: block; }
.cfb-empty__title { margin: 0 0 4px !important; font-size: 1.375rem; font-weight: 500; line-height: 1.3; color: var(--cfb-on-surface); }
.cfb-empty__text { margin: 0 auto 20px !important; color: var(--cfb-on-surface-v); }

/* ---------- Tablet: area and type move under the title ---------- */
@media (max-width: 1100px) {
	.cfb-table .c-area, .cfb-table .c-type { display: none; }
	.cfb-meta { display: block; }
	.cfb-table .c-id { width: 64px; }
	.cfb-desc { -webkit-line-clamp: 2; line-clamp: 2; }
}

/* ---------- Phone: every row becomes a card; filters scroll sideways ---------- */
@media (max-width: 599px) {
	.cfb-bar { position: static; padding-top: 4px; }
	.cfb-bar__row { flex-direction: column; align-items: stretch; gap: 16px; }
	.cfb-select { flex: none; }
	.cfb-group { grid-template-columns: minmax(0, 1fr); gap: 6px; }
	.cfb-group__label { padding-top: 0; }
	.cfb-chips {
		flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
		margin-inline: -16px; padding: 2px 16px 4px; scroll-padding-inline: 16px;
	}
	.cfb-chips::-webkit-scrollbar { display: none; }
	.cfb-chip { flex: none; }

	.cfb-table, .cfb-table tbody { display: block; background: transparent; border: 0; border-radius: 0; overflow: visible; }
	.cfb-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); }
	.cfb-table tbody { display: grid; gap: 12px; }
	.cfb-table tr.cfb-item {
		display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 12px 12px; padding: 16px 12px 16px 16px;
		background: var(--cfb-lowest); border: 1px solid var(--cfb-outline-v); border-radius: var(--cfb-md);
	}
	.cfb-table tr.cfb-item[hidden] { display: none; }
	.cfb-table tr.cfb-item > * { display: block; padding: 0; border: 0; width: auto; }
	.cfb-table td.c-status { order: 1; padding: 0; }
	.cfb-table td.c-prio { order: 2; padding: 0; }
	.cfb-table td.c-id { order: 3; justify-self: end; padding: 0; }
	.cfb-table td.c-more { order: 4; padding: 0; width: auto; }
	.cfb-table th.c-item { order: 5; grid-column: 1 / -1; padding-right: 4px; }
	body .cfb button.cfb-more { margin: -8px 0; }
	.cfb-table .c-area, .cfb-table .c-type { display: none !important; }
	.cfb-desc { -webkit-line-clamp: 3; line-clamp: 3; }
	.cfb-empty { padding: 40px 16px; }
}

/* ================================================================================================
 * Summary shortcodes: [cf_backlog_stats], [cf_backlog_open] (inside Text Editor widgets)
 * ================================================================================================ */
.cfb-sum, .elementor-widget-text-editor .cfb-sum { color: var(--cfb-on-surface-v); }
p.cfb-headline { margin: 0 0 16px !important; max-width: none !important; font-size: 1.125rem; line-height: 1.3; color: var(--cfb-on-surface-v); }
.cfb-big {
	display: block; font-size: clamp(3rem, 2.2rem + 3vw, 4.5rem); line-height: 1; font-weight: 500; letter-spacing: -0.03em;
	color: var(--cfb-on-surface); font-variant-numeric: tabular-nums; margin-bottom: 8px;
}
.cfb-meter { display: flex; gap: 4px; height: 12px; margin: 0 0 16px; }
.cfb-meter__seg { display: block; min-width: 6px; border-radius: var(--cfb-full); background: var(--cfb-outline-v); }
.cfb-meter__seg--done, .cfb-dot--done { background: var(--cfb-primary); }
.cfb-meter__seg--in-progress, .cfb-dot--in-progress { background: var(--cfb-secondary); }
.cfb-meter__seg--planned, .cfb-dot--planned { background: var(--cfb-tertiary); }
.cfb-sum ul { list-style: none; margin: 0; padding: 0; }
.cfb-sum li { max-width: none !important; margin: 0; }
.cfb-sum a { display: flex; align-items: center; border-radius: var(--cfb-sm); color: var(--cfb-on-surface); text-decoration: none; }
.cfb-sum a:hover { color: var(--cfb-on-surface); }
.cfb-sum a:focus-visible { outline: 3px solid var(--cfb-primary); outline-offset: 1px; }
.cfb-legend { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0 0 0 -8px !important; }
.cfb-legend a { gap: 8px; min-height: 40px; padding: 0 8px; font-size: .9375rem; font-weight: 500; }
.cfb-legend b { font-weight: 500; color: var(--cfb-on-surface-v); font-variant-numeric: tabular-nums; }
.cfb-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }

.cfb-bars { display: grid; gap: 2px; margin: 0 -8px !important; }
.cfb-bars a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 8px; font-size: .9375rem; line-height: 20px; }
.cfb-bars__label { font-weight: 500; }
.cfb-bars b { font-weight: 500; color: var(--cfb-on-surface-v); font-variant-numeric: tabular-nums; }
.cfb-bars__track { grid-column: 1 / -1; height: 6px; border-radius: var(--cfb-full); background: var(--cfb-high); overflow: hidden; }
.cfb-bars__track i { display: block; height: 100%; border-radius: inherit; background: var(--cfb-primary); }

.cfb-open { display: grid; gap: 2px; margin: 0 -8px !important; }
.cfb-open li { display: block; }
.cfb-open a { justify-content: space-between; align-items: flex-start; gap: 12px; min-height: 44px; padding: 10px 8px; font-size: .9375rem; font-weight: 500; line-height: 1.35; }
.cfb-open a .cfb-tag { flex: none; margin-top: -2px; }
/* "Show N more" for the open-items card: 4 items on phones and tablets, 8 on desktops */
.cfb-opencard.is-folded:not(.is-open) .cfb-x { display: none; }
@media (min-width: 1025px) {
	.cfb-opencard.is-folded:not(.is-open) .cfb-x { display: block; }
	.cfb-opencard.is-folded:not(.is-open) .cfb-x2 { display: none; }
	.cfb-opencard:not(.has-more-lg) .cfb-open-toggle { display: none; }
	.cfb-open-toggle__sm { display: none; }
}
@media (max-width: 1024px) { .cfb-open-toggle__lg { display: none; } }
.cfb-opencard.is-open .cfb-open-toggle__sm, .cfb-opencard.is-open .cfb-open-toggle__lg { display: none; }
.cfb-opencard:not(.is-open) .cfb-open-toggle__less { display: none; }
html body .cfb-open-toggle {
	display: inline-flex; align-items: center; gap: 4px; min-height: 40px; margin: 4px 0 0 -8px; padding: 0 12px 0 8px;
	border: 0; border-radius: var(--cfb-full); background: transparent; color: var(--cfb-primary);
	font: 500 .875rem/1 inherit; letter-spacing: 0; text-transform: none; cursor: pointer; box-shadow: none;
}
html body .cfb-open-toggle[hidden] { display: none; }
html body .cfb-open-toggle:is(:hover, :focus) { background: color-mix(in srgb, var(--cfb-primary) 8%, transparent); color: var(--cfb-primary); }
html body .cfb-open-toggle:focus-visible { outline: 3px solid var(--cfb-primary); outline-offset: 1px; }
.cfb-open-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 200ms var(--cfb-ease); }
.cfb-opencard.is-open .cfb-open-toggle svg { transform: rotate(180deg); }

/* Equal-height summary cards: the "By type" bars spread over the card's full height on desktops */
@media (min-width: 1025px) {
	.cfb-summary > .e-con > .elementor-widget-text-editor:last-child { flex-grow: 1; display: flex; flex-direction: column; }
	.cfb-summary > .e-con > .elementor-widget-text-editor:last-child > .elementor-widget-container,
	.cfb-summary > .e-con > .elementor-widget-text-editor:last-child .cfb-sum { flex-grow: 1; display: flex; flex-direction: column; }
	.cfb-summary .cfb-sum > .cfb-bars:only-child { flex-grow: 1; align-content: space-between; }
}

/* Motion: the bars grow once when the summary scrolls into view (cf-motion.js adds is-in); none with reduced motion. */
html.cf-js .cf-reveal .cfb-bars__track i, html.cf-js .cf-reveal .cfb-meter__seg { transform: scaleX(0); transform-origin: left center; }
html.cf-js .cf-reveal.is-in .cfb-bars__track i, html.cf-js .cf-reveal.is-in .cfb-meter__seg {
	transform: none; transition: transform 900ms var(--md-sys-motion-easing-emphasized-decelerate, cubic-bezier(.05, .7, .1, 1)) 150ms;
}
@media (prefers-reduced-motion: reduce) {
	.cfb *, .cfb *::before, .cfb-sum *, .cfb-sum *::before { transition: none !important; animation: none !important; }
	html.cf-js .cf-reveal .cfb-bars__track i, html.cf-js .cf-reveal .cfb-meter__seg { transform: none !important; }
}

/* ---------- Product backlog page (Elementor classes) ---------- */
body .cfb-card-title .elementor-heading-title { font-size: var(--md-sys-typescale-title-large-size, 1.375rem); line-height: 28px; font-weight: 500; letter-spacing: 0; }
.cfb-card-title { margin-top: 16px; padding-top: 24px; border-top: 1px solid var(--md-sys-color-outline-variant, #c1c7d3); }
@media (min-width: 768px) and (max-width: 1024px) { .e-con.cfb-span-tablet { grid-column: 1 / -1; } }
