:root {
  /* 1. Typography */
  --bulma-family-primary: "Qualion", sans-serif;
  --bulma-family-secondary: "Qualion", sans-serif;
  --bulma-weight-light: 300;
  --bulma-weight-normal: 400;
  --bulma-weight-medium: 500;
  --bulma-weight-semibold: 600;
  --bulma-weight-bold: 600;
  --bulma-weight-extrabold: 700;

  /* 2. Core colour scheme (DeepSeer Deep Purple) */
  --bulma-scheme-h: 249;
  --bulma-scheme-s: 49%;
  --bulma-scheme-l: 27%;

  /* Primary (DeepSeer Deep Purple) */
  --bulma-primary-h: var(--bulma-scheme-h);
  --bulma-primary-s: var(--bulma-scheme-s);
  --bulma-primary-l: var(--bulma-scheme-l);
  --bulma-primary-invert-l: 96%;

  /* Link (DeepSeer Inky Blue) */
  --bulma-link-h: 226;
  --bulma-link-s: 94%;
  --bulma-link-l: 45%;

  /* Info (DeepSeer Blue) */
  --bulma-info-h: 215;
  --bulma-info-s: 96%;
  --bulma-info-l: 49%;
  --bulma-info-invert-l: 96%;

  /* Success (DeepSeer Green) */
  --bulma-success-h: 162;
  --bulma-success-s: 86%;
  --bulma-success-l: 52%;

  /* Warning (DeepSeer Yellow) */
  --bulma-warning-h: 36;
  --bulma-warning-s: 98%;
  --bulma-warning-l: 65%;

  /* Danger (DeepSeer Red) */
  --bulma-danger-h: 0;
  --bulma-danger-s: 100%;
  --bulma-danger-l: 70%;
  --bulma-danger-invert-l: 96%;

  /* 4. Border radius (bigger, softer corners) */
  --bulma-radius-small: 0.5rem;
  --bulma-radius: 1rem;
  --bulma-radius-medium: 1rem;
  --bulma-radius-large: 1.5rem;
}

html {
  /* Prevent browsers from resizing text automatically */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.has-background-inky-purple {
  background-color: #402cbf;
}

/* DeepSeer Inky Blue -> DeepSeer Red */
.has-background-gradient-red {
  background-image: linear-gradient(45deg, #ff6666, #073ae0);
}

/* DeepSeer Inky Blue -> DeepSeer Green */
.has-background-gradient-green {
  background-image: linear-gradient(45deg, #1aeeae, #073ae0);
}

/* DeepSeer Inky Blue -> DeepSeer Soft Pink */
.has-background-gradient-pink {
  background-image: linear-gradient(45deg, #ffcccc, #073ae0);
}

.gap-1 {
  gap: 0.25rem;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-3 {
  gap: 1rem;
}

.gap-4 {
  gap: 1.5rem;
}

.gap-5 {
  gap: 3rem;
}

.is-absolute {
  position: absolute;
}

.overflow-visible {
  overflow: visible;
}

.overflow-auto {
  overflow: auto;
}

.width-fill {
  width: max-content;
  min-width: 100%;
}

.dropdown.is-focusable:focus-within .dropdown-menu {
  display: block;
}

.fullwidth {
  width: 100%;
}

.fullheight {
  height: 100%;
}

.rotate {
  display: inline-block;
  animation: spinner 1.5s linear infinite;
}

@keyframes spinner {
  to {
    transform: rotate(360deg);
  }
}

.hx-indicator::before {
  content: " ";
  width: 0.75em;
  height: 0.75em;
}

.hx-indicator.htmx-request::before {
  border: 1px solid var(--bulma-primary-bold);
  border-bottom-color: transparent;
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.narrative-node:hover {
  background-color: var(--bulma-text-soft);
  transition: transform 0.2s;
  text-decoration: none;
  cursor: pointer;
}

.narrative-node:has(input:checked) {
  background-color: var(--bulma-primary-soft);
  transition: transform 0.2s;
  text-decoration: none;
  cursor: pointer;
}

.text-nowrap {
  white-space: nowrap;
}

.border-none {
  border: none !important;
}

.sigma-renderer {
  aspect-ratio: 16/9;
}

.sigma-overlay:fullscreen .sigma-renderer {
  aspect-ratio: auto;
  width: 100%;
  height: 100%;
}

.sigma-overlay-actions {
  z-index: 20;
  position: absolute;
  top: 0;
  left: 0;
  padding: 1em;
  display: flex;
  gap: 0.5em;
}

.sigma-overlay-communities {
  z-index: 20;
  position: absolute;
  bottom: 0;
  right: 0;
  padding: 1em;
  overflow: auto;
  max-height: 100%;
}

.sigma-overlay-settings {
  z-index: 30;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1em;
  overflow: auto;
  max-height: 100%;
  background: var(--bulma-background);
}

.sigma-node-details-container {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
}

.sigma-node-details {
  max-width: 240px;
  max-height: 100%;
  overflow: auto;
  z-index: 3;
  word-break: break-word;
}

.chart-container {
  aspect-ratio: 16/9;
  width: 100%;
}

body {
  min-height: 100vh;
}

.autocomplete .dropdown-content {
  max-height: 50vh;
}

.autocomplete .textarea {
  cursor: text;
  overflow: auto;
}

.autocomplete .textarea .input {
  width: auto;
  border: none;
  outline: none;
  box-shadow: none;
  height: 2em;
}

.is-editable {
  position: relative;
}

.is-editable .box {
  margin-bottom: -0.25rem;
}

.is-editable a:last-of-type {
  --bulma-button-text-decoration: none;
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
}

.inline-checkboxes div {
  height: 100%;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
}

.custom-icon {
  vertical-align: -0.4em;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}

.stats > *:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 1em;
  background: #ccc;
  margin: 0 0.25rem;
  vertical-align: middle;
}

.wrap-anywhere {
  overflow-wrap: anywhere;
}

.card-header.is-hoverable:hover {
  cursor: pointer;
  background-color: var(--bulma-background-hover);
}

.sidebar-container {
  display: flex;
}

.sidebar {
  overflow-x: auto;
  width: 24rem;
  height: 100%;
}

.sidebar.is-toggled {
  display: none;
}

@media (max-width: 1024px) {
  .sidebar-container {
    flex-direction: column;
  }

  .sidebar {
    display: none;
  }

  .sidebar.is-toggled {
    display: block;
    width: 100%;
  }
}

.white-space-pre-wrap {
  white-space: pre-wrap;
}

.modal.is-large .modal-content {
  width: 90vw;
  max-height: 80vh;
}
