@import url('https://fonts.googleapis.com/css2?family=Zalando+Sans:wght@200..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Zalando+Sans+SemiExpanded:ital,wght@0,200..900;1,200..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Zalando+Sans:ital,wdth,wght@0,120,200..900;1,120,200..900&display=swap');

:root {
  --header-height: 50px;
  --navbar-height: 40px;
  --sidebar-width: 250px;
  --sidebar-minimized-width: 56px;
  --footer-height: 40px;
  --color-body: #f5f5f7;
  --color-header: #ffffff;
  --color-navbar: #f5f5f7;
  --color-sidebar: #f5f5f7;
  --color-main: #ffffff;
  --color-footer: #f5f5f7;
  --background-transparent: #f5f5f7ea;
  --background-dark: #f9f9fb;
  --background-darker: #f5f5f7;
  --background-darkest: #a5a5a5;
  --line-color: #94949450;
  --line-color-dark: #fff;
  --primary: #9849ff;
  --primary-dark: #5a0fbc;
  --primary-off-dark: #6418c7;
  --primary-hover: #aa78eb;
  --primary-disabled: #a35cff45;
  --primary-transparent: #a35cff25;
  --primary-contrast-text: #ffffff;
  --secondary: #f5f5f7;
  --secondary-dark: #d5d5d5;
  --secondary-hover: #e6e6e6;
  --success: #c8ff00;
  --success-dark: #9ec50f;
  --success-hover: #e0ff6f;
  --success-disabled: #c8ff0044;
  --success-contrast-text: #2c2c2c;
  --warning: #ffc232;
  --warning-dark: #d59808;
  --warning-hover: #ffd75f;
  --warning-disabled: #ffc23265;
  --warning-contrast-text: #2c2c2c;
  --danger: #fc024c;
  --danger-dark: #c2003a;
  --danger-hover: #f7466c;
  --danger-disabled: #fc024c55;
  --danger-contrast-text: #ffffff;
  --info: #4877fb;
  --info-dark: #2a59da;
  --info-hover: #6890ff;
  --info-disabled: #4877fb44;
  --info-contrast-text: #ffffff;
  --disabled: #3e3e40;
  --scroll-bar: #dbdbdc;
  --text-color-primary: #262626;
  --text-color-secondary: #827D82;
  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-semibold: 500;
  --font-weight-bold: 600;
  --font-family-sans: 'Zalando Sans', 'Inter', Arial, sans-serif;
  --font-family-sans-expanded: 'Zalando Sans SemiExpanded', 'Inter', Arial, sans-serif;
  --font-family-mono: 'Jetbrains Mono', Courier, monospace;
  --font-size-xxsmall: 8pt;
  --font-size-xsmall: 9pt;
  --font-size-small: 10pt;
  --font-size-normal: 11pt;
  --font-size-medium: 12pt;
  --font-size-large: 14pt;
  --font-size-xlarge: 18pt;
  --font-size-xxlarge: 22pt;
  --transition-speed: 200ms;
  --arrow-down-primary: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='20px' viewBox='0 -960 960 960' width='20px' fill='%232c2c2c'%3E%3Cpath d='M480-333 240-573l51-51 189 189 189-189 51 51-240 240Z'/%3E%3C/svg%3E");
  --arrow-down-secondary: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='20px' viewBox='0 -960 960 960' width='20px' fill='%238d8d8d'%3E%3Cpath d='M480-333 240-573l51-51 189 189 189-189 51 51-240 240Z'/%3E%3C/svg%3E");
  --notif-bottom: 33%;
  --notif-left: -12px;
  --notif-width: 5px;
  --notif-height: 5px;
  --notif-border-radius: 50%;
  --notif-background-color: var(--primary);
  --notif-box-shadow: 0 0 5px 1px var(--primary);
  --border-radius-buttons: 7px;
  --header_color: var(--text-color-secondary);
  --header_color_highlighted: var(--text-color-primary);
  --header_background: var(--background-darker);
  --header_background_highlighted: var(--secondary-hover);
  --content_color: var(--text-color-primary);
  --content_color_highlighted: var(--primary);
  --content_background: var(--background-dark);
  --content_background_highlighted: var(--background-dark);
  --border_color: var(--line-color);
  --border_color_highlighted: var(--primary);
  --selection: var(--primary-transparent);
  --menu_background: var(--background-darker);
  --menu_background_highlighted: var(--background-dark);
  --menu_color: var(--text-color-primary);
  --menu_color_highlighted: var(--primary-hover);
  --menu_box_shadow: 2px 2px 2px 0px rgba(143, 144, 145, 1);
  --cursor: var(--background-dark);
}

.darkmode {
  --color-body: #191a1b;
  --color-header: #121314;
  --color-navbar: #191a1b;
  --color-sidebar: #191a1b;
  --color-main: #121314;
  --color-footer: #121314;
  --background-transparent: #1c1e1eea;
  --background-dark: #191a1b;
  --background-darker: #121314;
  --background-darkest: #0C0D0E;
  --line-color: #494a4b44;
  --line-color-dark: #121314;
  --secondary: var(--background-dark);
  --secondary-dark: var(--background-darkest);
  --secondary-hover: var(--background-darker);
  --disabled: #3e3e40;
  --scroll-bar: #2d2836;
  --text-color-primary: #f8f7ef;
  --text-color-secondary: #909090;
  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-semibold: 500;
  --font-weight-bold: 600;
  --arrow-down-primary: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='20px' viewBox='0 -960 960 960' width='20px' fill='%23eae9ee'%3E%3Cpath d='M480-333 240-573l51-51 189 189 189-189 51 51-240 240Z'/%3E%3C/svg%3E");
  --arrow-down-secondary: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='20px' viewBox='0 -960 960 960' width='20px' fill='%2398979d'%3E%3Cpath d='M480-333 240-573l51-51 189 189 189-189 51 51-240 240Z'/%3E%3C/svg%3E");
  --header_color: var(--text-color-secondary);
  --header_color_highlighted: var(--text-color-primary);
  --header_background: var(--background-darker);
  --header_background_highlighted: var(--secondary-dark);
  --content_color: var(--text-color-primary);
  --content_color_highlighted: var(--primary);
  --content_background: var(--background-dark);
  --content_background_highlighted: var(--background-dark);
  --border_color: var(--line-color);
  --border_color_highlighted: var(--primary);
  --selection: var(--primary-transparent);
  --menu_background: var(--background-darker);
  --menu_background_highlighted: var(--background-dark);
  --menu_color: var(--text-color-primary);
  --menu_color_highlighted: var(--primary-hover);
  --menu_box_shadow: unset;
  --cursor: var(--background-dark);
}

.contrast-mode {
  --color-header: #fff;
  --color-navbar: #fff;
  --color-sidebar: #fff;
  --color-main: #fff;
  --color-footer: #fff;
  --background-transparent: #fff;
  --background-dark: #fff;
  --background-darker: #fff;
  --background-darkest: #666;
  --line-color: #000;
  --scroll-bar: #000;
  --text-color-primary: #000;
  --text-color-secondary: #000;
  --font-weight-light: 600;
  --font-weight-regular: 700;
  --font-weight-semibold: 800;
  --font-weight-bold: 900;
}

.contrast-mode.darkmode {
  --color-header: #000;
  --color-navbar: #000;
  --color-sidebar: #000;
  --color-main: #000;
  --color-footer: #000;
  --background-transparent: #000;
  --background-dark: #000;
  --background-darker: #000;
  --background-darkest: #888;
  --line-color: #fff;
  --scroll-bar: #fff;
  --text-color-primary: #fff;
  --text-color-secondary: #fff;
  --font-weight-light: 600;
  --font-weight-regular: 700;
  --font-weight-semibold: 800;
  --font-weight-bold: 900;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-family-sans);
  font-weight: var(--font-weight-light);
  font-variation-settings: "wdth" 100;
  scrollbar-color: var(--scroll-bar) transparent;
  scrollbar-width: thin;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: var(--navbar-height) 1fr auto;
  grid-template-areas: "sidebar navbar"
    "sidebar main"
    "sidebar footer";
  background-color: var(--color-body);
  overflow-x: hidden;
  background-color: var(--color-navbar);
}

.loadingScreen {
  position: absolute;
  z-index: 999999997;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--color-main);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  transition: all var(--transition-speed) ease-in-out;
}

.loading-logo-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: 70%;
  opacity: 0;
}

.loading-logo-wrapper.loading-logo-ready {
  opacity: 1;
}

.logo-slot,
.logo-icon-slot {
  width: 100%;
}

.loading-logo {
  width: min(72vw, 820px);
  height: auto;
  overflow: visible;
}

.loading-logo path {
  transform-origin: center;
}

.loading-logo .logo-icon {
  opacity: 0;
  transform: translateY(0);
  transition: none;
}

.loading-logo .logo-icon-outline {
  fill: none;
  opacity: 0;
  stroke: var(--primary);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5px;
  vector-effect: non-scaling-stroke;
}

.loading-logo .logo-text {
  opacity: 0;
}

.loading-logo-css-animate {
  animation: loading-logo-wrapper-in 600ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.loading-logo-css-animate .logo-icon-outline {
  display: none;
}

.loading-logo-css-animate .logo-icon {
  animation: loading-logo-mark-in 900ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.loading-logo-css-animate .logo-icon:nth-of-type(2) {
  animation-delay: 140ms;
}

.loading-logo-css-animate .logo-text {
  animation: loading-logo-letter-in 500ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  transform-origin: 50% 55%;
}

.loading-logo-css-animate .logo-text:nth-child(1) {
  animation-delay: 1200ms;
}

.loading-logo-css-animate .logo-text:nth-child(2) {
  animation-delay: 1300ms;
}

.loading-logo-css-animate .logo-text:nth-child(3) {
  animation-delay: 1400ms;
}

.loading-logo-css-animate .logo-text:nth-child(4) {
  animation-delay: 1500ms;
}

.loading-logo-css-animate .logo-text:nth-child(5) {
  animation-delay: 1600ms;
}

.loading-logo-css-animate .logo-text:nth-child(6) {
  animation-delay: 1700ms;
}

@keyframes loading-logo-wrapper-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes loading-logo-mark-in {
  from {
    opacity: 0;
    transform: translate(-26px, 18px) scale(0.9) rotate(-1.5deg);
  }

  to {
    opacity: 1;
    transform: translate(0, 0) scale(1) rotate(0);
  }
}

@keyframes loading-logo-letter-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

hr {
  border: none;
  border-top: 1px solid var(--line-color);
  margin: 0 1rem;
  box-shadow: 0 -1px 0 0 var(--line-color-dark);
}

p {
  text-align: justify;
  font-size: var(--font-size-normal);
}

code {
  font-family: var(--font-family-mono);
  font-size: inherit;
  font-weight: inherit;
  margin: 0 8px;
  padding: 0;
  border-radius: 2px;
  background-color: var(--background-darker);
  box-shadow: 0 0 0 6px var(--background-darker);
}

em {
  font-size: inherit;
  font-weight: inherit;
}

small {
  font-size: var(--font-size-xsmall);
  color: var(--text-color-secondary);
  float: right;
  user-select: none;
}

strong {
  font-weight: var(--font-weight-semibold);
}

summary {
	cursor: pointer;
}

.kbd-set {
  font-size: inherit;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: start;
  gap: 12px;
  user-select: none;
}

kbd {
	display: inline-block;
	text-align: center;
	font-family: var(--font-family-mono);
	font-weight: var(--font-weight-semibold);
	font-size: var(--font-size-xsmall);
	min-width: 24px;
	text-wrap-mode: nowrap;
	margin: 0px;
	padding: 1px;
	border-radius: 3px;
	background-color: var(--background-darker);
	border: var(--background-dark) 1px solid;
	box-shadow: 0 2px 0 3px var(--line-color);
}

.cursor-help {
  cursor: help !important;
}

.logo {
  width: inherit;
  aspect-ratio: 903.411 / 307.705;
  margin-top: 0.4rem;
  padding-inline: 0.75rem;
}

.inline-logo {
  font-family: var(--font-family-sans-expanded);
  font-weight: var(--font-weight-semibold);
}

svg.logo-icon {
  display: none;
  width: inherit;
  aspect-ratio: 1;
  padding: 0.6rem 0.45rem 0 0.75rem;
}

.logo .logo-text,
.loading-logo .logo-text {
  fill: var(--text-color-primary);
}

.logo .logo-icon,
.logo-icon .logo-icon,
.loading-logo .logo-icon {
  fill: var(--primary);
}

.logo .logo-icon,
.logo-icon .logo-icon {
  transform-origin: bottom;
  transition: transform var(--transition-speed) ease;
}

.sidebar-minimized .logo {
  display: none;
}

.sidebar-minimized svg.logo-icon {
  display: block;
}

.header-svg {
  height: 1em;
  stroke-width: 1.2;
  color: var(--text-color-secondary, currentColor);
}

header,
.section-header {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  background-color: var(--color-header);
  color: var(--text-color-primary);
  padding: 1rem;
  z-index: 2;
  user-select: none;
}

.section-header {
  border-top-left-radius: 10px;
}

nav {
  grid-area: navbar;
  background-color: var(--color-navbar);
  color: var(--text-color-primary);
  padding: 0 0 0 1rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.navbar-alert {
  position: relative;
}

.navbar-alert-dot {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid transparent;
  transition: transform var(--transition-speed) ease, background-color var(--transition-speed) ease;
}

.navbar-alert[data-state="attention"] .btn-small {
  background: var(--warning-disabled);
  color: color-mix(in srgb, var(--warning) 80%, var(--text-color-primary));
  border-color: var(--line-color);
}

.navbar-alert[data-state="attention"] .navbar-alert-dot {
  background: var(--warning);
}

.navbar-alert[data-state="info"] .btn-small {
  background: var(--info-disabled);
  color: color-mix(in srgb, var(--info) 80%, var(--text-color-primary));
  border-color: var(--line-color);
}

.navbar-alert[data-state="info"] .navbar-alert-dot {
  background: var(--info);
}

.navbar-alert-popup {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  width: min(320px, calc(100vw - 2rem));
  z-index: 30;
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--line-color);
  background: var(--background-dark);
  
}

.navbar-alert-popup-floating {
  position: fixed;
  top: 0;
  left: 0;
  right: auto;
  z-index: 9999;
  box-shadow: 0 14px 40px color-mix(in srgb, var(--background-darkest) 32%, transparent);
}

.navbar-alert-popup-title {
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-semibold);
  color: var(--text-color-primary);
  margin-bottom: 0.35rem;
}

.navbar-alert-popup-message {
  font-size: var(--font-size-small);
  color: var(--text-color-secondary);
  line-height: 1.3;
}

@keyframes navbar-alert-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.12);
    opacity: 0.75;
  }
}

#navbar ul,
#navbar ul li {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 1rem;
}

.breadcrumb {
  opacity: 1;
  font-size: var(--font-size-small);
  color: var(--text-color-secondary);
  font-weight: var(--font-weight-regular);
  user-select: none;
}

.breadcrumb .breadcrumb-category {
  font-weight: var(--font-weight-semibold);
}

aside {
  position: sticky;
  top: var(--header-height);
  align-self: start;
  grid-area: sidebar;
  background-color: var(--color-sidebar);
  color: var(--text-color-primary);
  padding: 1rem;
  width: var(--sidebar-width);
  margin: 0;
  padding: 0;
  border-radius: 0;
  top: 0;
  z-index: 3;
  height: 100vh;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

main {
  grid-area: main;
  height: calc(100vh - var(--navbar-height) - var(--footer-height));
  background-color: var(--color-main);
  color: var(--text-color-primary);
  padding: 0 0rem;
  display: grid;
  gap: 0rem;
  grid-template-rows: auto;
  grid-template-columns: auto;
  grid-template-areas: "main-0";
  border-top-left-radius: 15px;
  border-left: 1px solid var(--line-color);
  border-top: 1px solid var(--line-color);
}

main:has(.section-container) {
  grid-template-columns: auto;
  grid-template-areas: "main-0";
}

main:has(.section.left),
main:has(.section.right) {
  grid-template-columns: 1fr 2fr;
  grid-template-areas: "main-1 main-2";
}
main:has(.home-shell) {
  --header-height: 0;
}
main:has(.home-shell) .section-header {
  display: none;
}
main:has(.home-shell) header {
  background-color: transparent;
}
main:has(.section.inputs),
main:has(.section.results) {
  grid-template-columns: 1fr 2fr;
  grid-template-areas: "main-1 main-2";
}

.section-container {
  display: grid;
  grid-area: main-1;
  grid-column: span 2;
  grid-template-columns: 1fr 2fr;
  grid-template-areas: "sec-1 sec-2";
}

.section-container .section.inputs {
  grid-area: sec-1;
  border-right: 1px solid var(--line-color);
}

.section-container .section.results {
  grid-area: sec-2;
}

.section {
  position: relative;
  grid-area: main-0;
  display: grid;
  grid-template-columns: auto;
  grid-template-rows: var(--header-height) calc(100vh - var(--navbar-height) - var(--header-height) - var(--footer-height) - 0.5rem);
  grid-template-areas:
    "section-header"
    "section-content";
  padding-top: 0.5rem;
}

.section .section-header,
.section .section-content {
  overflow-x: hidden;
  overflow-y: hidden;
  width: 100%;
  padding: 0 1rem;
  min-height: 1rem;
  padding: 0;
  padding: 0.75rem;
  margin: 0;
  padding-top: 0;
}

.section .section-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
}

#inputs-content {
	padding-bottom: 30rem;
}

@media (max-width: 576px) {
  #section-model-inputs #inputs-content {
    padding-bottom: 2rem;
  }
}

.section.left {
  grid-area: main-1;
}

.section.right {
  grid-area: main-2;
  border-left: 1px solid var(--line-color);
}

.section .section-header {
  grid-area: section-header;
  padding-bottom: 0;
  z-index: 22;
}

.section .section-content {
  grid-area: section-content;
}

.section-scroll-top-btn {
  position: absolute;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid var(--line-color);
  background: color-mix(in oklab, var(--background-dark) 85%, var(--primary-disabled));
  color: var(--text-color-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px -16px var(--background-darkest);
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px) scale(0.97);
  pointer-events: none;
  transition: opacity var(--transition-speed) ease, transform var(--transition-speed) ease, border-color var(--transition-speed) ease;
  z-index: 5;
}

.section-scroll-top-btn svg {
  width: 18px;
  height: 18px;
}

.section-scroll-top-btn:hover {
  border-color: var(--primary);
}

.section-scroll-top-btn.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

footer {
  grid-area: footer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--font-size-small);
  background-color: var(--color-footer);
  color: var(--text-color-secondary);
  padding: 1rem;
  height: var(--footer-height);
  user-select: none;
  border-left: 1px solid var(--line-color);
  border-top: 1px solid var(--line-color);
  z-index: 1;
}

a {
  text-decoration: none;
  color: var(--primary);
  border-radius: 3px;
  user-select: none;
}

a:hover {
  color: var(--primary-hover);
}

a:hover svg {
  stroke: var(--text-color-primary);
}

#sidebar-toggle {
  display: none;
  border: none;
  background: none;
}

#sidebar-toggle .hamburger-icon {
  width: 20px;
  height: 20px;
  transition: transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

#sidebar-toggle .hamburger-line {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5px;
  transition:
    stroke-dasharray 600ms cubic-bezier(0.4, 0, 0.2, 1),
    stroke-dashoffset 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

#sidebar-toggle .hamburger-line-top-bottom {
  stroke-dasharray: 12 63;
}

#sidebar-toggle.is-open .hamburger-icon {
  transform: rotate(-45deg);
}

#sidebar-toggle.is-open .hamburger-line-top-bottom {
  stroke-dasharray: 20 300;
  stroke-dashoffset: -32.42;
}

#sidebar-close-btn-wrapper {
  display: none;
}

@media (max-width: 1200px) {
  body {
    grid-template-columns: 1fr;
    grid-template-rows: var(--navbar-height) auto auto auto;
    grid-template-areas: "navbar"
      "header"
      "main"
      "footer";
  }

  main {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    grid-template-areas: "submain";
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  main:has(.section.left),
  main:has(.section.right),
  main:has(.section.inputs),
  main:has(.section.results) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "submain";
  }

  .section-container {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "sec-1"
      "sec-2";
    width: 100%;
    min-width: 0;
    flex: 0 0 auto;
  }

  .section {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    width: 100%;
    min-width: 0;
    height: auto;
    flex: 0 0 auto;
  }

  .section .section-header,
  .section .section-content {
    min-width: 0;
    border-bottom: 1px solid var(--line-color);
    margin-bottom: 0.5rem;
    padding-block: 0.5rem;
  }

  .section .section-content {
    height: auto;
    overflow-y: visible;
  }

  .section.left,
  .section.right {
    grid-area: submain;
  }

  .section.right,
  .section-container .section.results {
    border-left: 0;
  }

  .section-container .section.inputs {
    border-right: 0;
    border-bottom: 1px solid var(--line-color);
  }


  header {
    position: sticky;
    top: 0;
    background-color: var(--color-header);
    z-index: 2;
  }

  #inputs {
    grid-area: submain;
    flex: 0 0 auto;
  }

  #results {
    grid-area: submain;
    flex: 0 0 auto;
  }

  #sidebar {
    position: fixed;
    top: calc(var(--navbar-height) + 0.55rem);
    right: 0.85rem;
    left: auto;
    margin: 0;
    width: min(350px, calc(100vw - 1.4rem));
    height: auto;
    max-height: calc(100dvh - var(--navbar-height) - 1.1rem);
    padding: 0.65rem;
    display: flex;
    border: 1px solid color-mix(in oklab, var(--line-color) 82%, var(--primary-disabled));
    border-radius: 18px;
    background: color-mix(in oklab, var(--color-sidebar) 90%, var(--background-transparent));
    backdrop-filter: blur(20px) saturate(1.15);
    box-shadow:
      0 24px 64px -34px var(--background-darkest),
      0 12px 30px -24px var(--background-darkest),
      inset 0 1px 0 color-mix(in oklab, var(--line-color) 45%, transparent);
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transform: translateY(-0.45rem) scale(0.965);
    transform-origin: top right;
    transition:
      opacity 170ms ease,
      transform 190ms cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 40;
  }

  #sidebar::before {
    content: "";
    position: absolute;
    top: -7px;
    right: 1.05rem;
    width: 14px;
    height: 14px;
    border-left: 1px solid color-mix(in oklab, var(--line-color) 82%, var(--primary-disabled));
    border-top: 1px solid color-mix(in oklab, var(--line-color) 82%, var(--primary-disabled));
    background: color-mix(in oklab, var(--color-sidebar) 90%, var(--background-transparent));
    transform: rotate(45deg);
  }

  #sidebar.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  #sidebar-resize-btn {
    display: none;
  }

  #sidebar .sidebar-footer {
    position: static;
    flex-shrink: 0;
    width: calc(100% + 1.3rem);
    margin: 0 -0.65rem -0.65rem;
    border-top: 1px solid var(--line-color);
    border-radius: 0 0 17px 17px;
    box-shadow: none;
  }

  #sidebar .logo {
    display: block;
    width: min(210px, 76%);
    margin: 0.25rem auto 0.85rem;
    padding: 0;
  }

  #sidebar .logo-slot {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 0.1rem 0 0.2rem;
  }

  #sidebar-toggle {
    display: inline-flex;
    margin-right: 0.5rem;
  }

  .navbar-alert-popup {
    right: -0.25rem;
  }

  #sidebar-close-btn-wrapper {
    display: none;
  }

  .section-scroll-top-btn {
    right: 0.8rem;
    bottom: 0.8rem;
  }
}

.flex {
  display: flex;
}

.flex-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.flex-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: end;
  margin: 1rem;
  gap: 1rem;
  width: 100%;
}

.flex-col {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-items: center;
  justify-content: start;
  gap: 1rem;
}

.flex-direction-col {
  flex-direction: column;
}

.flex-grow-0 {
  flex-grow: 0 !important;
}

.flex-grow-1 {
  flex-grow: 1 !important;
}

.flex-wrap {
  flex-wrap: wrap;
}

.no-wrap {
  white-space: nowrap !important;
}

.justify-content-center {
  justify-content: center !important;
}

.justify-content-start {
  justify-content: start !important;
}

.justify-content-end {
  justify-content: end !important;
}

.place-items-start {
  place-items: start !important;
}

.align-items-start {
  align-items: start !important;
}

.align-items-center {
  align-items: center !important;
}

.align-items-end {
  align-items: end !important;
}

.align-items-last-baseline {
  align-items: last baseline !important;
}

.align-items-baseline {
  align-items: baseline !important;
}

.justify-self-center {
  justify-self: center !important;
}

.justify-self-end {
  justify-self: end !important;
}

.margin-0-auto {
  margin: 0 auto;
}

.margin-auto-0 {
  margin: 0 auto;
}

.grid-cols-1-15 {
  grid-template-columns: 1fr 1.5fr !important;
}

.sidebar-footer {
  background-color: var(--background-darker);
  padding: 0.75rem 0 0.75rem 0;
}

#sidebar ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0.35rem 0.45rem;
  border-radius: 8px;
  overflow-x: hidden;
  overflow-y: auto;
}

#sidebar ul li {
  position: relative;
  text-wrap: nowrap;
  border-radius: var(--border-radius-buttons);

  span {
    transition: font-weight var(--transition-speed) ease-in-out;
  }
}

#sidebar ul li a:active {
  color: var(--primary-hover);
}

#sidebar ul li a:active svg {
  stroke: var(--primary-hover);
}

#sidebar .dropdown-button:hover {
  svg {
    stroke: var(--text-color-primary);
  }
}

#sidebar li:has(li.active) .dropdown-button {
  svg {
    stroke: var(--primary);
  }
}

#sidebar ul li.active {
  a {
    color: var(--primary);
    font-weight: var(--font-weight-semibold);
  }

  span {
    font-weight: var(--font-weight-semibold);
  }

  .st0,
  .st1,
  .st2 {
    fill: var(--primary);
  }

  .svg-stroke-secondary {
    stroke: var(--text-color-primary);
  }

}

.dropdown-button {
  width: 100%;
  text-align: left;
}

.svg-fill-none {
  fill: none !important;
}

.svg-stroke-current {
  stroke-width: 1.5;
  stroke: currentColor;
}

.svg-stroke-secondary {
  stroke-width: 1.5;
  stroke: var(--text-color-secondary);
}

.svg-24 {
  height: 24px;
  width: 24px;
}
.svg-16 {
  height: 16px;
  width: 16px;
}

#sidebar a,
#sidebar .dropdown-button {
  text-decoration: none;
  color: var(--text-color-primary);
  background-color: transparent;
  border: none;
  border-radius: var(--border-radius-buttons);
  font-size: var(--font-size-small);
  display: flex;
  align-items: center;
  gap: 0.9rem;
  height: 40px;
  margin: 0;
  padding: 1.25rem 0.8rem;
  cursor: pointer;
  transition: all var(--transition-speed) ease-in-out;

  svg {
    fill: var(--text-color-secondary);
    transition: all var(--transition-speed) ease-in-out;
  }
}

#sidebar a:hover,
#sidebar .dropdown-button:hover {
  background-color: var(--primary-disabled);
  color: var(--text-color-primary);
  font-weight: var(--font-weight-semibold);

  span {
    font-weight: var(--font-weight-semibold);
  }

  svg {
    fill: var(--text-color-primary);
  }
}

#sidebar a span,
#sidebar .dropdown-button span {
  flex-grow: 1;
}

#sidebar svg {
  flex-shrink: 0;
}

#sidebar .svg-24 {
  height: 20px;
  width: 20px;
}

#sidebar-resize-btn {
  display: flex;
  align-items: center;
  position: absolute;
  top: 0;
  left: calc(var(--sidebar-width) - 8px);
  right: 0;
  width: 25px;
  height: 40px;
  border-radius: 0 20px 20px 0;
  border: none;
  color: var(--background-darker);
  background-color: transparent;
  cursor: pointer;

  svg {
    fill: none;
    stroke: var(--text-color-secondary);
    transition: stroke var(--transition-speed) ease-in-out;
  }
}

#sidebar-resize-btn:hover svg {
  stroke: var(--primary);
}

#sidebar.sidebar-minimized {
  width: var(--sidebar-minimized-width);
  overflow-x: hidden;

  #sidebar-resize-btn {
    position: fixed;
    top: 0;
    left: calc(var(--sidebar-minimized-width) - 8px);

    svg {
      rotate: 180deg;
    }
  }

  a>span {
    display: none;
  }
}

#sidebar .sub-menu {
  display: grid;
  grid-template-rows: 0fr;
  margin: 0 0 0 0.9rem;
  transition: var(--transition-speed) ease-in-out;
  border-radius: 0;
  background-color: transparent;
  box-shadow: none;

  >div {
    overflow: hidden;
    position: relative;
    padding-left: 1rem;
  }

  >div::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 1.75rem;
    left: 0.45rem;
    width: 1px;
    background: color-mix(in oklab, var(--text-color-secondary) 35%, var(--background-darker));
    border-radius: 999px;
  }

  li {
    margin: 0px;
  }

  li::before {
    content: "";
    position: absolute;
    top: 0.75rem;
    left: -0.55rem;
    width: 0.55rem;
    height: 0.55rem;
    border-left: 1px solid color-mix(in oklab, var(--text-color-secondary) 35%, var(--background-darker));
    border-bottom: 1px solid color-mix(in oklab, var(--text-color-secondary) 35%, var(--background-darker));
    border-bottom-left-radius: 0.25rem;
  }

  a {
    padding-left: 0.75rem;
  }

}

#sidebar .submenu-category {
  display: block;
  margin: 0.45rem 0 0.2rem 0.75rem;
  color: var(--text-color-secondary);
  font-size: var(--font-size-xsmall);
  font-weight: var(--font-weight-semibold);
  line-height: 1.2;
  opacity: 0.85;
  white-space: nowrap;
  user-select: none;
}

#sidebar .submenu-category:first-child {
  margin-top: 0.2rem;
}

#sidebar .sub-menu.show {
  grid-template-rows: 1fr;
}

#sidebar ul li.active > a,
#sidebar ul li.active > .dropdown-button {
  color: var(--primary);
  background-color: color-mix(in oklab, var(--primary-disabled) 70%, transparent);
}

#sidebar ul li.active > a .svg-stroke-secondary,
#sidebar ul li.active > .dropdown-button .svg-stroke-secondary {
  stroke: var(--primary);
}

#sidebar ul li.active > a svg:not(.svg-fill-none),
#sidebar ul li.active > .dropdown-button svg:not(.svg-fill-none) {
  fill: var(--primary);
}

#sidebar.sidebar-minimized ul li.active > a,
#sidebar.sidebar-minimized ul li.active > .dropdown-button {
  box-shadow: none;
}

#sidebar.sidebar-minimized a,
#sidebar.sidebar-minimized .dropdown-button {
  justify-content: center;
  gap: 0;
  padding-inline: 0;
  font-size: 0;
}

#sidebar.sidebar-minimized .dropdown-button span,
#sidebar.sidebar-minimized a > span,
#sidebar.sidebar-minimized .dropdown-button svg:last-child {
  display: none;
}

#sidebar.sidebar-minimized .sub-menu {
  margin: 0;
}

#sidebar.sidebar-minimized .sub-menu > div {
  padding-left: 0;
}

#sidebar.sidebar-minimized .submenu-category {
  height: 0;
  margin: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

#sidebar.sidebar-minimized .sub-menu > div::before,
#sidebar.sidebar-minimized .sub-menu li::before {
  display: none;
}

#sidebar.sidebar-minimized a svg,
#sidebar.sidebar-minimized .dropdown-button svg {
  margin: 0 auto;
}

@media (max-width: 1200px) {
  #sidebar-resize-btn {
    display: none !important;
  }

  #sidebar .logo-slot {
    width: 100%;
  }

  #sidebar ul {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0.15rem 0 0.65rem;
    /* padding: 0.15rem; */
    overflow-y: auto;
  }

  #sidebar hr {
    margin: 0.25rem 0.45rem;
  }

  #sidebar a,
  #sidebar .dropdown-button {
    min-height: 38px;
    height: 38px;
    padding: 0.95rem 0.8rem;
  }

  #sidebar .sub-menu {
    margin-left: 1.25rem;
  }
}

@media (max-width: 480px) {
  #sidebar {
    top: calc(var(--navbar-height) + 0.45rem);
    right: 0.5rem;
    width: calc(100vw - 1rem);
    max-height: calc(100dvh - var(--navbar-height) - 0.9rem);
    border-radius: 10px;
    padding: 0.55rem;
  }

  #sidebar::before {
    right: 1.15rem;
  }

  #sidebar .sidebar-footer {
    width: calc(100% + 1.1rem);
    margin: 0 -0.55rem -0.55rem;
  }

  #sidebar .logo {
    width: min(190px, 70%);
    margin-bottom: 0.65rem;
  }
}

.rotate-180 {
  transform: rotate(180deg);
}

.hidden {
  display: none !important;
}

label {
  color: var(--text-color-secondary);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-xsmall);
  transition: all var(--transition-speed) ease;
  position: relative;
  user-select: none;
}

.subtle-message {
  color: var(--text-color-secondary);
  font-size: var(--font-size-small);
  font-style: italic;
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Font styles */
.font-family-expanded {
  font-family: var(--font-family-sans-expanded) !important;
}

.font-size-xxsmall {
  font-size: var(--font-size-xxsmall) !important;
}

.font-size-xsmall {
  font-size: var(--font-size-xsmall) !important;
}

.font-size-small {
  font-size: var(--font-size-small) !important;
}

.font-size-normal {
  font-size: var(--font-size-normal) !important;
}

.font-size-medium {
  font-size: var(--font-size-medium) !important;
}

.font-size-large {
  font-size: var(--font-size-large) !important;
}

.font-size-xlarge {
  font-size: var(--font-size-xlarge) !important;
}

.font-size-xxlarge {
  font-size: var(--font-size-xxlarge) !important;
}

.font-weight-light {
  font-weight: var(--font-weight-light) !important;
}

.font-weight-regular {
  font-weight: var(--font-weight-regular) !important;
}

.font-weight-semibold {
  font-weight: var(--font-weight-semibold) !important;
}

.font-weight-bold {
  font-weight: var(--font-weight-bold) !important;
}

/* Inputs */
.input-group {
  display: flex;
  width: 100%;
  flex-direction: row;
  gap: 1rem;
}

.input-pair {
  position: relative;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  width: 100%;
}

.input-pair:has(input[type="text"]:read-only)::before,
.input-pair:has(input[type="number"]:read-only)::before {
	content: "Read-only";
	font-size: var(--font-size-xsmall);
	color: var(--text-color-secondary);
	position: absolute;
	right: 0;
}

.input-with-suffix {
  position: relative;
  width: 100%;
}

.input-with-suffix input {
  padding-right: 2rem;
}

.input-with-suffix > .units {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  flex-grow: 0;
  pointer-events: none;
  font-size: var(--font-size-xsmall);
}

input[type="text"],
input[type="number"],
input[type="file"],
input[type="search"] {
  color: var(--text-color-primary);
  background-color: var(--background-darker);
  border: var(--line-color) 1px solid;
  border-radius: 7px;
  margin: 0.5rem 0rem;
  padding: 0.5rem;
  outline: none;
  width: 100%;
  transition: all var(--transition-speed) ease;
  box-sizing: border-box;
  font-size: var(--font-size-small);
}

/* Select inputs */
select {
  color: var(--text-color-primary);
  background-color: var(--background-darker);
  border: var(--line-color) 1px solid;
  border-radius: 7px;
  
  margin: 0.5rem 0rem;
  padding: 0.5rem;
  outline: none;
  width: 100%;
  transition: all var(--transition-speed) ease;
  box-sizing: border-box;
  font-size: var(--font-size-small);
  cursor: pointer;
}

select:hover,
select:focus-visible,
select:active {
  border: var(--primary) 1px solid;
}

label:has(+ select:hover),
label:has(+ select:focus-visible),
label:has(+ select:active) {
  color: var(--text-color-primary);
}

#select_organism {
  font-style: italic;
}

#select_organism option:first-of-type {
  font-style: normal;
}

.width-auto {
  width: auto !important;
}

.width-26px {
  width: 26px !important;
}

input[type="file"] {
  cursor: pointer;
  padding: 0;
}

input:disabled {
  background-color: var(--background-darker);
  color: var(--text-color-secondary);
  cursor: not-allowed;
  opacity: 0.7;
}
input[type="text"]:read-only,
input[type="number"]:read-only {
}

input[type="file"]:disabled::file-selector-button {
  cursor: not-allowed;
  pointer-events: none;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type=number] {
  -moz-appearance: textfield;
}

input[type="text"]:hover,
input[type="text"]:focus,
input[type="text"]:active,
input[type="number"]:hover,
input[type="number"]:focus,
input[type="number"]:active,
input[type="file"]:hover,
input[type="file"]:active,
input[type="search"]:hover,
input[type="search"]:focus,
input[type="search"]:active {
  border: var(--primary) 1px solid;
}

label:has(+ input[type="text"]:hover),
label:has(+ input[type="text"]:focus),
label:has(+ input[type="text"]:active),
label:has(+ input[type="number"]:hover),
label:has(+ input[type="number"]:focus),
label:has(+ input[type="number"]:active),
label:has(+ input[type="search"]:hover),
label:has(+ input[type="search"]:focus),
label:has(+ input[type="search"]:active),
label:has(+ .control-row input[type="number"]:hover),
label:has(+ .control-row input[type="number"]:focus),
label:has(+ .control-row input[type="number"]:active),
label:has(+ input[type="file"]:hover),
label:has(+ input[type="file"]:active),
label:has(+ .radio-group:hover),
label:has(+ .radio-group:active),
label:has(+ .segmented-radio-field:hover),
label:has(+ .segmented-radio-field:active),
label:has(+ .input-with-suffix:hover) {
  color: var(--text-color-primary);
}

input[type="text"]:invalid,
input[type="number"]:invalid,
input[type="file"]:invalid {
  /* box-shadow: inset 0 0 7px -1px var(--danger); */
  border: var(--danger) 1px solid;
}

input[type="file"]::file-selector-button {
  width: auto;
  height: 100%;
  border: none;
  border-radius: 0;
  /* Match input border radius if you want */
  background-color: var(--secondary);
  color: var(--text-color-primary);
  font-family: var(--font-family-sans);
  font-weight: var(--font-weight-regular);
  font-size: calc(var(--font-size-normal) * 0.85);
  
  padding: 0.5rem 1rem;
  box-sizing: border-box;
  /* Important to make width behave correctly */
  margin-right: 0.5rem;
  cursor: pointer;
  transition: background-color var(--transition-speed) ease;
}

input[type="file"]::file-selector-button:hover {
  background-color: var(--secondary-hover);
}

input[type="file"]::file-selector-button:active {
  background-color: var(--secondary-dark);
}

.toggle-switch {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-direction: row-reverse;
  width: fit-content;
  cursor: pointer;
  margin-top: 0.75rem;
  user-select: none;
}

.toggle-switch .label-text {
  font-weight: var(--font-weight-semibold);
}

.toggle-switch:hover {
  color: var(--text-color-primary)
}

.toggle-switch:has(input[type="checkbox"]:checked) {
  color: var(--text-color-primary)
}

.toggle-switch:has(input[type="checkbox"]:disabled) {
  color: var(--text-color-secondary);
  cursor: not-allowed;
  pointer-events: none;
  text-decoration: line-through;
}

.toggle-switch input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch:has(input[type="checkbox"]:focus-visible) {
  color: var(--primary);

  .toggle-switch-background {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
  }
}

.toggle-switch-background {
  display: flex;
  gap: 0;
  position: relative;
  top: 0;
  left: 0;
  width: 40px;
  min-width: 40px;
  height: 22px;
  background-color: var(--background-darker);
  border-radius: 15px;
  
  transition: background-color var(--transition-speed) ease-in-out, box-shadow var(--transition-speed) ease-in-out;

  border: 1px solid var(--line-color);
	box-sizing: content-box;
}

.toggle-switch-handle {
  position: relative;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background-color: var(--background-dark);
  border-radius: 50%;
  border: var(--line-color) 1px solid;
  
  transition: transform var(--transition-speed) ease-in-out;
}

.toggle-switch input[type="checkbox"]:checked+.toggle-switch-background {
  background-color: var(--success);
}

.toggle-switch input[type="checkbox"]:checked+.toggle-switch-background .toggle-switch-handle {
  transform: translateX(18px);
}

#contrast-toggle-container {
  user-select: none;
  position: relative;
  scale: 1;
}

#contrast-toggle-container .toggle-switch-background {
  background-color: var(--background-darker);
  border: 1px solid var(--line-color);
  box-sizing: content-box;
}

#contrast-toggle-container .toggle-switch-background .toggle-switch-handle {
  position: absolute;
  z-index: 1;
}

#contrast-toggle-container svg:first-child {
  transform-origin: center;
  transform: scale(0.9);
  fill: var(--text-color-primary);
  position: relative;
  left: 1px;
  top: 1px;
}

#contrast-toggle-container svg:last-child {
  transform-origin: center;
  transform: scale(0.9);
  position: relative;
  stroke: var(--text-color-primary);
  fill: none;
  right: 1px;
  top: 1px;

  path {
    fill: var(--text-color-primary);
  }
}

#theme-toggle-container {
  user-select: none;
  position: relative;
  scale: 1;
}

#theme-toggle-container .toggle-switch-background {
  background-color: var(--background-darker);
  border: 1px solid var(--line-color);
  box-sizing: content-box;
}

#theme-toggle-container .toggle-switch-background .toggle-switch-handle {
  position: absolute;
  z-index: 1;
}

#theme-toggle-container svg:first-child {
  transform-origin: center;
  transform: scale(0.9);
  fill: var(--text-color-primary);
  position: relative;
  left: 1px;
  top: 1px;
}

#theme-toggle-container svg:last-child {
  transform-origin: center;
  transform: scale(0.9);
  fill: rgb(218, 80, 0);
  position: relative;
  right: 1px;
  top: 1px;
}

/* Radio buttons */
.radio-group {
  margin: 1rem 0 0 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  border-radius: 3px;
  align-self: start;
  gap: 20px;
  align-items: start;
  transition: background-color var(--transition-speed) ease,
    box-shadow var(--transition-speed) ease;
}

.radio-group.horizontal {
  flex-direction: row;
  align-items: center;
}

.radio-group.vertical {
  flex-direction: column;
  gap: 10px;
}

.radio-group:hover {
  color: var(--primary);
  background-color: var(--background-darker);
  box-shadow: 0 0 0 8px var(--background-darker);
}

.radio-group>label:hover {
  color: var(--text-color-primary);
}

.segmented-radio-field {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.segmented-radio-field.radio-group {
  gap: 0.5rem;
}

.segmented-radio-field.radio-group:hover {
  color: inherit;
  background-color: transparent;
  box-shadow: none;
}

.segmented-radio-label {
  color: var(--text-color-secondary);
  font-size: var(--font-size-xsmall);
  font-weight: var(--font-weight-semibold);
  white-space: nowrap;
  transition: color var(--transition-speed) ease;
}

.segmented-radio-field:hover .segmented-radio-label {
  color: var(--text-color-primary);
}

.segmented-radio-control {
  display: inline-flex;
  align-items: center;
  /* flex-wrap: wrap; */
  gap: 0.2rem;
  padding: 0.2rem;
  border: 1px solid var(--line-color);
  border-radius: var(--border-radius-buttons);
  background: var(--background-darker);
}

.segmented-radio-control label {
  margin: 0;
  cursor: pointer;
}

.w-100 {
  width: 100%;
}

.w-50 {
  width: 50%;
}

.segmented-radio-control.w-100 label {
  flex: 1 1 auto;
  min-width: 0;
}

.segmented-radio-control.w-100 span {
  text-align: center;
  white-space: nowrap;
}

.segmented-radio-control input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.segmented-radio-control span {
  display: block;
  padding-inline: 0.6rem;
  padding-block: 0.35rem;
  border-radius: calc(var(--border-radius-buttons) - 4px);
  color: var(--text-color-secondary);
  font-size: var(--font-size-xsmall);
  font-weight: var(--font-weight-semibold);
  line-height: 1.2;
  transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

.segmented-radio-control label:hover span {
  color: var(--text-color-primary);
}

.segmented-radio-control input:checked + span {
  background: var(--primary-disabled);
  color: var(--primary);
}

.segmented-radio-control input:focus-visible + span {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.segmented-radio-control input:disabled + span {
  color: var(--text-color-secondary);
  cursor: not-allowed;
  opacity: 0.45;
  text-decoration: line-through;
}

.segmented-radio-field .availability-note {
  flex-basis: 100%;
  margin: 0.1rem 0 0 calc(3rem + 0.5rem);
}

.radio-container {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: start;
  gap: 0.5rem;
  flex-wrap: wrap;
  cursor: pointer;
  font-size: var(--font-size-xsmall);
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  color: var(--text-color-secondary);
}

/* Hide the browser's default radio button */
.radio-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

/* Create a custom radio button */
.checkmark {
  position: relative;
  /*relative*/
  /*top: 0;*/
  /*left: 0; */
  height: 20px;
  width: 20px;
  background-color: var(--background-darker);
  border-radius: 50%;
  
  transition: background-color var(--transition-speed) ease-in-out;
}

/* On mouse-over, add a grey background color */
.radio-container:hover input~.checkmark {
  background-color: var(--background-dark);
}

/* When the radio button is checked, add a blue background */
.radio-container input:checked~.checkmark {
  background-color: var(--success);
}

.radio-container:has(input:checked) {
  color: var(--text-color-primary);
}

.radio-container:has(input:disabled) {
  color: var(--text-color-secondary);
  cursor: not-allowed;
  /* pointer-events: none; */

  &::after {
    content: "Unavailable";
    position: absolute;
    top: 80%;
    left: calc( 20px + 0.5rem );
    font-size: var(--font-size-xxsmall);
    font-weight: var(--font-weight-regular);
    color: var(--text-color-secondary);
    
  }
}
.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}
.radio-container input:checked~.checkmark:after {
  display: block;
}

.radio-container .checkmark:after {
  top: 4px;
  left: 4px;
  width: 10px;
  height: 10px;
  background-color: var(--background-dark);
  border-radius: 50%;
  border: var(--line-color) 1px solid;
  transition: transform var(--transition-speed) ease-in-out;
}

.radio-inputs-icons {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  border-radius: 8px;
  border: var(--line-color) 1px solid;
  background-color: var(--background-darker);
  box-sizing: border-box;
  padding: 1px;
  width: 100px;
  min-width: 100px;
  height: 36px;
  border: none;
  box-shadow: none;
  background-color: transparent;
}

.radio-inputs-icons .radio {
  flex: auto auto auto;
  text-align: center;
}

.radio-inputs-icons .radio input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-inputs-icons input:focus+.name {
  outline: 3px solid var(--primary);
}

.radio-inputs-icons .radio .name {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  height: 30px;
  width: 30px;
  color: var(--text-color-secondary);
  transition: all var(--transition-speed) ease-in-out;
  margin: 0 1px;
  cursor: pointer;
  border-radius: 20px;
}

.radio-inputs-icons .radio input:checked+.name {
  box-shadow: none;
}

.radio-inputs-icons .radio .name>svg {
  fill: var(--background-darkest);
  fill: var(--primary-disabled);
}

.radio-inputs-icons .radio:hover .name>svg {
  fill: var(--text-color-primary);
  fill: var(--primary-hover);
}

.radio-inputs-icons .radio:hover input:checked+.name>svg {
  fill: var(--text-color-secondary);
  fill: var(--primary-hover);
}

.radio-inputs-icons .radio input:checked+.name>svg {
  fill: var(--text-color-primary);
  fill: var(--primary);
}

.radio-inputs-icons .radio input:checked+.name {
  position: relative;
  animation: select var(--transition-speed) ease;
  box-shadow: none;
}

@keyframes select {
  0% {
    transform: scale(0.95);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

.custom-select {
  position: relative;
  color: var(--text-color-primary);
  background-color: var(--background-darker);
  border: var(--line-color) 1px solid;
  border-radius: 7px;
  margin: 0.5rem 0rem;
  outline: none;
  width: 100%;
  transition: all var(--transition-speed) ease;
  box-sizing: border-box;
  font-size: var(--font-size-small);
}

.custom-select select {
  display: none;
  border-radius: 7px;
}

.select-selected {
  background-color: var(--background-darker);
  border-radius: 7px;
  transition: all var(--transition-speed) ease;
  user-select: none;
}

.custom-select:hover {
  border: var(--primary) 1px solid;
}

.custom-select:has(select:invalid) {
  border: var(--danger) 1px solid;
}

.custom-select:has(select:invalid) .select-selected {
  box-shadow: inset 0 0 5px -1px var(--danger);
}

label:has(+ .custom-select:hover) {
  color: var(--text-color-primary);
}

.custom-select:hover .select-selected:after {
  background-image: var(--arrow-down-primary);
}

.select-selected:after {
  position: absolute;
  color: var(--text-color-secondary);
  content: "";
  top: 7px;
  right: 10px;
  width: 20px;
  height: 20px;
  background-image: var(--arrow-down-secondary);
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  transition: rotate var(--transition-speed) ease;
}

.select-selected.select-arrow-active:after {
  background-image: var(--arrow-down-primary);
  rotate: 180deg;
}

.select-items div,
.select-selected {
  padding: 0.5rem;
  cursor: pointer;
  border-radius: 7px;
}

.select-items {
  position: absolute;
  background-color: var(--background-darker);
  border: none;
  border-radius: 7px;
  top: 100%;
  left: 0;
  right: 0;
  padding: 0.5rem;
  
  max-height: 300px;
  overflow-y: auto;
  z-index: 5;

  div {
    transition: background-color var(--transition-speed) ease-in-out;
  }
}

.select-hide {
  display: none;
}

.select-items div:hover,
.same-as-selected {
  background-color: var(--background-darkest);
}

/* Cards */
.card {
  container-type: inline-size;
  container-name: card;
  position: relative;
  color: var(--text-color-primary);
  background-color: var(--background-dark);
  border-radius: 15px;
  border: var(--line-color) 1px solid;
  padding: 0;
  min-height: 170px;
  width: 100%;
  min-width: 0;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 0 5px var(--background-darker);
}

.card:first-child {
  margin-top: 0.3rem;
}

.row:not(:first-child) .card {
  margin-top: 0;
}

.card-fill {
  height: 100%;
}

.card .card-header {
  display: flex;
  gap: 0.25rem;
  justify-content: space-between;
  align-items: center;
  font-size: var(--font-size-large);
  font-weight: var(--font-weight-bold);
  font-family: var(--font-family-sans-expanded);
  padding: 1.5rem 1.75rem 0 1.75rem;
  user-select: none;
  transition: color var(--transition-speed) ease-in-out;
}

.card .card-header .header-title {
  color: inherit;
  font-size: inherit;
  font-weight: var(--font-weight-semibold);
}

.card .card-subheader {
  display: flex;
  position: relative;
  gap: 1rem;
  justify-content: space-between;
  align-items: end;
  color: var(--text-color-secondary);
  border-bottom: var(--line-color) 1px solid;
  margin: 0 1.75rem 0 1.75rem;
  padding: 0 calc(1rem + 100px) 1rem 0;
  font-size: var(--font-size-small);
  user-select: none;
}

.card .card-subheader::after {
  content: "";
  position: absolute;
  bottom: 0px;
  border-bottom: 1px solid var(--line-color-dark);
  width: 100%;

}

.card-header:not(:has(.radio-inputs-icons))+.card-subheader {
  padding-top: 0.5rem;
}

.card .card-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: left;
  font-size: var(--font-size-normal);
  flex-grow: 1;
  margin: 1rem 1.75rem 1rem 1.75rem;
  width: auto;
  min-height: 10px;
  scrollbar-gutter: stable;
}

.empty-state {
  color: var(--text-color-secondary);
  font-size: var(--font-size-small);
  line-height: 1.5;
  padding: 0.875rem 1rem;
  border: 1px solid var(--line-color);
  border-radius: var(--border-radius-buttons);
  background: var(--background-darker);
}

.card-body.flex-row {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
}

.card .card-footer {
  position: relative;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: start;
  gap: 0.5rem;
  font-size: var(--font-size-small);
  background-color: var(--background-darker);
  padding: 1.5rem 1.75rem 1.5rem 1.75rem;
  border-radius: 0 0 15px 15px;
  border-top: 1px solid var(--line-color);
}

.card .card-footer.card-footer-with-progress {
  align-items: stretch;
  flex-direction: column;
}

.card-footer-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  min-width: 0;
  width: 100%;
}

.card-footer-actions > :first-child {
  flex: 1 1 16rem;
}

.card-footer-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-left: auto;
}

.card-footer-progress {
  width: 100%;
}

.card-footer-progress:empty {
  display: none;
}

.card-footer-progress .segm-progress-text {
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: pre-wrap;
}

.card>.card-footer> :first-child {
  flex-grow: 1;
  text-wrap: wrap;
}

.card>.card-footer>span {
  font-size: var(--font-size-small);
  color: var(--text-color-secondary);
  padding-right: 1rem;
}

@media (max-width: 768px) {
  .card .card-header,
  .card .card-subheader,
  .card .card-footer {
    min-width: 0;
  }

  .card .card-header,
  .card .card-subheader {
    flex-wrap: wrap;
  }

  .card .card-header {
    padding: 1.25rem 1.25rem 0;
  }

  .card .card-subheader {
    align-items: flex-start;
    gap: 0.5rem;
    margin-inline: 1.25rem;
    padding-right: 0;
  }

  .card .card-body {
    margin: 1rem 1.25rem;
    min-width: 0;
  }

  .card-body.flex-row > * {
    min-width: 0;
    max-width: 100%;
  }

  .card .card-footer {
    flex-direction: column;
    align-items: stretch;
    padding: 1.25rem;
  }

  .card > .card-footer > span {
    padding-right: 0;
  }

  .card-footer-actions,
  .card-footer-buttons {
    width: 100%;
  }

  .card-footer-buttons {
    justify-content: flex-end;
    margin-left: 0;
  }
}

@media (max-width: 576px) {
  .card .card-header,
  .card .card-subheader {
    flex-direction: column;
    align-items: stretch;
  }

  .card .card-header {
    padding: 1rem 1rem 0;
  }

  .card .card-subheader {
    margin-inline: 1rem;
  }

  .card .card-body {
    margin: 1rem;
  }

  .card-body.flex-row {
    flex-direction: column;
  }

  .card-body.flex-row > *,
  .card-footer-actions > *,
  .card-footer-buttons > * {
    width: 100%;
    max-width: 100%;
  }

  .card .card-footer {
    padding: 1rem;
  }

  .card-footer-buttons {
    flex-direction: column;
  }
}

.card-footer section {
  color: var(--text-color-secondary);
}

.units {
  font-size: inherit;
  font-size: var(--font-size-small);
  color: var(--text-color-secondary);
  flex-grow: 1;
}

.version {
	color: var(--text-color-secondary);
	font-size: var(--font-size-small);
	font-weight: var(--font-weight-light);
}

/* Background colors */
.bg-dark {
	background: var(--background-dark) !important;
}

/* Text colors */
.text-primary {
  color: var(--text-color-primary) !important;
}

.text-emphasis {
	color: var(--text-color-primary);
	font-family: var(--font-family-sans-expanded);
	font-weight: var(--font-weight-bold);
	font-size: var(--font-size-large);
}

.text-primary-regular {
  color: var(--primary) !important;
}

.text-primary-light {
  color: var(--primary-hover) !important;
}

.text-secondary {
  color: var(--text-color-secondary) !important;
}

.text-success {
  color: var(--success) !important;
}

.text-danger {
  color: var(--danger) !important;
}

.text-warning {
  color: var(--warning) !important;
}

.text-info {
  color: var(--info) !important;
}

/* Text sizes */
.text-xsmall {
  font-size: var(--font-size-xsmall);
}

.text-small {
  font-size: var(--font-size-small);
}

.text-normal {
  font-size: var(--font-size-normal);
}

.text-large {
  font-size: var(--font-size-large);
}

.text-xlarge {
  font-size: var(--font-size-xlarge);
}

.text-align-center {
  text-align: center;
}

.text-align-right {
  text-align: right;
}

.text-align-left {
  text-align: left;
}

.text-align-justify {
  text-align: justify;
}

/* Fade-in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade-in class */
.fade-in {
  animation: fadeIn var(--transition-speed) ease-in-out;
}

/* Notification dot */
.dot {
  position: relative;

  &::after {
    content: "";
    position: absolute;

    /* bottom: var(--notif-bottom, 33%); */
    /* left: var(--notif-left, -12px); */
    bottom: 1.4rem;
    left: 0.2rem;
    width: var(--notif-width, 5px);
    height: var(--notif-height, 5px);

    border-radius: var(--border-radius, 50%);
    background-color: var(--notif-background-color, var(--primary));
    box-shadow: var(--notif-box-shadow, 0 0 5px 1px var(--primary));
  }
}

/* Buttons */
.btn {
  padding: 0.35em 1.2em;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
  height: 2.8em;

  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color-primary);
  background-color: var(--background-darker);
  font-family: var(--font-family-sans-expanded);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-semibold);
  border: 1px solid var(--line-color);
  border-radius: 8px;
  min-width: fit-content;
  transition: all 150ms ease-in-out;
  outline: none;
  cursor: pointer;
}

.btn.btn-short {
	height: auto;
	padding: .25rem .5rem;
	border-radius: 7px;
}

.btn span {
  font: inherit;
}


.btn:has(.btn-icon) {
  padding: 0.35em;
  padding-left: 3.2em;
  padding-right: 1.2em;
}

.btn .btn-icon {
  background: var(--background-dark);
  margin-right: 1em;
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.2em;
  width: 2.2em;
  border-radius: 5px;
  left: 0.25em;
  transition: all var(--transition-speed) ease;
  pointer-events: none;
}

.btn .btn-icon .btn-svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  transition: stroke ease var(--transition-speed);
}

.btn:hover .btn-icon {
  width: calc(100% - 0.5em);
}

.btn:active .btn-svg {
  stroke: var(--background-darkest);
}

.btn:disabled,
.btn:disabled:hover,
.btn:disabled:focus,
.btn:disabled:active {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}

.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.btn-tiny {
  font-size: var(--font-size-xsmall);
  font-weight: var(--font-weight-regular);
  padding: 0.4rem;
  width: 32px;
  height: 32px;
}

.btn-group-small {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
}

@media (max-width: 576px) {
  #section-model-inputs > .section-header {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.75rem;
  }

  #section-model-inputs > .section-header #save-load-parameters-buttons {
    width: 100%;
    justify-content: flex-start;
  }
}

#sidebar.sidebar-minimized .btn-group-small {
  flex-direction: column-reverse;
}

#sidebar.sidebar-minimized .reduced-gap {
  gap: 0;
}

.btn-small {
  position: relative;
  display: flex;
  justify-content: center;
  color: var(--text-color-primary);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-regular);
  width: 36px;
  height: 36px;
  padding: 0.42rem;
  transition: all var(--transition-speed) ease-in-out;
  outline: none;
  cursor: pointer;
  background-color: var(--background-dark);
  border-radius: 8px;
  border: none;
  border: var(--line-color) 1px solid;
}

.actions-btn {
	width: 24px;
	height: 24px;
	min-width: 24px;
  width: 42px;
	padding: 0.25rem;
	border-radius: 28px;
	box-sizing: border-box;
}

svg.stroke {
  stroke-width: 1.5px;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke: var(--text-color-primary);
  fill: none;
}

svg.fill {
  stroke: none;
  fill: var(--text-color-primary);
}

.btn-small:hover {
  background-color: var(--background-darker);
}

.btn-small:active {
  background-color: var(--background-darkest);
}

.btn-small:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn-small:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.btn-small:disabled:hover {
  background-color: unset;
  scale: 1;
  cursor: unset;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-contrast-text);
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-primary:active {
  background: var(--primary-dark);
}

.btn-primary .btn-icon {
  background: var(--primary-dark);
}

.btn:active.btn-primary .btn-svg {
  stroke: var(--primary);
}

.btn:has(.btn-icon).btn-primary:active {
  background: var(--primary);
}

.btn-secondary {
  background: var(--secondary);
}

.btn-secondary:hover {
  background: var(--secondary-hover);
}

.btn-secondary:active {
  background: var(--secondary-dark);
}

.btn:has(.btn-icon).btn-secondary:active {
  background: var(--secondary);
}

.btn-secondary .btn-icon {
  background: var(--secondary-dark);
}

.btn:active.btn-secondary .btn-svg {
  stroke: var(--secondary);
}

.btn-success {
  background: var(--success);
  color: var(--success-contrast-text);
}

.btn-success:hover {
  background: var(--success-hover);
}

.btn-success:active {
  background: var(--success-dark);
}

.btn:has(.btn-icon).btn-success:active {
  background: var(--success);
}

.btn-success .btn-icon {
  background: var(--success-dark);
}

.btn:active.btn-success .btn-svg {
  stroke: var(--success);
}

.btn-warning {
  background: var(--warning);
  color: var(--warning-contrast-text);
}

.btn-warning:hover {
  background: var(--warning-hover);
}

.btn-warning:active {
  background: var(--warning-dark);
}

.btn:has(.btn-icon).btn-warning:active {
  background: var(--warning);
}

.btn-warning .btn-icon {
  background: var(--warning-dark);
}

.btn:active.btn-warning .btn-svg {
  stroke: var(--warning);
}

.btn-danger {
  background: var(--danger);
  color: var(--danger-contrast-text);
}

.btn-danger:hover {
  background: var(--danger-hover);
}

.btn-danger:active {
  background: var(--danger-dark);
}

.btn:has(.btn-icon).btn-danger:active {
  background: var(--danger);
}

.btn-danger .btn-icon {
  background: var(--danger-dark);
}

.btn:active.btn-danger .btn-svg {
  stroke: var(--danger);
}

.btn-info {
  background: var(--info);
  color: var(--info-contrast-text);
}

.btn-info:hover {
  background: var(--info-hover);
}

.btn-info:active {
  background: var(--info-dark);
}

.btn:has(.btn-icon).btn-info:active {
  background: var(--info);
}

.btn-info .btn-icon {
  background: var(--info-dark);
}

.btn:active.btn-info .btn-svg {
  stroke: var(--info);
}

.step-delete-undo-toast {
	position: absolute;
	left: 50%;
	top: 40px;
	transform: translate(-50%, 10px);
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.65rem 0.85rem;
	border-radius: 10px;
	border: 1px solid var(--line-color);
	background: var(--background-transparent);
	color: var(--text-color-primary);
	
	backdrop-filter: blur(8px);
	opacity: 0;
	pointer-events: none;
	transition: opacity 150ms ease, transform 150ms ease;
	z-index: 1200;
}

.step-delete-undo-toast.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.step-delete-undo-text {
  font-size: var(--font-size-small);
}

.step-delete-undo-btn {
  min-width: 54px;
  padding: 0.4rem 0.65rem;
}

@media (max-width: 768px) {
  .step-delete-undo-toast {
    width: calc(100% - 24px);
    left: 12px;
    right: 12px;
    transform: translate(0, 10px);
  }

  .step-delete-undo-toast.is-visible {
    transform: translate(0, 0);
  }
}


/* Progress bars */
progress[value] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border: none;
  width: 100%;
  height: 12px;

  border-radius: 10em;
  background: var(--background-darker);
  

  overflow: visible;
}

progress[value]::-webkit-progress-bar {
  transform: translate(1px, 1px);
  height: 10px;
  border-radius: 10em;
  background: none;
}

progress[value]::-webkit-progress-value {
  height: 10px;
  border-radius: 10em;
  background: var(--text-color-primary);
  /* box-shadow: inset 0 0 2px 0 var(--background-darker); */

  /* glow */
  box-shadow:
    0 0 2px 2px var(--text-color-secondary) inset,
    0 0 14px 0 var(--text-color-secondary);
}

progress[value]::-moz-progress-bar {
  transform: translate(1px, 1px);
  height: 10px;
  border-radius: 10em;
  background: var(--text-color-primary);
  /* box-shadow: inset 0 0 2px 0px var(--background-darkest); */

  /* glow */
  box-shadow:
    0 0 2px 2px var(--text-color-secondary) inset,
    0 0 14px 0 var(--text-color-secondary);
}

/* Progress primary */
progress[value].progress-primary::-webkit-progress-value {
  background: var(--primary);
  /* glow */
  box-shadow:
    0 0 2px 2px var(--primary-hover) inset,
    0 0 14px 0 var(--primary);
}

progress[value].progress-primary::-moz-progress-bar {
  background: var(--primary);
  /* glow */
  box-shadow:
    0 0 2px 2px var(--primary-hover) inset,
    0 0 14px 0 var(--primary);
}

/* Progress success */
progress[value].progress-success::-webkit-progress-value {
  background: var(--success);
  /* glow */
  box-shadow:
    0 0 2px 2px var(--success-hover) inset,
    0 0 14px 0 var(--success);
}

progress[value].progress-success::-moz-progress-bar {
  background: var(--success);
  /* glow */
  box-shadow:
    0 0 2px 2px var(--success-hover) inset,
    0 0 14px 0 var(--success);
}

/* Progress warning */
progress[value].progress-warning::-webkit-progress-value {
  background: var(--warning);
  /* glow */
  box-shadow:
    0 0 2px 2px var(--warning-hover) inset,
    0 0 14px 0 var(--warning);
}

progress[value].progress-warning::-moz-progress-bar {
  background: var(--warning);
  /* glow */
  box-shadow:
    0 0 2px 2px var(--warning-hover) inset,
    0 0 14px 0 var(--warning);
}

/* Progress danger */
progress[value].progress-danger::-webkit-progress-value {
  background: var(--danger);
  /* glow */
  box-shadow:
    0 0 2px 2px var(--danger-hover) inset,
    0 0 14px 0 var(--danger);
}

progress[value].progress-danger::-moz-progress-bar {
  background: var(--danger);
  /* glow */
  box-shadow:
    0 0 2px 2px var(--danger-hover) inset,
    0 0 14px 0 var(--danger);
}

/* Progress info */
progress[value].progress-info::-webkit-progress-value {
  background: var(--info);
  /* glow */
  box-shadow:
    0 0 2px 2px var(--info-hover) inset,
    0 0 14px 0 var(--info);
}

progress[value].progress-info::-moz-progress-bar {
  background: var(--info);
  /* glow */
  box-shadow:
    0 0 2px 2px var(--info-hover) inset,
    0 0 14px 0 var(--info);
}

label:has(+ progress[value]) {
  margin-top: 1rem;
  padding-bottom: 5px;
  color: var(--text-color-secondary);
}

progress {
  --color-var-prog: var(--text-color-primary);
  --color-var-prog-inner: var(--text-color-secondary);
}

progress.pulse[value] {

  &::-moz-progress-bar,
  &::-webkit-progress-value {
    animation: progress-animation 1.2s infinite ease-in-out;
  }
}

.progress-primary {
  --color-var-prog: var(--primary);
  --color-var-prog-inner: var(--primary-hover);
}

.progress-success {
  --color-var-prog: var(--success);
  --color-var-prog-inner: var(--success-hover);
}

.progress-warning {
  --color-var-prog: var(--warning);
  --color-var-prog-inner: var(--warning-hover);
}

.progress-danger {
  --color-var-prog: var(--danger);
  --color-var-prog-inner: var(--danger-hover);
}

.progress-info {
  --color-var-prog: var(--info);
  --color-var-prog-inner: var(--info-hover);
}

@keyframes progress-animation {
  50% {
    box-shadow:
      0 0 2px 2px var(--color-var-prog-inner) inset,
      0 0 0px 0 var(--color-var-prog);
  }
}

.h-100 {
  height: 100%;
}

.row,
.row-fluid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  padding: 0;
  width: 100%;
}

.row {
  margin: 0;
}

.span-1 {
  grid-column-end: span 1
}

.span-2 {
  grid-column-end: span 2
}

.span-3 {
  grid-column-end: span 3
}

.span-4 {
  grid-column-end: span 4
}

.span-5 {
  grid-column-end: span 5
}

.span-6 {
  grid-column-end: span 6
}

.offset-0 {
  grid-column-start: 1
}

.offset-1 {
  grid-column-start: 2
}

.offset-2 {
  grid-column-start: 3
}

.offset-3 {
  grid-column-start: 4
}

.offset-4 {
  grid-column-start: 5
}

.offset-5 {
  grid-column-start: 6
}

@media (max-width:1360px) {

  .xl-span-1 {
    grid-column-end: span 1
  }

  .xl-span-2 {
    grid-column-end: span 2
  }

  .xl-span-3 {
    grid-column-end: span 3
  }

  .xl-span-4 {
    grid-column-end: span 4
  }

  .xl-span-5 {
    grid-column-end: span 5
  }

  .xl-span-6 {
    grid-column-end: span 6
  }

  .xl-span-7 {
    grid-column-end: span 7
  }

  .xl-span-8 {
    grid-column-end: span 8
  }

  .xl-span-9 {
    grid-column-end: span 9
  }

  .xl-span-10 {
    grid-column-end: span 10
  }

  .xl-span-11 {
    grid-column-end: span 11
  }

  .xl-span-12 {
    grid-column-end: span 12
  }

  .xl-offset-0 {
    grid-column-start: 1
  }

  .xl-offset-1 {
    grid-column-start: 2
  }

  .xl-offset-2 {
    grid-column-start: 3
  }

  .xl-offset-3 {
    grid-column-start: 4
  }

  .xl-offset-4 {
    grid-column-start: 5
  }

  .xl-offset-5 {
    grid-column-start: 6
  }

  .xl-offset-6 {
    grid-column-start: 7
  }

  .xl-offset-7 {
    grid-column-start: 8
  }

  .xl-offset-8 {
    grid-column-start: 9
  }

  .xl-offset-9 {
    grid-column-start: 10
  }

  .xl-offset-10 {
    grid-column-start: 11
  }

  .xl-offset-11 {
    grid-column-start: 12
  }

  .xl-offset-12 {
    grid-column-start: 13
  }
}

@media (max-width:992px) {
  .lg-span-1 {
    grid-column-end: span 1
  }

  .lg-span-2 {
    grid-column-end: span 2
  }

  .lg-span-3 {
    grid-column-end: span 3
  }

  .lg-span-4 {
    grid-column-end: span 4
  }

  .lg-span-5 {
    grid-column-end: span 5
  }

  .lg-span-6 {
    grid-column-end: span 6
  }

  .lg-span-7 {
    grid-column-end: span 7
  }

  .lg-span-8 {
    grid-column-end: span 8
  }

  .lg-span-9 {
    grid-column-end: span 9
  }

  .lg-span-10 {
    grid-column-end: span 10
  }

  .lg-span-11 {
    grid-column-end: span 11
  }

  .lg-span-12 {
    grid-column-end: span 12
  }

  .lg-offset-0 {
    grid-column-start: 1
  }

  .lg-offset-1 {
    grid-column-start: 2
  }

  .lg-offset-2 {
    grid-column-start: 3
  }

  .lg-offset-3 {
    grid-column-start: 4
  }

  .lg-offset-4 {
    grid-column-start: 5
  }

  .lg-offset-5 {
    grid-column-start: 6
  }

  .lg-offset-6 {
    grid-column-start: 7
  }

  .lg-offset-7 {
    grid-column-start: 8
  }

  .lg-offset-8 {
    grid-column-start: 9
  }

  .lg-offset-9 {
    grid-column-start: 10
  }

  .lg-offset-10 {
    grid-column-start: 11
  }

  .lg-offset-11 {
    grid-column-start: 12
  }

  .lg-offset-12 {
    grid-column-start: 13
  }
}

@media (max-width:900px) {
  .md-span-1 {
    grid-column-end: span 1
  }

  .md-span-2 {
    grid-column-end: span 2
  }

  .md-span-3 {
    grid-column-end: span 3
  }

  .md-span-4 {
    grid-column-end: span 4
  }

  .md-span-5 {
    grid-column-end: span 5
  }

  .md-span-6 {
    grid-column-end: span 6
  }

  .md-span-7 {
    grid-column-end: span 7
  }

  .md-span-8 {
    grid-column-end: span 8
  }

  .md-span-9 {
    grid-column-end: span 9
  }

  .md-span-10 {
    grid-column-end: span 10
  }

  .md-span-11 {
    grid-column-end: span 11
  }

  .md-span-12 {
    grid-column-end: span 12
  }

  .md-offset-0 {
    grid-column-start: 1
  }

  .md-offset-1 {
    grid-column-start: 2
  }

  .md-offset-2 {
    grid-column-start: 3
  }

  .md-offset-3 {
    grid-column-start: 4
  }

  .md-offset-4 {
    grid-column-start: 5
  }

  .md-offset-5 {
    grid-column-start: 6
  }

  .md-offset-6 {
    grid-column-start: 7
  }

  .md-offset-7 {
    grid-column-start: 8
  }

  .md-offset-8 {
    grid-column-start: 9
  }

  .md-offset-9 {
    grid-column-start: 10
  }

  .md-offset-10 {
    grid-column-start: 11
  }

  .md-offset-11 {
    grid-column-start: 12
  }

  .md-offset-12 {
    grid-column-start: 13
  }
}

@media (max-width:576px) {
  .sm-span-1 {
    grid-column-end: span 1
  }

  .sm-span-2 {
    grid-column-end: span 2
  }

  .sm-span-3 {
    grid-column-end: span 3
  }

  .sm-span-4 {
    grid-column-end: span 4
  }

  .sm-span-5 {
    grid-column-end: span 5
  }

  .sm-span-6 {
    grid-column-end: span 6
  }

  .sm-span-7 {
    grid-column-end: span 7
  }

  .sm-span-8 {
    grid-column-end: span 8
  }

  .sm-span-9 {
    grid-column-end: span 9
  }

  .sm-span-10 {
    grid-column-end: span 10
  }

  .sm-span-11 {
    grid-column-end: span 11
  }

  .sm-span-12 {
    grid-column-end: span 12
  }

  .sm-offset-0 {
    grid-column-start: 1
  }

  .sm-offset-1 {
    grid-column-start: 2
  }

  .sm-offset-2 {
    grid-column-start: 3
  }

  .sm-offset-3 {
    grid-column-start: 4
  }

  .sm-offset-4 {
    grid-column-start: 5
  }

  .sm-offset-5 {
    grid-column-start: 6
  }

  .sm-offset-6 {
    grid-column-start: 7
  }

  .sm-offset-7 {
    grid-column-start: 8
  }

  .sm-offset-8 {
    grid-column-start: 9
  }

  .sm-offset-9 {
    grid-column-start: 10
  }

  .sm-offset-10 {
    grid-column-start: 11
  }

  .sm-offset-11 {
    grid-column-start: 12
  }

  .sm-offset-12 {
    grid-column-start: 13
  }
}

@media (max-width:380px) {
  [class*=span-] {
    grid-column-end: span 12
  }

  [class*=offset-] {
    grid-column-start: 1
  }
}

.collapsible-container {
  font-size: inherit;
  padding-top: 0.5rem
}

.collapsible {
  display: flex;
  flex-direction: row;
  align-items: start;
  justify-content: start;
  gap: 0.25rem;
  background-color: transparent;
  color: var(--text-color-secondary);
  cursor: pointer;
  padding: 0;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  font-size: inherit;
  transition: color var(--transition-speed) ease-in-out;
}

.collapsible:focus-visible {
  color: var(--text-color-primary);
}

/* Add a background color to the button if it is clicked on (add the .active class with JS), and when you move the mouse over it (hover) */
.collapsible-active,
.collapsible:hover {
  color: var(--text-color-primary);
}

.collapsible svg {
  fill: var(--text-color-secondary);
  transition: rotate var(--transition-speed) ease-in-out, fill var(--transition-speed) ease-in-out;
}

.collapsible:active svg,
.collapsible:hover>svg,
.collapsible-active>svg {
  fill: var(--text-color-primary);
}

.collapsible-active>svg {
  rotate: 180deg;
}
.collapsible-content {
  padding-top: 0;
  background-color: inherit;
  font-size: inherit;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease-out;
}

.quick-tips-body {
  color: var(--text-color-secondary);
}

h1 {
  font-size: var(--font-size-xxlarge);
  font-weight: var(--font-weight-bold);
	font-variation-settings: "wdth" 115;
  font-family: var(--font-family-sans-expanded);
}

h2 {
  font-size: var(--font-size-xlarge);
  font-weight: var(--font-weight-semibold);
}

h3 {
  font-size: var(--font-size-large);
  font-weight: var(--font-weight-semibold);
}

h4 {
  font-size: var(--font-size-medium);
  font-weight: var(--font-weight-semibold);
  font-family: var(--font-family-sans-expanded);
  margin-top: .5rem;
}

h5 {
  font-size: var(--font-size-medium);
  font-weight: var(--font-weight-semibold);
}

h6 {
  font-size: var(--font-size-normal);
  font-weight: var(--font-weight-semibold);
}

canvas.canvas-gauge {
  min-width: 175px;
  max-width: 175px;
  min-height: 100px;
  max-height: 100px;
  padding: 0;
  margin-bottom: 0.75rem;
}

.m-0 {
  margin: 0rem !important;
}

.m-1 {
  margin: 1rem !important;
}

.m-2 {
  margin: 2rem !important;
}

.m-3 {
  margin: 3rem !important;
}

.m-4 {
  margin: 4rem !important;
}

.m-5 {
  margin: 5rem !important;
}

.mb-0 {
  margin-bottom: 0rem !important;
}

.mb-1 {
  margin-bottom: 1rem !important;
}

.mb-15 {
  margin-bottom: 1.5rem !important;
}

.mb-2 {
  margin-bottom: 2rem !important;
}

.mb-3 {
  margin-bottom: 3rem !important;
}

.mb-4 {
  margin-bottom: 4rem !important;
}

.mb-5 {
  margin-bottom: 5rem !important;
}

.mb-05 {
  margin-bottom: 0.5rem !important;
}

.mt-0 {
  margin-top: 0rem !important;
}

.mt-1-5 {
  margin-top: 1.5rem !important;
}

.mt-1 {
  margin-top: 1rem !important;
}

.mt-2 {
  margin-top: 2rem !important;
}

.mt-3 {
  margin-top: 3rem !important;
}

.mt-4 {
  margin-top: 4rem !important;
}

.mt-5 {
  margin-top: 5rem !important;
}

.mt-05 {
  margin-top: 0.5rem !important;
}

.ml-3 {
  margin-left: 3rem !important;
}

.ml-auto {
  margin-left: auto !important;
}

.mr-0 {
  margin-right: 0rem !important;
}

.mx-0 {
  margin-left: 0rem !important;
  margin-right: 0rem !important;
}
.mx-1 {
  margin-left: 1rem !important;
  margin-right: 1rem !important;
}
.mx-1-75 {
  margin-left: 1.75rem !important;
  margin-right: 1.75rem !important;
}
.mx-2 {
  margin-left: 2rem !important;
  margin-right: 2rem !important;
}
.mx-3 {
  margin-left: 3rem !important;
  margin-right: 3rem !important;
}
.mx-4 {
  margin-left: 4rem !important;
  margin-right: 4rem !important;
}
.mx-5 {
  margin-left: 5rem !important;
  margin-right: 5rem !important;
}

.px-0 {
  padding-left: 0rem !important;
  padding-right: 0rem !important;
}
.px-1 {
  padding-left: 1rem;
  padding-right: 1rem;
}
.px-1-75 {
  padding-inline: 1.75rem !important;
}
.px-2 {
  padding-left: 2rem;
  padding-right: 2rem;
}
.px-3 {
  padding-left: 3rem;
  padding-right: 3rem;
}
.px-4 {
  padding-left: 4rem;
  padding-right: 4rem;
}
.px-5 {
  padding-left: 5rem;
  padding-right: 5rem;
}

.p-0 {
  padding: 0rem !important;
}

.p-0-15 {
  padding: 0.15rem !important;
}

.p-0-25 {
  padding: 0.25rem !important;
}

.p-0-35 {
  padding: 0.35rem !important;
}

.p-1 {
  padding: 1rem !important;
}

.p-2 {
  padding: 2rem !important;
}

.p-3 {
  padding: 3rem !important;
}

.p-4 {
  padding: 4rem !important;
}

.p-5 {
  padding: 5rem !important;
}

.pr-0 {
  padding-right: 0rem !important;
}

.pr-1 {
  padding-right: 1rem !important;
}

.pr-2 {
  padding-right: 2rem !important;
}

.pr-3 {
  padding-right: 3rem !important;
}

.pr-4 {
  padding-right: 4rem !important;
}

.pr-5 {
  padding-right: 5rem !important;
}

.pt-0 {
  padding-top: 0 !important;
}

.pt-0-5 {
  padding-top: 0.5rem !important;
}

.pt-0-75 {
  padding-top: 0.75rem !important;
}

.pt-1 {
  padding-top: 1rem !important;
}

.pb-1 {
  padding-bottom: 1rem !important;
}

.katex-display {
  text-align: left !important;
}

.katex * {
  font-family: inherit;
  font-weight: inherit;
  font-variation-settings: normal;
}
.st0 {
  fill-opacity: .3;
}
.st0,
.st1,
.st2 {
  fill: var(--text-color-secondary);
}

.st0,
.st2 {
  fill: var(--primary);
}

.st2 {
  fill-opacity: .6;
}
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--background-darker);
}

::-webkit-scrollbar-thumb {
  background: var(--background-darkest);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-hover);
  border: 0;
}
::-webkit-scrollbar-thumb:active {
  background: var(--primary-dark);
}
::-webkit-scrollbar-corner {
  background-color: var(--background-darker);
}
.floating-tooltip {
  background: var(--background-darker);
  color: var(--text-color-primary);
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  border: 1px solid var(--line-color);
  font-size: var(--font-size-small);
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
}

.tooltip-info {
  border-left: 5px solid var(--info);
}

.tooltip-warning {
  border-left: 5px solid var(--warning);
}

.tooltip-warning::before {
  content: "!";
  margin-right: 0.75rem;
  color: var(--warning);
  font-weight: var(--font-weight-semibold);
}

.tooltip-danger,
.tooltip-error {
  border-left: 5px solid var(--danger);
}

.tooltip-danger::before,
.tooltip-error::before {
  content: "✕";
  margin-right: 0.75rem;
  color: var(--danger);
  font-weight: var(--font-weight-semibold);
}


/* Driver.js tours and feature hints */
.driver-popover.temere-driver-popover,
.driver-popover.temere-driver-hint-popover {
  min-width: 320px;
  max-width: min(400px, calc(100vw - 2rem));
  padding: 0;
  color: var(--text-color-primary);
  font-family: inherit;
  font-size: var(--font-size-normal);
  background: var(--background-dark);
  border: 1px solid var(--line-color);
  border-radius: 12px;
  
}

.driver-popover.temere-driver-popover .driver-popover-title,
.driver-popover.temere-driver-hint-popover .driver-popover-title {
  padding: 0.85rem 3rem 0 1rem;
  color: var(--text-color-primary);
  font: inherit;
  font-size: var(--font-size-medium);
  font-weight: var(--font-weight-semibold);
  background: none;
  border-radius: 13px 13px 0 0;
}

.driver-popover.temere-driver-popover .driver-popover-description,
.driver-popover.temere-driver-hint-popover .driver-popover-description {
  padding: 0.75rem 1rem 1rem;
  color: var(--text-color-secondary);
  line-height: 1.5;
}

.driver-popover.temere-driver-popover .driver-popover-footer,
.driver-popover.temere-driver-hint-popover .driver-popover-footer {
  gap: 0.5rem;
  /* padding: 0 1rem 1rem; */
  height: unset;
  border-width: 1px 0 0 0;
  border-radius: 0 0 13px 13px;
  margin: 0;
}

.driver-popover.temere-driver-popover button,
.driver-popover.temere-driver-hint-popover button {
  min-height: 30px;
  padding: 0.35rem 0.75rem;
  color: var(--text-color-primary);
  font: inherit;
  font-weight: var(--font-weight-semibold);
  font-family: var(--font-family-sans-expanded);
  text-shadow: none;
  background: var(--background-lighter);
  border: 1px solid var(--line-color);
  border-radius: 5px;
}

.driver-popover.temere-driver-popover button:hover,
.driver-popover.temere-driver-hint-popover button:hover {
  color: var(--text-color-primary);
  background: var(--background-lightest);
}

.driver-popover.temere-driver-popover .driver-popover-next-btn,
.driver-popover.temere-driver-hint-popover .driver-hint-button {
  color: var(--button-text-color, #fff);
  background: var(--primary);
  border-color: var(--primary);
}

.driver-popover.temere-driver-popover .driver-popover-progress-text {
  color: var(--text-color-secondary);
}

.driver-popover.temere-driver-popover .driver-popover-close-btn,
.driver-popover.temere-driver-hint-popover .driver-popover-close-btn {
  top: 0.55rem;
  right: 0.55rem;
  width: 28px;
  min-height: 28px;
  padding: 0;
  color: var(--text-color-secondary);
  background: transparent;
  border: 0;
  z-index: 3;
}

.driver-hint {
  --driver-hint-color: var(--primary);
  --driver-hint-size: 24px;
}

.driver-hint-pulse {
  animation: driver-hint-pulse 1.2s ease infinite;
}

@keyframes driver-hint-pulse {
  70% {
    transform: scale(2);
    opacity: 0;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

.driver-popover-arrow {
  border-color: var(--background-dark);
  border-width: 7px;
}
.driver-popover-arrow-side-right {
	border-top-color: #0000;
	border-bottom-color: #0000;
	border-left-color: #0000;
	right: 100%;
}
.driver-popover-arrow-side-left {
	border-top-color: #0000;
	border-bottom-color: #0000;
	border-right-color: #0000;
	right: 100%;
}
.driver-popover-arrow-side-top {
	border-right-color: #0000;
	border-bottom-color: #0000;
	border-left-color: #0000;
	right: 100%;
}
.driver-popover-arrow-side-bottom {
	border-right-color: #0000;
	border-top-color: #0000;
	border-left-color: #0000;
	right: 100%;
}

@media (max-width: 600px) {
  .driver-popover.temere-driver-popover,
  .driver-popover.temere-driver-hint-popover {
    min-width: min(300px, calc(100vw - 2rem));
  }
}

.temere-popup {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: 1fr auto;
  gap: 0.5rem 0;
  grid-template-areas:
    "popupTitle popupMessage"
    "buttons buttons";


  min-width: 320px;
  max-width: 90vw;
  background: var(--background-darker);
  color: var(--text-color-primary);
  font-weight: var(--font-weight-semibold);
  border-radius: 7px;
  border: 1px solid var(--line-color);
  padding: 20px 24px 16px 24px;
  font-size: var(--font-size-normal);
  display: none;
  z-index: 9999;
}

body:has(.temere-popup.warning.show-popup)::after,
body:has(.temere-popup.error.show-popup)::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 1;
  z-index: 9998;
}

body:has(.temere-popup.temere-popup-inline.warning.show-popup)::after,
body:has(.temere-popup.temere-popup-inline.error.show-popup)::after,
body:has(.temere-popup.temere-popup-transient.warning.show-popup)::after,
body:has(.temere-popup.temere-popup-transient.error.show-popup)::after {
  content: none;
}

.temere-popup::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.1;
  background-color: transparent;
  transform-origin: left;
  pointer-events: none;
}

@keyframes slowly-scaleX-down {
  0% {
    transform: scaleX(1);

  }

  100% {
    transform: scaleX(0);
  }
}

.temere-popup:not(:has(.temere-popup-btn-row)) {
  grid-template-rows: auto;
  grid-template-areas:
    "popupTitle popupMessage";
}

.temere-popup.show-popup {
  display: grid;
  position: fixed;
  top: -250px;
  left: 50%;
  transform: translate(-50%, 300px);
  z-index: 9999;
}

.temere-popup.success {
  border-left: 7px solid var(--success);

  &::after {
    background-color: var(--success);
    animation: slowly-scaleX-down var(--temere-popup-timer-duration, 2.5s) forwards linear;
    animation-play-state: var(--temere-popup-timer-play-state, running);
  }

  .temere-popup-title {
    color: var(--success-dark);
  }
}

.temere-popup.warning {
  border-left: 7px solid var(--warning);

  .temere-popup-title {
    color: var(--warning-dark);
  }
}

.temere-popup.temere-popup-transient.warning::after {
  background-color: var(--warning);
  animation: slowly-scaleX-down var(--temere-popup-timer-duration, 5s) forwards linear;
  animation-play-state: var(--temere-popup-timer-play-state, running);
}

.temere-popup.temere-popup-transient.danger::after,
.temere-popup.temere-popup-transient.error::after {
  background-color: var(--danger);
  animation: slowly-scaleX-down var(--temere-popup-timer-duration, 5s) forwards linear;
  animation-play-state: var(--temere-popup-timer-play-state, running);
}

.temere-popup.temere-popup-transient.info::after {
  background-color: var(--info);
  animation: slowly-scaleX-down var(--temere-popup-timer-duration, 5s) forwards linear;
  animation-play-state: var(--temere-popup-timer-play-state, running);
}

.temere-popup.info {
  border-left: 7px solid var(--info);

  .temere-popup-title {
    color: var(--info);
  }
}

.temere-popup.error {
  border-left: 7px solid var(--danger);

  .temere-popup-title {
    color: var(--danger);
  }
}

.temere-popup.danger {
  border-left: 7px solid var(--danger);

  .temere-popup-title {
    color: var(--danger);
  }
}

.temere-popup-btn-row {
  grid-area: buttons;
  margin-top: 16px;
  display: flex;
  justify-content: end;
  gap: 12px;
}

.temere-popup-title {
  grid-area: popupTitle;
  font-weight: var(--font-weight-semibold);
  flex-grow: 0;
  margin-right: .5rem;
}

.temere-popup-message {
  grid-area: popupMessage;
  font-weight: var(--font-weight-regular);
  color: var(--text-color-secondary);
  flex-grow: 1;
}

.temere-popup.temere-popup-inline {
  min-width: 0;
  width: calc(100% - 16px);
  max-width: none;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: var(--font-size-small);
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto;
  gap: 0.35rem 0.7rem;
  grid-template-areas: "popupTitle popupMessage buttons";
  pointer-events: auto;
}

.temere-popup.temere-popup-inline.show-popup {
  position: absolute;
  top: auto;
  left: auto;
  right: 8px;
  left: 8px;
  bottom: 12px;
  transform: none;
  z-index: 40;
}

.temere-popup.temere-popup-inline.warning::after {
  background-color: var(--warning);
  animation: slowly-scaleX-down var(--temere-popup-timer-duration, 2.5s)
    forwards linear;
  animation-play-state: var(--temere-popup-timer-play-state, running);
}

.temere-popup.temere-popup-inline.info::after {
  background-color: var(--info);
  animation: slowly-scaleX-down var(--temere-popup-timer-duration, 2.5s)
    forwards linear;
  animation-play-state: var(--temere-popup-timer-play-state, running);
}

.temere-popup.temere-popup-inline .temere-popup-btn-row {
  margin-top: 0;
  gap: 0.45rem;
  align-items: center;
}

.temere-popup.temere-popup-inline .temere-popup-title {
  margin-right: 0;
  white-space: nowrap;
  font-size: var(--font-size-xsmall);
}

.temere-popup.temere-popup-inline .temere-popup-message {
  font-size: var(--font-size-xsmall);
  line-height: 1.2;
}

.temere-popup.temere-popup-inline .btn {
  padding: 0.28rem 0.55rem;
  font-size: var(--font-size-xsmall);
}

.temere-ai-drawer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
  background: transparent;
  transition: background-color 180ms ease;
}

.temere-ai-drawer.is-open {
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.08);
}

.temere-ai-drawer-panel {
  display: flex;
  flex-direction: column;
  width: min(460px, calc(100vw - 1rem));
  height: calc(100vh - 1rem);
  margin: 0.5rem;
  color: var(--text-color-primary);
  background: var(--background-dark);
  border: 1px solid var(--line-color);
  border-radius: 14px;
  transform: translateX(calc(100% + 1rem));
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}

.temere-ai-drawer.is-open .temere-ai-drawer-panel {
  transform: translateX(0);
}

.temere-ai-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--line-color);
}

.temere-ai-drawer-kicker,
.temere-ai-drawer-meta,
.temere-ai-drawer-footer {
  color: var(--text-color-secondary);
  font-size: var(--font-size-xsmall);
}

.temere-ai-drawer-header h2 {
  margin: 0.15rem 0;
  font-family: var(--font-family-sans-expanded);
  font-size: var(--font-size-large);
  font-weight: var(--font-weight-semibold);
}

.temere-ai-drawer-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 1rem;
  overflow-y: auto;
}

.temere-ai-section {
  padding-block: 0.85rem;
  border-bottom: 1px solid var(--line-color);
}

.temere-ai-section:first-child {
  padding-top: 0;
}

.temere-ai-section:last-child {
  border-bottom: 0;
}

.temere-ai-section h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-family-sans-expanded);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-semibold);
}

.temere-ai-section p,
.temere-ai-section li {
  margin: 0;
  color: var(--text-color-secondary);
  font-size: var(--font-size-small);
  line-height: 1.55;
  white-space: pre-line;
}

.temere-ai-section ul {
  margin: 0;
  padding-left: 1rem;
}

.temere-ai-error h3 {
  color: var(--danger-dark);
}

.temere-ai-drawer-footer {
  padding: 0.8rem 1rem;
  border-top: 1px solid var(--line-color);
  background-color: var(--background-darker);
}

@media (max-width: 900px) {
  .temere-popup.temere-popup-inline.show-popup {
    right: 8px;
    left: 8px;
    bottom: 8px;
    max-width: none;
    width: auto;
  }
}

::-moz-selection {
  color: var(--text-color-primary);
  background: var(--primary-disabled);
}

::selection {
  color: var(--text-color-primary);
  background: var(--primary-disabled);
}

.page-error {
  color: var(--danger);
  padding: 1rem;
}

.chart-selection-box {
  position: absolute;
  border-radius: 8px;
  background-color: #8883;
  box-shadow: 0 0 3px 0px var(--text-color-primary);
  pointer-events: none;
  z-index: 10;
}

.chart-tooltip {
  position: absolute;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 4px;
  pointer-events: none;
  z-index: 20;
  white-space: nowrap;
}

.description {

  width: 100%;
  height: 100%;

  background-color: transparent;
  color: var(--text-color-primary);
  font-size: var(--font-size-large);
  font-weight: var(--font-weight-semibold);
  padding: 3rem 0;
}


.fixed-image {
  position: fixed;
  bottom: -15px;
  right: -100px;
  height: 90%;
  aspect-ratio: 1/1;
  filter: hue-rotate(-29deg);
  transform: rotate(-75deg);
  opacity: 0.9;
  z-index: -1;
}

#steps-container {
  position: relative;
  margin-left: 1.25rem;
  display: grid;
  gap: 1rem;
}

.step-card-connectors {
  position: absolute;
  top: 0;
  left: -2.25rem;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.step-card-connectors path {
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke: var(--text-color-secondary);
  stroke-width: 1;
  fill: none;
}

.step-card-connectors circle {
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke: none;
  transition: r var(--transition-speed) ease-in-out;
}

.growth-module-dot {
  fill: var(--primary);
  filter: drop-shadow(0 0 2px var(--primary));
}

.thermal-module-dot {
  fill: var(--danger);
  filter: drop-shadow(0 0 2px var(--danger));
}

.survival-module-dot {
  fill: var(--info);
  filter: drop-shadow(0 0 2px var(--info));
}

.step-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: start;
  width: 100%;
  min-height: 90px;
  max-height: 90px;
  background-color: var(--background-dark);
  border-radius: 16px;
  box-sizing: border-box;
  border: var(--line-color) 1px solid;
  overflow: clip;
  transition: background-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
  user-select: none;
  box-shadow: 0 0 0 5px var(--background-darker);
}

.step-card-actions-btn {
	position: absolute;
	z-index: 1;
	top: 0.45rem;
	right: calc(0.5rem + 40px + 0.55rem);
	width: 24px;
	height: 24px;
	min-width: 24px;
  width: 42px;
	padding: 0.25rem;
	border-radius: 28px;
	box-sizing: border-box;
}

.step-card-actions-btn svg {
  width: 16px;
  height: 16px;
}

.step-card-img {
  position: absolute;
  height: 70px;
  bottom: 0;
  left: -16px;
  transition: opacity var(--transition-speed) ease;
  opacity: 0.25;
  user-select: none;
  pointer-events: none;
  filter: drop-shadow(0 12px 12px var(--background-darkest));
}

.step-card-svg {
  position: absolute;
  left: -16px;
  top: 15px;
  height: 80px;
  transition: opacity var(--transition-speed) ease;
  opacity: 0.3;
}

.step-card-svg.truck {
  height: 80px;
  top: 8px;
  left: -16px;
}

.step-card-svg.car {
  height: 58px;
  top: 30px;
  left: -18px;
}

.step-card .title {
  display: block;
  position: absolute;
  bottom: 30px;
  left: 156px;
  color: var(--text-color-secondary);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-medium);
  user-select: none;
  transition: color var(--transition-speed) ease;
  width: calc(100% - 160px);
}

.step-card .title::before {
  content: "";
  position: absolute;
  top: 0.5rem;
  left: -1.5rem;
  width: 0.5em;
  height: 0.5em;
  border-top: 2px solid var(--text-color-secondary);
  border-right: 2px solid var(--text-color-secondary);
  transform: rotate(45deg);
  transform-origin: 75% 25%;
  background-color: transparent;
  transition: transform var(--transition-speed) ease, opacity var(--transition-speed) ease;
  opacity: 0.5;
  pointer-events: none;
}

.step-card .title::after {
  content: "Click to edit";
  position: relative;
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-light);
  transition: opacity var(--transition-speed) ease;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 576px) {
  .step-card .title::after {
    display: none;
  }
}

.step-card .model-info {
  display: block;
  position: absolute;
  bottom: 10px;
  left: 156px;
  color: var(--text-color-secondary);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-medium);
  user-select: none;
  transition: color var(--transition-speed) ease;
  pointer-events: none;
  overflow: hidden;
  text-wrap: nowrap;
  text-overflow: ellipsis;
}

.step-card .model-tag.secondary::before {
  content: "| ";
}

@media (max-width: 576px) {
  .step-card .title {
    bottom: 42px;
  }

  .step-card .model-info {
    bottom: 6px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: calc(100% - 160px);
    line-height: 1.15;
    white-space: normal;
  }

  .step-card .model-tag {
    display: block;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .step-card .model-tag.secondary::before {
    content: none;
  }
}


.step-card .step-card-header {
  height: 90px;
  position: absolute;
  top: 0;
  width: 100%;
  border-bottom: 1px solid var(--line-color);
  overflow: hidden;
}

.step-card .card-body {
  width: 100%;
  position: relative;
  margin-top: 90px;
  display: none;
  border-radius: 0.5em;
  background-color: transparent;
  flex-direction: column;
  justify-content: space-between;
}

.step-card .title input[type="checkbox"] {
  cursor: pointer;
  position: absolute;
  opacity: 0;
  top: 0;
  left: -2rem;
  width: calc(100% + 2rem);
  height: 250%;
}

.step-card .title:hover {
  &::after {
    opacity: 0.75;
  }
}

.step-card .title:has(input[type="checkbox"]:checked:hover) {
  &::after {
    opacity: 0.0;
  }
}

.step-card:has(.toggle-switch input[type="checkbox"]:checked) .step-card-svg {
  opacity: 1;
}

.step-card:has(.toggle-switch input[type="checkbox"]:checked) .step-card-img {
  opacity: 0.7;
}

.step-card:has(.toggle-switch input[type="checkbox"]:checked) .title {
  color: var(--text-color-primary);
}

.step-card .title:has(input[type="checkbox"]:checked)::before {
  transform: rotate(135deg);
  opacity: 1;
}

.step-card:has(.step-card-header .title input[type="checkbox"]:checked) {
  max-height: revert;
}

.step-card:has(.step-card-header .title input[type="checkbox"]:checked) .card-body {
  display: flex;
}

.step-card .toggle-switch {
  position: absolute;
  display: flex;
  top: -0.4em;
  right: 0.5rem;
}

.step-card .toggle-switch .label-text {
  position: absolute;
  cursor: pointer;
  right: 100%;
  align-self: center;
  margin-right: 0.3em;
  transition: color var(--transition-speed) ease-in-out;
}

.step-card .toggle-switch:has(input[type="checkbox"]:checked) .label-text {
  color: var(--text-color-primary);
}
.step-card-handle {
  position: absolute;
  left: 155px;
  top: 0;
  width: calc(100% - 310px);
  height: 32px;
  background-color: transparent;
  border-radius: 0 0 16px 16px;
  z-index: 1;
  opacity: 0.25;
  cursor: grab;
  transition: opacity var(--transition-speed) ease-in-out;
}

.step-card-handle:hover {
  opacity: 0.75;
}

.step-card-handle:active {
  opacity: 1;
}

.step-card-handle::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 15%;
  min-width: 24px;
  width: 70%;
  height: 3px;
  border-radius: 2px;
  background-color: var(--text-color-secondary);
  transition: background-color var(--transition-speed) ease-in-out;
}

.step-card-handle:hover::after {
  background-color: var(--text-color-primary);
}

.step-card-handle:active {
  cursor: grabbing;
}

.sortable-chosen {
  opacity: 0.75;
}

.sortable-ghost {
  background: var(--background-darker);
  border-radius: 16px;
  outline: 2px dashed var(--primary);
  outline-offset: 5px;
}

.move-blocked {
  border-color: var(--danger);
  animation: shake 0.3s;
}

@keyframes shake {
  0% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px);
  }

  50% {
    transform: translateX(5px);
  }

  75% {
    transform: translateX(-5px);
  }

  100% {
    transform: translateX(0);
  }
}

.model-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.7rem;
  color: var(--text-color-secondary);
  margin-top: 2px;
}

.model-tag.primary {
  color: var(--text-color-secondary);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-xsmall);
}

.model-tag.secondary {
  color: var(--text-color-secondary);
  font-weight: var(--font-weight-light);
  font-size: var(--font-size-xsmall);
}


.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal-content {
  max-width: 600px;
  width: 90%;
}

.report-modal.show {
  display: flex;
}

.report-modal-content {
  width: min(34rem, calc(100vw - 2rem));
  max-height: min(38rem, calc(100vh - 2rem));
}

.report-modal-body {
  display: grid;
  gap: 1rem;
}

.report-modal-message {
  flex: 1 1 auto;
  min-width: 0;
}

.report-fit-options {
  display: grid;
  /* gap: 0.65rem; */
  max-height: 16rem;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.feedback-modal-content {
  max-width: 760px;
  max-height: 90vh;
}

.feedback-modal-body {
  min-height: 0;
  overflow: hidden;
}

.feedback-form-frame {
  position: relative;
  width: 100%;
  height: min(72vh, 850px);
  min-height: 24rem;
}

.feedback-form-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.feedback-form-loading {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  color: var(--text-color-secondary);
  background: var(--background-color);
}

.feedback-form-loading .loading-spinner,
.feedback-form-loading .btn-run-spinner {
  display: inline-block;
}

.feedback-form-frame.is-loaded .feedback-form-loading {
  display: none;
}

.simulation-settings-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
}

.simulation-settings-footer {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: unset;
}

.card > .simulation-settings-footer > .simulation-footer-spacer {
  grid-column: 1;
  min-width: 0;
  padding: 0;
}

.simulation-settings-footer:has(#progressContainer.has-progress) .simulation-footer-spacer {
  display: none;
}

.simulation-settings-footer #btnRunMonteCarloSims {
  grid-column: 2;
  justify-self: end;
}

#progressContainer {
  grid-column: 1;
  display: grid;
  grid-template-rows: auto auto;
  gap: 0.45rem;
  min-width: 0;
  margin: 0;
  position: relative;
}

#progressContainer:not(.has-progress) {
  display: none;
}

.progress-steps {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(58px, 1fr);
  align-items: stretch;
  gap: 0.5rem;
  gap: 1px;
  width: 100%;
  margin: 0;
}

.progress-step {
  position: relative;
  display: grid;
  grid-template-rows: minmax(1.25rem, auto) 12px;
  gap: 0.35rem;
  min-width: 0;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
  user-select: none;
}

.progress-step-label {
  display: block;
  min-width: 0;
  font-size: var(--font-size-xsmall);
  font-weight: var(--font-weight-light);
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-align: left;
  color: var(--text-color-secondary);
  margin-top: auto;
  padding-left: 1rem;
}

.progress-step.active .progress-step-label {
  color: var(--text-color-primary);
}

.progress-step.dot::after {
  display: none;
}

.progress-step-bar {
  position: relative;
  display: block;
  width: 100%;
  height: 12px;
  border: 1px solid var(--line-color);
  background: var(--background-darker);
  
  transition: background var(--transition-speed), box-shadow var(--transition-speed), border-color var(--transition-speed);
}

.progress-step:first-child .progress-step-bar {
  border-radius: 6px 0 0 6px;
}

.progress-step:last-child .progress-step-bar {
  border-radius: 0 6px 6px 0;
}

.progress-step.active.dot .progress-step-bar {
  background: var(--background-darker);
  
}

.progress-step.active .progress-step-bar::before {
  content: "";
  position: absolute;
  top: -1.2rem;
  left: 0rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--primary-disabled);
  border-top-color: var(--primary);
  background: transparent;
  box-shadow: none;
  animation: progress-spinner 650ms linear infinite;
}

@keyframes progress-spinner {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.progress-step.secondary.done .progress-step-bar {
  background-color: var(--text-color-primary);
  box-shadow: 0 0 2px 0px var(--text-color-secondary) inset;
}

.progress-step.info.done .progress-step-bar {
  background-color: var(--info);
  box-shadow: 0 0 2px 0px var(--info-hover) inset;
}

.progress-step.success.done .progress-step-bar {
  background-color: var(--success);
  box-shadow: 0 0 2px 0px var(--success-hover) inset;
}

.progress-step.warning.done .progress-step-bar {
  background-color: var(--warning);
  box-shadow: 0 0 2px 0px var(--warning-hover) inset;
}

.progress-step.danger.done .progress-step-bar {
  background-color: var(--danger);
  box-shadow: 0 0 2px 0px var(--danger-hover) inset;
}

.progress-step.primary.done .progress-step-bar {
  background-color: var(--primary);
  box-shadow: 0 0 2px 0px var(--primary-hover) inset;
}

.progress-step.done .progress-step-bar::after {
  content: "✓";
  display: flex;
  align-items: center;
  color: var(--text-color-secondary);
  font-size: var(--font-size-small);
  line-height: 1;
  width: 100%;
  height: 100%;
	position: absolute;
	top: -1.2rem;
}

.progress-step.warning.done .progress-step-bar::after {
  content: "!";
  font-size: var(--font-size-normal);
}

.progress-step.danger.done .progress-step-bar::after {
  content: "✕";
  font-size: var(--font-size-normal);
}

/* Generic progress indicator */
.segm-progress {
  display: grid;
  gap: 0.55rem;
  width: 100%;
  min-width: 0;
}

.segm-progress-steps {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(54px, 1fr);
  align-items: stretch;
  /* gap: 0.5rem; */
  gap: 1px;
  width: 100%;
}

.segm-progress-step {
  position: relative;
  display: grid;
  grid-template-rows: minmax(1.25rem, auto) 12px;
  gap: 0.35rem;
  min-width: 0;
  user-select: none;
}

.segm-progress-step-label {
  display: block;
  min-width: 0;
  padding-left: 1rem;
  margin-top: auto;
  color: var(--text-color-secondary);
  font-size: var(--font-size-xsmall);
  font-weight: var(--font-weight-light);
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-align: left;
}

.segm-progress-step.active .segm-progress-step-label {
  color: var(--text-color-primary);
}

.segm-progress-step-bar {
  position: relative;
  display: block;
  width: 100%;
  height: 12px;
  border: 1px solid var(--line-color);
  /* border-radius: 10em; */
  background: var(--background-darker);
  
  transition: background var(--transition-speed), box-shadow var(--transition-speed), border-color var(--transition-speed);
}

.segm-progress-step:first-child .segm-progress-step-bar {
  border-radius: 6px 0 0 6px;
}

.segm-progress-step:last-child .segm-progress-step-bar {
  border-radius: 0 6px 6px 0;
}

.segm-progress-step.active .segm-progress-step-bar::before {
  content: "";
  position: absolute;
  top: -1.2rem;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--primary-disabled);
  border-top-color: var(--primary);
  background: transparent;
  animation: progress-spinner 650ms linear infinite;
}

.segm-progress-step.done.primary .segm-progress-step-bar {
  background-color: var(--primary);
  box-shadow: 0 0 2px 0 var(--primary-hover) inset;
}

.segm-progress-step.done.success .segm-progress-step-bar {
  background-color: var(--success);
  box-shadow: 0 0 2px 0 var(--success-hover) inset;
}

.segm-progress-step.done.warning .segm-progress-step-bar {
  background-color: var(--warning);
  box-shadow: 0 0 2px 0 var(--warning-hover) inset;
}

.segm-progress-step.done.danger .segm-progress-step-bar,
.segm-progress-step.done.error .segm-progress-step-bar {
  background-color: var(--danger);
  box-shadow: 0 0 2px 0 var(--danger-hover) inset;
}

.segm-progress-step.done .segm-progress-step-bar::after {
  content: "✓";
  position: absolute;
  top: -1.2rem;
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  color: var(--text-color-secondary);
  font-size: var(--font-size-small);
  line-height: 1;
}

.segm-progress-step.done.warning .segm-progress-step-bar::after {
  content: "!";
  font-size: var(--font-size-normal);
}

.segm-progress-step.done.danger .segm-progress-step-bar::after,
.segm-progress-step.done.error .segm-progress-step-bar::after {
  content: "✕";
  font-size: var(--font-size-normal);
}

.segm-progress-text {
  min-height: 1.1em;
  color: var(--text-color-secondary);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-light);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stochastic-ai-progress {
  flex: 1 1 360px;
  max-width: 800px;
}

.stochastic-ai-progress:empty {
  display: none;
}

#progressText {
  user-select: none;
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-light);
  color: var(--text-color-secondary);
  min-height: 1.1em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: wrap;
}

@media (max-width: 700px) {
  .simulation-settings-fields {
    grid-template-columns: 1fr;
  }

  .simulation-settings-footer {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .simulation-settings-footer .simulation-footer-spacer {
    display: none;
  }

  .simulation-settings-footer #btnRunMonteCarloSims {
    grid-column: 1;
    width: 100%;
  }

  #progressContainer {
    grid-column: 1;
  }
}

.card .card-header input[type="checkbox"] {
  position: absolute;
  left: 0;
  width: calc(100% - 100px - 1rem);
  height: 100%;
  max-height: 36px;
  appearance: none;
  opacity: 0;
  z-index: 1;
  cursor: pointer;
}

.card:has(.card-header input[type="checkbox"]) {
  min-height: 36px;

  .card-header {
    padding: 0 0.5rem 0 1.75rem;
    font-size: var(--font-size-normal);
    min-height: 36px;
  }

  .card-subheader {
    display: none;
  }

  .card-body {
    display: none;
    margin: 1rem 1.75rem 0.5rem 1.75rem;
  }

  .card-footer {
    display: none;
    border-radius: 0;
  }

  .card-header::before {
    content: "";
    position: absolute;
    top: 1rem;
    left: 0.5rem;
    width: 0.5em;
    height: 0.5em;
    border-top: 2px solid var(--text-color-secondary);
    border-right: 2px solid var(--text-color-secondary);
    transform: rotate(45deg);
    transform-origin: 75% 25%;
    background-color: transparent;
    transition: transform var(--transition-speed) ease, opacity var(--transition-speed) ease;
    opacity: 0.5;
    pointer-events: none;
  }
}

.card:has(.card-header input[type="checkbox"]:hover) {
  .card-header {
    color: var(--primary-hover);
  }
}

.card:has(.card-header input[type="checkbox"]:checked) {

  .card-header::before {
    transform: rotate(135deg);
  }

  .card-subheader {
    display: flex;
  }

  .card-body {
    display: flex;
  }

  .card-footer {
    display: flex;
    padding: 1rem 1.75rem 1rem 1.75rem;
  }
}


/* Jspreadsheet */
.jspreadsheet-host {
  width: 100%;
  font-size: var(--font-size-small);
  overflow: auto;
  overflow: hidden !important;
  min-height: 202px;
  max-height: 202px;
  
  border: 1px solid var(--line-color);
  border-radius: 7px;
  padding: 0;
  background-color: var(--background-darker);
  translate: 0 -1px;
}

.jss_content {
  min-height: 200px;
  box-shadow: none !important;
  width: 100%;
  overflow: auto !important;
  max-height: 200px !important;
}

.jss_worksheet {
  background-color: var(--background-dark);
  border: none;
  border-right: 1px solid var(--line-color);
  border-bottom: 1px solid var(--line-color);
}

.jspreadsheet-host .dynamic-file-cell-danger {
  background-color: var(--danger-disabled) !important;
}

.jspreadsheet-host .dynamic-file-cell-warning {
  background-color: var(--warning-disabled) !important;
}

.jss_selectall { border-top: none !important; border-left: none !important; }
.jss_worksheet thead tr td { border-top: none !important; }
.jss_row { border-left: none !important;}

.jcontextmenu {
  background: var(--background-darker);
  color: var(--text-color-primary);
  font-size: var(--font-size-small);
  
  border: 1px solid var(--line-color);
  border-radius: 7px;
}

.jss_corner {
  background-color: var(--primary);
}

.jcontextmenu>div a {
  font-size: var(--font-size-small);
  color: var(--text-color-primary);
}

.jtooltip {
  display: none;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

/* Gap styles */
.gap-05 {
  gap: 0.5rem !important;
}

.gap-0 {
  gap: 0 !important;
}

.my-0 {
  margin-block: 0 !important;
}

.my-05 {
  margin-block: 0.5rem !important;
}

.my-1 {
  margin-block: 1rem !important;
}

.overflow-x-hidden-y-auto {
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

.overflow-auto {
  overflow: auto !important;
}

.min-height-0 {
  min-height: 0 !important;
}

.min-height-fit-content {
  min-height: fit-content !important;
}

.min-width-0 {
  min-width: 0 !important;
}

[hidden] {
  display: none !important;
}

.text-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modified-tag {
  position: relative;
}

.modified-tag::after {
  content: "Modified in table";
  position: absolute;
  right: 0.45rem;
  bottom: 0.95rem;
  height: 16px;
  background-color: var(--info-disabled);
  color: var(--info-hover);
  font-size: var(--font-size-xsmall);
  font-weight: var(--font-weight-semibold);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--info);
  padding: 0.05rem 0.25rem;
  opacity: 0.9;
}


#distFitToolSpreadsheet {
  overflow: hidden;
  background: var(--background-darker);
  border-radius: 7px;
  border: 1px solid var(--line-color);
  
  flex-grow: 1;
  height: 100%;
  position: relative;
  display: flex;
}

@media (max-width: 1200px) {
  .card-fill-responsive {
    height: auto;
  }

  .responsive-embedded-table {
    flex: 0 0 202px;
    min-height: 202px;
    height: 202px;
  }
}

#distFitToolSpreadsheet .jtabs-content {
  display: flex;
  width: 100%;
}

#distFitToolSpreadsheet .jss_container {
  display: flex;
  max-height: 1000px !important;
  height: auto;
  width: 100%;
}

#distFitToolSpreadsheet .jss_content {
  min-height: unset !important;
  max-height: unset !important;
  flex-grow: 1;
}

.sticky-top {
  position: sticky !important;
  top: 0 !important;
  z-index: 1;
}

.bd-filter-blur {
  backdrop-filter: blur(10px) !important;
}

/* Grids */
.grid {
  display: grid !important;
}

.grid.two-two {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
}

.grid.two-one {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(1, 1fr);
}

.grid.three-one {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 1fr;
}

.gap-1 {
  gap: 1rem !important;
}

.gap-2 {
  gap: 2rem !important;
}

.gap-8 {
  gap: clamp(3rem, 8vw, 8rem) !important;
}

.gap-025 {
  gap: 0.25rem !important;
}

.gap-1-2 {
  gap: 1rem 2rem !important;
}

.chart-grid {
  min-height: 0;
  height: 100%;
}

.chart-cell {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.chart-cell canvas {
  width: 100% !important;
  height: 100% !important;
}

.file-fit-chart-panel {
  position: relative;
  width: 100%;
  height: 9.5rem;
  transition: height 180ms ease;
}

.file-fit-chart-panel.is-fit-active {
  height: 15.5rem;
}

.file-fit-chart-panel canvas {
  width: 100% !important;
  height: 100% !important;
}

.file-fit-controls {
  align-items: last baseline;
  gap: 0.75rem;
  padding-bottom: 0.75rem;
}

.fit-dist-selects {
  display: grid;
  gap: 0.45rem;
}

.distribution-fit-chart-body {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.distribution-fit-results-header {
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.distribution-fit-select-field {
  flex: 1 1 16rem;
  min-width: 14rem;
  max-width: 28rem;
}

.distribution-fit-criterion-field {
  flex: 1 1 18rem;
  min-width: 16rem;
  max-width: 30rem;
}

.distribution-fit-chart-toolbar {
  display: flex;
  align-items: center;
  justify-content: end;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.segmented-radio-field.is-disabled {
  opacity: 0.58;
}

.distribution-fit-chart-grid {
  flex: 1 1 auto;
  min-height: 0;
}

.distribution-fit-chart-grid.is-single-view {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}

.distribution-fit-chart-grid.is-single-view .chart-cell:not(.is-active) {
  display: none;
}

@media (max-width: 700px) {
  .distribution-fit-select-field,
  .distribution-fit-criterion-field {
    flex: 0 1 auto;
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .distribution-fit-chart-toolbar {
    align-items: flex-start;
    flex-direction: column;
    width: 100%;
  }

  .chart-grid-responsive-1 {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: none !important;
    height: auto;
  }

  .chart-grid-responsive-1 > .chart-cell {
    height: clamp(13rem, 62vw, 16rem);
    min-height: 13rem;
  }

  .chart-grid-responsive-1 > .chart-cell[data-fit-chart="histogram"] {
    height: clamp(20rem, 92vw, 24rem);
    min-height: 20rem;
  }

  .fit-summary-table-responsive {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    margin-right: 0;
  }

  .fit-summary-table-responsive .summary-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }

  .fit-summary-table-responsive .summary-table th,
  .fit-summary-table-responsive .summary-table td {
    overflow-wrap: anywhere;
  }

  .fit-summary-table-responsive .vertical-splitter {
    width: 100%;
    height: 1px;
    border-top: 1px solid var(--line-color);
  }
}

.floating-action-menu {
  position: fixed;
  z-index: 9999;
  min-width: 13rem;
  padding: 0.35rem;
  border: 1px solid var(--line-color);
  border-radius: 14px;
  background: color-mix(in srgb, var(--background-dark) 94%, transparent);
  box-shadow: 0 14px 40px color-mix(in srgb, var(--background-darkest) 32%, transparent);
  backdrop-filter: blur(14px);
}

.floating-action-menu-inner {
  display: grid;
  gap: 0.2rem;
}

.floating-action-item {
  display: grid;
  grid-template-columns: 1.35rem minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  min-height: 2.35rem;
  padding: 0.45rem 0.65rem;
  border: 0;
  border-radius: 10px;
  color: var(--text-color-secondary);
  background: transparent;
  font-family: inherit;
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-semibold);
  text-align: left;
  cursor: pointer;
  transition: color var(--transition-speed) ease, background-color var(--transition-speed) ease;
}

.floating-action-item svg {
  width: 1.15rem;
  height: 1.15rem;
  color: currentColor;
}

.floating-action-item svg.stroke {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.floating-action-item:hover,
.floating-action-item:focus-visible {
  color: var(--text-color-primary);
  background: var(--primary-disabled);
  outline: none;
}

.floating-action-item.danger {
  color: var(--danger);
}

.floating-action-item.danger:hover,
.floating-action-item.danger:focus-visible {
  color: var(--danger);
  background: var(--danger-disabled);
}

.stochastic-boxplot-cell {
  height: 20rem;
}

.stochastic-ridgeline-cell {
  min-height: 20rem;
}

.stochastic-boxplot-unavailable {
  display: grid;
  place-items: center;
  min-height: 8rem;
  color: var(--text-color-secondary);
  font-size: var(--font-size-small);
}

.stochastic-step-result {
  display: grid;
  gap: 0.5rem;
}

.stochastic-step-result + .stochastic-step-result {
  margin-top: 1.5rem;
}

.stochastic-step-result-title {
  text-align: center;
  font-size: var(--font-size-medium);
  margin: 0;
}

.stochastic-step-chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(9rem, 10rem);
  gap: 1rem;
  align-items: center;
}

.stochastic-histogram-cell {
  height: 12rem;
  min-height: 0;
  overflow: visible;
}

.stochastic-gauge-cell {
  display: grid;
  grid-template-rows: auto auto;
  align-items: center;
  justify-items: center;
  gap: 0.5rem;
  height: auto;
  min-height: 0;
}

.stochastic-gauge-cell canvas.canvas-gauge {
  width: 100% !important;
  height: auto !important;
  min-width: 0;
  max-width: none;
  min-height: 0;
  max-height: 100px;
  margin-bottom: 0;
}

.stochastic-gauge-caption {
  font-size: var(--font-size-xsmall);
  text-align: center;
}

@media (max-width: 900px) {
  .stochastic-step-chart-grid {
    grid-template-columns: 1fr;
  }

  .stochastic-gauge-cell {
    height: auto;
  }
}

.chart-sync-toggle {
  margin-top: 0;
  white-space: nowrap;
}

.footer-settings {
  display: grid;
  width: 100%;
  gap: 0.75rem;
}

.footer-settings-heading {
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-semibold);
}

.footer-settings-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem 1rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-6 {
  display: grid;
  grid-template-columns: 2fr repeat(5, minmax(0, 1fr));
}

@media (max-width: 576px) {
  .grid-responsive-1 {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .grid-responsive-1 > [class*="span-"] {
    grid-column: 1 / -1;
  }

  .grid-responsive-1 > * {
    width: 100%;
    min-width: 0;
  }
}

.grid-cols-11auto {
  grid-template-columns: 1fr 1fr auto;
}

@media (max-width: 700px) {
  .simulation-settings-fields.grid-cols-11auto {
    grid-template-columns: minmax(0, 1fr);
  }

  .simulation-settings-fields > *,
  .simulation-settings-fields .input-pair,
  .simulation-settings-fields input,
  .simulation-settings-fields select,
  .simulation-settings-fields button {
    width: 100%;
    min-width: 0;
  }
}

.system-definition-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.5fr) minmax(0, 0.6fr);
}

@media (max-width: 700px) {
  .system-definition-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .system-definition-grid .input-pair,
  .system-definition-grid select {
    width: 100%;
    min-width: 0;
  }
}

.dose-response-input-card {
  min-height: unset;
  overflow: visible;
}

.dose-response-preview-card {
  flex: 0 0 auto;
}

.dose-response-results-card {
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
}

.dose-response-results-card .card-body {
  flex: 1 1 auto;
  min-height: 0;
}

.dose-response-input-body {
  display: grid;
  gap: 0.8rem;
}

.dose-response-controls {
  min-width: 0;
}

.parameter-card-list {
  display: grid;
  min-width: 0;
  overflow: visible;
}

.parameter-card-list parameter-card {
  min-width: 0;
}

.card:has(#dose_response_serving_size_container) {
  overflow: visible;
}

.scenario-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.55rem;
  min-width: 0;
  color: var(--text-color-secondary);
  font-size: var(--font-size-xsmall);
  font-weight: var(--font-weight-semibold);
}

.scenario-summary span + span {
  padding-left: 0.55rem;
  border-left: 1px solid var(--line-color);
}

.scenario-summary strong {
  color: var(--text-color-primary);
  font-weight: var(--font-weight-semibold);
}

.dose-response-preview-cell,
.dose-response-results-cell {
  height: 18rem;
}

.dose-response-preview-cell {
  height: clamp(16rem, 32vh, 20rem);
  min-height: 16rem;
}

.dose-response-results-cell {
  height: 100%;
  min-height: 18rem;
}

@media (max-width: 700px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.card-status-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border-top: 1px solid var(--line-color);
  color: var(--text-color-secondary);
  font-size: var(--font-size-small);
}

.card-status-bar > span:last-child {
  min-width: 0;
  line-height: 1.35;
  margin: 0.25em 0;
}

.card-status-bar > .status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 6.25rem;
  min-height: 1.7rem;
  height: 100%;
  padding: 0.18rem 0.55rem;
  border-right: 1px solid var(--line-color);
  border-radius: 0;
  background: var(--background-dark);
  color: var(--text-color-secondary);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-semibold);
  line-height: 1.2;
}

.card-status-bar > .status-pill[data-status="success"] {
  color: var(--success-dark);
  border-color: var(--line-color);
  background: var(--success-disabled);
}

.card-status-bar > .status-pill[data-status="warning"] {
  color: var(--warning-dark);
  border-color: var(--line-color);
  /* border-color: var(--warning-disabled); */
  background: var(--warning-disabled);
}

.card-status-bar > .status-pill[data-status="danger"] {
  color: var(--danger-dark);
  border-color: var(--line-color);
  /* border-color: var(--danger-disabled); */
  background: var(--danger-disabled);
}

.deterministic-status-spinner {
  flex: 0 0 auto;
  width: 0.65rem;
  height: 0.65rem;
  margin-right: 0.35rem;
  border: 1.5px solid var(--primary-disabled);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: progress-spinner 650ms linear infinite;
}

.loading-spinner,
.btn .btn-run-spinner {
  display: none;
  width: 1rem;
  height: 1rem;
  border: 1.5px solid var(--primary-disabled);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: progress-spinner 650ms linear infinite;
}

.btn.is-running .btn-svg {
  display: none;
}

.btn.is-running .btn-run-spinner {
  display: inline-block;
}

@media (max-width: 700px) {
  .card-status-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
    padding-inline: 1rem;
  }
}

.deterministic-chart-card-body {
  position: relative;
  min-height: 0;
}

.deterministic-chart-stack {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 3rem;
  gap: 0.55rem;
  width: 100%;
  height: clamp(22rem, 100%, 35rem);
  min-height: 300px;
  overflow: hidden;
}

.deterministic-chart-panel {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.deterministic-chart-main {
  height: 100%;
}

.deterministic-chart-navigator {
  height: 3rem;
}

.deterministic-chart-panel canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

#deterministicNavigatorChart {
  cursor: ew-resize;
}

.deterministic-metrics {
  align-items: stretch;
  margin-right: 0;
}

.deterministic-summary-table {
  min-width: min(100%, 46rem);
}

.deterministic-summary-table td:first-child,
.deterministic-summary-table th:first-child {
  max-width: 16rem;
}

.deterministic-summary-mobile {
  display: none;
}

@media (max-width: 1200px) {
  #section-deterministic .row.h-100 {
    height: auto;
  }
}

@media (max-width: 576px) {
  .deterministic-chart-card-body {
    flex: 0 0 auto;
    min-height: 24rem;
    overflow: visible;
  }

  .deterministic-chart-stack {
    flex: 0 0 auto;
    height: 24rem;
    min-height: 24rem;
  }

  .deterministic-summary-table-desktop {
    display: none;
  }

  .deterministic-metrics {
    width: 100%;
    min-width: 0;
  }

  .deterministic-summary-mobile {
    display: grid;
    gap: 1rem;
    width: 100%;
    min-width: 0;
  }

  .deterministic-summary-mobile-table {
    width: 100%;
    table-layout: fixed;
    margin: 0;
  }

  .deterministic-summary-mobile-table caption {
    padding-bottom: 0.5rem;
    color: var(--text-color-primary);
    font-weight: var(--font-weight-semibold);
    text-align: left;
  }

  .deterministic-summary-mobile-table th,
  .deterministic-summary-mobile-table td {
    width: 50%;
    padding: 0.4rem 0;
    text-align: left;
    overflow-wrap: anywhere;
  }
}

#deterministic_chart_empty {
  position: absolute;
  inset: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

/* Summary tables */
.fit-summary-table {
  display: flex;
  align-items: start;
  gap: 0.5rem;
  margin-right: 2rem;
  color: var(--text-color-secondary);
}

.summary-table {
  text-align: left;
  color: var(--text-color-secondary);
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0.5rem;
  font-size: inherit;
  font-weight: var(--font-weight-regular);
}

#deterministic_metrics {
  height: 12vh;
  overflow: auto;
}

.summary-table th,
.summary-table td {
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--line-color, #ccc);
}

.summary-table th {
  font-weight: var(--font-weight-semibold);
  text-align: left;
}

.stochastic-summary-table {
  font-size: var(--font-size-small);
}

.summary-metric-value {
  display: inline-block;
}

.change-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  margin-left: 0.3rem;
  font-weight: var(--font-weight-semibold);
  line-height: 1;
}

.change-indicator--up {
  color: var(--danger);
}

.change-indicator--down {
  color: var(--success-dark);
}

.change-indicator--neutral {
  color: var(--warning);
}

.summary-indicators-hidden .change-indicator {
  display: none;
}

.stochastic-summary-mobile {
  display: none;
}

@media (max-width: 576px) {
  .stochastic-zoom-hint,
  .stochastic-summary-table-desktop {
    display: none;
  }

  #stochastic_summary_table {
    width: 100%;
    min-width: 0;
    margin-right: 0;
  }

  .stochastic-summary-mobile {
    display: grid;
    gap: 1rem;
    width: 100%;
    min-width: 0;
  }

  .stochastic-summary-mobile-table {
    width: 100%;
    table-layout: fixed;
    margin: 0;
  }

  .stochastic-summary-mobile-table caption {
    padding-bottom: 0.5rem;
    color: var(--text-color-primary);
    font-weight: var(--font-weight-semibold);
    text-align: left;
  }

  .stochastic-summary-mobile-table th,
  .stochastic-summary-mobile-table td {
    width: 50%;
    padding: 0.4rem 0;
    text-align: left;
    overflow-wrap: anywhere;
  }
}

.summary-table-unit {
  display: block;
  font-size: var(--font-size-xsmall);
  font-weight: var(--font-weight-regular);
  color: var(--text-color-secondary);
  line-height: 1.1;
}

.sensitivity-input-card {
  min-height: unset;
}

.sensitivity-results-card {
  height: 100%;
  min-height: 0;
}

.sensitivity-results-card .card-body {
  min-height: 0;
}

#sensitivity_status,
#sensitivity_results_subheader {
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
}

#sensitivity_status > span:first-child,
#sensitivity_results_subheader > span:first-child {
  flex: 1 1 18rem;
  min-width: 12rem;
}

.sensitivity-results-controls {
  margin-left: auto;
}

.sensitivity-chart-cell {
  height: clamp(22rem, 55vh, 40rem);
  min-height: 18rem;
}

.sensitivity-chart-cell canvas {
  width: 100%;
  height: 100%;
}

.sensitivity-results-table {
  width: 100%;
  max-height: 8rem;
  overflow: auto;
  margin-right: 0;
}

@media (max-width: 1200px) {
  .sensitivity-results-card {
    height: auto;
  }
}

@media (max-width: 700px) {
  #sensitivity_status > span:first-child,
  #sensitivity_results_subheader > span:first-child {
    flex: 0 1 auto;
    width: 100%;
    min-width: 0;
  }

  .sensitivity-results-controls {
    width: 100%;
    margin-left: 0;
  }

  .sensitivity-results-card.is-empty .card-body {
    display: none;
  }
}

#section-model-database .section-content {
  min-height: 0;
}

#section-model-database .card {
  height: 100%;
  min-height: 0;
}

#section-model-database .card-body {
  min-height: 0;
  overflow: hidden;
}

.model-database-table {
  flex: 1 1 auto;
  margin-right: 0;
  min-height: 0;
  width: 100%;
}

.model-database-table-scroll {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: auto;
}

.model-database-table table {
  table-layout: fixed;
}

.model-database-col-organism {
  width: 16rem;
}

.model-database-col-storage {
  width: 10rem;
}

.model-database-col-kind {
  width: 6.5rem;
}

.model-database-col-process {
  width: 9rem;
}

.model-database-col-model {
  width: 34%;
}

.model-database-col-sets {
  width: 5rem;
}

.model-database-col-sources {
  width: 24%;
}

.model-database-context-row td {
  color: var(--text-color-primary);
  font-weight: var(--font-weight-semibold);
  background: var(--background-darker);
}

.model-database-context-row td:first-child,
.model-database-context-row td:nth-child(2) {
  color: var(--primary);
}

.model-database-source-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  /* white-space: nowrap; */
}

.model-database-sort {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: var(--font-weight-semibold);
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.model-database-sort:hover {
  color: var(--text-color-primary);
}

.model-database-card-list {
  display: none;
}

.model-database-card-group {
  display: grid;
  gap: 0.4rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line-color);
}

.model-database-card-group-header {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  color: var(--text-color-primary);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-semibold);
}

.model-database-card-group-header span:last-child {
  color: var(--text-color-secondary);
  font-weight: var(--font-weight-regular);
}

.model-database-card-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-top: 1px solid var(--line-color);
}

.model-database-card-title {
  color: var(--text-color-primary);
  font-weight: var(--font-weight-semibold);
}

.model-database-card-meta,
.model-database-card-side {
  color: var(--text-color-secondary);
  font-size: var(--font-size-xsmall);
}

.model-database-card-side {
  display: flex;
  flex-direction: column;
  flex: 0 0 9rem;
  min-width: 0;
  text-align: right;
}

.model-database-card-side span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-database-context-row {
	position: sticky;
	top: 1.65rem;
}

@media (max-width: 900px) {
  .model-database-controls {
    grid-template-columns: 1fr;
  }

  .model-database-table table {
    display: none;
  }

  .model-database-card-list {
    display: grid;
  }
}

.border-0 {
  border: none !important;
}

#btn_add_step_module::after {
	content: "Add module";
	position: absolute;
	top: -10%;
	left: -10%;
	height: 120%;
	outline: 2px dashed var(--text-color-secondary);
	font-size: var(--font-size-small);
	font-weight: var(--font-weight-regular);
	color: var(--text-color-secondary);
	pointer-events: none;
	opacity: 0;
	transition: opacity var(--transition-speed) ease-in-out;
	border-radius: 10px;
	outline-offset: 0.25rem;
	display: flex;
	align-items: center;
	padding-left: 48px;
	padding-right: 0.5rem;
	text-wrap: nowrap;
}
#btn_add_step_module:hover::after {
  opacity: 0.75;
}

#section-home {
  line-height: 1.5;
  overflow: hidden;
  border-top-left-radius: 14px;
  background: var(--color-main);
  padding: 0;
}
#section-home .section-content { padding-top: 0; padding-bottom: 0; }
.home-shell {
  --home-inset: clamp(1rem, 4vw, 4rem);
  width: 100%;
  padding-bottom: 4rem;
}
#section-home .home-hero {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  grid-template-columns: minmax(0, 1fr);
  min-height: calc(100vh - var(--navbar-height) - var(--footer-height) - 1px);
  min-height: calc(100dvh - var(--navbar-height) - var(--footer-height) - 1px);
  height: auto;
  position: relative;
  isolation: isolate;
  padding: 0;
}
.home-hero::before {
	content: "";
	position: absolute;
	z-index: -1;
	inset: -10vh;
	pointer-events: none;
	background: radial-gradient(ellipse at 65% 20%, color-mix(in srgb, var(--primary) 32%, transparent), transparent 65%), radial-gradient(ellipse at 10% 65%, color-mix(in srgb, var(--primary-hover) 22%, transparent), transparent 60%);
	mask: linear-gradient(#fff,80%, transparent);
}
.home-hero-text { width: calc(100% - 2 * var(--home-inset)); max-width: 48rem; margin-inline: auto; align-self: center; padding-block: 3rem; }
.home-hero h1, .home-copy-block h3, .home-band h3 {
  margin: 0;
  color: var(--text-color-primary);
  font-family: var(--font-family-sans-expanded);
  font-weight: var(--font-weight-semibold);
}
.home-hero h1 {
  font-size: clamp(2rem, 4.2vw, 3.6rem);
  letter-spacing: -0.035em;
  line-height: 1.13;
}
.home-lead {
  text-align: center;
  max-width: 42rem;
  margin: 1.4rem auto 0;
  font-size: var(--font-size-large);
  color: var(--text-color-primary);
  line-height: 1.7;
}
.home-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.25rem; margin-top: 1.75rem; }
.home-actions a { text-decoration: none; gap: 0.75rem; }
.home-histogram { 
  width: 100%;
  margin: 0; 
  position: absolute; 
  inset: 0;
  opacity: 0.5;
  z-index: -1;
}
.home-histogram-window {
  overflow: hidden;
  height: 100%;
}
.home-histogram-track { display: flex; width: 100%; height: 100%; }
.home-histogram-bars { display: flex; align-items: end; width: 100%; flex-shrink: 0; height: 100%; gap: 3px; padding-right: 3px; }
.home-histogram-bars span {
  flex: 1;
  min-width: 0;
  height: var(--bar-height);
  border-radius: 2px 2px 0 0;
  border-bottom: none;
  background: linear-gradient(#fff0, var(--primary-transparent), #fff0);
}
.home-feature-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  padding: 2.5rem 0;
  text-align: center;
  color: var(--primary);
}
.home-feature { display: flex; align-items: center; justify-content: center; gap: 0.35rem; }
.home-feature::before, .home-feature::after { font-size: var(--font-size-large); opacity: 0.4; }
.home-feature::before { content: "{"; }
.home-feature::after { content: "}"; }
.home-grid, .home-feature-strip { max-width: 80rem; margin-inline: auto; padding-inline: var(--home-inset); }
.home-grid { display: grid; gap: 3.5rem; padding-top: 5.5rem; }
.home-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.home-copy-block {
  position: relative;
  display: flex;
  align-items: start;
  min-width: 0;
  padding: 1.5rem;
  overflow: hidden;
  border-radius: 16px;
}
.home-card-copy { display: grid; align-content: end; gap: 0.4rem; width: 100%; min-width: 0; }
.home-kicker { display: flex; align-items: center; gap: 0.4rem; margin: 0; color: var(--text-color-secondary); font-size: var(--font-size-small); font-weight: var(--font-weight-regular); }
.home-kicker-icon { flex-shrink: 0; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.home-copy-block h3 { font-size: var(--font-size-large); line-height: 1.3; }
.home-copy-block p:not(.home-kicker), .home-band p {
  text-align: left;
  margin: 0;
  color: var(--text-color-secondary);
  font-size: var(--font-size-normal);
}
.home-predictions .home-copy-block h3 { font-size: var(--font-size-xxlarge); }
.home-hero .home-feature-strip { padding: 2rem 0 0; font-weight: var(--font-weight-regular); font-size: var(--font-size-small) !important; }
#section-home .home-band { position: static; display: grid; place-content: center; height: auto; padding: 0; margin-bottom: 1.25rem; }
.home-band h3 { color: var(--text-color-primary); font-size: var(--font-size-xxlarge); text-align: center; }
.home-band p { color: var(--primary-hover);}
.home-predictions .home-band h3 { font-size: var(--font-size-xxlarge); }
.home-tool-link { display: inline-flex; align-items: center; gap: 0.65rem; margin-top: 0.75rem; color: var(--text-color-primary); text-decoration: none; }
.home-link-svg { flex-shrink: 0; width: 18px; height: 18px; color: inherit; stroke: currentColor; }
.home-actions a:not(.btn) { color: var(--text-color-primary); }
.home-actions a:not(.btn):hover { color: var(--primary); }
.home-tool-link:hover { color: var(--primary); }
.home-tool-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; }
@media (max-width: 700px) {
  .home-copy-block { align-items: end; }
}
@media (max-width: 560px) {
  .home-shell { padding-bottom: 2rem; }
  .home-hero-text { padding-block: 2rem; }
  .home-lead { font-size: var(--font-size-normal); }
  .home-feature-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
  .home-row { grid-template-columns: minmax(0, 1fr); }
  .home-grid { gap: 2.5rem; padding-top: 2.5rem; }
}

.svg-fill-primary { fill: var(--primary); }
.svg-fill-primary-disabled { fill: var(--primary-disabled); }
.svg-fill-success { fill: var(--success); }
.svg-fill-background-dark { fill: var(--background-dark); }
.svg-fill-background-darker { fill: var(--background-darker); }
.svg-fill-text-primary { fill: var(--text-color-primary); }
.svg-fill-text-secondary { fill: var(--text-color-secondary); }
.svg-fill-line-color { fill: var(--line-color); }
.svg-fill-contrast { fill: var(--primary-contrast-text); }
.svg-fill-none { fill: none; }
.svg-stroke-primary { stroke: var(--primary); }
.svg-stroke-primary-dark { stroke: var(--primary-dark); }
.svg-stroke-line-color { stroke: var(--line-color); stroke: color-mix(in srgb, var(--text-color-secondary), var(--line-color) 80%); }
.svg-stroke-round { stroke-linecap: round; }
.svg-stroke-miter-10 { stroke-miterlimit: 10; }
.svg-stroke-width-1 { stroke-width: 1px; }
.svg-stroke-width-2 { stroke-width: 2px; }
.svg-stroke-width-25 { stroke-width: 2.5px; }
.svg-stroke-dash-8 { stroke-dasharray: 8; }
.svg-stroke-dash-8017 { stroke-dasharray: 8.017 8.017; }
.svg-stroke-dash-7988 { stroke-dasharray: 7.988 7.988; }
.opacity-02 { opacity: 0.2; }
.opacity-03 { opacity: 0.3; }
.opacity-035 { opacity: 0.35; }
.opacity-04 { opacity: 0.4; }
.opacity-05 { opacity: 0.5; }
.opacity-06 { opacity: 0.6; }
.opacity-075 { opacity: 0.75; }
.opacity-08 { opacity: 0.8; }
.text-anchor-end {text-anchor: end; }
.svg-dashed-line {
  fill: none;
  stroke-miterlimit: 10;
  stroke: var(--text-color-secondary);
  stroke-dasharray: 3;
}

.accent-title {
  color: var(--text-color-primary);
  font-weight: var(--font-weight-semibold);
  margin-bottom: 0.25rem;
}

.accent-subtitle {
  color: var(--text-color-secondary);
  font-weight: var(--font-weight-regular);
  margin-bottom: 1rem;
}

.accent-body {
  color: var(--text-color-secondary);
  font-weight: var(--font-weight-regular);
  font-size: var(--font-size-medium);
}

.border-left-primary {
  border-left: 3px solid var(--primary);
  padding-left: 1rem;
}

.document-readable {
  width: 100%;
  max-width: 62rem;
  min-width: 0;
  padding-bottom: 2rem;
  overflow-wrap: anywhere;
}

.document-content dl {
  margin: 1rem 0;
  line-height: 1.65;
}

.document-content dt {
  margin-top: 1rem;
  font-weight: var(--font-weight-semibold);
}

.document-content dd {
  margin: 0.25rem 0 0;
  color: var(--text-color-secondary);
}

.document-content hr {
  margin: 2rem 0 1rem;
  border: 0;
  border-top: 1px solid var(--line-color);
}

.logo-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem 3rem;
  margin: 1.75rem 0;
}

.logo-list figure {
  margin-inline: 0;
  min-width: 0;
  max-width: 100%;
  color: var(--text-color-secondary);
}

.logo-list svg,
.logo-list img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 6rem;
}

.logo-list figcaption {
  margin-top: 0.75rem;
  font-size: var(--font-size-normal);
  line-height: 1.65;
}

.document-readable h2,
.document-readable dl {
  font-size: var(--font-size-normal);
}

.document-content.document-readable h2 {
  margin: 2rem 0 1rem;
  padding: 0;
  border: 0;
  font-weight: var(--font-weight-semibold);
}

.document-readable p + p {
  margin-top: 1rem;
}

.pos-absolute {
  position: absolute;
}
.right-175rem {
  right: 1.75rem;
}


.jss_worksheet > tbody > tr > td {
  cursor: cell;
}

.model-fitting-input-card,
.model-fitting-controls-card,
.model-fitting-results-card {
  height: 100%;
  min-height: 0;
}

.model-fitting-input-card .card-body,
.model-fitting-controls-card .card-body,
.model-fitting-results-card .card-body {
  min-height: 0;
}

.model-fitting-results-card {
  display: flex;
  flex-direction: column;
}

#modelFitRunMessage[hidden] {
  display: none;
}

.model-fitting-results-card .card-body {
  flex: 1 1 0;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.model-fitting-chart-controls {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
  min-width: 0;
}

.model-fitting-chart-x-field,
.model-fitting-chart-view-field,
.model-fitting-chart-single-field {
  flex-shrink: 0;
}

#modelFitSpreadsheet {
  overflow: hidden;
  background: var(--background-darker);
  border-radius: 7px;
  border: 1px solid var(--line-color);
  
  flex: 1 1 14rem;
  height: 16px;
  min-height: 14rem;
  position: relative;
  display: flex;
  margin-bottom: 0.75rem;
}

#modelFitSpreadsheet .jtabs-content {
  display: flex;
  width: 100%;
}

#modelFitSpreadsheet .jss_container {
  display: flex;
  max-height: 1000px !important;
  height: auto;
  width: 100%;
}

#modelFitSpreadsheet .jss_content {
  min-height: unset !important;
  max-height: unset !important;
  flex-grow: 1;
}

#modelFitSpreadsheet .jss_worksheet thead tr td {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--background-darker);
  font-size: var(--font-size-small);
  padding-block: 0.25rem;
}

.model-fitting-equation {
	min-height: 5em;
	padding: 0.5rem 1rem;
	border: 1px solid var(--line-color);
	border-radius: 8px;
	color: var(--text-color-secondary);
	background: var(--background-darker);
  overflow-inline: auto;
	max-width: 100%;
	display: block;
	text-align: left;
  align-content: center;
}

.model-fitting-equation .katex {
  display: inline-block;
  max-width: none;
  white-space: nowrap;
}

.model-fitting-role-symbol {
  flex: 0 0 auto;
}

.model-fitting-role-title {
  min-width: 0;
  color: var(--text-color-secondary);
  font-size: var(--font-size-xsmall);
  white-space: nowrap;
}

.model-fitting-chart-grid {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  align-content: stretch;
  align-items: stretch;
}

.model-fitting-chart-grid.model-fitting-chart-grid-single {
  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, 1fr);
}

.model-fitting-chart-grid .chart-cell {
  min-height: 0;
  height: auto;
  overflow: hidden;
}

.model-fitting-fit-chart-cell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 0.75rem;
}

.chart-cell.model-fitting-fit-chart-cell:has(.model-fitting-curve-slider-panel[hidden]) {
	grid-template-columns: minmax(0, 1fr);
}

.model-fitting-chart-canvas-wrap {
  min-width: 0;
  min-height: 0;
  position: relative;
}

.model-fitting-chart-canvas-wrap canvas {
  width: 100%;
  height: 100%;
}

.model-fitting-chart-grid.model-fitting-chart-grid-single .chart-cell {
  min-height: 26rem;
}

.model-fitting-chart-grid .chart-cell[hidden] {
  display: none;
}

.model-fitting-estimates-chart-cell {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: auto !important;
}

.model-fitting-estimates-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  grid-auto-rows: 1fr;
  gap: 1rem;
  align-items: stretch;
}

.model-fitting-estimate-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
}

.model-fitting-estimate-heading {
  color: var(--text-color-secondary);
  margin-bottom: 0.25rem;
  text-align: center;
}

td[data-label="Parameter"] {
	font-size: var(--font-size-medium);
}

.model-fitting-estimate-canvas-wrap {
  flex: 1 1 auto;
  position: relative;
  height: 8rem;
  min-height: 8rem;
}

.model-fitting-estimate-canvas-wrap canvas {
  width: 100%;
  height: 100%;
}

.model-fitting-estimates-table {
  flex: 0 0 auto;
}

.model-fitting-upload-mapping-modal {
  max-width: 760px;
  max-height: min(88vh, 780px);
}

.model-fitting-curve-slider-panel {
	min-height: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding-left: 0.25rem;
  margin-right: 2rem;
}

.model-fitting-curve-slider-panel[hidden] {
  display: none;
}

.model-fitting-curve-slider {
  height: min(20rem, 80%);
  min-height: 10rem;
}

.model-fitting-curve-slider-label {
  color: var(--text-color-secondary);
  font-size: var(--font-size-xsmall);
  text-align: center;
}

.model-fitting-results-footer {
  display: grid;
  grid-template-columns: minmax(13rem, 1fr) minmax(18rem, 1.25fr) auto;
  align-items: start;
  gap: 1rem;
  flex: 0 1 auto;
  max-height: 10rem;
  overflow: auto;
}

.model-fitting-results-footer table {
  width: 100%;
  font-size: var(--font-size-small);
}

.model-fitting-results-footer .fit-summary-table {
  margin-right: 0;
}

.model-fitting-summary-table {
  font-size: var(--font-size-small);
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .model-fitting-results-card {
    height: auto;
  }

  .model-fitting-results-card .model-fitting-chart-body {
    flex: 0 0 auto;
    overflow: visible;
  }

  .model-fitting-results-footer {
    grid-template-columns: 1fr;
    max-height: none;
    overflow: visible;
  }

  .model-fitting-chart-grid {
    flex: 0 0 auto;
    height: auto;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, minmax(12rem, 1fr));
  }

  .model-fitting-chart-body {
    flex-direction: column;
  }

  .model-fitting-fit-chart-cell {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(12rem, 1fr) auto;
  }

  .model-fitting-curve-slider-panel {
    width: 100%;
    flex-direction: row;
    padding-left: 0;
  }

  .model-fitting-curve-slider {
    width: min(22rem, 100%);
    height: auto;
    min-height: 0;
  }

  .model-fitting-curve-slider-label {
    max-height: none;
  }
}

@media (max-width: 576px) {
  .model-fitting-chart-grid.model-fitting-chart-grid-single .chart-cell {
    min-height: 22rem;
  }

}

/* User guide */
.guide-shell {
  display: grid;
  grid-template-columns: minmax(12rem, 0.18fr) minmax(0, 1fr) minmax(11rem, 0.16fr);
  gap: 1.5rem;
  align-items: start;
  width: 100%;
}

.guide-sidebar,
#section-help .guide-page-nav {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: calc(100vh - var(--navbar-height) - var(--header-height) - var(--footer-height) - 2rem);
  overflow-y: auto;
}

#section-help .guide-search {
  width: 100%;
}

#section-help .guide-nav,
#section-help .guide-page-links {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  background-color: var(--color-main);
}

#section-help .guide-nav button,
#section-help .guide-page-links a {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text-color-secondary);
  text-align: left;
  font-size: var(--font-size-small);
  line-height: 1.35;
  padding: 0.45rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: color var(--transition-speed) ease, background-color var(--transition-speed) ease;
}

#section-help .guide-nav button:hover,
#section-help .guide-page-links a:hover,
#section-help .guide-nav button.is-active,
#section-help .guide-page-links a.is-active {
  color: var(--text-color-primary);
  background-color: var(--background-dark);
}

#section-help .guide-page-links a[data-level="3"] {
  padding-left: 1.25rem;
}

.guide-content {
  min-width: 0;
  max-width: 78rem;
}

#section-help .guide-doc {
  display: none;
  padding-bottom: 30rem;
}

#section-help .guide-doc.is-active {
  display: block;
}

.document-content h1 {
  margin-bottom: 0.5rem;
  display: flex;
  gap: 0.25em;
  align-items: center;
}

.document-content h2 {
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-color);
}

.document-content h3 {
  margin-top: 1.5rem;
}

.document-content p,
.document-content li {
  color: var(--text-color-secondary);
  line-height: 1.65;
}

.document-content ul,
.document-content ol {
  padding-left: 1.25rem;
}

#section-help .guide-lede {
  color: var(--text-color-secondary);
  font-size: var(--font-size-medium);
}

#section-help .guide-media {
  margin: 1.25rem 0 1.75rem;
}

#section-help h2 {
  margin-bottom: 0.3rem;
}

#section-help .guide-media-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	/* min-height: 18rem; */
	border: 1px solid var(--line-color);
	border-radius: 8px;
	background-color: var(--background-dark);
	color: var(--text-color-secondary);
	text-align: center;
	/* padding: 1.25rem; */
	width: 100%;
}

#section-help .guide-media figcaption {
  position: relative;
  margin-top: 0.55rem;
  color: var(--text-color-secondary);
  font-size: var(--font-size-small);
}
#section-help .guide-media figcaption::before {
  content: "Figure: ";
  font-weight: var(--font-weight-semibold);
}

#section-help .guide-placeholder-note {
	padding: 0.8rem 1rem;
	background-color: var(--primary-transparent);
	color: var(--text-color-secondary);
	border-radius: 8px;
	margin-block: .75rem;
	font-size: var(--font-size-normal);
	display: flex;
	flex-direction: column;
	gap: .25rem;
}

#section-help .guide-no-results {
  display: none;
  color: var(--text-color-secondary);
  font-size: var(--font-size-small);
  padding: 0.35rem 0.5rem;
}

#section-help .guide-no-results.is-visible {
  display: block;
}

@media (max-width: 1180px) {
  .guide-shell {
    grid-template-columns: minmax(11rem, 0.22fr) minmax(0, 1fr);
  }

  #section-help .guide-page-nav {
    display: none;
  }
}

@media (max-width: 820px) {
  .guide-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .guide-sidebar {
    position: relative;
    max-height: none;
  }

  #section-help .guide-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  }
}

.shelf-life-window-heading {
  display: block;
  /* margin-top: 1.25rem; */
}

.shelf-life-window-heading h4,
.shelf-life-window-heading p {
  margin: 0;
}

.shelf-life-window {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}
.shelf-life-window:has(.shelf-life-module-row:only-child) {
  grid-template-columns: minmax(0, 1fr);
}

.shelf-life-range-slider {
  height: calc(100% - 74px);
  align-self: center;
  margin-inline: auto;
}

.shelf-life-module-list {
  display: flex;
  flex-direction: column;
}

.shelf-life-module-row {
  height: 74px;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: .5rem;
  padding: .25rem .7rem;
  border: 1px solid var(--line-color);
  transition: opacity .15s ease, background .15s ease;
  border-radius: 12px;
}

.shelf-life-module-row.is-active {
  background: color-mix(in srgb, var(--shelf-module-color, var(--primary)) 8%, transparent);
}

.shelf-life-module-row.is-outside {
  opacity: .42;
}

.shelf-life-module-marker {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-color);
}

.shelf-life-module-row.is-active .shelf-life-module-marker {
  background: var(--shelf-module-color, var(--primary));
}

.shelf-life-module-row .segmented-radio-control input:checked + span {
  background: color-mix(in srgb, var(--shelf-module-color, var(--primary)) 22%, transparent);
  color: var(--shelf-module-color, var(--primary));
}

.shelf-life-module-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.shelf-life-module-copy span {
  font-size: var(--font-size-small);
}

.shelf-life-module-copy span,
.shelf-life-module-copy small {
  color: var(--text-color-secondary);
}

.shelf-life-outcome-field {
  margin-top: 1.25rem;
}

.time-optimization-composition-cell {
  height: 12rem;
}

.shelf-life-recommendation-mobile {
  display: none;
}

.value-transition {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 100%;
}

.value-transition-item {
  display: flex;
  flex-direction: column;
  gap: .15rem;
}

.value-transition-number {
  display: flex;
  align-items: baseline;
  gap: .3rem;
}

.value-transition-arrow {
  flex: 1 1 4rem;
  min-width: 2rem;
  /* max-width: 8rem; */
  position: relative;
  height: 1px;
  margin-inline: 1rem;
  background: var(--text-color-secondary);
}

.value-transition-arrow::after {
	content: "";
	position: absolute;
	top: -5px;
	right: 1px;
	color: var(--primary);
	font-size: 1.5rem;
	line-height: 1;
	border: 1px solid var(--text-color-secondary);
	border-top: none;
	border-left: none;
	height: 10px;
	width: 10px;
	rotate: -45deg;
}

.value-transition .units {
  flex-grow: 0;
}

@media (max-width: 800px) {
  .value-transition {
    display: grid;
    grid-template-columns: 1fr;
    gap: .65rem;
  }

  .value-transition-arrow {
    display: none;
  }

  .shelf-life-module-row {
    grid-template-columns: 12px minmax(0, 1fr);
  }

}

@media (max-width: 1200px) {
  .shelf-life-input-card {
    height: auto;
  }

  .shelf-life-input-card > .card-body {
    height: auto;
    overflow: visible !important;
  }
}

@media (max-width: 576px) {
  .shelf-life-input-card .segmented-radio-field,
  .shelf-life-input-card .segmented-radio-control,
  .shelf-life-outcome-field,
  .shelf-life-outcome-field select {
    width: 100%;
    min-width: 0;
  }

  .shelf-life-input-card .segmented-radio-control label {
    flex: 1 1 0;
    min-width: 0;
  }

  .shelf-life-input-card .segmented-radio-control span {
    text-align: center;
    white-space: normal;
  }

  .shelf-life-window {
    grid-template-columns: 16px minmax(0, 1fr);
    gap: 1rem;
  }

  .shelf-life-range-slider {
    display: block;
    height: calc(100% - 74px);
    min-height: 10rem;
    align-self: center;
  }

  .shelf-life-module-list {
    width: 100%;
    min-width: 0;
  }

  .shelf-life-module-row {
    height: auto;
    min-height: 74px;
    grid-template-columns: 12px minmax(0, 1fr);
    align-items: start;
    padding: 0.65rem 0.7rem;
  }

  .shelf-life-module-row > .segmented-radio-field {
    grid-column: 1 / -1;
    width: 100%;
    padding-left: calc(12px + 0.5rem);
  }

  .time-optimization-composition-cell {
    height: clamp(18rem, 82vw, 22rem);
    min-height: 18rem;
  }

  .shelf-life-recommendation-desktop {
    display: none;
  }

  .shelf-life-recommendation-mobile {
    display: grid;
    gap: 1rem;
    width: 100%;
    min-width: 0;
  }

  .shelf-life-recommendation-mobile-table {
    width: 100%;
    table-layout: fixed;
    margin: 0;
  }

  .shelf-life-recommendation-mobile-table caption {
    padding-bottom: 0.5rem;
    color: var(--text-color-primary);
    font-weight: var(--font-weight-semibold);
    text-align: left;
  }

  .shelf-life-recommendation-mobile-table th,
  .shelf-life-recommendation-mobile-table td {
    width: 50%;
    padding: 0.4rem 0;
    text-align: left;
    overflow-wrap: anywhere;
  }
}
