@charset "UTF-8";

/**
 * collapsible.css 2.7.0
 * Author: hybrid.
 * Type: core
 * Load: optional
 *
 * Height animation via max-height (set by collapsible.js).
 * Width animation via max-width on .horizontal (set by collapsible.js).
 * Requires collapsible.js — max-height / max-width values are set programmatically.
 *
 * States
 * off : .collapsible, .collapsible > *
 * on  : .collapsible.opened, .collapsible.opened > *
 *
 * Variants
 * .truncated   — starts at capped height, closing gradient via ::after
 * .horizontal  — animates max-width instead of max-height
 *
 * Tokens
 * --collapsible-toggle-width        toggle width (default: auto)
 * --collapsible-toggle-justify      toggle justify-content (default: flex-start)
 * --collapsible-toggle-gap          gap between icon and label (default: 1em)
 * --collapsible-icon                icon mask-image for toggle (default: --icon-more)
 * --collapsible-icon-start          icon rotation, closed state (default: 0deg)
 * --collapsible-icon-end            icon rotation on .active (default: 45deg)
 * --collapsible-icon-size           icon size (default: 1em)
 * --collapsible-icon-order          icon position vs label (default: -1, before)
 * --collapsible-duration            duration of the height / width / opacity transitions (default: --duration-normal)
 * --collapsible-duration-fast       duration of the margin / padding / icon transitions (default: --duration-fast)
 * --collapsible-horizontal-width    fallback max-width when .horizontal is opened
 *                                   without inline value from JS (default: 100vw)
 * --collapsible-spacing-top         margin of the first child (default: --content-spacing)
 * --collapsible-spacing-bottom      margin of the last child (default: --content-spacing)
 * --truncated-gradient-height       fade height (default: 2em)
 * --truncated-gradient-color        fade color as RGB tuple (default: --bright-rgb)
 *
 * Dependencies
 * collapsible.js               — sets max-height / max-width inline, toggles .overflow-visible
 * --bright-rgb                 defined in colors.css
 * --content-spacing            defined in spacing.css
 * --duration-fast              defined in animations.css
 * --duration-normal            defined in animations.css
 * --easeInQuint                defined in animations.css
 * --easeOutQuint               defined in animations.css
 *
 * Changelog 2.6.0
 * — .horizontal variant restored (lost in 2.4/2.5), on the 2.5 token system
 * — max-width added to .collapsible transitions
 * — Header aligned with the code (default icon, rotation)
 *
 * TODO
 * — color-mix() for --truncated-gradient-color (non-RGB colors)
 */



/* ================================================================================================== */
/* ============================================= CONFIG ============================================= */
/* ================================================================================================== */

/**
 * Override in project CSS to customize per context.
 * --truncated-gradient-height and --truncated-gradient-color
 * control the fade-out effect on .truncated collapsibles.
 * --truncated-gradient-color expects an RGB tuple: e.g. 255, 255, 255
 */


/* ============================== COLLAPSIBLE ============================== */

:root {
	--collapsible-duration: var(--duration-normal);
	--collapsible-duration-fast: var(--duration-fast);
	--collapsible-horizontal-width: 100vw;
	--collapsible-spacing-top: var(--content-spacing, 1em);
	--collapsible-spacing-bottom: var(--content-spacing, 1em);
}


/* ============================== TRUNCATED ============================== */

:root {
	--truncated-gradient-height: 2em;
	--truncated-gradient-color:  var(--bright-rgb, 255, 255, 255);
}


/* ============================== COLLAPSIBLE TOGGLE ============================== */

:root {
	--collapsible-toggle-width: auto;
	--collapsible-toggle-justify: flex-start;
	--collapsible-toggle-gap: 1em;

	--collapsible-icon: var(--icon-more, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 4h2v7h7v2h-7v7h-2v-7H4v-2h7z'/%3E%3C/svg%3E"));
	--collapsible-icon-start: 0deg;
	--collapsible-icon-end: 45deg;
	--collapsible-icon-size: 1em;
	--collapsible-icon-order: -1;
}

/* Reduced motion: no animation (the JS skips it too) */
@media (prefers-reduced-motion: reduce) {
	:root {
		--collapsible-duration: 0s;
		--collapsible-duration-fast: 0s;
	}
}



/* ====================================================================================================== */
/* ============================================= ANIMATIONS ============================================= */
/* ====================================================================================================== */


/* ============================== COLLAPSIBLE ============================== */

.collapsible {
	transition:
		max-height var(--collapsible-duration),
		max-width var(--collapsible-duration),
		margin var(--collapsible-duration-fast),
		padding var(--collapsible-duration-fast);
	transition-delay: calc(var(--collapsible-duration-fast) / 2);
}
.collapsible > * {
	transition:
		opacity var(--collapsible-duration),
		margin var(--collapsible-duration-fast);
}
.collapsible,
.collapsible > * {
	transition-timing-function: var(--easeOutQuint);
}

.collapsible.opened {
	transition-delay: 0s;
}
.collapsible.opened,
.collapsible.opened > * {
	transition-timing-function: var(--easeInQuint);
}
.collapsible.opened > * {
	transition-delay: calc(var(--collapsible-duration-fast) / 2);
}


/* ============================== TOGGLE ============================== */

.collapsible-toggle::before {
	transition: transform var(--collapsible-duration-fast);
	transition-timing-function: var(--easeOutQuint);
}
.collapsible-toggle.active::before {
	transition-timing-function: var(--easeInQuint);
}


/* ============================== TRUNCATED ============================== */

.collapsible.truncated::after {
	transition: opacity var(--collapsible-duration);
}



/* ======================================================================================================= */
/* ============================================= COLLAPSIBLE ============================================= */
/* ======================================================================================================= */


/* ============================== DEFAULT ============================== */

.collapsible {
	position: relative;
	display: block;
	max-height: 0;
	overflow: hidden;
	/* Limits the reflow triggered by the max-height animation to the box itself:
	   without it, every transition frame recalculates the layout of the WHOLE
	   document. With several collapsibles on a page the effect adds up and
	   shows as jerky animations. */
	contain: layout;
}
.collapsible > * { opacity: 0; }


/* ============================== OPENED ============================== */

.collapsible.opened { padding: 0; }
.collapsible.opened > * { opacity: 1; }


/* ============================== ACTIVE ============================== */

/* overflow only becomes visible once the height transition ends (class set by
   collapsible.js on transitionend), otherwise overflowing content (left/right)
   shows before the box has finished opening */
.collapsible.opened.overflow-visible { overflow: visible; }


/* ============================== HORIZONTAL ============================== */

/* The animation runs on max-width (set inline by collapsible.js).
   max-height is released: the height follows the content.
   Fallback without inline value: --collapsible-horizontal-width (less precise animation). */
.collapsible.horizontal {
	max-height: none;
	max-width: 0;
}
.collapsible.horizontal.opened { max-width: var(--collapsible-horizontal-width); }


/* ============================== NAV ============================== */

nav.collapsible {
	display: inline-flex;
	flex-direction: column;
}

nav.collapsible.horizontal { flex-direction: row; }
nav.collapsible > * { flex-shrink: 0; }


/* ============================== SPACING ============================== */

/* No top margin on: a closed panel, a panel right after its toggle (or the heading wrapping it),
   the auto "read more" toggle right after a truncated panel. The toggle that follows a panel
   in an accordion list keeps its spacing. */
div.collapsible:not(.opened),
:is(.collapsible-toggle, :has(> .collapsible-toggle)) + div.collapsible,
div.collapsible.truncated + .collapsible-toggle { margin-top: 0; }

div.collapsible > :first-child { margin-top: var(--collapsible-spacing-top); }
div.collapsible > :last-child { margin-bottom: var(--collapsible-spacing-bottom); }

/* Horizontal: no vertical spacing added to the content */
:where(div.collapsible.horizontal) {
	--collapsible-spacing-top: 0;
	--collapsible-spacing-bottom: 0;
}


/* ===================================================================================================== */
/* ============================================= TRUNCATED ============================================= */
/* ===================================================================================================== */


/* ============================== DEFAULT ============================== */

.collapsible.truncated { overflow: hidden; }
.collapsible.truncated > * {
	opacity: 1;
	margin: 0;
}

.collapsible.truncated::after {
	content: '';
	position: absolute;
	inset: auto 0 0 0;
	height: var(--truncated-gradient-height);
	background: linear-gradient(
		to bottom,
		rgba(var(--truncated-gradient-color), 0) 0%,
		rgba(var(--truncated-gradient-color), .8) 50%,
		rgba(var(--truncated-gradient-color), 1) 100%
	);
	pointer-events: none;
}


/* ============================== MODIFIERS ============================== */

.collapsible.truncated.opened::after { opacity: 0; }
.collapsible.truncated:not(.opened) .read-more-hidden { display: none; }
.collapsible.truncated.opened .read-more-hidden { display: block; }


/* ============================== MARKERS ============================== */

.more-tag,
.more-marker { display: none !important; }



/* ================================================================================================== */
/* ============================================= TOGGLE ============================================= */
/* ================================================================================================== */


/* ============================== DEFAULT ============================== */

.collapsible-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: var(--collapsible-toggle-justify);
	gap: var(--collapsible-toggle-gap);
	width: var(--collapsible-toggle-width);
	cursor: pointer;
	text-decoration: none;
}
.collapsible-toggle * { text-decoration: none; }

/* Toggle not needed (set by collapsible.js) */
:where(.collapsible-toggle[hidden]) { display: none; }

/* Focus ring: reset.css (global :focus-visible), buttons.css for a <button> toggle */


/* ============================== IN HEADING ============================== */

/* Accordion: <hN><button class="collapsible-toggle">. The button takes the heading
   typography and loses the button look (buttons.css). A toggle outside a heading
   keeps the button style.
   The --button-* tokens are the optional ones of buttons.css: its hover / active /
   focus states only read them, so they stay neutral here. Without buttons.css they do nothing.
   Specificity = one class: wins over a plain `button` rule, overridable by a project class. */
:where(h2, h3, h4, h5, h6) > .collapsible-toggle {
	--button-text-color: currentColor;
	--button-hover-text-color: currentColor;
	--button-background-color: transparent;
	--button-hover-background-color: transparent;
	--button-border-width: 0;
	--button-padding-x: 0;
	--button-padding-y: 0;
	--button-radius: 0;
	margin: 0;
	font: inherit;
	letter-spacing: inherit;
	text-align: inherit;
	text-transform: inherit;
	white-space: normal;
}


/* ============================== ICON ============================== */

.collapsible-toggle::before {
	content: "";
	position: relative;
	order: var(--collapsible-icon-order);
	height: var(--collapsible-icon-size);
	aspect-ratio: 1/1;
	background: currentColor;
	mask-image: var(--collapsible-icon);
	mask-size: contain;
	mask-repeat: no-repeat;
	mask-position: center;
	backface-visibility: hidden;
	transform: rotate(var(--collapsible-icon-start));
}
.collapsible-toggle.active::before { transform: rotate(var(--collapsible-icon-end)); }