.note-page {
  background: #f4f1e9;
}

.note-page::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: -1;
  height: 760px;
  border-radius: 0;
  background:
    radial-gradient(circle at 82% 12%, rgba(37, 99, 235, 0.12), transparent 28rem),
    linear-gradient(180deg, #fbfaf6 0%, #f4f1e9 100%);
}

.note-shell {
  width: min(940px, calc(100% - 40px));
  margin: 0 auto;
}

.note-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  border-bottom: 1px solid #d7d1c5;
  color: #5f5b52;
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.note-topbar a {
  color: #1e40af;
  font-weight: 600;
  text-decoration: none;
}

.note-topbar a:hover,
.note-topbar a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.note-hero {
  display: grid;
  gap: 26px;
  padding: 92px 0 82px;
}

.note-kicker,
.note-section-label {
  margin: 0;
  color: #1d4ed8;
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.note-hero h1 {
  max-width: 12ch;
  margin: 0;
  color: #111827;
  font-family: "Sora", "Inter", sans-serif;
  font-size: clamp(3.5rem, 8.5vw, 7.1rem);
  line-height: 0.96;
  letter-spacing: -0.065em;
}

.note-dek {
  max-width: 62ch;
  margin: 0;
  color: #3f3c36;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
  line-height: 1.5;
}

.note-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 22px;
  color: #6f6a60;
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.75rem;
}

.note-meta span + span::before {
  content: "·";
  margin-right: 22px;
  color: #aaa397;
}

.note-article {
  width: min(760px, calc(100% - 40px));
  margin: 0 auto;
  padding-bottom: 90px;
}

.note-article section {
  padding: 54px 0;
  scroll-margin-top: 32px;
}

.note-article section + section {
  border-top: 1px solid #d7d1c5;
}

.note-article p,
.note-article li {
  color: #423f39;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.13rem;
  line-height: 1.78;
}

.note-article p {
  margin: 0 0 1.42rem;
}

.note-article a {
  color: #1d4ed8;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.note-article strong {
  color: #161513;
}

.note-hook {
  max-width: 27ch;
  color: #111827 !important;
  font-family: "Sora", "Inter", sans-serif !important;
  font-size: clamp(1.8rem, 4.4vw, 2.7rem) !important;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.2 !important;
}

.note-article h2 {
  max-width: 20ch;
  margin: 10px 0 26px;
  color: #111827;
  font-family: "Sora", "Inter", sans-serif;
  font-size: clamp(1.85rem, 4.5vw, 2.8rem);
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.note-article blockquote {
  margin: 38px 0;
  padding: 0 0 0 26px;
  border-left: 4px solid #2563eb;
  color: #111827;
  font-family: "Sora", "Inter", sans-serif;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 650;
  line-height: 1.42;
}

.note-lifecycle {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 38px 0;
  overflow: hidden;
  border: 1px solid #c7c0b3;
  border-radius: 8px;
  background: #fbfaf6;
}

.note-lifecycle div {
  position: relative;
  padding: 24px;
}

.note-lifecycle div + div {
  border-left: 1px solid #c7c0b3;
}

.note-lifecycle span {
  display: block;
  margin-bottom: 11px;
  color: #1d4ed8;
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.note-lifecycle strong {
  display: block;
  font-family: "Sora", "Inter", sans-serif;
  font-size: 0.93rem;
  line-height: 1.42;
}

.note-lifecycle p {
  margin: 9px 0 0;
  color: #6f6a60;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.83rem;
  line-height: 1.5;
}

.note-tradeoffs {
  display: grid;
  gap: 14px;
  margin: 32px 0 8px;
  padding: 0;
  counter-reset: tradeoff;
  list-style: none;
}

.note-tradeoffs li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  padding: 19px 20px;
  border: 1px solid #d7d1c5;
  border-radius: 7px;
  background: rgba(251, 250, 246, 0.74);
  counter-increment: tradeoff;
}

.note-tradeoffs li::before {
  content: "0" counter(tradeoff);
  color: #1d4ed8;
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 600;
}

.note-obtc-reveal {
  margin: 54px -48px 0;
  padding: 50px 48px !important;
  border-top: 0 !important;
  border-radius: 8px;
  background: #111827;
}

.note-obtc-reveal .note-section-label {
  color: #93c5fd;
}

.note-obtc-reveal h2,
.note-obtc-reveal strong {
  color: #ffffff;
}

.note-obtc-reveal p,
.note-obtc-reveal li {
  color: #d1d5db;
}

.note-obtc-reveal a {
  color: #93c5fd;
}

.note-parameter-line {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 34px 0;
  overflow: hidden;
  border: 1px solid #374151;
  border-radius: 7px;
}

.note-parameter-line div {
  padding: 20px;
  background: #182235;
}

.note-parameter-line div + div {
  border-left: 1px solid #374151;
}

.note-parameter-line span {
  display: block;
  margin-bottom: 7px;
  color: #93c5fd;
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.67rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.note-parameter-line strong {
  font-family: "Sora", "Inter", sans-serif;
  font-size: 0.96rem;
  line-height: 1.35;
}

.note-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 34px 0;
}

.note-results article {
  padding: 22px;
  border: 1px solid #c7c0b3;
  border-radius: 7px;
  background: #fbfaf6;
}

.note-results strong {
  display: block;
  margin-bottom: 7px;
  color: #111827;
  font-family: "Sora", "Inter", sans-serif;
  font-size: 1.25rem;
  letter-spacing: -0.025em;
}

.note-results span {
  display: block;
  color: #615d55;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.84rem;
  line-height: 1.5;
}

.note-boundary {
  margin: 32px 0 0;
  padding: 22px 24px;
  border: 1px solid #c7c0b3;
  border-left: 4px solid #b45309;
  border-radius: 6px;
  background: #fffaf0;
}

.note-boundary p {
  margin: 0;
  color: #744210;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.92rem;
  line-height: 1.62;
}

.note-questions {
  display: grid;
  gap: 15px;
  margin: 30px 0;
  padding-left: 1.5rem;
}

.note-sources {
  margin: 24px 0 0;
  padding-left: 1.3rem;
}

.note-sources li {
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.88rem;
  line-height: 1.6;
}

.note-sources li + li {
  margin-top: 8px;
}

.note-footer {
  border-top: 1px solid #d7d1c5;
  background: #ebe6dc;
}

.note-footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
  padding: 32px 0;
  color: #5f5b52;
  font-size: 0.84rem;
  line-height: 1.6;
}

.note-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 20px;
}

.note-footer a {
  color: #1e40af;
  font-weight: 600;
  text-decoration: none;
}

.note-footer a:hover,
.note-footer a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 720px) {
  .note-shell,
  .note-article {
    width: min(100% - 28px, 940px);
  }

  .note-topbar {
    align-items: flex-start;
    min-height: 0;
    padding: 18px 0;
  }

  .note-topbar span {
    max-width: 20ch;
    text-align: right;
  }

  .note-hero {
    padding: 62px 0 54px;
  }

  .note-hero h1 {
    font-size: clamp(3rem, 15.8vw, 5.2rem);
  }

  .note-meta {
    display: grid;
    gap: 4px;
  }

  .note-meta span + span::before {
    content: none;
  }

  .note-article section {
    padding: 42px 0;
  }

  .note-lifecycle,
  .note-parameter-line,
  .note-results {
    grid-template-columns: 1fr;
  }

  .note-lifecycle div + div,
  .note-parameter-line div + div {
    border-top: 1px solid #c7c0b3;
    border-left: 0;
  }

  .note-parameter-line div + div {
    border-top-color: #374151;
  }

  .note-tradeoffs li {
    grid-template-columns: 36px minmax(0, 1fr);
    padding: 17px;
  }

  .note-obtc-reveal {
    margin-right: 0;
    margin-left: 0;
    padding: 38px 22px !important;
  }

  .note-footer-inner {
    grid-template-columns: 1fr;
  }

  .note-footer-links {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
