html:has(> .notes-page) { scroll-behavior: auto; }

.notes-page {
  --notes-field: #18281f;
  --notes-contrast: #f1f6e9;
  --notes-signal: #d8f978;
  --notes-soft: #c6d2c7;
}

.notes-page .nav [aria-current] {
  color: var(--accent-strong);
  text-decoration: underline;
}

.notes-trail {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .42rem;
  margin-block: clamp(1.15rem, 3vw, 2.1rem) .95rem;
  color: var(--muted);
  font-size: .88rem;
}

.notes-trail a { font-weight: 650; }
.notes-trail a:hover { color: var(--accent-strong); }

.notes-mast {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, .75fr);
  gap: clamp(1.25rem, 4.4vw, 3.7rem);
  align-items: center;
  isolation: isolate;
  position: relative;
  padding: clamp(1.15rem, 5.5vw, 4.5rem);
  background: var(--notes-field);
  color: var(--notes-contrast);
}

.notes-mast::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 48px, #ddffe014 48px 49px);
  mask-image: linear-gradient(112deg, transparent 15%, #000);
  pointer-events: none;
  content: "";
}

.notes-hub .notes-mast { grid-template-columns: 1fr; }

.notes-kicker {
  color: var(--notes-signal);
  font: 500 .8rem/1.45 var(--mono);
  letter-spacing: .07em;
  text-transform: uppercase;
}

.notes-mast h1 {
  max-width: 14ch;
  margin-block: .18em .24em;
  font-size: clamp(2.3rem, 5.35vw, 5.3rem);
  font-weight: 730;
  line-height: .98;
  letter-spacing: -.066em;
  overflow-wrap: anywhere;
}

.notes-hub .notes-mast h1 {
  max-width: unset;
  font-size: clamp(2.8rem, 7.4vw, 6.7rem);
}

.notes-lead {
  max-width: 48ch;
  color: var(--notes-soft);
  font-size: clamp(1.04rem, 1.6vw, 1.32rem);
  line-height: 1.53;
}

.notes-byline {
  margin-top: 1.2rem;
  color: var(--notes-soft);
  font-size: .88rem;
  line-height: 1.4;
}

.notes-byline a { color: var(--notes-contrast); font-weight: 650; }
.notes-byline a:hover { color: var(--notes-signal); }

.notes-mast figure {
  min-width: 0;
  margin: 0;
  border: 1px solid #778d7a;
  background: #dfebe2;
}

.notes-mast figure a { display: block; }
.notes-mast figure img { display: block; width: 100%; height: auto; }
.notes-mast :focus-visible { outline-color: var(--notes-signal); }
.notes-mast figcaption {
  padding: .65rem .72rem;
  border-top: 1px solid #778d7a;
  color: var(--notes-soft);
  background: #1b2c22;
  font-size: .82rem;
  line-height: 1.42;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
  list-style: none;
  padding: clamp(1.1rem, 3vw, 2rem) 0 clamp(2.25rem, 6vw, 4.4rem);
}

.notes-grid > li { display: grid; }

.notes-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  border: 1px solid #bdcabd;
  background: #f9faf4;
  color: var(--ink);
  text-decoration: none;
}

.notes-card:is(:hover, :focus-visible) { border-color: var(--accent-strong); }
.notes-card[data-pointer-card] { --studio-tint: #53845f; }

.notes-card-art {
  position: relative;
  overflow: clip;
  aspect-ratio: 2.6;
  border-bottom: 1px solid #bdcabd;
  background: #d4e0d8;
}

.notes-card-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.notes-card-art .notes-thumb-handoff { object-position: center 31%; }
.notes-card-art .notes-thumb-amz { object-position: center 55%; }
.notes-card-art .notes-thumb-physics { object-position: center 33%; }
.notes-card-art .notes-thumb-boss { object-position: center 40%; }

.notes-card-content {
  display: grid;
  align-content: start;
  gap: .4rem;
  padding: clamp(.95rem, 2.5vw, 1.55rem);
}

.notes-card h2 {
  font-size: clamp(1.42rem, 2.6vw, 2.34rem);
  letter-spacing: -.05em;
  line-height: 1.08;
}

.notes-card h2 span {
  display: inline-block;
  margin-inline-start: .16em;
  color: var(--accent-strong);
  font-size: .83em;
}

.notes-card .notes-kicker { color: var(--accent-strong); }
.notes-card p:last-child { max-width: 52ch; color: var(--muted); line-height: 1.55; }

.notes-reading {
  display: grid;
  grid-template-columns: minmax(11rem, .55fr) minmax(0, 1.45fr);
  gap: clamp(1.45rem, 5vw, 4.6rem);
  align-items: start;
  padding: clamp(1.45rem, 5.2vw, 4rem) clamp(0rem, 2.5vw, 1.7rem) clamp(2.2rem, 5vw, 4rem);
}

.note-toc {
  position: sticky;
  top: 1.1rem;
  min-width: 0;
  padding: 1rem 0 1.25rem;
  border-block: 1px solid #a8baaa;
  color: var(--muted);
}

.note-toc p {
  padding-inline: .52rem;
  color: var(--ink);
  font: 500 .8rem/1.4 var(--mono);
  text-transform: uppercase;
  letter-spacing: .065em;
}

.note-toc ul { list-style: none; padding: .4rem 0 0; }
.note-toc li + li { margin-top: .1rem; }
.note-toc a {
  display: block;
  padding: .42rem .52rem;
  font-size: .93rem;
  line-height: 1.4;
  text-decoration: none;
}
.note-toc a:is(:hover, :focus-visible, [aria-current]) { color: var(--accent-strong); background: #e6eee2; }

.note-prose {
  min-width: 0;
  max-width: 72ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.45vw, 1.13rem);
  line-height: 1.68;
}

.note-prose section {
  padding: .9rem 0 1.25rem;
  scroll-margin-top: .7rem;
}

.note-prose section + section { border-top: 1px solid var(--line); }
.note-prose section:target h2 { color: var(--accent-strong); }

.note-prose h2 {
  margin-bottom: .6em;
  color: var(--ink);
  font-size: clamp(1.53rem, 3.2vw, 2.55rem);
  font-weight: 710;
  letter-spacing: -.052em;
  line-height: 1.075;
}

.note-prose p + p, .note-prose p + :is(ul, ol, dl, details, figure), .note-prose :is(ul, ol, dl, details, figure) + :is(p, details) {
  margin-top: .8em;
}

.note-prose :is(ul, ol) { padding-inline-start: 1.3em; }
.note-prose :is(ul, ol) li + li { margin-top: .42em; }
.note-prose :is(strong, dt) { color: var(--ink); font-weight: 680; }
.note-prose a { color: var(--accent-strong); font-weight: 620; }
.note-prose code { color: var(--ink); font: 500 .83em/1.4 var(--mono); overflow-wrap: anywhere; }

.notes-comparison {
  border-block: 1px solid #bacabc;
  background: #ebf0e8;
}

.notes-comparison > div { display: grid; grid-template-columns: 1fr 2.2fr; gap: .25rem .85rem; padding: .7rem .85rem; }
.notes-comparison > div + div { border-top: 1px solid #bacabc; }
.notes-comparison dt { line-height: 1.4; padding-top: .12em; }
.notes-comparison dd { margin: 0; }

.note-prose details {
  border: 1px solid #b8cabb;
  background: #f8faf4;
}

.note-prose details summary {
  padding: .7rem .82rem;
  color: var(--accent-strong);
  font-weight: 675;
  cursor: pointer;
}

.note-prose details[open] summary { border-bottom: 1px solid #b8cabb; }
.note-prose details > div { padding: .8rem 1rem; }

.notes-related {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .45rem 1.65rem;
  padding-block: 1.25rem;
  border-block: 1px solid #a8baaa;
}

.notes-related a { padding-block: .28rem; font-weight: 650; }
.notes-related a:hover { color: var(--accent-strong); }
.notes-page .footer { border-top: 1px solid var(--line); }

@media (max-width: 820px) {
  .notes-mast { grid-template-columns: 1fr; }
  .notes-mast h1 { max-width: 19ch; }
  .notes-mast figure { width: min(100%, 34rem); }
}

@media (max-width: 700px) {
  .notes-grid, .notes-reading { grid-template-columns: 1fr; }
  .note-toc { position: static; }
  .notes-reading { padding-inline: 0; }
}

@media (max-width: 410px) {
  .notes-page .top { gap: .55rem; }
  .notes-page .brand { gap: .4rem; white-space: nowrap; }
  .notes-page .nav-resume { padding-inline: .42rem; gap: .3rem; }
  .notes-comparison > div { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: no-preference) {
  .notes-card img, .notes-card h2 span { transition: transform 360ms cubic-bezier(.2, .8, .2, 1); }
  .notes-card:is(:hover, :focus-visible) img { transform: scale(1.045); }
  .notes-card:is(:hover, :focus-visible) h2 span { transform: translate(.15em, -.11em); }
}
