/*!
 * OpalUI v0.12.1 | MIT License | https://github.com/szilu/opalui
 */
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
/* Document
   ========================================================================== */
/**
 * 1. Correct the line height in all browsers.
 * 2. Prevent adjustments of font size after orientation changes in iOS.
 */
html {
  line-height: 1.15; /* 1 */
  -webkit-text-size-adjust: 100%; /* 2 */
}
/* Sections
   ========================================================================== */
/**
 * Remove the margin in all browsers.
 */
body {
  margin: 0;
}
/**
 * Render the `main` element consistently in IE.
 */
main {
  display: block;
}
/**
 * Correct the font size and margin on `h1` elements within `section` and
 * `article` contexts in Chrome, Firefox, and Safari.
 */
h1 {
  font-size: 2em;
  margin: 0.67em 0;
}
/* Grouping content
   ========================================================================== */
/**
 * 1. Add the correct box sizing in Firefox.
 * 2. Show the overflow in Edge and IE.
 */
hr {
  box-sizing: content-box; /* 1 */
  height: 0; /* 1 */
  overflow: visible; /* 2 */
}
/**
 * 1. Correct the inheritance and scaling of font size in all browsers.
 * 2. Correct the odd `em` font sizing in all browsers.
 */
pre {
  font-family: monospace, monospace; /* 1 */
  font-size: 1em; /* 2 */
}
/* Text-level semantics
   ========================================================================== */
/**
 * Remove the gray background on active links in IE 10.
 */
a {
  background-color: transparent;
}
/**
 * 1. Remove the bottom border in Chrome 57-
 * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
 */
abbr[title] {
  border-bottom: none; /* 1 */
  text-decoration: underline; /* 2 */
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted; /* 2 */
}
/**
 * Add the correct font weight in Chrome, Edge, and Safari.
 */
b,
strong {
  font-weight: bolder;
}
/**
 * 1. Correct the inheritance and scaling of font size in all browsers.
 * 2. Correct the odd `em` font sizing in all browsers.
 */
code,
kbd,
samp {
  font-family: monospace, monospace; /* 1 */
  font-size: 1em; /* 2 */
}
/**
 * Add the correct font size in all browsers.
 */
small {
  font-size: 80%;
}
/**
 * Prevent `sub` and `sup` elements from affecting the line height in
 * all browsers.
 */
sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}
sub {
  bottom: -0.25em;
}
sup {
  top: -0.5em;
}
/* Embedded content
   ========================================================================== */
/**
 * Remove the border on images inside links in IE 10.
 */
img {
  border-style: none;
}
/* Forms
   ========================================================================== */
/**
 * 1. Change the font styles in all browsers.
 * 2. Remove the margin in Firefox and Safari.
 */
button,
input,
optgroup,
select,
textarea {
  font-family: inherit; /* 1 */
  font-size: 100%; /* 1 */
  line-height: 1.15; /* 1 */
  margin: 0; /* 2 */
}
/**
 * Show the overflow in IE.
 * 1. Show the overflow in Edge.
 */
button,
input { /* 1 */
  overflow: visible;
}
/**
 * Remove the inheritance of text transform in Edge, Firefox, and IE.
 * 1. Remove the inheritance of text transform in Firefox.
 */
button,
select { /* 1 */
  text-transform: none;
}
/**
 * Correct the inability to style clickable types in iOS and Safari.
 */
button,
[type="button"],
[type="reset"],
[type="submit"] {
  -webkit-appearance: button;
}
/**
 * Remove the inner border and padding in Firefox.
 */
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
  border-style: none;
  padding: 0;
}
/**
 * Restore the focus styles unset by the previous rule.
 */
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
  outline: 1px dotted ButtonText;
}
/**
 * Correct the padding in Firefox.
 */
fieldset {
  padding: 0.35em 0.75em 0.625em;
}
/**
 * 1. Correct the text wrapping in Edge and IE.
 * 2. Correct the color inheritance from `fieldset` elements in IE.
 * 3. Remove the padding so developers are not caught out when they zero out
 *    `fieldset` elements in all browsers.
 */
legend {
  box-sizing: border-box; /* 1 */
  color: inherit; /* 2 */
  display: table; /* 1 */
  max-width: 100%; /* 1 */
  padding: 0; /* 3 */
  white-space: normal; /* 1 */
}
/**
 * Add the correct vertical alignment in Chrome, Firefox, and Opera.
 */
progress {
  vertical-align: baseline;
}
/**
 * Remove the default vertical scrollbar in IE 10+.
 */
textarea {
  overflow: auto;
}
/**
 * 1. Add the correct box sizing in IE 10.
 * 2. Remove the padding in IE 10.
 */
[type="checkbox"],
[type="radio"] {
  box-sizing: border-box; /* 1 */
  padding: 0; /* 2 */
}
/**
 * Correct the cursor style of increment and decrement buttons in Chrome.
 */
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
  height: auto;
}
/**
 * 1. Correct the odd appearance in Chrome and Safari.
 * 2. Correct the outline style in Safari.
 */
[type="search"] {
  -webkit-appearance: textfield; /* 1 */
  outline-offset: -2px; /* 2 */
}
/**
 * Remove the inner padding in Chrome and Safari on macOS.
 */
[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
}
/**
 * 1. Correct the inability to style clickable types in iOS and Safari.
 * 2. Change font properties to `inherit` in Safari.
 */
::-webkit-file-upload-button {
  -webkit-appearance: button; /* 1 */
  font: inherit; /* 2 */
}
/* Interactive
   ========================================================================== */
/*
 * Add the correct display in Edge, IE 10+, and Firefox.
 */
details {
  display: block;
}
/*
 * Add the correct display in all browsers.
 */
summary {
  display: list-item;
}
/* Misc
   ========================================================================== */
/**
 * Add the correct display in IE 10+.
 */
template {
  display: none;
}
/**
 * Add the correct display in IE 10.
 */
[hidden] {
  display: none;
}
* {
	box-sizing: border-box;
	scrollbar-color: var(--col-frost) transparent;
	scrollbar-width: thin;
}
body {
	overflow-x: hidden;

	--col-bg: var(--col-surface);
	--col-on: var(--col-on-surface);
	--col-em: var(--col-em-surface);
}
h1, h2, h3, h4, h5, h6 {
	margin: 0;
}
h1, h2, h3 {
	color: var(--col-em);
}
button {
	padding: 0;
}
ul {
	margin: 0;
	padding-inline-start: 0;
}
a, a:link, a:visited {
	text-decoration: none;
	color: var(--col-on);
}
a[disabled] {
	pointer-events: none;
	opacity: var(--op-disabled);
	cursor: not-allowed;
}
hr {
	border: 1px solid var(--col-on);
}
details summary::marker {
	content: none;
}
*::-webkit-scrollbar {
	width: 0.25rem;
	background: var(--col-primary);
}
*::-webkit-scrollbar-thumb {
	width: 0.25rem;
	background: var(--col-frost);
	box-shadow: none;
}
*::-webkit-scrollbar-track, *::-webkit-scrollbar-track-piece {
	background: var(--col-on-primary);
}
/* vim: ts=4
 */
.w-auto { width: auto !important; }
.w-100 { width: 100% !important; }
.w-50 { width: 50% !important; }
.w-min-0 { min-width: 0 !important; }
.w-min-100 { min-width: 100% !important; }
.w-max-100 { max-width: 100% !important; }
.h-auto { height: auto !important; }
.h-100 { height: 100% !important; }
.h-min-0 { min-height: 0 !important; }
.h-min-100 { min-height: 100% !important; }
.h-max-100 { max-height: 100% !important; }
.d-flex { display: flex !important; }
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.float-left { float: left !important; }
.float-right { float: right !important; }
.float-none { float: none !important; }
.pos-relative { position: relative !important; }
.pos-absolute { position: absolute !important; }
.pos-fixed { position: fixed !important; }
.pos-sticky { position: sticky !important; }
.top-0 { top: 0 !important; }
.top-50 { top: 50% !important; }
.top-100 { top: 100% !important; }
.bottom-0 { bottom: 0 !important; }
.bottom-50 { bottom: 50% !important; }
.bottom-100 { bottom: 100% !important; }
.left-0 { left: 0 !important; }
.left-50 { left: 50% !important; }
.left-100 { left: 100% !important; }
.right-0 { right: 0 !important; }
.right-50 { right: 50% !important; }
.right-100 { right: 100% !important; }
.overflow-visible { overflow: visible !important; }
.overflow-hidden { overflow: hidden !important; }
.overflow-auto { overflow: auto !important; }
.overflow-scroll { overflow: scroll !important; }
.overflow-x-hidden { overflow-x: hidden !important; }
.overflow-y-hidden { overflow-y: hidden !important; }
.overflow-x-scroll { overflow-x: scroll !important; }
.overflow-y-scroll { overflow-y: scroll !important; }
.overflow-x-auto { overflow-x: auto !important; }
.overflow-y-auto { overflow-y: auto !important; }
.scroll-smooth { scroll-behavior: smooth !important; }
.cursor-default { cursor: default !important; }
.cursor-pointer { cursor: pointer !important; }
.cursor-text { cursor: text !important; }
.object-fit-cover { -o-object-fit: cover !important; object-fit: cover !important; }
.object-fit-contain { -o-object-fit: contain !important; object-fit: contain !important; }
.m-auto { margin: auto !important; }
.m-0 { margin: 0 !important; }
.m-1 { margin: 0.25rem !important; }
.m-2 { margin: 0.5rem !important; }
.m-3 { margin: 1rem !important; }
.m-4 { margin: 2rem !important; }
.m-5 { margin: 4rem !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }
.mx-1 { margin-left: 0.25rem !important; margin-right: 0.25rem !important; }
.mx-2 { margin-left: 0.5rem !important; margin-right: 0.5rem !important; }
.mx-3 { margin-left: 1rem !important; margin-right: 1rem !important; }
.mx-4 { margin-left: 2rem !important; margin-right: 2rem !important; }
.mx-5 { margin-left: 4rem !important; margin-right: 4rem !important; }
.my-auto { margin-top: auto !important; margin-bottom: auto !important; }
.my-1 { margin-top: 0.25rem !important; margin-bottom: 0.25rem !important; }
.my-2 { margin-top: 0.5rem !important; margin-bottom: 0.5rem !important; }
.my-3 { margin-top: 1rem !important; margin-bottom: 1rem !important; }
.my-4 { margin-top: 2rem !important; margin-bottom: 2rem !important; }
.my-5 { margin-top: 4rem !important; margin-bottom: 4rem !important; }
.ms-auto { margin-left: auto !important; }
.ms-1 { margin-left: 0.25rem !important; }
.ms-2 { margin-left: 0.5rem !important; }
.ms-3 { margin-left: 1rem !important; }
.ms-4 { margin-left: 2rem !important; }
.ms-5 { margin-left: 4rem !important; }
.me-auto { margin-right: auto !important; }
.me-1 { margin-right: 0.25rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.me-3 { margin-right: 1rem !important; }
.me-4 { margin-right: 2rem !important; }
.me-5 { margin-right: 4rem !important; }
.mt-auto { margin-top: auto !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 2rem !important; }
.mt-5 { margin-top: 4rem !important; }
.mb-auto { margin-bottom: auto !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 2rem !important; }
.mb-5 { margin-bottom: 4rem !important; }
.p-0 { padding: 0 !important; }
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 2rem !important; }
.p-5 { padding: 4rem !important; }
.px-1 { padding-left: 0.25rem !important; padding-right: 0.25rem !important; }
.px-2 { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
.px-3 { padding-left: 1rem !important; padding-right: 1rem !important; }
.px-4 { padding-left: 2rem !important; padding-right: 2rem !important; }
.px-5 { padding-left: 4rem !important; padding-right: 4rem !important; }
.py-1 { padding-top: 0.25rem !important; padding-bottom: 0.25rem !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.py-4 { padding-top: 2rem !important; padding-bottom: 2rem !important; }
.py-5 { padding-top: 4rem !important; padding-bottom: 4rem !important; }
.ps-1 { padding-left: 0.25rem !important; }
.ps-2 { padding-left: 0.5rem !important; }
.ps-3 { padding-left: 1rem !important; }
.ps-4 { padding-left: 2rem !important; }
.ps-5 { padding-left: 4rem !important; }
.pe-1 { padding-right: 0.25rem !important; }
.pe-2 { padding-right: 0.5rem !important; }
.pe-3 { padding-right: 1rem !important; }
.pe-4 { padding-right: 2rem !important; }
.pe-5 { padding-right: 4rem !important; }
.pt-1 { padding-top: 0.25rem !important; }
.pt-2 { padding-top: 0.5rem !important; }
.pt-3 { padding-top: 1rem !important; }
.pt-4 { padding-top: 2rem !important; }
.pt-5 { padding-top: 4rem !important; }
.pb-1 { padding-bottom: 0.25rem !important; }
.pb-2 { padding-bottom: 0.5rem !important; }
.pb-3 { padding-bottom: 1rem !important; }
.pb-4 { padding-bottom: 2rem !important; }
.pb-5 { padding-bottom: 4rem !important; }
.border-on { border-color: var(--col-on) !important; }
.border-em { border-color: var(--col-em) !important; }
.border-dashed { border-style: dashed !important; }
.border-radius-0 { border-radius: 0 !important; }
.border-radius-sm { border-radius: var(--border-radius-sm) !important; }
.border-radius-lg { border-radius: var(--border-radius-lg) !important; }
.border-round { border-radius: 50% !important; }
.border-0 { border: 0 !important; }
.border-1 { border: 0.5rem; }
.border-2 { border: 1rem; }
.border-3 { border: 2rem; }
.border-4 { border: 4rem; }
.border-end-0 { border-right: 0 !important; }
.border-end-1 { border-right: 1px !important; }
.border-end-2 { border-right: 2px !important; }
.border-start-0 { border-left: 0 !important; }
.border-start-1 { border-left: 1px !important; }
.border-start-2 { border-left: 2px !important; }
.text-emph { color: var(--col-em) !important; }
.text-disabled { color: lch(from var(--col-on) l c h / var(--op-disabled)) !important; }
.text-primary { color: var(--col-primary) !important; }
.text-secondary { color: var(--col-secondary) !important; }
.text-accent { color: var(--col-accent) !important; }
.text-success { color: var(--col-success) !important; }
.text-em-success { color: var(--col-em-success) !important; }
.text-warning { color: var(--col-warning) !important; }
.text-error { color: var(--col-error) !important; }
.bg { color: var(--col-on) !important; background-color: var(--col-bg) !important; }
.bg.primary { --col-on: var(--col-on-primary); --col-bg: var(--col-primary); }
.bg.secondary { --col-on: var(--col-on-secondary); --col-bg: var(--col-secondary); }
.bg.accent { --col-on: var(--col-on-accent); --col-bg: var(--col-accent); }
.bg.success { --col-on: var(--col-on-success); --col-bg: var(--col-success); }
.bg.warning { --col-on: var(--col-on-warning); --col-bg: var(--col-warning); }
.bg.error { --col-on: var(--col-on-error); --col-bg: var(--col-error); }
.bg.container-primary { --col-on: var(--col-on-container-primary); --col-bg: var(--col-container-primary); }
.bg.container-secondary { --col-on: var(--col-on-container-secondary); --col-bg: var(--col-container-secondary); }
.bg.container-accent { --col-on: var(--col-on-container-accent); --col-bg: var(--col-container-accent); }
.bg.container-success { --col-on: var(--col-on-container-success); --col-bg: var(--col-container-success); }
.bg.container-warning { --col-on: var(--col-on-container-warning); --col-bg: var(--col-container-warning); }
.bg.container-error { --col-on: var(--col-on-container-error); --col-bg: var(--col-container-error); }
.bg-shadow { background-color: #00000080 !important; backdrop-filter: blur(var(--blur-radius)) !important; }
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }
.text-justify { text-align: justify !important; }
.text-uppercase { text-transform: uppercase !important; }
.text-lowercase { text-transform: lowercase !important; }
.text-capitalize { text-transform: capitalize !important; }
/* Text overflow */
.text-truncate {
	overflow: hidden !important;
	text-overflow: ellipsis !important;
	white-space: nowrap !important;
}
.text-wrap { white-space: normal !important; }
.text-nowrap { white-space: nowrap !important; }
.text-clamp-2 {
	display: -webkit-box !important;
	-webkit-line-clamp: 2 !important;
	-webkit-box-orient: vertical !important;
	overflow: hidden !important;
}
.text-clamp-3 {
	display: -webkit-box !important;
	-webkit-line-clamp: 3 !important;
	-webkit-box-orient: vertical !important;
	overflow: hidden !important;
}
.text-clamp-4 {
	display: -webkit-box !important;
	-webkit-line-clamp: 4 !important;
	-webkit-box-orient: vertical !important;
	overflow: hidden !important;
}
/* Font weights */
.font-light { font-weight: 300 !important; }
.font-normal { font-weight: 400 !important; }
.font-medium { font-weight: 500 !important; }
.font-semibold { font-weight: 600 !important; }
.font-bold { font-weight: 700 !important; }
/* Font sizes */
.text-xs { font-size: 0.75rem !important; }
.text-sm { font-size: 0.875rem !important; }
.text-base { font-size: 1rem !important; }
.text-lg { font-size: 1.125rem !important; }
.text-xl { font-size: 1.25rem !important; }
.text-2xl { font-size: 1.5rem !important; }
.text-3xl { font-size: 1.875rem !important; }
/* Flex utilities */
.flex-column { flex-direction: column !important; }
.flex-row { flex-direction: row !important; }
.flex-fill { flex: 1 1 0 !important; }
.flex-order-start { order: -1 !important; }
.flex-order-end { order: 99 !important; }
.f-none { flex: none !important; }
.justify-content-start { justify-content: flex-start !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-around { justify-content: space-around !important; }
.justify-content-evenly { justify-content: space-evenly !important; }
.align-items-start { align-items: flex-start !important; }
.align-items-end { align-items: flex-end !important; }
.align-items-center { align-items: center !important; }
.align-items-baseline { align-items: baseline !important; }
.align-items-stretch { align-items: stretch !important; }
.align-self-start { align-self: flex-start !important; }
.align-self-end { align-self: flex-end !important; }
.align-self-center { align-self: center !important; }
.align-self-baseline { align-self: baseline !important; }
.align-self-stretch { align-self: stretch !important; }
.align-content-start { align-content: flex-start !important; }
.align-content-end { align-content: flex-end !important; }
.align-content-center { align-content: center !important; }
.align-content-between { align-content: space-between !important; }
.align-content-around { align-content: space-around !important; }
.align-content-stretch { align-content: stretch !important; }
/*
.g-1 { gap: 0.25rem !important; --gap: 0.25rem !important; }
.g-2 { gap: 0.5rem !important; --gap: 0.5rem !important; }
.g-3 { gap: 1rem !important; --gap: 1rem !important; }
.g-4 { gap: 2rem !important; --gap: 2rem !important; }
.g-5 { gap: 4rem !important; --gap: 4rem !important; }
*/
.g-0 { --gap: 0 !important; }
.g-1 { --gap: 0.25rem !important; }
.g-2 { --gap: 0.5rem !important; }
.g-3 { --gap: 1rem !important; }
.g-4 { --gap: 2rem !important; }
.g-5 { --gap: 4rem !important; }
/* Translate */
.translate-middle {
	transform: translate(-50%, -50%) !important;
}
/* Animation */
.m-transition {
	transition: opacity 0.2s ease;
}
.m-transition.fade-out {
	opacity: 0;
}
.animate-rotate-cw {
	animation: rotate-cw 2s linear infinite;
}
@keyframes rotate-cw {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}
.z-1 { z-index: 1 !important; }
.z-2 { z-index: 2 !important; }
.z-3 { z-index: 3 !important; }
.z-4 { z-index: 4 !important; }
/* Visibility utilities */
.visible { visibility: visible !important; }
.invisible { visibility: hidden !important; }
/* Opacity utilities */
.opacity-0 { opacity: 0 !important; }
.opacity-25 { opacity: 0.25 !important; }
.opacity-50 { opacity: 0.5 !important; }
.opacity-75 { opacity: 0.75 !important; }
.opacity-100 { opacity: 1 !important; }
/* Pointer events */
.pointer-events-none { pointer-events: none !important; }
.pointer-events-auto { pointer-events: auto !important; }
/* User select */
.select-none { -webkit-user-select: none !important; -moz-user-select: none !important; user-select: none !important; }
.select-text { -webkit-user-select: text !important; -moz-user-select: text !important; user-select: text !important; }
.select-all { -webkit-user-select: all !important; -moz-user-select: all !important; user-select: all !important; }
/* Aspect ratio */
.aspect-square { aspect-ratio: 1 / 1 !important; }
.aspect-video { aspect-ratio: 16 / 9 !important; }
.aspect-4-3 { aspect-ratio: 4 / 3 !important; }
/* Object fit */
.object-cover { -o-object-fit: cover !important; object-fit: cover !important; }
.object-contain { -o-object-fit: contain !important; object-fit: contain !important; }
.object-fill { -o-object-fit: fill !important; object-fit: fill !important; }
.object-none { -o-object-fit: none !important; object-fit: none !important; }
/* vim: ts=4
 */
body {
	/* DEFAULTS */
	--color-primary: lch(35 60 250);
	--color-secondary: lch(from var(--color-primary) l calc(c / 2) h);
	--color-accent: lch(from var(--color-primary) l c calc(h + 180));
	--color-neutral: lch(35 20 250);

	--color-error: lch(35 50 25);
	--color-warning: lch(35 50 80);
	--color-success: lch(35 50 155);

	--op-panel: 1;
	--op-button: 1;
	--op-disabled: 0.5;

	/* WCAG 2 Contrast Recommendations:
		minimum for large text: 3:1	(2 levels)
		minimum: 4.5:1				(3 levels)
		enhanced: 7:1				(4 levels)
   */

	/* OVERRIDABLE DEFAULTS */
	--col-primary-m2: lch(from var(--col-primary) calc(l - 30) calc(c * 0.3) h);
	--col-primary-m1: lch(from var(--col-primary) calc(l - 15) calc(c * 0.8) h);
	--col-primary: lch(from var(--color-primary) 35 c h);
	--col-primary-p1: lch(from var(--col-primary) calc(l + 15) c h);
	--col-primary-p2: lch(from var(--col-primary) calc(l + 30) c h);
	--col-primary-p3: lch(from var(--col-primary) calc(l + 45) calc(c * 0.8) h);
	--col-primary-p4: lch(from var(--col-primary) calc(l + 60) calc(c * 0.3) h);

	--col-secondary-m2: lch(from var(--col-secondary) calc(l - 30) calc(c * 0.3) h);
	--col-secondary-m1: lch(from var(--col-secondary) calc(l - 15) calc(c * 0.8) h);
	--col-secondary: lch(from var(--color-secondary) 35 c h);
	--col-secondary-p1: lch(from var(--col-secondary) calc(l + 15) c h);
	--col-secondary-p2: lch(from var(--col-secondary) calc(l + 30) c h);
	--col-secondary-p3: lch(from var(--col-secondary) calc(l + 45) calc(c * 0.8) h);
	--col-secondary-p4: lch(from var(--col-secondary) calc(l + 60) calc(c * 0.3) h);

	--col-accent-m2: lch(from var(--col-accent) calc(l - 30) calc(c * 0.3) h);
	--col-accent-m1: lch(from var(--col-accent) calc(l - 15) calc(c * 0.8) h);
	--col-accent: lch(from var(--color-accent) 35 c h);
	--col-accent-p1: lch(from var(--col-accent) calc(l + 15) c h);
	--col-accent-p2: lch(from var(--col-accent) calc(l + 30) c h);
	--col-accent-p3: lch(from var(--col-accent) calc(l + 45) calc(c * 0.8) h);
	--col-accent-p4: lch(from var(--col-accent) calc(l + 60) calc(c * 0.3) h);

	--col-error: lch(from var(--color-error) 35 c h);
	--col-warning: lch(from var(--color-warning) 35 c h);
	--col-success: lch(from var(--color-success) 35 c h);

	--col-shadow: #000;
	--col-frost: var(--color-frost);
	--col-focus: var(--color-focus);

	--col-on-primary: lch(from var(--col-primary) calc(l + 60) calc(c * 0.3) h);
	--col-on-secondary: lch(from var(--col-secondary) calc(l + 60) calc(c * 0.3) h);
	--col-on-accent: lch(from var(--col-accent) calc(l + 60) calc(c * 0.3) h);
	--col-on-error: lch(from var(--color-error) calc(l + 60) c h);
	--col-on-warning: lch(from var(--color-warning) calc(l + 60) c h);
	--col-on-success: lch(from var(--color-success) calc(l + 60) c h);

	--col-em-primary: lch(from var(--col-primary) calc(l + 65) calc(c * 0.3) h);
	--col-em-secondary: lch(from var(--col-secondary) calc(l + 65) calc(c * 0.3) h);
	--col-em-accent: lch(from var(--col-accent) calc(l + 65) calc(c * 0.3) h);
	--col-em-error: lch(from var(--color-error) calc(l + 65) c h);
	--col-em-warning: lch(from var(--color-warning) calc(l + 65) c h);
	--col-em-success: lch(from var(--color-success) calc(l + 65) c h);

	--col-surface: lch(from var(--color-neutral) 99 calc(c * 0.2) h);
	--col-container-low: lch(from var(--color-neutral) 95 calc(c * 0.3) h);
	--col-container: lch(from var(--color-neutral) 90 calc(c * 0.5) h);
	--col-container-high: lch(from var(--color-neutral) 85 calc(c * 0.6) h);
	--col-container-primary: lch(from var(--color-primary) 90 calc(c * 0.5) h);
	--col-container-secondary: lch(from var(--color-secondary) 90 calc(c * 0.5) h);
	--col-container-accent: lch(from var(--color-accent) 90 calc(c * 0.5) h);
	--col-container-error: lch(from var(--color-error) 90 calc(c * 0.5) h);
	--col-container-warning: lch(from var(--color-warning) 90 calc(c * 0.5) h);
	--col-container-success: lch(from var(--color-success) 90 calc(c * 0.5) h);

	--col-on-surface: lch(from var(--color-neutral) 39 c h);
	--col-on-container-low: lch(from var(--color-neutral) 35 c h);
	--col-on-container: lch(from var(--color-neutral) 30 c h);
	--col-on-container-high: lch(from var(--color-neutral) 25 c h);
	--col-on-container-primary: lch(from var(--color-primary) 30 c h);
	--col-on-container-secondary: lch(from var(--color-secondary) 30 c h);
	--col-on-container-accent: lch(from var(--color-accent) 30 c h);
	--col-on-container-error: lch(from var(--color-error) 30 c h);
	--col-on-container-warning: lch(from var(--color-warning) 30 c h);
	--col-on-container-success: lch(from var(--color-success) 30 c h);

	--col-em-surface: lch(from var(--color-neutral) 29 c h);
	--col-em-container-low: lch(from var(--color-neutral) 25 c h);
	--col-em-container: lch(from var(--color-neutral) 20 c h);
	--col-em-container-high: lch(from var(--color-neutral) 15 c h);
	--col-em-container-primary: lch(from var(--color-primary) 20 c h);
	--col-em-container-secondary: lch(from var(--color-secondary) 20 c h);
	--col-em-container-accent: lch(from var(--color-accent) 20 c h);
	--col-em-container-error: lch(from var(--color-error) 20 c h);
	--col-em-container-warning: lch(from var(--color-warning) 20 c h);
	--col-em-container-success: lch(from var(--color-success) 20 c h);
}
body.dark {
	/* DEFAULTS */
	--color-primary: lch(68 60 250);
	--color-secondary: lch(from var(--color-primary) l calc(c / 2) h);
	--color-accent: lch(from var(--color-primary) l c calc(h + 180));

	/* OVERRIDABLE DEFAULTS */
	--col-primary-m2: lch(from var(--col-primary) calc(l + 30) calc(c * 0.3) h);
	--col-primary-m1: lch(from var(--col-primary) calc(l + 15) calc(c * 0.8) h);
	--col-primary: lch(from var(--color-primary) 65 c h);
	--col-primary-p1: lch(from var(--col-primary) calc(l - 15) c h);
	--col-primary-p2: lch(from var(--col-primary) calc(l - 30) c h);
	--col-primary-p3: lch(from var(--col-primary) calc(l - 45) calc(c * 0.8) h);
	--col-primary-p4: lch(from var(--col-primary) calc(l - 60) calc(c * 0.3) h);

	--col-secondary-m2: lch(from var(--col-secondary) calc(l + 30) calc(c * 0.3) h);
	--col-secondary-m1: lch(from var(--col-secondary) calc(l + 15) calc(c * 0.8) h);
	--col-secondary: lch(from var(--color-secondary) 65 c h);
	--col-secondary-p1: lch(from var(--col-secondary) calc(l - 15) c h);
	--col-secondary-p2: lch(from var(--col-secondary) calc(l - 30) c h);
	--col-secondary-p3: lch(from var(--col-secondary) calc(l - 45) calc(c * 0.8) h);
	--col-secondary-p4: lch(from var(--col-secondary) calc(l - 60) calc(c * 0.3) h);

	--col-accent-m2: lch(from var(--col-accent) calc(l + 30) calc(c * 0.3) h);
	--col-accent-m1: lch(from var(--col-accent) calc(l + 15) calc(c * 0.8) h);
	--col-accent: lch(from var(--color-accent) 65 c h);
	--col-accent-p1: lch(from var(--col-accent) calc(l - 15) c h);
	--col-accent-p2: lch(from var(--col-accent) calc(l - 30) c h);
	--col-accent-p3: lch(from var(--col-accent) calc(l - 45) calc(c * 0.8) h);
	--col-accent-p4: lch(from var(--col-accent) calc(l - 60) calc(c * 0.3) h);

	--col-error: lch(from var(--color-error) 65 c h);
	--col-warning: lch(from var(--color-warning) 65 c h);
	--col-success: lch(from var(--color-success) 65 c h);

	--col-on-primary: lch(from var(--col-primary) calc(l - 60) calc(c * 0.3) h);
	--col-on-secondary: lch(from var(--col-secondary) calc(l - 60) calc(c * 0.3) h);
	--col-on-accent: lch(from var(--col-accent) calc(l - 60) calc(c * 0.3) h);
	--col-on-error: lch(from var(--color-error) calc(l - 60) c h);
	--col-on-warning: lch(from var(--color-warning) calc(l - 60) c h);
	--col-on-success: lch(from var(--color-success) calc(l - 60) c h);

	--col-em-primary: lch(from var(--col-primary) calc(l - 65) calc(c * 0.3) h);
	--col-em-secondary: lch(from var(--col-secondary) calc(l - 65) calc(c * 0.3) h);
	--col-em-accent: lch(from var(--col-accent) calc(l - 65) calc(c * 0.3) h);
	--col-em-error: lch(from var(--color-error) calc(l - 65) c h);
	--col-em-warning: lch(from var(--color-warning) calc(l - 65) c h);
	--col-em-success: lch(from var(--color-success) calc(l - 65) c h);

	--col-surface: lch(from var(--color-neutral) 4 calc(c * 0.2) h);
	--col-container-low: lch(from var(--color-neutral) 11 calc(c * 0.3) h);
	--col-container: lch(from var(--color-neutral) 17 calc(c * 0.5) h);
	--col-container-high: lch(from var(--color-neutral) 23 calc(c * 0.6) h);
	--col-container-primary: lch(from var(--color-primary) 17 calc(c * 0.5) h);
	--col-container-secondary: lch(from var(--color-secondary) 17 calc(c * 0.5) h);
	--col-container-accent: lch(from var(--color-accent) 17 calc(c * 0.5) h);
	--col-container-error: lch(from var(--color-error) 17 calc(c * 0.5) h);
	--col-container-warning: lch(from var(--color-warning) 17 calc(c * 0.5) h);
	--col-container-success: lch(from var(--color-success) 17 calc(c * 0.5) h);

	--col-on-surface: lch(from var(--color-neutral) 61 c h);
	--col-on-container-low: lch(from var(--color-neutral) 65 c h);
	--col-on-container: lch(from var(--color-neutral) 70 c h);
	--col-on-container-high: lch(from var(--color-neutral) 75 c h);
	--col-on-container-primary: lch(from var(--color-primary) 70 c h);
	--col-on-container-secondary: lch(from var(--color-secondary) 70 c h);
	--col-on-container-accent: lch(from var(--color-accent) 70 c h);
	--col-on-container-error: lch(from var(--color-error) 70 c h);
	--col-on-container-warning: lch(from var(--color-warning) 70 c h);
	--col-on-container-success: lch(from var(--color-success) 70 c h);

	--col-em-surface: lch(from var(--color-neutral) 71 c h);
	--col-em-container-low: lch(from var(--color-neutral) 75 c h);
	--col-em-container: lch(from var(--color-neutral) 80 c h);
	--col-em-container-high: lch(from var(--color-neutral) 85 c h);
	--col-em-container-primary: lch(from var(--color-primary) 80 c h);
	--col-em-container-secondary: lch(from var(--color-secondary) 80 c h);
	--col-em-container-accent: lch(from var(--color-accent) 80 c h);
	--col-em-container-error: lch(from var(--color-error) 80 c h);
	--col-em-container-warning: lch(from var(--color-warning) 80 c h);
	--col-em-container-success: lch(from var(--color-success) 80 c h);
}
/* vim: ts=4
 */
/* Grid utilities */
.c-container {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	--gap: 0px;
	overflow-x: hidden;
	overflow-y: auto;
	&.fluid {
		max-width: 100%;
	}
}
.c-container > .row {
	display: flex;
	flex-flow: row wrap;
	justify-content: flex-start;
	position: relative;
	gap: 0;
	margin: 0 calc(var(--gap) / -2);
	& > .col, & > [class^="col-"], & > [class*=" col-"] {
		margin: 0 calc(var(--gap) / 2);
	}

	&:not(:last-child) {
		margin-bottom: var(--gap);
	}
}
.c-container > .row > .col { flex: 0 0 calc(100% - var(--gap));  max-width: calc(100% - var(--gap)); }
.c-container > .row > .col-1 { flex: 0 0 calc(100% / 12 - var(--gap));  max-width: calc(100% / 12 - var(--gap)); }
.c-container > .row > .col-2 { flex: 0 0 calc(200% / 12 - var(--gap));  max-width: calc(200% / 12 - var(--gap)); }
.c-container > .row > .col-3 { flex: 0 0 calc(300% / 12 - var(--gap));  max-width: calc(300% / 12 - var(--gap)); }
.c-container > .row > .col-4 { flex: 0 0 calc(400% / 12 - var(--gap));  max-width: calc(400% / 12 - var(--gap)); }
.c-container > .row > .col-5 { flex: 0 0 calc(500% / 12 - var(--gap));  max-width: calc(500% / 12 - var(--gap)); }
.c-container > .row > .col-6 { flex: 0 0 calc(600% / 12 - var(--gap));  max-width: calc(600% / 12 - var(--gap)); }
.c-container > .row > .col-7 { flex: 0 0 calc(700% / 12 - var(--gap));  max-width: calc(700% / 12 - var(--gap)); }
.c-container > .row > .col-8 { flex: 0 0 calc(800% / 12 - var(--gap));  max-width: calc(800% / 12 - var(--gap)); }
.c-container > .row > .col-9 { flex: 0 0 calc(900% / 12 - var(--gap));  max-width: calc(900% / 12 - var(--gap)); }
.c-container > .row > .col-10 { flex: 0 0 calc(1000% / 12 - var(--gap));  max-width: calc(1000% / 12 - var(--gap)); }
.c-container > .row > .col-11 { flex: 0 0 calc(1100% / 12 - var(--gap));  max-width: calc(1100% / 12 - var(--gap)); }
.c-container > .row > .col-12 { flex: 0 0 calc(1200% / 12 - var(--gap));  max-width: calc(1200% / 12 - var(--gap)); }
@media screen and (min-width: 768px) {
	.c-container > .row {
		& > .col-md-1 { flex: 0 0 calc(100% / 12 - var(--gap)); max-width: calc(100% / 12 - var(--gap)); }
		& > .col-md-2 { flex: 0 0 calc(200% / 12 - var(--gap)); max-width: calc(200% / 12 - var(--gap)); }
		& > .col-md-3 { flex: 0 0 calc(300% / 12 - var(--gap)); max-width: calc(300% / 12 - var(--gap)); }
		& > .col-md-4 { flex: 0 0 calc(400% / 12 - var(--gap)); max-width: calc(400% / 12 - var(--gap)); }
		& > .col-md-5 { flex: 0 0 calc(500% / 12 - var(--gap)); max-width: calc(500% / 12 - var(--gap)); }
		& > .col-md-6 { flex: 0 0 calc(600% / 12 - var(--gap)); max-width: calc(600% / 12 - var(--gap)); }
		& > .col-md-7 { flex: 0 0 calc(700% / 12 - var(--gap)); max-width: calc(700% / 12 - var(--gap)); }
		& > .col-md-8 { flex: 0 0 calc(800% / 12 - var(--gap)); max-width: calc(800% / 12 - var(--gap)); }
		& > .col-md-9 { flex: 0 0 calc(900% / 12 - var(--gap)); max-width: calc(900% / 12 - var(--gap)); }
		& > .col-md-10 { flex: 0 0 calc(1000% / 12 - var(--gap)); max-width: calc(1000% / 12 - var(--gap)); }
		& > .col-md-11 { flex: 0 0 calc(1100% / 12 - var(--gap)); }
		& > .col-md-12 { flex: 0 0 calc(1200% / 12 - var(--gap)); max-width: calc(1200% / 12 - var(--gap)); }
	}

	.c-dialog {
		width: 768px;
	}
}
@media screen and (min-width: 1200px) {
	.c-container > .row {
		& > .col-lg-1 { flex: 0 0 calc(100% / 12 - var(--gap)); max-width: calc(100% / 12 - var(--gap)); }
		& > .col-lg-2 { flex: 0 0 calc(200% / 12 - var(--gap)); max-width: calc(200% / 12 - var(--gap)); }
		& > .col-lg-3 { flex: 0 0 calc(300% / 12 - var(--gap)); max-width: calc(300% / 12 - var(--gap)); }
		& > .col-lg-4 { flex: 0 0 calc(400% / 12 - var(--gap)); max-width: calc(400% / 12 - var(--gap)); }
		& > .col-lg-5 { flex: 0 0 calc(500% / 12 - var(--gap)); max-width: calc(500% / 12 - var(--gap)); }
		& > .col-lg-6 { flex: 0 0 calc(600% / 12 - var(--gap)); max-width: calc(600% / 12 - var(--gap)); }
		& > .col-lg-7 { flex: 0 0 calc(700% / 12 - var(--gap)); max-width: calc(700% / 12 - var(--gap)); }
		& > .col-lg-8 { flex: 0 0 calc(800% / 12 - var(--gap)); max-width: calc(800% / 12 - var(--gap)); }
		& > .col-lg-9 { flex: 0 0 calc(900% / 12 - var(--gap)); max-width: calc(900% / 12 - var(--gap)); }
		& > .col-lg-10 { flex: 0 0 calc(1000% / 12 - var(--gap)); max-width: calc(1000% / 12 - var(--gap)); }
		& > .col-lg-11 { flex: 0 0 calc(1100% / 12 - var(--gap)); max-width: calc(1100% / 12 - var(--gap)); }
		& > .col-lg-12 { flex: 0 0 calc(1200% / 12 - var(--gap)); max-width: calc(1200% / 12 - var(--gap)); }
	}
}
@media screen and (max-width: 767px) {
	.c-container > .row .sm-hide-dyn {
		transition: transform .2s ease-in-out;
		position: absolute;
		left: 0;
		top: 0;
		right: 0;
		bottom: 0;
		z-index: 10;

		&:not(.show, .hide-left, .hide-right) {
			display: none;
		}
		&.hide-left, &.hide-right {
			transition: transform .2s ease-in-out;
		}
		&.hide-left:not(.show) {
			/* display: none; */
			transform: translateX(-100%);
		}
		&.hide-right:not(.show) {
			/* display: none; */
			transform: translateX(100%);
		}
	}

	.c-dialog {
		width: 100%;
	}

	.sm-hide { display: none !important; }
}
@media screen and (min-width: 768px) and (max-width: 1200px) {
	.c-container > .row .md-hide-dyn {
		position: absolute;
		left: 0;
		top: 0;
		right: 0;
		bottom: 0;
		z-index: 10;

		&:not(.show, .hide-left, .hide-right) {
			display: none;
		}
		&.hide-left, &.hide-right {
			transition: transform .2s ease-in-out;
		}
		&.hide-left:not(.show) {
			/* display: none; */
			transform: translateX(-100%);
		}
		&.hide-right:not(.show) {
			/* display: none; */
			transform: translateX(100%);
		}
	}

	.md-hide { display: none !important; }
}
@media screen and (min-width: 1200px) {
	.c-container > .row .lg-hide-dyn {
		transition: transform .2s ease-in-out;
		position: absolute;
		left: 0;
		top: 0;
		right: 0;
		bottom: 0;
		z-index: 10;

		&:not(.show, .hide-left, .hide-right) {
			display: none;
		}
		&.hide-left:not(.show) {
			/* display: none; */
			transform: translateX(-100%);
		}
		&.hide-right:not(.show) {
			/* display: none; */
			transform: translateX(100%);
		}
	}
	.lg-hide { display: none !important; }
}
/* vim: ts=4
 */
/* Avatar Component
 * Displays user profile images with fallback initials, status indicators, and badges
 */
.c-avatar {
	--avatar-size: 2.5rem; /* Default: md */
	--avatar-border-radius: 50%;
	--avatar-bg: var(--col-primary);
	--avatar-color: var(--col-on-primary);
	--avatar-font-size: calc(var(--avatar-size) / 2.5);

	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--avatar-size);
	height: var(--avatar-size);
	border-radius: var(--avatar-border-radius);
	background: var(--avatar-bg);
	color: var(--avatar-color);
	font-size: var(--avatar-font-size);
	font-weight: 600;
	line-height: 1;
	-webkit-user-select: none;
	   -moz-user-select: none;
	        user-select: none;
	flex-shrink: 0;

	& img {
		width: 100%;
		height: 100%;
		-o-object-fit: cover;
		   object-fit: cover;
		overflow: hidden;
		border-radius: inherit;
	}
}
/* Size variants */
.c-avatar.xs {
	--avatar-size: 1.5rem;
}
.c-avatar.sm {
	--avatar-size: 2rem;
}
.c-avatar.md {
	--avatar-size: 2.5rem;
}
.c-avatar.lg {
	--avatar-size: 3rem;
}
.c-avatar.xl {
	--avatar-size: 4rem;
}
/* Shape variants */
.c-avatar.square {
	--avatar-border-radius: 0;
}
.c-avatar.rounded {
	--avatar-border-radius: 0.5rem;
}
/* Status indicator */
.c-avatar-status {
	position: absolute;
	bottom: 0;
	right: 0;
	width: 25%;
	height: 25%;
	border-radius: 50%;
	border: calc(var(--avatar-size) / 16) solid var(--col-surface);
	background: var(--col-neutral);

	&.online {
		background: var(--col-success);
	}

	&.offline {
		background: var(--col-neutral-m1);
	}

	&.busy {
		background: var(--col-error);
	}

	&.away {
		background: var(--col-warning);
	}
}
/* Badge (notification count) */
.c-avatar-badge {
	position: absolute;
	top: -0.25rem;
	right: -0.25rem;
	min-width: 1.25rem;
	height: 1.25rem;
	padding: 0 0.25rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 0.625rem;
	background: var(--col-error);
	color: var(--col-on-error);
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1;
	border: calc(2rem / 16) solid var(--col-surface);
}
/* Ring/border for active states */
.c-avatar.ring {
	box-shadow: 0 0 0 calc(2rem / 16) var(--col-primary);
}
.c-avatar.ring-secondary {
	box-shadow: 0 0 0 calc(2rem / 16) var(--col-secondary);
}
.c-avatar.ring-success {
	box-shadow: 0 0 0 calc(2rem / 16) var(--col-success);
}
/* Avatar group - overlapping stack */
.c-avatar-group {
	display: inline-flex;
	flex-direction: row;

	& .c-avatar {
		margin-left: calc(var(--avatar-size) / -4);
		border: calc(2rem / 16) solid var(--col-surface);
		transition: transform 0.2s, z-index 0s;

		&:first-child {
			margin-left: 0;
		}

		&:hover {
			transform: translateY(-0.25rem);
			z-index: 10;
		}
	}

	/* Reverse stacking order */
	&.reverse {
		flex-direction: row-reverse;

		& .c-avatar {
			margin-left: 0;
			margin-right: calc(var(--avatar-size) / -4);

			&:first-child {
				margin-right: 0;
			}
		}
	}
}
/* vim: ts=4
 */
.c-badge {
	border-radius: 9rem;
	font-size: 0.75em;
	font-weight: 700;
	line-height: 1;
	min-width: calc(0.75em + 0.5rem);
	min-height: calc(0.75em + 0.5rem);
	display: flex;
	align-items: center;
	justify-content: center;
	white-space: nowrap;
	position: absolute;
	transform: translate(-50%, -50%) !important;
	/*
	padding: 0.25rem;
	*/

	&.tl { top: 0; left: 0; }
	&.tr { top: 0; left: 100%; }
	&.bl { top: 100%; left: 0; }
	&.br { top: 100%; left: 100%; }
}
/* vim: ts=4
 */
/****************/
/* Layout Boxes */
/****************/
.c-hbox {
	display: flex;
	gap: var(--gap);
}
.c-vbox {
	display: flex;
	flex-direction: column;
	gap: var(--gap);
}
.c-hbox.wrap, .c-vbox.wrap {
	flex-wrap: wrap;
}
.c-hbox > .fill, .c-vbox > .fill {
	flex: 1;
}
/* c-group */
/*
.c-group {
	display: flex;
	align-self: start;
	align-items: center;
	flex: 1 0 0;
	gap: var(--gap);

	& > * {
		flex: 1 0 0;
	}
}

.c-group > * {
	flex: 1 1 0;
	width: 0;
}
*/
.c-group {
	align-self: start;
	display: grid;
	/*
	grid-template-columns: repeat(2,1fr);
	grid-template-columns: repeat(auto-fit,minmax(auto, 1fr));
	*/
	grid-auto-flow: column;
	grid-auto-columns: 1fr;
	--gap: 0.5rem;
	gap: var(--gap);
}
/* vim: ts=4
 */
.c-button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--gap);
	/*
	border-radius: var(--border-radius-sm);
	*/
	border-radius: 1.25rem;
	border: 0px;
	box-shadow: inset 0px 0px 1rem var(--col-frost);
	height: 2.5rem;
	padding: 0 1rem;
	cursor: pointer;
	-webkit-user-select: none;
	   -moz-user-select: none;
	        user-select: none;
	--col-bg: var(--col-secondary);
	--col-on: var(--col-on-secondary);
	--col-em: var(--col-em-secondary);
	background-color: lch(from var(--col-bg) l c h / var(--op-button));
	color: var(--col-on);
	transition: color, background 0.3s;
	white-space: nowrap;

	&.clicked {
		background-color: lch(from var(--col-on) l c h);
		color: var(--col-bg);
	}

	&.link {
		background: none;
		border-color: transparent;
		box-shadow: none;
	}

	&.small {
		font-size: 0.75rem;
		padding: 0.25rem 0.75rem;
	}

	&.large {
		font-size: 1.5rem;
		padding: 0.5rem 1.5rem;
	}

	&.float {
		position: fixed;
		bottom: 0;
		right: 0;
		border-radius: 3rem;
		height: auto;
		padding: 1rem;
		z-index: 10;
	}
	&.icon {
		padding: 0.5rem;
	}

	&[disabled] {
		opacity: var(--op-disabled);
		cursor: not-allowed;
	}

	&:focus-visible {
		outline: none;
		box-shadow: inset 0px 0px 1rem var(--col-frost), 0px 0px 1rem var(--col-focus);
	}
	&.active {
		background: var(--col-container-secondary);
		color: var(--col-on-container-secondary);
	}

	&.primary {
		--col-bg: var(--col-primary);
		--col-on: var(--col-on-primary);
		--col-em: var(--col-em-primary);
	}
	&.primary.active {
		background: var(--col-container-primary);
		color: var(--col-on-container-primary);
	}
	&.container-primary {
		--col-bg: var(--col-container-primary);
		--col-on: var(--col-on-container-primary);
		--col-em: var(--col-em-container-primary);
	}
	&.container-primary.active {
		background: var(--col-primary);
		color: var(--col-on-primary);
	}

	&.secondary {
		--col-bg: var(--col-secondary);
		--col-on: var(--col-on-secondary);
		--col-em: var(--col-em-secondary);
	}
	&.secondary.active {
		background: var(--col-container-secondary);
		color: var(--col-on-container-secondary);
	}
	&.container-secondary {
		--col-bg: var(--col-container-secondary);
		--col-on: var(--col-on-container-secondary);
		--col-em: var(--col-em-container-secondary);
	}
	&.container-secondary.active {
		background: var(--col-secondary);
		color: var(--col-on-secondary);
	}

	&.accent {
		--col-bg: var(--col-accent);
		--col-on: var(--col-on-accent);
		--col-em: var(--col-em-accent);
	}
	&.accent.active {
		background: var(--col-container-accent);
		color: var(--col-on-container-accent);
	}
	&.container-accent {
		--col-bg: var(--col-container-accent);
		--col-on: var(--col-on-container-accent);
		--col-em: var(--col-em-container-accent);
	}
	&.container-accent.active {
		background: var(--col-accent);
		color: var(--col-on-accent);
	}

	&.error {
		background-color: var(--col-error);
		color: var(--col-on-error);
	}
	&.container-error {
		background-color: var(--col-container-error);
		color: var(--col-on-container-error);
	}

	&.warning {
		background-color: var(--col-warning);
		color: var(--col-on-warning);
	}
	&.container-warning {
		background-color: var(--col-container-warning);
		color: var(--col-on-container-warning);
	}

	&.success {
		background-color: var(--col-success);
		color: var(--col-on-success);
	}
	&.container-success {
		background-color: var(--col-container-success);
		color: var(--col-on-container-success);
	}

	.separator {
		align-self: stretch;
		margin: 0.25rem 0.5rem;
		border-right: 1px dashed var(--col-on);
		cursor: default;
	}
}
.c-link {
	display: flex;
	align-items: center;
	border: none;
	background: none;
	color: var(--col-em);
	transition: color 0.3s;
	cursor: pointer;
	-webkit-user-select: none;
	   -moz-user-select: none;
	        user-select: none;

	&.text {
		-webkit-text-decoration: dotted;
		        text-decoration: dotted;
		text-decoration-line: underline;
	}

	&.primary {
		color: var(--col-primary);
	}
	&.secondary {
		color: var(--col-secondary);
	}
	&.accent {
		color: var(--col-accent);
	}

	&.error {
		color: var(--col-error);
	}
	&.warning {
		color: var(--col-warning);
	}
	&.success {
		color: var(--col-success);
	}

	&[disabled] {
		opacity: var(--op-disabled);
		cursor: not-allowed;
	}

	&:focus-visible {
		outline: none;
		box-shadow: inset 0px 0px 1rem var(--col-frost), 0px 0px var(--sh-focus) var(--col-focus);
	}

	&.clicked {
		color: var(--col-focus);
	}
}
.c-icon {
	height: 1.5rem;
	border: none;
	border-radius: var(--border-radius-sm);
	background: none;
	color: var(--col-secondary);
	cursor: pointer;
	-webkit-user-select: none;
	   -moz-user-select: none;
	        user-select: none;

	&.primary {
		color: var(--col-primary);
	}
	&.secondary {
		color: var(--col-secondary);
	}
	&.accent {
		color: var(--col-accent);
	}

	&.error {
		color: var(--col-error);
	}
	&.warning {
		color: var(--col-warning);
	}
	&.success {
		color: var(--col-success);
	}

	&:focus-visible {
		outline: none;
		box-shadow: inset 0px 0px 1rem var(--col-frost), 0px 0px var(--sh-focus) var(--col-focus);
	}
}
/* vim: ts=4
 */
.c-dropdown {
	position: relative;
	display: inline-block;
}
.c-dropdown > summary {
	display: flex;
	cursor: pointer;
	list-style: none;
}
.c-dropdown > summary::-webkit-details-marker {
	display: none;
}
details.c-dropdown:not([open]) > :last-child {
	display: none;
}
details.c-dropdown[open] > :last-child {
	display: block;
	position: absolute;
	left: 0;
	white-space: nowrap;
	z-index: 100;
	background: var(--col-container-high);
	box-shadow: inset 0px 0px 1rem var(--col-shadow);
	margin-top: 0.5rem;
}
.c-dropdown.up[open] > :last-child {
	bottom: 100%;
	margin-top: 0;
	margin-bottom: 0.5rem;
}
.c-dropdown.right[open] > :last-child {
	left: auto;
	right: 0;
}
/* vim: ts=4
 */
.c-fieldset {
	border: 1px solid lch(from var(--col-secondary) l c h / var(--op-disabled));
	padding: var(--p-fieldset);
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}
.c-fieldset > legend {
	text-transform: uppercase;
	letter-spacing: 0.1rem;
}
.c-input, .c-select, .c-input-group {
	border-radius: var(--border-radius-sm);
	border: var(--border-w-sm) solid var(--col-secondary);
	background: var(--col-container);
	color: var(--col-on-container);
	min-height: 2.5rem;
	box-shadow: inset 0px 0px 1rem var(--col-frost);
	width: 100%;
}
.c-input, .c-select {
	padding: 0.5rem 0.5rem;
}
.c-select > option {
	color: var(--col-on-surface);
	background: var(--col-surface);
}
.c-input:focus-visible, .c-select:focus-visible {
	outline: none;
	box-shadow: inset 0px 0px 1rem var(--col-frost), 0px 0px var(--sh-focus) var(--col-focus);
}
input.c-input[type="color"] {
	padding: 0.1rem;
	min-height: calc(1rem + 2 * 0.5rem);
}
textarea.c-input {
	resize: none;
}
textarea.c-input.resize {
	resize: vertical;
}
.c-input-group {
	display: flex;
	align-items: stretch;

	> * {
		margin: auto;
	}

	> .c-input {
		border: none;
	}

	> .c-dropdown > * > .c-input {
		border: none;
		background: none;
	}
}
/*
.c-input-group:has(:focus) {
*/
.c-input-group:focus-within {
	box-shadow: inset 0px 0px 1rem var(--col-frost), 0px 0px var(--sh-focus) var(--col-focus);
}
.c-input-group > .c-input:focus-visible, .c-input-group > .c-select:focus-visible {
	box-shadow: none;
}
.c-input-group > *, .c-input-group > .c-dropdown > * > input {
	border-width: var(--border-w-sm);
	/*
	background: transparent;
	*/
	/*
	padding-top: 0;
	padding-bottom: 0;
	*/
	box-shadow: none;
	/*
	align-items: center;
	display: flex;
	*/
}
.c-input-group > *:not(:last-child) {
	border-top-right-radius: 0;
	border-bottom-right-radius: 0;
}
.c-input-group > *:not(:first-child) {
	border-top-left-radius: 0;
	border-bottom-left-radius: 0;
}
/**********/
/* Toggle */
/**********/
/*
.c-toggle + .c-toggle-ui {
*/
.c-toggle {
	-webkit-appearance: none;
	   -moz-appearance: none;
	        appearance: none;
	height: 1.25rem;
	width: 2.25rem;
	/*
	padding: 0.125rem;
	*/
	border-radius: 1rem;
	background: var(--col-bg);
	color: var(--col-on);
	cursor: pointer;
	display: inline-block;
	position: relative;
	--col-bg: var(--col-secondary);
	--col-on: var(--col-on-secondary);
	--col-em: var(--col-em-secondary);

	&.primary {
		--col-bg: var(--col-primary);
		--col-on: var(--col-on-primary);
		--col-em: var(--col-em-primary);
	}
	&.secondary {
		--col-bg: var(--col-secondary);
		--col-on: var(--col-on-secondary);
		--col-em: var(--col-em-secondary);
	}
	&.accent {
		--col-bg: var(--col-accent);
		--col-on: var(--col-on-accent);
		--col-em: var(--col-em-accent);
	}

	&.error {
		--col-bg: var(--col-error);
		--col-on: var(--col-on-error);
		--col-em: var(--col-em-error);
	}
	&.warning {
		--col-bg: var(--col-warning);
		--col-on: var(--col-on-warning);
		--col-em: var(--col-em-warning);
	}
	&.success {
		--col-bg: var(--col-success);
		--col-on: var(--col-on-success);
		--col-em: var(--col-em-success);
	}
}
.c-toggle:after {
	border-radius: 1rem;
	content: "";
	display: block;
	height: 1rem;
	width: 1rem;
	margin: 0.125rem;
	position: absolute;
	left: 0;
	background: var(--col-on);
	transition: all .2s ease-out;
}
.c-toggle:checked:after {
	left: 1rem;
	background: var(--col-em);
}
/* vim: ts=4
 */
.c-modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(var(--blur-radius));
	z-index: 999;
}
.c-modal.show {
	display: flex;
	align-items: center;
	justify-content: center;
}
.c-modal > .c-dialog {
	position: relative;
	width: auto;
	max-width: 60rem;
}
.c-dialog {
	border: 0;
}
/* vim: ts=4
 */
.c-nav {
	display: flex;
	align-items: center;
	/*
	--gap: 1rem;
	gap: var(--gap);
	*/
	position: relative;
	background: var(--col-bg);
	color: var(--col-on);
	backdrop-filter: blur(var(--blur-radius));
	border-radius: var(--border-radius-lg);
	z-index: 9;
	margin: 0;
	padding: var(--p-nav);
	--col-bg: var(--col-container-high);
	--col-on: var(--col-on-container-high);
	--col-em: var(--col-em-container-high);

	&.emph {
		box-shadow: inset 0px 0px 2rem var(--col-frost);
	}
	a {
		text-decoration: none;
	}

	&.low {
		--col-on: var(--col-on-container-low);
		--col-em: var(--col-em-container-low);
		--col-bg: var(--col-container-low);
	}
	&.mid {
		--col-on: var(--col-on-container);
		--col-em: var(--col-em-container);
		--col-bg: var(--col-container);
	}
	&.high {
		--col-on: var(--col-on-container-high);
		--col-em: var(--col-em-container-high);
		--col-bg: var(--col-container-high);
	}
}
.c-nav-group {
	display: flex;
	align-items: center;
	margin: 0;
	& li { display: flex; }
}
.c-nav.vertical, c-nav-group.vertical {
	flex-direction: column;
	align-items: stretch;
}
ul.c-nav {
	li {
		list-style: none;
		hr {
			margin: 0;
		}
	}
}
.c-nav-item, .c-nav-link {
	display: flex;
	align-items: center;
	--gap: .5rem;
	/*
	border-radius: var(--border-radius-sm);
	*/
	/* margin: 0.125rem; */
	cursor: pointer;
	-webkit-user-select: none;
	   -moz-user-select: none;
	        user-select: none;
	/* Reset button styles */
	border: none;
	background: none;
	/* color: var(--col-txt); */
	color: var(--col-on);
	padding: 0;
	gap: var(--gap);

	&[disabled] {
		opacity: var(--op-disabled);
		cursor: not-allowed;
	}
}
.c-nav > .c-nav-item, .c-nav-group > .c-nav-item,
.c-nav > li > .c-nav-item, .c-nav-group > li > .c-nav-item {
	margin: 0 var(--p-nav-item-x);
}
.c-nav.vertical > .c-nav-item, .c-nav-group.vertical > .c-nav-item,
.c-nav.vertical > li > .c-nav-item, .c-nav-group.vertical > li > .c-nav-item {
	margin: var(--p-nav-item-y) 0;
	width: 100%;
}
.c-nav-item.active, .c-nav-link.active {
	color: var(--col-frost);
}
.c-nav-item:focus-visible, .c-nav-link:focus-visible {
	outline: none;
	box-shadow: inset 0px 0px 1rem var(--col-frost), 0px 0px var(--sh-focus) var(--col-focus);
}
.c-nav-item.h-small, .c-nav-link.h-small {
	width: 4rem;
	overflow: hidden;
}
.c-nav-link.vertical {
	flex-direction: column;
}
/* vim: ts=4
 */
.c-panel {
	display: flex;
	flex-direction: column;
	backdrop-filter: blur(var(--blur-radius));
	border-radius: var(--border-radius-lg);
	padding: var(--p-panel);
	gap: var(--gap);
	/*
	box-shadow: inset 0px 0px 2rem var(--col-bg-emph);
	*/
	transition: background 0.3s, border 0.3s, color 0.3s;
	position: relative;
	background-color: lch(from var(--col-bg) l c h / var(--op-panel));
	color: var(--col-on);
	/*
	--col-bg: lch(from var(--col-surface) l c h / var(--op-panel));
	*/
	--col-bg: var(--col-container-low);
	--col-on: var(--col-on-container-low);
	--col-em: var(--col-em-container-low);

	&.emph {
		box-shadow: inset 0px 0px 2rem var(--col-frost);
	}
	&.primary {
		/*
		background-color: lch(from var(--col-container-primary) l c h / var(--op-panel));
		color: var(--col-on-container-primary);
		*/
		--col-on: var(--col-on-container-primary);
		--col-em: var(--col-em-container-primary);
		--col-bg: var(--col-container-primary);
	}
	&.secondary {
		/*
		background-color: lch(from var(--col-container-secondary) l c h / var(--op-panel));
		color: var(--col-on-container-primary);
		*/
		--col-on: var(--col-on-container-secondary);
		--col-em: var(--col-em-container-secondary);
		--col-bg: var(--col-container-secondary);
	}
	&.accent {
		/*
		background-color: lch(from var(--col-container-accent) l c h / var(--op-panel));
		color: var(--col-on-container-accent);
		*/
		--col-on: var(--col-on-container-accent);
		--col-em: var(--col-em-container-accent);
		--col-bg: var(--col-container-accent);
	}

	&.low {
		/*
		background-color: lch(from var(--col-container-low) l c h / var(--op-panel));
		color: var(--col-on-container-low);
		*/
		--col-on: var(--col-on-container-low);
		--col-em: var(--col-em-container-low);
		--col-bg: var(--col-container-low);
	}
	&.mid {
		/*
		background-color: lch(from var(--col-container) l c h / var(--op-panel));
		color: var(--col-on-container);
		*/
		--col-on: var(--col-on-container);
		--col-em: var(--col-em-container);
		--col-bg: var(--col-container);
	}
	&.high {
		/*
		background-color: lch(from var(--col-container-high) l c h / var(--op-panel));
		color: var(--col-on-container-high);
		*/
		--col-on: var(--col-on-container-high);
		--col-em: var(--col-em-container-high);
		--col-bg: var(--col-container-high);
	}

	&.error {
		/*
		background-color: lch(from var(--col-container-error) l c h / var(--op-panel));
		color: var(--col-on-container-error);
		*/
		--col-on: var(--col-on-container-error);
		--col-em: var(--col-em-container-error);
		--col-bg: var(--col-container-error);
	}
	&.warning {
		/*
		background-color: lch(from var(--col-container-warning) l c h / var(--op-panel));
		color: var(--col-on-container-warning);
		*/
		--col-on: var(--col-on-container-warning);
		--col-em: var(--col-em-container-warning);
		--col-bg: var(--col-container-warning);
	}
	&.success {
		/*
		background-color: lch(from var(--col-container-success) l c h / var(--op-panel));
		color: var(--col-on-container-success);
		*/
		--col-on: var(--col-on-container-success);
		--col-em: var(--col-em-container-success);
		--col-bg: var(--col-container-success);
	}

	/**/
	.body {
		flex: 1;
	}
}
/* vim: ts=4
 */
/* Sidebar/Drawer Component
 * Responsive sidebar with overlay, push, resizable, and collapsible modes
 */
.c-sidebar {
	--sidebar-width: 16rem;
	--sidebar-min-width: 12rem;
	--sidebar-max-width: 24rem;
	--sidebar-transition: transform 0.3s ease-in-out;

	position: fixed;
	top: 0;
	bottom: 0;
	width: var(--sidebar-width);
	min-width: var(--sidebar-min-width);
	max-width: var(--sidebar-max-width);
	display: flex;
	flex-direction: column;
	background: var(--col-surface);
	border-right: var(--border-w-lg) solid var(--col-outline);
	z-index: 100;
	transition: var(--sidebar-transition);
	overflow: hidden;

	&.left {
		left: 0;
		transform: translateX(calc(-1 * var(--sidebar-width)));
	}

	&.right {
		right: 0;
		border-right: none;
		border-left: var(--border-w-lg) solid var(--col-outline);
		transform: translateX(var(--sidebar-width));
	}

	/* Open state */
	&.open {
		transform: translateX(0);
	}

	/* Pinned state (desktop: push content mode) */
	&.pinned {
		position: relative;
		transform: translateX(0);
	}
}
/* Sidebar content area */
.c-sidebar-content {
	flex: 1;
	overflow-y: auto;
	overflow-x: hidden;
	padding: var(--p-panel);
}
/* Resize handle */
.c-sidebar-resize-handle {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 0.25rem;
	cursor: ew-resize;
	background: transparent;
	transition: background 0.2s;
	z-index: 10;

	.c-sidebar.left & {
		right: 0;
	}

	.c-sidebar.right & {
		left: 0;
	}

	&:hover,
	&:active {
		background: var(--col-primary);
	}
}
/* Resizing state */
.c-sidebar.resizing {
	transition: none;
	-webkit-user-select: none;
	   -moz-user-select: none;
	        user-select: none;

	& .c-sidebar-resize-handle {
		background: var(--col-primary);
	}
}
/* Backdrop overlay (mobile mode) */
.c-sidebar-backdrop {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: lch(from var(--col-on) l c h / 0.5);
	backdrop-filter: blur(2px);
	z-index: 99;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease-in-out;

	&.show {
		opacity: 1;
		pointer-events: auto;
	}
}
/* Collapse toggle button */
.c-sidebar-toggle {
	position: absolute;
	top: 1rem;
	background: var(--col-surface);
	border: var(--border-w-lg) solid var(--col-outline);
	border-radius: 50%;
	width: 2rem;
	height: 2rem;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 101;
	transition: transform 0.2s;

	.c-sidebar.left & {
		right: -1rem;
	}

	.c-sidebar.right & {
		left: -1rem;
	}

	&:hover {
		background: var(--col-container);
	}

	/* Rotate icon when sidebar is closed */
	.c-sidebar:not(.open) & {
		transform: rotate(180deg);
	}
}
/* Responsive behavior */
@media (max-width: 767px) {
	/* Mobile: always overlay mode */
	.c-sidebar {
		position: fixed;

		&.pinned {
			position: fixed;
			transform: translateX(calc(-1 * var(--sidebar-width)));

			&.open {
				transform: translateX(0);
			}
		}

		&.right.pinned {
			transform: translateX(var(--sidebar-width));

			&.open {
				transform: translateX(0);
			}
		}
	}
}
@media (min-width: 768px) and (max-width: 1023px) {
	/* Tablet: can be overlay or pinned */
	.c-sidebar {
		/* Default overlay behavior */
	}
}
@media (min-width: 1024px) {
	/* Desktop: prefer pinned mode */
	.c-sidebar.auto-pin {
		position: relative;
		transform: translateX(0);
	}
}
/* Sidebar header/footer sections */
.c-sidebar-header,
.c-sidebar-footer {
	padding: var(--p-panel);
	border-bottom: var(--border-w-lg) solid var(--col-outline);
	flex-shrink: 0;
}
.c-sidebar-footer {
	border-bottom: none;
	border-top: var(--border-w-lg) solid var(--col-outline);
}
/* Sidebar navigation items */
.c-sidebar-nav {
	list-style: none;
	padding: 0;
	margin: 0;

	& .c-nav-item {
		width: 100%;
		text-align: left;
		margin-bottom: 0.25rem;
	}
}
/* Nested sidebar sections */
.c-sidebar-section {
	margin-bottom: 1.5rem;

	&:last-child {
		margin-bottom: 0;
	}
}
.c-sidebar-section-title {
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: lch(from var(--col-on) l c h / var(--op-disabled));
	padding: 0.5rem 0;
	margin: 0;
}
/* Collapsed state (icon-only mode) */
.c-sidebar.collapsed {
	--sidebar-width: 4rem;
	--sidebar-min-width: 4rem;

	& .c-sidebar-content {
		padding: 0.5rem;
	}

	& .c-sidebar-section-title,
	& .c-nav-item-text {
		opacity: 0;
		overflow: hidden;
		white-space: nowrap;
	}

	& .c-nav-item {
		justify-content: center;
	}
}
/* vim: ts=4
 */
/********/
/* Tabs */
/********/
.c-tabs {
	display: flex;
	align-items: center;
}
.c-tab {
	border-bottom: var(--border-w-lg) solid var(--col-secondary);
	margin: 0 var(--border-radius-lg);
	padding: 0.5rem 1rem;
	text-decoration: none;
	cursor: pointer;
	-webkit-user-select: none;
	   -moz-user-select: none;
	        user-select: none;
	transition: color, background 0.3s;
}
.c-tab.active {
	color: var(--col-em);
	border-color: var(--col-em);
}
.c-tab.primary {
	color: var(--col-primary);
}
.c-tab.primary.active {
	border-color: var(--col-primary);
}
.c-tab.secondary {
	color: var(--col-secondary);
}
.c-tab.secondary.active {
	border-color: var(--col-secondary);
}
/* vim: ts=4
 */
.c-tag {
	display: flex;
	align-items: center;
	border-radius: var(--border-radius-lg);
	border: var(--border-w-sm) solid var(--col-secondary);
	box-shadow: inset 0px 0px 1rem var(--col-frost);
	font-size: 0.75rem;
	padding: 0.125rem 0.25rem;
	-webkit-user-select: none;
	   -moz-user-select: none;
	        user-select: none;
	background-color: lch(from var(--col-secondary) l c h / var(--op-button));
	color: var(--col-on-secondary);
	transition: color, background 0.3s;

	&.primary {
		background-color: var(--col-primary);
		color: var(--col-on-primary);
	}
	&.secondary {
		background-color: var(--col-secondary);
		color: var(--col-on-secondary);
	}
	&.accent {
		background-color: var(--col-accent);
		color: var(--col-on-accent);
	}

	&.error {
		background-color: var(--col-error);
		color: var(--col-on-error);
	}
	&.warning {
		background-color: var(--col-warning);
		color: var(--col-on-warning);
	}
	&.success {
		background-color: var(--col-success);
		color: var(--col-on-success);
	}
}
.c-tag.small {
	font-size: 0.75rem;
	padding: 0.25rem 0.75rem;
}
.c-tag.large {
	font-size: 1.5rem;
	padding: 0.5rem 1.5rem;
}
.c-tag-list {
	display: flex;
	--gap: 0.25rem;
	flex-flow: row wrap;
	gap: var(--gap);
}
/* vim: ts=4
 */
/* Toast Notification System
 * Dismissible notifications with variants, positioning, and animations
 */
/* Toast container - positioned at viewport edges */
.c-toast-container {
	position: fixed;
	z-index: 1000;
	pointer-events: none;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 1rem;
	max-width: 24rem;

	/* Position variants */
	&.top-left {
		top: 0;
		left: 0;
	}

	&.top-center {
		top: 0;
		left: 50%;
		transform: translateX(-50%);
	}

	&.top-right {
		top: 0;
		right: 0;
	}

	&.bottom-left {
		bottom: 0;
		left: 0;
	}

	&.bottom-center {
		bottom: 0;
		left: 50%;
		transform: translateX(-50%);
	}

	&.bottom-right {
		bottom: 0;
		right: 0;
	}

	&.middle-left {
		top: 50%;
		left: 0;
		transform: translateY(-50%);
	}

	&.middle-right {
		top: 50%;
		right: 0;
		transform: translateY(-50%);
	}

	&.middle-center {
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
	}
}
/* Individual toast */
.c-toast {
	pointer-events: auto;
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	padding: 1rem;
	border-radius: var(--border-radius-lg);
	background: var(--col-surface);
	border: var(--border-w-lg) solid var(--col-outline);
	box-shadow: 0 4px 12px lch(from var(--col-on) l c h / 0.1), 0 0 0 1px lch(from var(--col-on) l c h / 0.05);
	backdrop-filter: blur(var(--blur-radius));
	min-width: 18rem;
	max-width: 100%;
	animation: toast-slide-in 0.3s ease-out;

	/* Variant colors */
	&.success {
		--toast-color: var(--col-success);
		border-color: var(--col-success);
	}

	&.error {
		--toast-color: var(--col-error);
		border-color: var(--col-error);
	}

	&.warning {
		--toast-color: var(--col-warning);
		border-color: var(--col-warning);
	}

	&.info {
		--toast-color: var(--col-secondary);
		border-color: var(--col-secondary);
	}
}
/* Toast icon */
.c-toast-icon {
	flex-shrink: 0;
	width: 1.5rem;
	height: 1.5rem;
	color: var(--toast-color, var(--col-on));
}
/* Toast content */
.c-toast-content {
	flex: 1;
	min-width: 0;
}
.c-toast-title {
	font-weight: 600;
	margin: 0 0 0.25rem 0;
	color: var(--col-on);
}
.c-toast-message {
	margin: 0;
	color: lch(from var(--col-on) l c h / 0.8);
	font-size: 0.875rem;
	line-height: 1.4;
}
/* Toast actions */
.c-toast-actions {
	display: flex;
	gap: 0.5rem;
	margin-top: 0.75rem;
}
/* Close button */
.c-toast-close {
	flex-shrink: 0;
	background: transparent;
	border: none;
	color: lch(from var(--col-on) l c h / 0.5);
	cursor: pointer;
	padding: 0;
	width: 1.5rem;
	height: 1.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--border-radius-sm);
	transition: background 0.2s, color 0.2s;

	&:hover {
		background: lch(from var(--col-on) l c h / 0.1);
		color: var(--col-on);
	}
}
/* Progress bar for auto-dismiss */
.c-toast-progress {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: lch(from var(--col-on) l c h / 0.1);
	border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
	overflow: hidden;

	&::after {
		content: '';
		display: block;
		height: 100%;
		background: var(--toast-color, var(--col-primary));
		animation: toast-progress var(--toast-duration, 5s) linear;
	}
}
.c-toast.with-progress {
	padding-bottom: calc(1rem + 3px);
	position: relative;
}
/* Animations */
@keyframes toast-slide-in {
	from {
		opacity: 0;
		transform: translateY(-1rem);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}
@keyframes toast-slide-out {
	from {
		opacity: 1;
		transform: translateY(0);
		max-height: 10rem;
		margin-bottom: 0.5rem;
	}
	to {
		opacity: 0;
		transform: translateY(-1rem);
		max-height: 0;
		margin-bottom: 0;
		padding-top: 0;
		padding-bottom: 0;
	}
}
@keyframes toast-progress {
	from {
		width: 100%;
	}
	to {
		width: 0%;
	}
}
/* Dismissing animation */
.c-toast.dismissing {
	animation: toast-slide-out 0.3s ease-in forwards;
}
/* Bottom positioned containers slide from bottom */
.c-toast-container.bottom-left .c-toast,
.c-toast-container.bottom-center .c-toast,
.c-toast-container.bottom-right .c-toast {
	animation: toast-slide-in-bottom 0.3s ease-out;
}
@keyframes toast-slide-in-bottom {
	from {
		opacity: 0;
		transform: translateY(1rem);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}
.c-toast-container.bottom-left .c-toast.dismissing,
.c-toast-container.bottom-center .c-toast.dismissing,
.c-toast-container.bottom-right .c-toast.dismissing {
	animation: toast-slide-out-bottom 0.3s ease-in forwards;
}
@keyframes toast-slide-out-bottom {
	from {
		opacity: 1;
		transform: translateY(0);
		max-height: 10rem;
		margin-bottom: 0.5rem;
	}
	to {
		opacity: 0;
		transform: translateY(1rem);
		max-height: 0;
		margin-bottom: 0;
		padding-top: 0;
		padding-bottom: 0;
	}
}
/* Responsive */
@media (max-width: 767px) {
	.c-toast-container {
		left: 0;
		right: 0;
		max-width: 100%;
		transform: none !important;

		&.top-center,
		&.bottom-center,
		&.middle-center {
			left: 0;
		}
	}

	.c-toast {
		min-width: 0;
	}
}
/* vim: ts=4
 */
/*
@import url("atoms.css");
*/
