:root {
  --oxford-50: #f1f7ff;
  --oxford-600: #0058be;
  --oxford-700: #00397a;
  --oxford-900: #001936;

  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;

  --sun-300: #ffedb0;
  --sun-500: #ffd13a;

  --jp-content-font-size1: 16px !important;
}

html {
  box-sizing: border-box;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

body.jp-Notebook {
  padding: 0;
  margin: 0;
}

main > .jp-Cell.jp-mod-noOutputs {
  display: none;
}

main > .jp-Cell:has(h1) {
  background-color: var(--oxford-50);
  padding: 0 0 3em;
  position: relative;
  z-index: 1;
}

.jp-Cell-outputWrapper {
  max-width: 64rem !important;
  margin: 0 auto !important;
  padding: 0 2rem !important;
}

.jp-Cell-outputArea:has(h2:first-child > a) {
  h2 {
    border-top: 1px solid var(--gray-300);
    margin-block: 3rem 0 !important;
    padding-block: 3rem 0 !important;
  }
}

.jp-Cell-outputArea:has(h4:first-child > a) {
  h4 {
    border-top: 1px dashed var(--gray-200);
    font-size: 1.25em;
    margin-block: 2rem 0 !important;
    padding-block: 2rem 0 !important;
  }
}

.jp-Cell-outputArea:has(h2:first-child > a),
.jp-Cell-outputArea:has(h4:first-child > a) {
  h2 a,
  h4 a {
    color: var(--oxford-600);
    line-height: 1.2;
    text-decoration: none !important;

    &:not([href^="#"])::after {
      content: "\21F2";
      display: inline-block;
      transform: rotate(-90deg);
      margin-inline-start: 0.25em;
    }

    &:hover {
      color: var(--oxford-900);
      text-decoration: underline !important;
    }

    &:hover {
      color: var(--oxford-900);
      text-decoration: underline !important;
    }

    &:focus-visible {
      background-color: var(--sun-300);
      color: var(--oxford-900);
      outline: 2px solid var(--sun-500);
      outline-offset: 0.25rem;
    }
  }
}

img {
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  margin: 2rem 1rem 3rem;
  width: calc(100% - 2rem);
}

details {
  background-color: var(--oxford-50);
  border: 1px solid var(--oxford-700);
  border-left-width: 4px;
  margin: 2rem 0 0;
}

details[open] {
  background-color: white;
}

details summary {
  cursor: pointer;
  color: var(--oxford-700);
  font-size: 1.1em !important;
  padding: 0.5rem 1rem;
}

details summary > * {
  display: inline;
}

details ul {
  border-top: 1px solid var(--oxford-700);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0 !important;
  padding: 1rem 0 1rem 2.5rem !important;

  li {
    font-size: 18px;
    line-height: 1.3;

    a {
      font-weight: 600;
    }
  }
}
