@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: notes-view-old 0.34s cubic-bezier(0.4, 0, 1, 1) both;
}

::view-transition-new(root) {
  animation: notes-view-new 0.62s cubic-bezier(0.22, 1, 0.36, 1) both;
}

html {
  overflow: hidden;
  background: #f2efe7;
}

.notes-page {
  --notes-paper: #f2efe7;
  --notes-paper-deep: #e7e2d7;
  --notes-ink: #171b19;
  --notes-muted: #626761;
  --notes-faint: rgba(23, 27, 25, 0.13);
  --notes-gold: #a28b4c;
  --notes-gold-bright: #b3a369;
  --notes-panel: rgba(249, 247, 241, 0.965);
  --notes-sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --notes-serif: "Fraunces", Georgia, serif;
  --notes-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --notes-ease: cubic-bezier(0.22, 1, 0.36, 1);
  width: 100%;
  min-height: 100svh;
  overflow: hidden;
  color: var(--notes-ink);
  background:
    radial-gradient(circle at 69% 47%, rgba(179, 163, 105, 0.075), transparent 31rem),
    var(--notes-paper);
  font-family: var(--notes-sans);
  animation: notes-page-enter 0.68s var(--notes-ease) both;
}

.notes-page::before {
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  content: "";
  background: radial-gradient(circle, rgba(23, 27, 25, 0.22) 0.45px, transparent 0.55px) 0 0 / 5px 5px;
  opacity: 0.09;
}

.notes-page::after {
  position: fixed;
  z-index: 200;
  inset: 0;
  pointer-events: none;
  content: "";
  background: var(--notes-ink);
  transform: translateY(102%);
  transition: transform 0.48s var(--notes-ease);
}

.notes-page.is-leaving::after {
  transform: translateY(0);
}

.notes-page.is-leaving .reader-header,
.notes-page.is-leaving .notes-explorer {
  opacity: 0.5;
  transform: scale(0.992);
  transition: opacity 0.3s ease, transform 0.42s var(--notes-ease);
}

.notes-page button,
.notes-page a {
  -webkit-tap-highlight-color: transparent;
}

.notes-page button:focus-visible,
.notes-page a:focus-visible {
  outline: 2px solid var(--notes-gold);
  outline-offset: 5px;
}

.notes-skip-link {
  position: fixed;
  z-index: 150;
  top: 12px;
  left: 12px;
  padding: 9px 14px;
  color: var(--notes-paper);
  background: var(--notes-ink);
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.notes-skip-link:focus {
  transform: translateY(0);
}

.reader-header {
  position: fixed;
  z-index: 40;
  top: 0;
  left: 0;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: flex-start;
  padding: 25px clamp(22px, 4.2vw, 66px);
  pointer-events: none;
}

.reader-header__home {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--notes-ink);
  font-family: var(--notes-serif);
  font-size: 17px;
  line-height: 1;
  pointer-events: auto;
}

.reader-header__home > span:first-child {
  color: var(--notes-gold);
  font-family: var(--notes-sans);
  transition: transform 0.3s var(--notes-ease);
}

.reader-header__home:hover > span:first-child,
.reader-header__home:focus-visible > span:first-child {
  transform: translateX(-4px);
}

.notes-explorer {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100dvh;
  min-height: 100svh;
  overflow: hidden;
}

.notes-intro {
  position: absolute;
  z-index: 5;
  top: clamp(112px, 15vh, 158px);
  left: clamp(24px, 5.2vw, 82px);
  width: min(390px, 33vw);
  pointer-events: none;
}

.notes-intro h1 {
  margin: 0;
  font-family: var(--notes-serif);
  font-size: clamp(58px, 7.4vw, 108px);
  font-weight: 500;
  letter-spacing: -0.057em;
  line-height: 0.9;
}

.notes-intro__description {
  max-width: 310px;
  margin: 26px 0 0;
  color: var(--notes-muted);
  font-size: 13px;
  line-height: 1.6;
}

.spiral-stage,
.spiral-canvas,
.note-nodes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.spiral-stage {
  --spiral-scale-a: 0.94;
  --spiral-scale-b: 1.06;
  --spiral-scale-c: 0.88;
  --spiral-scale-d: 1.03;
  z-index: 2;
  overflow: hidden;
}

.spiral-canvas {
  z-index: 1;
  pointer-events: none;
}

.spiral-canvas,
.note-nodes {
  transform-origin: var(--spiral-origin-x, 60%) var(--spiral-origin-y, 54%);
  animation: spiral-float-breathe 32s cubic-bezier(0.45, 0, 0.55, 1) infinite;
  will-change: transform;
}

.notes-page.is-note-open .spiral-canvas,
.notes-page.is-note-open .note-nodes {
  animation-play-state: paused;
}

.note-nodes {
  z-index: 3;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
}

.note-node-item {
  position: absolute;
  top: var(--node-y, 50%);
  left: var(--node-x, 50%);
  opacity: 0;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(0.7);
  transition:
    opacity 0.45s ease var(--node-delay, 0ms),
    transform 0.7s var(--notes-ease) var(--node-delay, 0ms),
    top 0.6s var(--notes-ease),
    left 0.6s var(--notes-ease);
}

.note-node-item.is-positioned {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.note-node {
  position: relative;
  display: grid;
  width: 46px;
  height: 46px;
  padding: 0;
  place-items: center;
  color: var(--notes-ink);
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.note-node__dot {
  position: relative;
  display: block;
  width: 8px;
  height: 8px;
  background: var(--notes-ink);
  border: 2px solid var(--notes-paper);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(23, 27, 25, 0.42);
  transition:
    width 0.42s var(--notes-ease),
    height 0.42s var(--notes-ease),
    background 0.3s ease,
    box-shadow 0.42s var(--notes-ease),
    transform 0.42s var(--notes-ease);
}

.note-node__dot::before {
  position: absolute;
  inset: 50%;
  width: 28px;
  height: 28px;
  content: "";
  border: 1px solid rgba(162, 139, 76, 0.45);
  border-radius: inherit;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.4);
  transition: opacity 0.35s ease, transform 0.6s var(--notes-ease);
}

.note-node:hover .note-node__dot,
.note-node:focus-visible .note-node__dot,
.note-node.is-active .note-node__dot {
  width: 12px;
  height: 12px;
  background: var(--notes-gold-bright);
  box-shadow:
    0 0 0 1px rgba(162, 139, 76, 0.65),
    0 5px 18px rgba(116, 94, 37, 0.23);
  transform: scale(1.04);
}

.note-node:hover .note-node__dot::before,
.note-node:focus-visible .note-node__dot::before,
.note-node.is-active .note-node__dot::before {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.note-node[aria-expanded="true"] .note-node__dot::before {
  animation: note-ring 2.4s ease-out infinite;
}

.notes-state {
  position: absolute;
  z-index: 4;
  right: clamp(24px, 4.2vw, 66px);
  bottom: 27px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--notes-muted);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: opacity 0.3s ease;
}

.notes-state.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.notes-state.is-error {
  max-width: 310px;
  color: #754737;
  letter-spacing: 0.04em;
  line-height: 1.5;
  text-align: right;
  text-transform: none;
}

.notes-state__pulse {
  width: 5px;
  height: 5px;
  background: var(--notes-gold);
  border-radius: 50%;
  animation: state-pulse 1.2s ease-in-out infinite alternate;
}

.note-scrim {
  position: fixed;
  z-index: 59;
  inset: 0;
  visibility: hidden;
  pointer-events: none;
  background: rgba(20, 22, 20, 0.28);
  opacity: 0;
  transition: opacity 0.35s ease, visibility 0.35s;
  backdrop-filter: blur(2px);
}

.note-panel {
  position: fixed;
  z-index: 70;
  top: var(--panel-y, 110px);
  left: var(--panel-x, 50vw);
  display: flex;
  width: min(590px, calc(100vw - 48px));
  max-height: min(74dvh, 760px);
  overflow: hidden;
  flex-direction: column;
  color: var(--notes-ink);
  background: var(--notes-panel);
  border: 1px solid rgba(23, 27, 25, 0.14);
  border-radius: 16px;
  box-shadow:
    0 28px 80px rgba(29, 29, 25, 0.17),
    0 4px 16px rgba(29, 29, 25, 0.055);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.985);
  transform-origin: 30% 15%;
  visibility: hidden;
  transition:
    opacity 0.22s ease,
    transform 0.48s var(--notes-ease),
    visibility 0.48s;
  backdrop-filter: blur(18px);
}

.note-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  visibility: visible;
}

.note-panel.is-pinned {
  border-color: rgba(162, 139, 76, 0.38);
  box-shadow:
    0 30px 88px rgba(29, 29, 25, 0.2),
    0 0 0 1px rgba(179, 163, 105, 0.08) inset;
}

.note-panel__head {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 30px 24px;
  border-bottom: 1px solid var(--notes-faint);
}

.note-panel__heading {
  min-width: 0;
}

.note-panel__index,
.note-panel__meta {
  margin: 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.13em;
  line-height: 1.45;
  text-transform: uppercase;
}

.note-panel__index {
  margin-bottom: 9px;
  color: var(--notes-gold);
}

.note-panel__meta {
  color: var(--notes-muted);
}

.note-panel h2 {
  max-width: 475px;
  margin: 9px 0 0;
  font-family: var(--notes-serif);
  font-size: clamp(25px, 2.25vw, 34px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.16;
}

.note-panel__close {
  position: relative;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  padding: 0;
  color: var(--notes-ink);
  background: transparent;
  border: 1px solid var(--notes-faint);
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease, transform 0.35s var(--notes-ease);
}

.note-panel__close:hover {
  color: var(--notes-paper);
  background: var(--notes-ink);
  border-color: var(--notes-ink);
  transform: rotate(4deg);
}

.note-panel__close span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 1px;
  background: currentColor;
}

.note-panel__close span:first-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

.note-panel__close span:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.note-panel__body {
  min-height: 120px;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 27px 30px 34px;
  scrollbar-color: rgba(23, 27, 25, 0.26) transparent;
  scrollbar-width: thin;
}

.note-panel__loading {
  position: relative;
  margin: 3px 0;
  padding-left: 22px;
  color: var(--notes-muted);
  font-size: 12px;
}

.note-panel__loading::before {
  position: absolute;
  top: 0.58em;
  left: 0;
  width: 10px;
  height: 10px;
  content: "";
  border: 1px solid rgba(23, 27, 25, 0.2);
  border-top-color: var(--notes-gold);
  border-radius: 50%;
  animation: note-loading 0.75s linear infinite;
}

.note-panel__error {
  padding: 18px;
  color: #68473d;
  background: rgba(157, 110, 83, 0.08);
  border: 1px solid rgba(117, 71, 55, 0.16);
  border-radius: 9px;
  font-size: 13px;
}

.note-panel__retry {
  display: inline-block;
  margin-top: 13px;
  padding: 7px 12px;
  color: inherit;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
}

.note-panel__plain {
  margin: 0;
  overflow-x: auto;
  color: var(--notes-ink);
  white-space: pre-wrap;
}

.markdown-body {
  color: #282d2a;
  font-family: var(--notes-sans);
  font-size: 15px;
  line-height: 1.72;
}

.markdown-body > :first-child {
  margin-top: 0;
}

.markdown-body > :last-child {
  margin-bottom: 0;
}

.markdown-body p {
  margin: 14px 0;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  margin: 1.65em 0 0.58em;
  color: var(--notes-ink);
  font-family: var(--notes-serif);
  font-weight: 500;
  letter-spacing: -0.017em;
  line-height: 1.25;
}

.markdown-body h1 {
  font-size: 1.75em;
}

.markdown-body h2 {
  font-size: 1.5em;
}

.markdown-body h3 {
  font-size: 1.25em;
}

.markdown-body ul,
.markdown-body ol {
  margin: 15px 0;
  padding-left: 1.35em;
}

.markdown-body li {
  margin: 8px 0;
  padding-left: 0.2em;
}

.markdown-body li::marker {
  color: var(--notes-gold);
}

.markdown-body strong {
  color: var(--notes-ink);
  font-weight: 600;
}

.markdown-body a {
  color: #765f25;
  text-decoration: underline;
  text-decoration-color: rgba(118, 95, 37, 0.34);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.markdown-body a:hover {
  text-decoration-color: currentColor;
}

.markdown-body mark {
  padding: 0.04em 0.15em;
  color: inherit;
  background: linear-gradient(transparent 24%, rgba(179, 163, 105, 0.31) 24%, rgba(179, 163, 105, 0.31) 89%, transparent 89%);
}

.markdown-body blockquote {
  margin: 25px 0;
  padding: 2px 0 2px 20px;
  color: var(--notes-muted);
  border-left: 2px solid var(--notes-gold);
  font-family: var(--notes-serif);
  font-size: 1.07em;
}

.markdown-body pre {
  max-width: 100%;
  overflow-x: auto;
  margin: 24px 0;
  padding: 18px 20px;
  background: #ebe7de !important;
  border: 1px solid rgba(23, 27, 25, 0.1);
  border-radius: 9px;
  white-space: pre;
}

.markdown-body code {
  padding: 0.12em 0.31em;
  color: #66521e;
  background: rgba(162, 139, 76, 0.11);
  border-radius: 4px;
  font-family: var(--notes-mono);
  font-size: 0.86em;
}

.markdown-body pre code {
  padding: 0;
  color: inherit;
  background: transparent;
  border-radius: 0;
}

.markdown-body img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 28px auto;
  padding: 12px;
  background: #fffdf8;
  border: 1px solid rgba(23, 27, 25, 0.11);
  border-radius: 9px;
}

.markdown-body table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  margin: 24px 0;
  border-spacing: 0;
  border-collapse: collapse;
  font-size: 0.9em;
}

.markdown-body th,
.markdown-body td {
  padding: 9px 12px;
  border: 1px solid rgba(23, 27, 25, 0.14);
  text-align: left;
}

.markdown-body th {
  color: var(--notes-ink);
  background: rgba(179, 163, 105, 0.1);
  font-weight: 600;
}

.markdown-body hr {
  margin: 29px 0;
  border: 0;
  border-top: 1px solid var(--notes-faint);
}

.markdown-body mjx-container {
  color: var(--notes-ink);
}

.markdown-body mjx-container[display="true"] {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px 0 12px;
}

.notes-status-sr,
.note-node__label {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  margin: -1px !important;
  padding: 0 !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.notes-noscript {
  position: fixed;
  z-index: 180;
  right: 20px;
  bottom: 20px;
  left: 20px;
  padding: 17px 20px;
  color: var(--notes-paper);
  background: var(--notes-ink);
  border-radius: 10px;
  font: 13px/1.55 var(--notes-sans);
}

.notes-noscript a {
  color: #d4c78e;
  text-decoration: underline;
}

@media (max-width: 980px) {
  .notes-intro {
    width: min(330px, 39vw);
  }

  .notes-intro h1 {
    font-size: clamp(54px, 8.4vw, 84px);
  }
}

@media (max-width: 759px), (hover: none), (pointer: coarse) {
  .reader-header {
    padding: 21px 20px;
  }

  .reader-header__home {
    font-size: 16px;
  }

  .notes-intro {
    top: 99px;
    left: 23px;
    width: calc(100% - 46px);
  }

  .notes-intro h1 {
    font-size: clamp(48px, 15vw, 68px);
    line-height: 0.86;
  }

  .notes-intro__description {
    max-width: 275px;
    margin-top: 17px;
    font-size: 12px;
  }

  .note-node {
    width: 48px;
    height: 48px;
  }

  .notes-state {
    right: 21px;
    bottom: max(18px, env(safe-area-inset-bottom));
  }

  .note-panel {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: min(78dvh, 720px);
    padding-bottom: env(safe-area-inset-bottom);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -24px 70px rgba(28, 29, 26, 0.2);
    opacity: 1;
    transform: translateY(105%);
    transform-origin: center bottom;
    transition: transform 0.56s var(--notes-ease), visibility 0.56s;
  }

  .note-panel::before {
    width: 38px;
    height: 3px;
    flex: 0 0 3px;
    margin: 9px auto 0;
    content: "";
    background: rgba(23, 27, 25, 0.18);
    border-radius: 999px;
  }

  .note-panel.is-open {
    transform: translateY(0);
  }

  .note-panel__head {
    padding: 17px 21px 18px;
  }

  .note-panel h2 {
    font-size: clamp(24px, 7vw, 30px);
  }

  .note-panel__close {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .note-panel__body {
    padding: 23px 21px 30px;
  }

  .markdown-body {
    font-size: 15px;
  }

  .notes-page.is-note-open .note-scrim {
    visibility: visible;
    pointer-events: auto;
    opacity: 1;
  }
}

@media (max-width: 430px) {
  .note-panel__meta {
    letter-spacing: 0.08em;
  }
}

@media (max-height: 650px) and (min-width: 760px) {
  .notes-intro {
    top: 92px;
  }

  .notes-intro h1 {
    font-size: 60px;
  }

  .notes-intro__description {
    margin-top: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root),
  .notes-page,
  .notes-state__pulse,
  .note-panel__loading::before,
  .note-node[aria-expanded="true"] .note-node__dot::before {
    animation: none !important;
  }

  .notes-page::after,
  .notes-page.is-leaving .reader-header,
  .notes-page.is-leaving .notes-explorer,
  .note-node-item,
  .note-node__dot,
  .note-node__dot::before,
  .note-panel,
  .note-scrim,
  .spiral-canvas,
  .note-nodes {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }

  .spiral-canvas,
  .note-nodes {
    animation: none !important;
    transform: none !important;
  }
}

@keyframes notes-page-enter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes notes-view-old {
  to {
    opacity: 0;
    transform: scale(0.992);
  }
}

@keyframes notes-view-new {
  from {
    opacity: 0;
    transform: translateY(9px);
  }
}

@keyframes note-ring {
  0% {
    opacity: 0.72;
    transform: translate(-50%, -50%) scale(0.62);
  }
  75%,
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.45);
  }
}

@keyframes state-pulse {
  to {
    opacity: 0.28;
    transform: scale(0.75);
  }
}

@keyframes note-loading {
  to {
    transform: rotate(360deg);
  }
}

@keyframes spiral-float-breathe {
  0%,
  100% {
    transform: translate3d(-1.2vw, 0.8vh, 0) rotate(-1deg) scale(var(--spiral-scale-a));
  }
  25% {
    transform: translate3d(1.6vw, -1.4vh, 0) rotate(0.55deg) scale(var(--spiral-scale-b));
  }
  50% {
    transform: translate3d(0.45vw, 1.35vh, 0) rotate(1.25deg) scale(var(--spiral-scale-c));
  }
  75% {
    transform: translate3d(-1.45vw, -0.75vh, 0) rotate(-0.25deg) scale(var(--spiral-scale-d));
  }
}
