.note-page {
  background:
    linear-gradient(90deg, rgba(20,38,31,.035) 1px, transparent 1px),
    radial-gradient(circle at 88% 2%, rgba(101,124,242,.14), transparent 24rem),
    var(--paper);
  background-size: 42px 42px, auto, auto;
}

.article-shell { width: min(860px, calc(100% - 48px)); margin-inline: auto; }

.note-hero { overflow: hidden; border-bottom: 1px solid var(--line); }
.note-hero-grid {
  display: grid;
  grid-template-columns: minmax(0,1.15fr) minmax(360px,.75fr);
  gap: 76px;
  align-items: center;
  min-height: 720px;
  padding-block: 86px 92px;
}
.note-copy h1 {
  max-width: 780px;
  margin: 0;
  font: 500 clamp(52px,6vw,82px)/.98 var(--display);
  letter-spacing: -.045em;
}
.note-copy h1 span { color: #5c7430; font-style: italic; }
.note-deck { max-width: 760px; margin: 27px 0 17px; color: var(--ink-2); font: 500 clamp(21px,2vw,28px)/1.42 var(--display); }
.note-lead { max-width: 760px; color: var(--muted); font-size: 17px; }

.note-map { position: relative; padding: 30px; border-radius: 12px; background: var(--ink); color: var(--cream); box-shadow: var(--shadow); }
.note-map::before { content: ""; position: absolute; inset: 11px; pointer-events: none; border: 1px solid rgba(255,255,255,.08); border-radius: 7px; }
.map-source, .map-reduce { position: relative; display: grid; gap: 8px; padding: 18px; border: 1px solid rgba(255,255,255,.17); background: rgba(255,255,255,.04); }
.map-source small, .map-reduce small { color: rgba(255,255,255,.48); font: 700 9px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.map-source strong, .map-reduce strong { font: 500 19px/1.35 var(--display); }
.map-source { border-color: rgba(201,241,125,.48); }
.map-reduce { border-color: var(--mint); background: var(--mint); color: var(--ink); }
.map-reduce small { color: rgba(20,38,31,.58); }
.map-split { display: grid; grid-template-columns: 1fr 1px 1fr; height: 32px; place-items: center; }
.map-split span { width: 1px; height: 100%; background: rgba(255,255,255,.28); }
.map-split i { width: 55%; height: 1px; background: rgba(255,255,255,.28); }
.map-operators { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 32px; }
.map-operators > div { display: grid; gap: 10px; min-height: 132px; align-content: center; padding: 15px; border: 1px solid rgba(255,255,255,.17); background: rgba(255,255,255,.04); }
.map-operators span { color: var(--mint); font: 700 9px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.map-operators strong { font: 500 17px/1.3 var(--display); }
.map-operators small { color: rgba(255,255,255,.46); font-size: 10px; }

.note-status-strip { border-bottom: 1px solid var(--line); background: #e7e0d0; }
.note-status-strip .article-shell { display: grid; grid-template-columns: 190px 1fr; gap: 30px; padding-block: 23px; }
.note-status-strip strong { color: #557321; font: 730 10px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.note-status-strip p { margin: 0; color: var(--muted); font-size: 13px; }

.prose { padding-block: 32px 116px; }
.prose section { padding-block: 78px; border-bottom: 1px solid var(--line); scroll-margin-top: 72px; }
.prose section:last-child { border-bottom: 0; }
.section-kicker { margin: 0 0 14px; color: #587427; font: 750 10px/1.3 var(--mono); letter-spacing: .11em; text-transform: uppercase; }
.prose h2 { margin: 0 0 31px; font: 500 clamp(35px,4.8vw,54px)/1.08 var(--display); letter-spacing: -.035em; }
.prose h3 { font-family: var(--display); font-weight: 500; }
.prose > section > p:not(.section-kicker) { color: #344a41; font-size: 17px; line-height: 1.88; }
.prose .opening { color: var(--ink); font: 500 21px/1.75 var(--display); }

.equation-band { overflow-x: auto; margin: 30px 0; padding: 27px 23px; border: 1px solid var(--ink); background: var(--cream); box-shadow: 8px 8px 0 var(--mint); text-align: center; }
.compact-equation { box-shadow: 8px 8px 0 var(--blue); }
.reduction-equation { box-shadow: 8px 8px 0 var(--gold); }
.equation-band mjx-container { font-size: 116% !important; }

.owner-quote, .question-quote { margin: 34px 0; padding: 29px 31px; border-left: 5px solid var(--ink); background: var(--mint); color: var(--ink); font: 500 21px/1.62 var(--display); }
.question-quote { border-color: var(--coral); background: #fae6dd; }

.operator-card { margin: 31px 0; padding: 27px; border: 1px solid var(--ink); background: var(--cream); }
.symmetric-card { box-shadow: 9px 9px 0 var(--mint); }
.asymmetric-card { box-shadow: 9px 9px 0 var(--coral); }
.operator-label { display: flex; align-items: center; gap: 14px; }
.operator-label span { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 50%; background: var(--ink); color: var(--mint); font: 750 11px/1 var(--mono); }
.operator-label strong { font: 500 22px/1.3 var(--display); }
.operator-card .formula { margin-bottom: 0; }

.typed-pairing { display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: stretch; margin: 30px 0; }
.typed-pairing > div { display: grid; gap: 12px; padding: 24px; border: 1px solid var(--ink); background: var(--cream); }
.typed-pairing span { color: #587427; font: 750 9px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.typed-pairing strong { font: 500 26px/1.2 var(--display); }
.typed-pairing small { color: var(--muted); }
.typed-pairing > i { align-self: center; font: 500 30px/1 var(--display); font-style: normal; }

.comparison-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; margin: 31px 0; border: 1px solid var(--ink); background: var(--ink); }
.comparison-grid > div { padding: 24px; background: var(--cream); }
.comparison-grid span { color: #587427; font: 750 9px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.comparison-grid h3 { margin: 17px 0 10px; font-size: 23px; line-height: 1.2; }
.comparison-grid p { margin: 0; color: var(--muted); font-size: 13px; }

.boundary-panel { margin: 31px 0; border-top: 1px solid var(--ink); }
.boundary-panel > div { display: grid; grid-template-columns: 52px 1fr; gap: 19px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.boundary-panel span { color: var(--coral); font: 750 11px/1.5 var(--mono); }
.boundary-panel p { margin: 0; color: #344a41; }

.closing-section { border-bottom: 0 !important; }
.closing-quote { margin: 33px 0; padding: 36px; border: 1px solid var(--ink); background: var(--ink); color: var(--cream); box-shadow: 10px 10px 0 var(--mint); }
.closing-quote p { margin: 0; font: 500 23px/1.72 var(--display); }
.note-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 31px; }

.references { padding-top: 55px !important; }
.references h2 { font-size: 38px; }
.references ul { margin: 0; padding-left: 20px; }
.references li { margin-bottom: 12px; color: var(--muted); }
.references a { border-bottom: 1px solid var(--ink); color: var(--ink); font-weight: 720; }

@media (max-width: 980px) {
  .note-hero-grid { grid-template-columns: 1fr; gap: 43px; min-height: auto; padding-block: 70px; }
  .note-map { max-width: 620px; }
  .comparison-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .article-shell { width: min(100% - 28px,860px); }
  .note-hero-grid { padding-block: 50px 58px; }
  .note-copy h1 { font-size: clamp(43px,12vw,61px); }
  .note-deck { font-size: 20px; }
  .note-map { padding: 22px; }
  .map-operators { grid-template-columns: 1fr; }
  .map-split { grid-template-columns: 1px; }
  .map-split i { display: none; }
  .note-status-strip .article-shell { grid-template-columns: 1fr; gap: 8px; }
  .prose { padding-bottom: 78px; }
  .prose section { padding-block: 58px; }
  .prose h2 { font-size: clamp(34px,10vw,47px); }
  .prose > section > p:not(.section-kicker) { font-size: 16px; }
  .equation-band { padding-inline: 12px; box-shadow: 6px 6px 0 var(--mint); }
  .compact-equation { box-shadow: 6px 6px 0 var(--blue); }
  .reduction-equation { box-shadow: 6px 6px 0 var(--gold); }
  .operator-card { padding: 22px 17px; }
  .typed-pairing { grid-template-columns: 1fr; }
  .typed-pairing > i { transform: rotate(90deg); justify-self: center; }
  .boundary-panel > div { grid-template-columns: 38px 1fr; }
  .closing-quote { padding: 26px 22px; box-shadow: 7px 7px 0 var(--mint); }
  .closing-quote p { font-size: 20px; }
  .note-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
