/* aaroncphelps.com — note article pages. Ported from the v3 design reference. */

.note-article-wrap {
  max-width: 1120px;
  padding: 32px 48px 72px;
  margin-inline: auto;
}
.note-back {
  display: inline-flex;
  gap: 8px;
  min-height: 32px;
  align-items: center;
  color: #e57647;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 24px;
  padding-right: 10px;
  border: 1px solid #e57647;
  background: #302e2c;
  transition:
    color 220ms ease,
    border-color 220ms ease,
    background-color 220ms ease;
}
.note-back-icon {
  width: 30px;
  min-height: 30px;
  display: grid;
  place-items: center;
  color: #e57647;
  border-right: 1px solid #e57647;
}
.note-back .pixel-arrow {
  width: 14px;
  height: 14px;
}
.note-back:is(:hover, :focus-visible) {
  color: #f3aa87;
  border-color: #f3aa87;
  background: #39312c;
}
.pixel-arrow {
  display: block;
  flex-shrink: 0;
  width: 21px;
  height: 21px;
}
.note-article-header {
  max-width: 760px;
  margin-bottom: 40px;
}
.note-article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 22px;
  color: #bcb4a4;
  font-family: "Space Mono", monospace;
  font-size: 0.75rem;
  line-height: 1.6;
  margin-bottom: 18px;
}
.note-draft {
  border: 1px solid #69645e;
  padding: 2px 7px;
}
.note-article-header h1 {
  font-family: "proxima-sera", Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.5rem, 4.4vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  text-wrap: pretty;
  max-width: 25ch;
}
.note-article-lead {
  max-width: 56ch;
  margin-top: 22px;
  font-size: 1.25rem;
  line-height: 1.55;
  color: #ccc6be;
}
.note-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #bcb4a4;
}
.note-byline > span {
  color: #e57647;
}
.note-reading-layout {
  display: grid;
  grid-template-columns: minmax(0, 680px) minmax(160px, 1fr);
  gap: 64px;
  align-items: start;
  border-top: 1px solid #69645e;
  padding-top: 32px;
}
.note-body {
  min-width: 0;
  grid-column: 1;
  grid-row: 1;
}
.note-short-version {
  border-left: 3px solid #e57647;
  padding: 4px 0 4px 22px;
  margin-bottom: 42px;
}
.note-small-label {
  font-family: "Space Mono", monospace;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.6;
  color: #bcb4a4;
}
.note-short-version > p:last-child {
  font-size: 1.1875rem;
  font-weight: 500;
  line-height: 1.5;
  margin-top: 10px;
  color: #eeeae5;
}
.note-section {
  scroll-margin-top: 28px;
  margin-bottom: 40px;
}
.note-section h2 {
  font-family: "proxima-nova", -apple-system, "Segoe UI", Arial, sans-serif;
  font-weight: 600;
  font-size: clamp(1.375rem, 2.4vw, 1.6875rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}
.note-section > p {
  font-size: 1.125rem;
  line-height: 1.75;
  color: #d1cbc3;
  margin-top: 18px;
  text-wrap: pretty;
}
.note-example {
  margin: 30px 0 0;
  background: #dad5cf;
  color: #262626;
}
.note-example-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.note-example-columns > div {
  padding: 24px;
  min-width: 0;
}
.note-example-columns > div + div {
  border-left: 1px solid #b8b1a7;
}
.note-example h3 {
  font-family: "proxima-nova", -apple-system, "Segoe UI", Arial, sans-serif;
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.4;
  margin-bottom: 18px;
}
.note-example ul {
  display: grid;
  gap: 9px;
}
.note-example li {
  font-size: 0.9375rem;
  line-height: 1.45;
  padding: 9px 11px;
  border: 1px solid #b8b1a7;
}
.note-example-after li:first-child {
  background: #e57647;
  color: #242424;
  border-color: #e57647;
  font-weight: 600;
}
.note-example-after li:not(:first-child) {
  border-color: transparent;
  padding-inline: 0;
  color: #5c554d;
}
.note-example figcaption {
  font-size: 0.875rem;
  line-height: 1.5;
  color: #5c554d;
  padding: 18px 24px;
  border-top: 1px solid #b8b1a7;
}
.note-checklist {
  border-top: 1px solid #69645e;
  margin-top: 28px;
  padding-top: 20px;
}
.note-checklist ul {
  margin-top: 14px;
}
.note-checklist li {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding-block: 12px;
  border-bottom: 1px solid #444;
  color: #e1dcd5;
  font-size: 1.0625rem;
  line-height: 1.5;
}
.note-checklist li > span {
  font-family: "Space Mono", monospace;
  font-weight: 400;
  font-size: 0.75rem;
  line-height: 1.6;
  color: #e57647;
}
.note-sidebar {
  position: sticky;
  top: 28px;
  grid-column: 2;
  grid-row: 1;
}
.note-contents-mobile {
  display: none;
}
.note-contents-desktop > h2 {
  font-size: 0.9375rem;
  font-weight: 600;
  padding-bottom: 16px;
}
.note-contents summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 44px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  padding-bottom: 12px;
}
.note-contents summary > span {
  color: #bcb4a4;
  transition: transform 180ms;
}
.note-contents:not([open]) summary > span {
  transform: rotate(-90deg);
}
.note-contents nav {
  border-top: 1px solid #4d4d4d;
  padding-top: 10px;
}
.note-contents ol {
  list-style: none;
  padding: 0;
  margin: 0;
}
.note-contents a {
  display: flex;
  gap: 12px;
  align-items: baseline;
  min-height: 44px;
  padding: 10px 0;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: #bcb4a4;
}
.note-contents a > span {
  flex-shrink: 0;
  font-family: "Space Mono", monospace;
  font-weight: 400;
  font-size: 0.75rem;
  line-height: 1.6;
  color: #e57647;
}
.note-contents a:hover {
  color: #fff;
}
.note-contents-sources {
  border-top: 1px solid #4d4d4d;
  margin-top: 8px;
  padding-top: 8px;
}
.note-contents-sources a {
  align-items: center;
  gap: 12px;
}
.note-contents-sources .pixel-arrow {
  color: #e57647;
}
.note-sidebar-caption {
  border-top: 1px solid #4d4d4d;
  margin-top: 24px;
  padding-top: 22px;
  color: #bcb4a4;
  font-size: 0.875rem;
  line-height: 1.6;
}
.note-sources {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid #69645e;
  scroll-margin-top: 28px;
}
.note-sources h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 18px;
}
.note-source-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding-block: 18px;
  border-bottom: 1px solid #4d4d4d;
  color: #eeeae5;
}
.note-source-copy {
  display: grid;
  gap: 7px;
  min-width: 0;
}
.note-source-title {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
}
.note-source-link .pixel-arrow {
  color: #e57647;
}
.note-source-publisher {
  font-size: 0.875rem;
  line-height: 1.5;
  color: #bcb4a4;
}
.note-source-link:is(:hover, :focus-visible) {
  color: #fff;
}
.note-source-link:is(:hover, :focus-visible) .note-source-title {
  text-decoration: underline;
  text-decoration-color: #e57647;
  text-underline-offset: 4px;
}
.note-next {
  margin-top: 48px;
}
.note-next-card {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  gap: 14px 24px;
  padding: 28px;
  border: 1px solid #625b66;
  background-color: #302e32;
  color: #eeeae5;
  transition:
    background-color 320ms ease,
    border-color 320ms ease;
}
.note-next-card::before {
  content: '';
  position: absolute;
  inset: 1px;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(
    circle,
    rgb(188 153 215 / 55%) 1px,
    transparent 1.5px
  );
  background-size: 18px 18px;
  mask-image: linear-gradient(to right, transparent 12%, #000 100%);
  opacity: 0;
  transition: opacity 360ms ease;
}
.note-next-card:is(:hover, :focus-visible) {
  color: #fff;
  border-color: #95829e;
  background-color: #36303b;
}
.note-next-card:is(:hover, :focus-visible)::before {
  opacity: 1;
}
.note-next-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  grid-column: 1 / -1;
  color: #bcb4a4;
  font-family: "Space Mono", monospace;
  font-weight: 400;
  font-size: 0.75rem;
  line-height: 1.6;
  letter-spacing: 0.035em;
  margin-bottom: 3px;
}
.note-next-title {
  grid-column: 1;
  grid-row: 2;
  font-size: clamp(1.375rem, 2.5vw, 1.625rem);
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}
.note-next-description {
  grid-column: 1;
  grid-row: 3;
  max-width: 44ch;
  font-size: 1rem;
  line-height: 1.55;
  color: #c7bdcf;
}
.note-next-arrow {
  grid-column: 2;
  grid-row: 2;
  color: #c9acd9;
  width: 28px;
  height: 28px;
}
.note-next .note-back-bottom {
  margin: 18px 0 0;
}
@media (max-width: 980px) {
  .note-reading-layout {
    gap: 40px;
    grid-template-columns: minmax(0, 1fr) 170px;
  }
  .note-example-columns {
    grid-template-columns: 1fr;
  }
  .note-example-columns > div + div {
    border-left: 0;
    border-top: 1px solid #b8b1a7;
  }
}
@media (max-width: 800px) {
  .note-article-wrap {
    max-width: 744px;
    padding: 24px 32px 48px;
  }
  .note-article-header {
    margin-bottom: 28px;
  }
  .note-reading-layout {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding-top: 0;
  }
  .note-sidebar {
    position: static;
    width: 100%;
    border-bottom: 1px solid #4d4d4d;
  }
  .note-contents {
    padding: 10px 0;
  }
  .note-contents summary {
    padding-block: 8px;
  }
  .note-contents nav {
    padding-top: 6px;
    padding-bottom: 8px;
  }
  .note-contents ol {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 24px;
  }
  .note-sidebar-caption,
  .note-contents-desktop {
    display: none;
  }
  .note-contents-mobile {
    display: block;
  }
  .note-example-columns {
    grid-template-columns: 1fr 1fr;
  }
  .note-example-columns > div + div {
    border-left: 1px solid #b8b1a7;
    border-top: 0;
  }
}
@media (max-width: 480px) {
  .note-article-wrap {
    padding: 18px 24px 40px;
  }
  .note-back {
    margin-bottom: 18px;
  }
  .note-article-header h1 {
    font-size: 2.5rem;
  }
  .note-article-lead {
    font-size: 1.125rem;
    line-height: 1.6;
  }
  .note-article-meta {
    gap: 10px 16px;
  }
  .note-contents ol {
    grid-template-columns: 1fr;
  }
  .note-short-version {
    padding-left: 18px;
    margin-bottom: 34px;
  }
  .note-short-version > p:last-child {
    font-size: 1.125rem;
  }
  .note-section > p {
    font-size: 1.0625rem;
    line-height: 1.7;
  }
  .note-example-columns {
    grid-template-columns: 1fr;
  }
  .note-example-columns > div + div {
    border-left: 0;
    border-top: 1px solid #b8b1a7;
  }
  .note-example-columns > div {
    padding: 20px;
  }
  .note-example figcaption {
    padding: 16px 20px;
  }
  .note-section {
    margin-bottom: 34px;
  }
  .note-checklist li {
    font-size: 1rem;
  }
  .note-next-card {
    padding: 22px 20px;
    gap: 12px 16px;
  }
  .note-source-link {
    gap: 16px;
  }
}
@media (hover: none) {
  .note-back {
    min-height: 44px;
  }
  .note-back-icon {
    min-height: 42px;
  }
  .note-next-card::before {
    opacity: 0.28;
  }
}
@media (prefers-reduced-motion: reduce) {
  .note-back,
  .note-next-card,
  .note-next-card::before {
    transition: none;
  }
  .note-contents summary > span {
    transition: none;
  }
}

/* local resets: keep the article immune to a stale shared stylesheet */
.note-example ul,
.note-checklist ul,
.note-sources ul,
.note-contents ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
