:root {
  --primary-color: #1e6bb8;
  --primary-dark-color: #174f88;
  --primary-light-color: #4d8fcd;
  --image-modal-overlay: rgba(15, 23, 42, 0.82);
  --image-modal-caption: #e5e7eb;
  --top-height: 156px;
}

#projectname {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.24;
  padding-bottom: 0.1rem;
}

#projectbrief {
  font-size: 0.82rem;
  line-height: 1.35;
}

#projectalign {
  width: 100%;
  min-width: 0;
}

#projectname,
#projectbrief {
  white-space: normal;
  overflow-wrap: anywhere;
}

#projectlogo img {
  max-height: 52px;
  width: auto;
}

#projectlogo .project-logo-swap {
  display: inline-flex;
  align-items: center;
}

#projectlogo .project-logo-swap img {
  cursor: default;
  pointer-events: none !important;
}

#projectlogo .project-logo-dark {
  display: none;
}

html.dark-mode #projectlogo .project-logo-light {
  display: none;
}

html.dark-mode #projectlogo .project-logo-dark {
  display: inline-block;
}

html:not(.dark-mode) #projectlogo .project-logo-light {
  display: inline-block;
}

html:not(.dark-mode) #projectlogo .project-logo-dark {
  display: none;
}

#nav-tree-contents {
  padding-top: 0.35rem;
}

.contents div.image object,
.contents div.image img,
.contents > p > img {
  background: transparent !important;
}

.theme-image-swap .theme-image-dark {
  display: none;
}

html.dark-mode .theme-image-swap .theme-image-light {
  display: none;
}

html.dark-mode .theme-image-swap .theme-image-dark {
  display: inline-block;
}

html.dark-mode .theme-image-swap--invert-dark .theme-image-dark {
  filter: invert(1) hue-rotate(180deg);
}

html:not(.dark-mode) .theme-image-swap .theme-image-light {
  display: inline-block;
}

html:not(.dark-mode) .theme-image-swap .theme-image-dark {
  display: none;
}

.theme-image-swap img {
  max-width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
  pointer-events: auto !important;
}

.theme-image-swap p {
  margin-top: 0.75rem;
}

.theme-image-swap--medium {
  display: flex;
  justify-content: center;
}

.theme-image-swap--medium img {
  width: min(640px, 100%);
}

.theme-image-swap--small {
  display: flex;
  justify-content: center;
}

.theme-image-swap--small img {
  width: min(460px, 100%);
}

.docs-media {
  display: flex;
  justify-content: center;
  margin: 1rem 0 1.25rem;
}

.docs-media--medium img {
  width: min(760px, 100%);
}

.docs-media--small img {
  width: min(460px, 100%);
}

.docs-media img {
  display: block;
  max-width: 100%;
  height: auto;
  cursor: zoom-in;
}

.media-compare {
  width: min(980px, 100%);
  margin: 1rem auto 1.25rem;
  border-collapse: separate;
  border-spacing: 0.75rem 0.35rem;
}

.media-compare td {
  width: 50%;
  vertical-align: top;
  text-align: center;
}

.media-compare img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.35rem;
  cursor: zoom-in;
}

.docs-action-row {
  display: flex;
  justify-content: center;
  margin: 1rem 0 1.25rem;
}

.docs-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  border-radius: 0.55rem;
  border: 1px solid var(--primary-color);
  background: color-mix(in srgb, var(--primary-color) 12%, transparent);
  color: var(--primary-color) !important;
  font-weight: 600;
  text-decoration: none !important;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.docs-link-button:hover {
  background: color-mix(in srgb, var(--primary-color) 18%, transparent);
  border-color: var(--primary-dark-color);
  color: var(--primary-dark-color) !important;
}

#nav-path ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

#nav-path li.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex: 1 1 auto;
  min-width: 0;
  margin-left: auto;
  padding-right: var(--spacing-large);
  list-style: none;
}

#nav-path li.footer .footer-left,
#nav-path li.footer .footer-right {
  display: inline-flex;
  align-items: center;
}

#nav-path li.footer .footer-left {
  gap: 0.35rem;
  min-width: 0;
}

#nav-path li.footer .footer-right {
  margin-left: auto;
  white-space: nowrap;
}

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--image-modal-overlay);
  backdrop-filter: blur(4px);
}

.image-modal.is-open {
  display: flex;
}

body.image-modal-open {
  overflow: hidden;
}

.image-modal__backdrop {
  position: absolute;
  inset: 0;
}

.image-modal__figure {
  position: relative;
  z-index: 1;
  margin: 0;
  width: min(96vw, 1600px);
  max-height: 96vh;
}

.image-modal__image {
  display: block;
  width: 100%;
  max-height: calc(96vh - 3rem);
  height: auto;
  object-fit: contain;
  background: transparent;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.35);
  cursor: zoom-out;
}

.image-modal__caption {
  margin-top: 0.75rem;
  color: var(--image-modal-caption);
  text-align: center;
  font-size: 0.95rem;
}

.image-modal__caption:empty {
  display: none;
}
