.graph-search {
  flex: 0 1 18rem;
  margin-left: auto;
  min-width: 10rem;
}

.graph-search__icon {
  font-size: 1.1rem;
  left: 0.7rem;
  top: 0.62rem;
}

.graph-search input {
  background: color-mix(in srgb, var(--color-surface) 72%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-ink) 14%, transparent);
  border-radius: var(--radius-control);
  font-size: 0.78rem;
  min-height: 2.35rem;
  padding: 0.5rem 0.8rem 0.5rem 2.2rem;
  width: 100%;
}

.graph-search input:focus {
  background: var(--color-surface);
  border-color: color-mix(in srgb, var(--color-ink-strong) 55%, transparent);
  outline: 0;
}

.graph-search__results {
  background: var(--color-surface);
  border-radius: var(--radius-surface);
  box-shadow: 0 0.65rem 1.5rem color-mix(in srgb, var(--color-ink-strong) 12%, transparent);
  left: 0;
  margin-top: 0.35rem;
  position: absolute;
  right: 0;
  z-index: 12;
}

.graph-search__results a {
  font-size: 0.76rem;
  padding: 0.65rem 0.75rem;
  text-decoration: none;
}

.graph-search__results a + a {
  border-top: 1px solid color-mix(in srgb, var(--color-ink) 8%, transparent);
}

.graph-search__results a:hover,
.graph-search__results a:focus-visible {
  background: color-mix(in srgb, var(--color-ink) 7%, var(--color-surface));
}

.graph-search__results p {
  padding: 0.65rem 0.75rem;
}

.curriculum-graph {
  --curriculum-graph-width: 1.25rem;
  --curriculum-content-gap: 2px;
  --curriculum-boundary-gutter: 0px;
  --curriculum-lane-spacing: 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--color-ink) 14%, transparent);
  border-top: 1px solid color-mix(in srgb, var(--color-ink) 14%, transparent);
  container: curriculum-graph / inline-size;
}

.curriculum-graph__layout {
  isolation: isolate;
  position: relative;
}

.curriculum-graph__svg {
  height: 100%;
  inset: 0;
  overflow: visible;
  pointer-events: none;
  position: absolute;
  width: 100%;
  z-index: 5;
}

.curriculum-graph__arrow {
  fill: var(--color-muted);
}

.curriculum-graph__arrow--highlighted {
  fill: var(--color-dependency);
}

.curriculum-graph__arrow--proposed {
  fill: var(--color-dependency);
}

.curriculum-graph__arrow--boundary {
  fill: color-mix(in srgb, var(--color-muted) 65%, transparent);
}

.curriculum-graph__edge {
  fill: none;
  stroke: var(--color-muted);
  stroke-width: 2;
  transition: opacity 120ms ease, stroke 120ms ease, stroke-width 120ms ease;
  vector-effect: non-scaling-stroke;
}

.curriculum-graph__edge--proposed {
  stroke: var(--color-dependency);
}

.curriculum-graph__edge--proposed.is-proposal-deleted {
  stroke-dasharray: 5 4;
}

.curriculum-graph__edge--boundary {
  stroke: color-mix(in srgb, var(--color-muted) 65%, transparent);
  stroke-dasharray: 3 4;
  stroke-width: 1.5;
}

.curriculum-graph__boundary-count {
  fill: var(--color-muted);
  font-size: 0.65rem;
  font-weight: 700;
  paint-order: stroke;
  stroke: var(--color-panel-start);
  stroke-linejoin: round;
  stroke-width: 4px;
}

.curriculum-graph__edge--boundary.is-related {
  stroke: var(--color-dependency);
}

.curriculum-graph__boundary-count.is-related {
  fill: var(--color-dependency);
}

.curriculum-graph__list {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.curriculum-graph__item {
  display: grid;
  grid-template-columns: var(--curriculum-graph-width) minmax(0, 1fr);
  transition: opacity 120ms ease;
}

.curriculum-graph__item + .curriculum-graph__item {
  border-top: 1px solid color-mix(in srgb, var(--color-ink) 10%, transparent);
}

.curriculum-graph__item.is-proposed-isolated + .curriculum-graph__item:not(.is-proposed-isolated) {
  margin-top: var(--space-3);
}

.curriculum-graph__anchor {
  align-self: center;
  background: currentColor;
  border-radius: 50%;
  color: var(--color-ink-strong);
  grid-column: 1;
  grid-row: 1;
  height: 1.2rem;
  justify-self: end;
  margin-right: calc(var(--curriculum-content-gap) + var(--curriculum-boundary-gutter) + var(--curriculum-node-lane) * var(--curriculum-lane-spacing));
  width: 1.2rem;
  z-index: 4;
}

.curriculum-graph__item.is-proposal-created {
  color: var(--color-proposal-created);
}

.curriculum-graph__item.is-proposal-deleted {
  color: var(--color-proposal-deleted);
}

.curriculum-graph__item.is-proposal-rename {
  color: var(--color-proposal-rename);
}

.curriculum-graph__item.is-proposal-content {
  color: var(--color-proposal-content);
}

.curriculum-graph__item[class*="is-proposal-"] .curriculum-graph__anchor {
  color: currentColor;
}

.curriculum-graph__item[class*="is-proposal-"] .curriculum-graph__name,
.curriculum-graph__item[class*="is-proposal-"] .curriculum-graph__row[aria-current="page"] .curriculum-graph__name {
  color: currentColor;
}

.curriculum-graph__anchor.has-progress {
  position: relative;
}

.curriculum-graph__anchor.has-progress::before,
.unit-completion__indicator::before {
  background: var(--color-surface);
  border-radius: 50%;
  content: "";
  height: 60%;
  width: 60%;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}

.curriculum-graph__anchor.has-progress.is-completed:not(.is-recognized)::before,
.unit-completion__indicator.is-completed:not(.is-recognized)::before {
  content: none;
}

.curriculum-graph__anchor.has-progress.is-recognized,
.unit-completion__indicator.is-recognized {
  background: currentColor;
}

.curriculum-graph__anchor.has-progress.is-recognized::before,
.unit-completion__indicator.is-recognized::before {
  background: linear-gradient(to top, currentColor 75%, var(--color-surface) 75%);
}

.unit-completion {
  align-items: center;
  display: flex;
  flex: none;
  gap: var(--space-1);
  margin-left: auto;
}

.unit-completion button {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--color-ink-strong);
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 700;
  gap: var(--space-2);
  padding: var(--space-2);
  white-space: nowrap;
}

.unit-completion .unit-completion__literal {
  color: var(--color-muted);
  font-weight: 600;
}

.unit-completion__indicator {
  background: currentColor;
  border-radius: 50%;
  display: inline-block;
  flex: none;
  height: 1.2rem;
  position: relative;
  width: 1.2rem;
}

.curriculum-graph__row {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 0.25rem;
  grid-column: 1 / -1;
  grid-row: 1;
  min-width: 0;
  padding: var(--space-3) 3.75rem var(--space-3) calc(var(--curriculum-graph-width) + var(--space-3));
  text-align: left;
  text-decoration: none;
  transition: background 120ms ease;
  z-index: 2;
}

.curriculum-graph__content {
  align-self: center;
  align-items: center;
  background: color-mix(in srgb, var(--color-surface) 72%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-ink) 12%, transparent);
  border-radius: var(--radius-control);
  display: flex;
  grid-column: 2;
  grid-row: 1;
  height: 2.2rem;
  justify-content: center;
  justify-self: end;
  margin-right: var(--space-2);
  text-decoration: none;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
  width: 2.2rem;
  z-index: 3;
}

.curriculum-graph__content:hover,
.curriculum-graph__content:focus-visible {
  background: var(--color-surface);
  border-color: color-mix(in srgb, var(--color-ink-strong) 45%, transparent);
  color: var(--color-ink-strong);
}

.curriculum-graph__content .material-symbols-rounded {
  font-size: 1.15rem;
}

.curriculum-graph__row:hover,
.curriculum-graph__row[aria-current="page"] {
  background: color-mix(in srgb, var(--color-ink) 7%, var(--color-surface));
  box-shadow: inset 0.22rem 0 var(--color-ink-strong);
}

.curriculum-graph__row[aria-current="page"] .curriculum-graph__name {
  color: var(--color-ink-strong);
}

.curriculum-graph__item.is-path-target .curriculum-graph__anchor {
  box-shadow: none;
  color: var(--color-ink-strong);
  position: relative;
}

.curriculum-graph__item.is-path-target .curriculum-graph__anchor::before {
  background: var(--color-surface);
  border-radius: 50%;
  content: "";
  height: 60%;
  width: 60%;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}

.curriculum-graph__item.is-path-target .curriculum-graph__anchor::after {
  background: currentColor;
  border-radius: 50%;
  content: "";
  height: 25%;
  width: 25%;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}

.curriculum-graph__row:focus-visible {
  outline: 2px solid var(--color-ink-strong);
  outline-offset: -2px;
}

.curriculum-graph__name {
  font-weight: 700;
}

.curriculum-graph.is-filtering .curriculum-graph__item:not(.is-related),
.curriculum-graph.is-filtering .curriculum-graph__edge:not(.is-related) {
  opacity: 0.2;
}

.curriculum-graph__item[data-relation-distance="0"] .curriculum-graph__row {
  background: color-mix(in srgb, var(--color-dependency) 15%, transparent);
}

.curriculum-graph__item[data-relation-distance="1"] .curriculum-graph__row {
  background: color-mix(in srgb, var(--color-dependency) 10%, transparent);
}

.curriculum-graph__item[data-relation-distance="2"] .curriculum-graph__row {
  background: color-mix(in srgb, var(--color-dependency) 6%, transparent);
}

.curriculum-graph__item[data-relation-distance="3"] .curriculum-graph__row,
.curriculum-graph__item[data-relation-distance="4"] .curriculum-graph__row {
  background: color-mix(in srgb, var(--color-dependency) 3%, transparent);
}

.curriculum-graph__edge.is-related {
  stroke: var(--color-dependency);
  stroke-width: 3;
}

.curriculum-graph__edge.is-related[data-relation-distance="1"] {
  opacity: 0.78;
  stroke-width: 2.6;
}

.curriculum-graph__edge.is-related[data-relation-distance="2"] {
  opacity: 0.58;
  stroke-width: 2.3;
}

.curriculum-graph__edge.is-related[data-relation-distance="3"],
.curriculum-graph__edge.is-related[data-relation-distance="4"] {
  opacity: 0.38;
  stroke-width: 2;
}

.curriculum-graph__boundary-count.is-related[data-relation-distance="1"] {
  opacity: 0.78;
}

.curriculum-graph__boundary-count.is-related[data-relation-distance="2"] {
  opacity: 0.58;
}

.curriculum-graph__boundary-count.is-related[data-relation-distance="3"],
.curriculum-graph__boundary-count.is-related[data-relation-distance="4"] {
  opacity: 0.38;
}

@media (max-width: 42rem) {
  .graph-search {
    flex-basis: auto;
    margin-left: 0;
    width: 100%;
  }
}
