html { scroll-padding-top: 88px; }

.note-reader { width: min(100% - 2 * var(--gutter), 1176px); }
.note-reader .reader-grid { grid-template-columns: minmax(0, 880px) minmax(0, 216px); gap: clamp(28px, 4vw, 62px); }
.note-header { margin-bottom: 30px; }
.note-header .reader-title { max-width: 19em; text-wrap: balance; }
.note-intro { max-width: 44em; margin: 14px 0 0; color: #424e45; font-size: 17px; line-height: 1.8; }
.note-byline { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.note-byline time { margin-left: 7px; font-variant-numeric: tabular-nums; }

.note-section-header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.note-section-header h2, .note-action h2 { margin: 0; font: 700 25px/1.35 var(--song); text-wrap: pretty; }
.note-zoom-note { flex: none; margin: 0; color: var(--muted); font-size: 12px; }
.note-spread { display: grid; align-items: start; gap: 18px; }
.note-spread--compare, .note-spread--looks { grid-template-columns: repeat(var(--frames), minmax(0, 1fr)); }
.note-spread--looks[data-frames="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 22px; }
.note-spread--process { gap: 21px; }
.note-case { margin: 0; min-width: 0; }
.note-spread--process .note-case { display: grid; grid-template-columns: minmax(162px, 38%) minmax(0, 1fr); gap: clamp(17px, 2.5vw, 30px); align-items: center; }
.note-spread--process .note-case + .note-case { padding-top: 21px; border-top: 1px solid var(--line); }

.note-image { display: block; position: relative; overflow: hidden; border-radius: 11px; background: #e9e6de; }
.note-image img { width: 100%; height: auto; transition: transform 200ms ease; }
.note-image:hover img { transform: scale(1.025); }
.note-image:focus-visible { outline-offset: 4px; }
.note-case-title { margin: 10px 0 0; color: var(--green); font-size: 15px; font-weight: 680; line-height: 1.55; text-wrap: pretty; }
.note-case-copy { margin: 5px 0 0; color: #414b43; font-size: 14px; line-height: 1.75; overflow-wrap: anywhere; }
.note-spread--process .note-case-title { margin-top: 0; font: 700 24px/1.4 var(--song); }
.note-spread--process .note-case-copy { margin-top: 9px; font-size: 16px; line-height: 1.8; }
.note-mobile-key { display: none; }

.note-insight { margin-top: 26px; max-width: 49em; }
.note-insight h2 { margin: 0; font: 700 25px/1.35 var(--song); text-wrap: pretty; }
.note-insight p { margin: 8px 0 0; font-size: 16px; line-height: 1.85; }

.note-action { margin-top: 28px; padding: 21px 24px; border-radius: 12px; background: #e8eee5; }
.note-action h2 { color: var(--green); }
.note-exercise { max-width: 50em; margin: 10px 0 0; padding-left: 1.4em; font-size: 16px; line-height: 1.8; }
.note-exercise li { padding-left: 4px; }
.note-exercise li + li { margin-top: 7px; }
.note-exercise li::marker { color: var(--green); font-weight: 650; }
.note-decision-title { margin: 21px 0 8px; color: var(--green); font-size: 15px; }
.note-decisions { margin: 0; border: 1px solid #cbd8cc; border-radius: 8px; background: var(--paper); }
.note-decisions > div { display: grid; grid-template-columns: minmax(0, 41%) minmax(0, 1fr); column-gap: 14px; padding: 10px 13px; }
.note-decisions > div + div { border-top: 1px solid var(--line); }
.note-decisions dt, .note-decisions dd { margin: 0; font-size: 14px; line-height: 1.65; }
.note-decisions dt { color: var(--green); font-weight: 650; }
.note-takeaway { max-width: 52em; margin: 14px 0 0; font-size: 15px; line-height: 1.75; }
.note-reader .reader-side { padding-top: 0; }
.note-onpage { display: grid; gap: 8px; margin: 0 0 25px; padding: 0 0 15px; border-bottom: 1px solid var(--line); color: var(--green); font-size: 13px; }
.note-onpage a:hover, .note-onpage a:focus-visible { text-decoration: underline; text-underline-offset: 4px; }

.note-lightbox {
  width: min(680px, calc(100vw - 22px));
  max-height: calc(100dvh - 22px);
  padding: 16px;
  border: 0;
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 18px 52px #15251e38;
}
.note-lightbox::backdrop { background: #141d19b5; }
.lightbox-top, .lightbox-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lightbox-top { margin-bottom: 10px; }
.lightbox-title { margin: 0; font-size: 15px; font-weight: 650; }
.lightbox-photo { display: block; width: auto; max-width: 100%; max-height: 65dvh; height: auto; margin: 0 auto; border-radius: 7px; background: #e8e8df; }
.lightbox-bottom { margin-top: 10px; }
.lightbox-index { margin: 0; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.lightbox-control {
  min-width: 63px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  color: var(--green);
  font-size: 14px;
}
.lightbox-control:hover:not(:disabled) { background: var(--sage); }
.lightbox-control:disabled { opacity: .5; cursor: default; }

@media (max-width: 940px) {
  .note-reader .reader-grid { grid-template-columns: minmax(0, 1fr) 174px; gap: 28px; }
  .note-spread { gap: 12px; }
}
@media (max-width: 700px) {
  html { scroll-padding-top: 72px; }
  .note-reader .reader-grid { grid-template-columns: minmax(0, 1fr); gap: 27px; }
  .note-header { margin-bottom: 24px; }
  .note-header .reader-title { font-size: clamp(27px, 7.2vw, 38px); text-wrap: pretty; }
  .note-intro { margin-top: 9px; font-size: 16px; }
  .note-section-header h2, .note-insight h2, .note-action h2 { font-size: 21px; }
  .note-section-header { margin-bottom: 10px; }
  .note-spread--compare { column-gap: 7px; row-gap: 9px; }
  .note-spread--compare .note-case, .note-spread--compare .note-case-caption { display: contents; }
  .note-spread--compare .note-image { grid-row: 1; grid-column: var(--frame); border-radius: 7px; }
  .note-spread--compare .note-case-title { grid-row: 2; grid-column: var(--frame); margin: 0; font-size: 12px; line-height: 1.45; }
  .note-spread--compare .note-case-copy { grid-column: 1 / -1; padding-top: 9px; margin-top: 1px; border-top: 1px solid var(--line); font-size: 15px; }
  .note-spread--compare .note-mobile-key { display: block; margin-bottom: 2px; color: var(--green); }
  .note-spread--looks, .note-spread--looks[data-frames="4"] { grid-template-columns: minmax(0, 1fr); gap: 21px; }
  .note-spread--looks .note-case-copy, .note-spread--process .note-case-copy { font-size: 15px; }
  .note-spread--process { gap: 17px; }
  .note-spread--process .note-case { display: block; }
  .note-spread--process .note-case + .note-case { padding-top: 15px; }
  .note-spread--process .note-case-title { margin-top: 9px; font-size: 20px; }
  .note-spread--process .note-case-copy { margin-top: 4px; }
  .note-action { padding: 15px 16px; margin-top: 23px; }
  .note-insight p, .note-exercise { font-size: 15px; }
  .note-decision-title { margin-top: 17px; }
  .note-decisions > div { grid-template-columns: minmax(0, 1fr); row-gap: 3px; padding: 9px 11px; }
  .note-onpage { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .note-image:hover img { transform: none; }
}

.lightbox-visual { position: relative; width: fit-content; max-width: 100%; margin-inline: auto; }
.note-image:has(.note-mark-overlay):hover img { transform: none; }
.note-mark-overlay { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.note-mark-line {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--length);
  border-top: 1.4px solid #bcfae7;
  filter: drop-shadow(0 0 1px #133c34);
  transform: rotate(var(--angle));
  transform-origin: left center;
}
.note-mark-label {
  position: absolute;
  left: var(--x);
  top: var(--y);
  min-width: 1.35em;
  min-height: 1.35em;
  padding: 1px .26em;
  border: 1px solid #c1f9e9;
  border-radius: .35em;
  background: #17483e;
  color: #fff;
  font: 650 clamp(9px, 1.25vw, 12px)/1.1 var(--sans);
  text-align: center;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}
