/* DIM LAZAR — Notes page */

.notes-main,
.notes-footer {
  width: min(
    1120px,
    calc(100% - var(--internal-left) - var(--internal-right))
  );
}

.notes-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}

.notes-heading > div:first-child {
  min-width: 0;
}

.notes-kicker {
  margin-bottom: 0.72rem;
  color: rgba(255, 255, 255, 0.34);
  font-size: 0.68rem;
  font-weight: 390;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.notes-heading h1 {
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(2.8rem, 6.2vw, 5.4rem);
  font-weight: 250;
  line-height: 0.96;
  letter-spacing: -0.035em;
}

.language-switch {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.58rem;
  padding-bottom: 0.25rem;
  color: rgba(255, 255, 255, 0.20);
  font-size: 0.72rem;
  letter-spacing: 0.10em;
}

.language-button {
  appearance: none;
  border: 0;
  border-bottom: 1px solid transparent;
  padding: 0.25rem 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.42);
  font: 420 0.72rem/1 var(--f-sans);
  letter-spacing: 0.10em;
  cursor: pointer;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.language-button:hover,
.language-button:focus-visible,
.language-button.is-active {
  color: rgba(255, 255, 255, 0.94);
  border-bottom-color: rgba(200, 169, 126, 0.72);
  outline: none;
}

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

.notes-layout {
  display: grid;
  grid-template-columns: minmax(190px, 0.45fr) minmax(0, 1.55fr);
  align-items: start;
  gap: clamp(3rem, 6vw, 6.5rem);
  padding-top: 3.8rem;
}

.notes-index {
  position: sticky;
  top: 7.4rem;
}

.notes-index-label {
  margin-bottom: 1.25rem;
  color: rgba(255, 255, 255, 0.31);
  font-size: 0.66rem;
  font-weight: 390;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.notes-index ol {
  list-style: none;
}

.notes-index li + li {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.notes-index a {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr);
  gap: 0.55rem;
  padding: 0.95rem 0;
  color: rgba(255, 255, 255, 0.49);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 340;
  line-height: 1.42;
  transition: color 0.25s var(--ease);
}

.notes-index a span {
  color: rgba(200, 169, 126, 0.54);
  font-size: 0.64rem;
  letter-spacing: 0.10em;
}

.notes-index a:hover,
.notes-index a:focus-visible {
  color: rgba(255, 255, 255, 0.90);
  outline: none;
}

.notes-list {
  min-width: 0;
}

.note {
  scroll-margin-top: 8.2rem;
  animation: noteFade 0.45s var(--ease) both;
}

.note + .note {
  margin-top: clamp(5rem, 9vw, 8.5rem);
  padding-top: clamp(4.2rem, 7vw, 6.8rem);
  border-top: 1px solid rgba(200, 169, 126, 0.28);
}

.note-number {
  margin-bottom: 0.9rem;
  color: rgba(200, 169, 126, 0.64);
  font-size: 0.66rem;
  font-weight: 430;
  letter-spacing: 0.16em;
}

.note h2 {
  max-width: 18ch;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.91);
  font-size: clamp(1.75rem, 3.2vw, 3rem);
  font-weight: 270;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.note p {
  max-width: 69ch;
  color: rgba(255, 255, 255, 0.61);
  font-size: clamp(0.93rem, 1.05vw, 1rem);
  font-weight: 300;
  line-height: 1.84;
  letter-spacing: 0.006em;
}

.note p + p {
  margin-top: 1.45rem;
}

.note .note-close {
  margin-top: 2rem;
  padding-top: 1.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  color: rgba(239, 229, 213, 0.87);
}

.note .note-emphasis {
  margin-top: 2rem;
  padding: 1.45rem 0 1.45rem 1.4rem;
  border-left: 1px solid rgba(200, 169, 126, 0.48);
  color: rgba(239, 229, 213, 0.87);
}

.note strong {
  font-weight: 470;
}

@keyframes noteFade {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 920px) {
  .notes-main,
  .notes-footer {
    width: min(
      var(--internal-content),
      calc(100% - var(--internal-left) - var(--internal-right))
    );
  }

  .notes-layout {
    grid-template-columns: 1fr;
    gap: 3.4rem;
  }

  .notes-index {
    position: static;
  }

  .notes-index ol {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2rem;
  }

  .notes-index li:nth-child(2) {
    border-top: 0;
  }
}

@media (max-width: 760px) {
  .notes-heading {
    display: block;
    padding-bottom: 22px;
  }

  .notes-kicker {
    margin-bottom: 0.62rem;
    font-size: 0.64rem;
    letter-spacing: 0.15em;
  }

  .notes-heading h1 {
    font-size: clamp(2.85rem, 14vw, 4rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
  }

  .language-switch {
    margin-top: 1.35rem;
    gap: 0.36rem;
    padding: 0;
    font-size: 0.68rem;
  }

  .language-button {
    min-width: 36px;
    min-height: 40px;
    padding: 0.55rem 0.2rem 0.42rem;
    font-size: 0.70rem;
  }

  .notes-layout {
    gap: 2.8rem;
    padding-top: 34px;
  }

  .notes-index ol {
    display: block;
  }

  .notes-index li:nth-child(2) {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .notes-index a {
    grid-template-columns: 2rem minmax(0, 1fr);
    padding: 0.8rem 0;
    font-size: 0.80rem;
  }

  .note {
    scroll-margin-top: 6.2rem;
  }

  .note + .note {
    margin-top: 4rem;
    padding-top: 3.7rem;
  }

  .note h2 {
    max-width: 20ch;
    margin-bottom: 1.55rem;
    font-size: clamp(1.65rem, 8vw, 2.25rem);
  }

  .note p {
    max-width: none;
    font-size: 0.96rem;
    line-height: 1.72;
    letter-spacing: 0;
    overflow-wrap: break-word;
  }

  .note p + p {
    margin-top: 1.25rem;
  }

  .note .note-close {
    margin-top: 1.65rem;
    padding-top: 1.3rem;
  }

  .note .note-emphasis {
    margin-top: 1.65rem;
    padding: 1.25rem 0 1.25rem 1.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .note {
    animation: none;
  }
}
