:root {
  --notes-grey: #c0c0c0;
  --notes-grey-light: #dedede;
  --notes-grey-dark: #747474;
  --notes-blue: #0000ee;
  --notes-visited: #551a8b;
  --notes-yellow: #f2f20b;
}

html:has(.notes-web),
body:has(.notes-web) {
  min-width: 0;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--notes-grey);
}

body:has(.notes-web) .site-footer {
  display: none !important;
}

.notes-web,
.notes-web * {
  box-sizing: border-box;
}

.notes-web {
  position: fixed;
  inset: 72px 0 0;
  z-index: 20;
  min-width: 0;
  width: 100vw;
  height: calc(100dvh - 72px);
  padding: 7px 8px 48px;
  overflow: auto;
  color: #000000;
  background: var(--notes-grey);
  font-family: "Times New Roman", Times, serif;
  font-size: clamp(15px, 1.15vw, 19px);
  line-height: 1.18;
  text-align: left;
}

.notes-web a {
  color: var(--notes-blue);
  text-decoration: underline;
  cursor: pointer;
}

.notes-web a:visited {
  color: var(--notes-visited);
}

.notes-web a:hover,
.notes-web a:focus-visible,
.notes-web button:hover,
.notes-web button:focus-visible {
  color: #ffffff;
  background: var(--notes-blue);
  outline: 1px dotted #ffffff;
  outline-offset: -2px;
}

.notes-directory {
  position: relative;
  width: 100%;
  min-height: calc(100dvh - 127px);
}

.notes-directory h1 {
  margin: 0 0 17px;
  font-family: "Times New Roman", Times, serif;
  font-size: clamp(25px, 2.45vw, 42px);
  font-weight: 700;
  line-height: 1;
}

.notes-directory h1 a {
  color: var(--notes-blue);
}

.notes-directory__links {
  margin: 0 0 10px;
  font-size: .86em;
}

.notes-toolbar {
  display: inline-flex;
  max-width: 100%;
  margin: 0 0 13px;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid var(--notes-grey-dark);
  border-bottom: 2px solid var(--notes-grey-dark);
  background: #b8b8b8;
  font: 700 .76em/1 Arial, Helvetica, sans-serif;
}

.notes-toolbar a,
.notes-toolbar button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 25px;
  margin: 0;
  padding: 3px 10px;
  border: 0;
  border-right: 1px solid #777777;
  color: #101075;
  background: transparent;
  font: inherit;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.notes-toolbar a:last-child {
  border-right: 0;
}

.notes-toolbar b {
  color: #e5ff00;
  font-family: "Times New Roman", Times, serif;
  font-size: 1.35em;
  font-style: italic;
  text-shadow: 1px 1px #3131a3;
}

.notes-toolbar span {
  color: #ffff21;
  text-shadow: 1px 1px #5b4f91;
}

.notes-search {
  display: flex;
  align-items: center;
  gap: 7px;
  width: min(100%, 560px);
  margin: 0 0 12px;
  padding: 5px;
  border: 2px inset #e2e2e2;
  font: .8em/1.1 Arial, Helvetica, sans-serif;
}

.notes-search[hidden] {
  display: none;
}

.notes-search input {
  min-width: 70px;
  flex: 1 1 auto;
  height: 24px;
  padding: 2px 4px;
  border: 2px inset #ffffff;
  border-radius: 0;
  color: #000000;
  background: #ffffff;
  font: 14px/1 Arial, Helvetica, sans-serif;
}

.notes-search button {
  min-height: 24px;
  padding: 2px 8px;
  border: 2px outset #eeeeee;
  border-radius: 0;
  color: #000000;
  background: var(--notes-grey);
  font: 12px/1 Arial, Helvetica, sans-serif;
  cursor: pointer;
}

.notes-directory__index {
  width: min(700px, 43vw);
  margin-top: 2px;
}

.notes-directory__index ul {
  margin: 0;
  padding-left: 31px;
}

.notes-directory__index li {
  margin: 0 0 2px;
  padding: 0;
  font-size: clamp(17px, 1.4vw, 24px);
  line-height: 1.08;
}

.notes-directory__index li[hidden] {
  display: none;
}

.notes-directory__index li a {
  font-weight: 700;
}

.notes-directory__index li i {
  margin-left: 1px;
  font-size: .78em;
}

.notes-directory__index li small {
  font-size: .62em;
}

.notes-directory__index mark {
  display: inline-block;
  margin-left: 4px;
  padding: 0 2px;
  transform: rotate(-3deg);
  color: #111111;
  background: var(--notes-yellow);
  font: 700 8px/1.1 Arial, Helvetica, sans-serif;
}

.notes-directory__status {
  margin: 14px 0 0 19px;
  font-size: .74em;
  font-style: italic;
}

.notes-help {
  width: min(100%, 700px);
  margin: 38px 0 0;
  padding-top: 5px;
  border-top: 1px solid #858585;
  font-size: .72em;
}

.notes-help code {
  font-family: "Courier New", Courier, monospace;
  font-size: .92em;
}

.notes-document {
  display: none;
  position: fixed;
  inset: 72px 0 0;
  z-index: 22;
  width: 100vw;
  height: calc(100dvh - 72px);
  padding: 0 10px 70px;
  overflow: auto;
  background: var(--notes-grey);
  scrollbar-color: #7e7e7e #d7d7d7;
}

.notes-slideshow {
  position: absolute;
  right: 1.1vw;
  top: clamp(210px, 40vh, 390px);
  width: min(51vw, 980px);
  margin: 0;
}

.notes-slideshow__frame {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
}

.notes-slideshow__frame img {
  display: block;
  width: 100%;
  aspect-ratio: 1.51;
  border: 2px inset #eeeeee;
  background: #a9a9a9;
  object-fit: contain;
}

.notes-slideshow__frame button {
  width: 32px;
  height: 42px;
  border: 2px outset #eeeeee;
  border-radius: 0;
  color: #101075;
  background: #b8b8b8;
  font: 700 19px/1 "Times New Roman", serif;
  cursor: pointer;
}

.notes-slideshow > p {
  margin: 5px 42px 0;
  color: #333333;
  font: italic 11px/1 Arial, Helvetica, sans-serif;
  text-align: center;
}

.notes-document:target,
.notes-web.is-reading .notes-document.is-current {
  display: block;
}

.notes-web:has(.notes-document:target) .notes-directory,
.notes-web.is-reading .notes-directory {
  display: none;
}

.notes-document__nav {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 0 -10px 22px;
  padding: 8px 10px;
  border-bottom: 1px solid #8d8d8d;
  background: var(--notes-grey);
  font-size: .74em;
}

.notes-document__nav button {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--notes-blue);
  background: transparent;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.notes-document__page {
  width: min(100%, 1180px);
  margin: 0;
}

.notes-document__page > h1,
.notes-entry__page > h1 {
  margin: 0 0 16px;
  font-family: "Times New Roman", Times, serif;
  font-size: clamp(27px, 3.2vw, 52px);
  font-weight: 700;
  line-height: 1;
}

.notes-document__body {
  width: min(100%, 1050px);
  font-size: clamp(16px, 1.35vw, 21px);
  line-height: 1.36;
}

.notes-document__body p {
  margin: 0 0 1.22em;
}

.notes-document__body strong {
  font-weight: 700;
}

.notes-document__body a {
  color: var(--notes-blue);
}

.notes-document__body h2,
.notes-document__body h3,
.notes-document__body h4 {
  margin: 1.2em 0 .35em;
  font-family: "Times New Roman", Times, serif;
  font-size: 1em;
  line-height: inherit;
}

.notes-document__body img {
  max-width: 100%;
  height: auto;
}

.notes-document__body blockquote {
  margin: 1em 0 1em 2em;
}

.notes-document__end {
  margin: 34px 0 0;
  padding-top: 8px;
  border-top: 1px solid #858585;
  font-size: .74em;
}

.notes-entry {
  padding-top: 0;
}

.notes-entry .notes-document__nav {
  margin-right: -8px;
  margin-left: -8px;
}

.notes-entry__page {
  padding-top: 2px;
}

.notes-access-dialog {
  width: min(360px, calc(100vw - 34px));
  padding: 29px;
  border: 2px outset var(--notes-grey-light);
  border-radius: 0;
  color: #000000;
  background: var(--notes-grey);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, .34);
  font-family: "Times New Roman", Times, serif;
  text-align: center;
}
.notes-access-dialog::backdrop { background: rgba(0, 0, 0, .34); }
.notes-access-dialog h2 { margin: 0 0 20px; font: 700 27px/1.05 "Times New Roman", Times, serif; }
.notes-access-dialog > a { display: inline-block; border: 2px outset #eeeeee; padding: 10px 20px; color: #ffffff; background: var(--notes-blue); font: 700 12px/1 Arial, Helvetica, sans-serif; text-decoration: none; text-transform: uppercase; }
.notes-access-dialog__close { position: absolute; top: 6px; right: 8px; border: 0; color: #000000; background: transparent; font: 24px/1 Arial, Helvetica, sans-serif; cursor: pointer; }

@media (max-width: 640px) {
  .notes-web {
    padding: 6px 6px 42px;
    font-size: 15px;
  }

  .notes-directory { min-height: 0; }

  .notes-directory__index { width: 100%; }

  .notes-slideshow {
    position: static;
    width: 100%;
    margin-top: clamp(70px, 18vh, 150px);
  }

  .notes-slideshow__frame {
    grid-template-columns: 30px minmax(0, 1fr) 30px;
    gap: 4px;
  }

  .notes-directory h1 {
    margin-bottom: 13px;
    font-size: 25px;
  }

  .notes-toolbar {
    display: grid;
    grid-template-columns: repeat(2, auto);
    width: 100%;
    overflow-x: auto;
  }

  .notes-toolbar a,
  .notes-toolbar button {
    justify-content: center;
    padding-right: 7px;
    padding-left: 7px;
    font-size: 10px;
  }

  .notes-document {
    padding-right: 8px;
    padding-left: 8px;
  }

  .notes-document__nav {
    margin-right: -8px;
    margin-left: -8px;
  }

  .notes-document__body {
    font-size: 17px;
    line-height: 1.32;
  }
}

@media (prefers-reduced-motion: reduce) {
  .notes-web,
  .notes-web * {
    scroll-behavior: auto !important;
  }
}

@media (forced-colors: active) {
  .notes-toolbar,
  .notes-search,
  .notes-document__nav {
    border: 1px solid CanvasText;
  }
}

@media print {
  body:has(.notes-web) {
    overflow: visible;
    background: #ffffff;
  }

  .notes-web {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    background: #ffffff;
  }

  .notes-directory,
  .notes-document__nav,
  .notes-document__end {
    display: none !important;
  }

  .notes-document,
  .notes-document:target,
  .notes-web.is-reading .notes-document.is-current {
    display: block;
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    overflow: visible;
    background: #ffffff;
  }
}

@media print {
  .notes-web.is-reading .notes-document:not(.is-current) { display: none; }
}
