/* Side Notes — editorial archive + article layout */

.side-notes-hero {
  padding-top: calc(var(--header-height) + var(--space-2xl));
  padding-bottom: var(--space-xl);
  background: var(--bg-soft);
}

.side-notes-hero h1 {
  max-width: 12ch;
}

.side-notes-hero__lede {
  max-width: 36rem;
  margin-bottom: 0;
}

.side-notes-archive {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-2xl);
  background: var(--bg);
}

.side-notes-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.side-notes-list__item {
  border-top: 1px solid var(--line);
}

.side-notes-list__item:last-child {
  border-bottom: 1px solid var(--line);
}

.side-notes-tile {
  display: grid;
  grid-template-columns: minmax(9rem, 14rem) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
  padding: clamp(1.75rem, 3vw, 2.75rem) 0;
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.side-notes-tile:hover {
  opacity: 0.88;
}

.side-notes-tile__media {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #e4e6ee;
}

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

.side-notes-tile__media--placeholder {
  background:
    linear-gradient(145deg, #e8eaf2 0%, #d5d8e4 100%);
}

.side-notes-tile__copy {
  min-width: 0;
  padding-top: 0.15rem;
}

.side-notes-tile__title {
  margin: 0 0 12px;
  max-width: 16ch;
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.side-notes-tile__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em 0.55em;
  margin: 0 0 14px;
  font-size: var(--text-label);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.side-notes-tile__excerpt {
  max-width: 38rem;
  margin: 0;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.55;
  color: #414348;
}

.side-notes-empty {
  margin: 0;
  color: var(--muted);
}

/* Individual note */

.side-note-main {
  padding-top: calc(var(--header-height) + var(--space-xl));
  padding-bottom: var(--space-2xl);
  background: var(--bg);
}

.side-note-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 18rem);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.side-note-article {
  min-width: 0;
  max-width: 50rem;
}

.side-note-header {
  margin-bottom: var(--space-lg);
}

.side-note-header h1 {
  max-width: 22ch;
  margin-bottom: 16px;
  font-size: clamp(2.4rem, 5.5vw, 3.5rem);
}

.side-note-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em 0.55em;
  margin: 0 0 22px;
  font-size: var(--text-label);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.side-note-header__deck {
  max-width: 36rem;
  margin: 0;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.5;
  color: #292a2d;
}

.side-note-body {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: #2f3135;
}

.side-note-body > *:first-child {
  margin-top: 0;
}

.side-note-body p,
.side-note-body ul,
.side-note-body ol {
  margin: 0 0 1.25em;
}

.side-note-body h2 {
  margin: 2em 0 0.75em;
  font-size: clamp(1.55rem, 2.5vw, 1.85rem);
}

.side-note-body h3 {
  margin: 1.75em 0 0.65em;
}

.side-note-body a {
  color: var(--purple);
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.side-note-body a:hover {
  color: var(--purple-deep);
}

.side-note-body ul,
.side-note-body ol {
  padding-left: 1.25em;
}

.side-note-body li {
  margin: 0.4em 0;
}

.side-note-body blockquote {
  margin: 1.75em 0;
  padding: 0.15em 0 0.15em 1.15em;
  border-left: 3px solid var(--purple);
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
}

.side-note-body blockquote p {
  margin: 0;
}

.side-note-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.75em 0;
  border-radius: var(--radius-sm);
}

.side-note-body strong {
  font-weight: 750;
  color: var(--ink);
}

.side-note-footer {
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  border-top: 1px solid var(--line);
}

.side-note-footer__back {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: var(--text-label);
  font-weight: 800;
  color: var(--purple);
  text-decoration: none;
}

.side-note-footer__back:hover {
  color: var(--ink);
}

.side-note-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 24px);
}

.side-note-sidebar__media {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #e4e6ee;
  box-shadow: var(--shadow-sm);
}

.side-note-sidebar__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.side-note-sidebar__media--placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #e8eaf2 0%, #d5d8e4 100%);
}

.side-note-sidebar__placeholder-label {
  font-size: var(--text-label-sm);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9aa0b5;
}

.side-note-sidebar__meta {
  display: grid;
  gap: 6px;
  margin: 16px 0 0;
  font-size: var(--text-label-sm);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.side-note-sidebar__category {
  color: var(--purple);
}

@media (max-width: 900px) {
  .side-notes-tile {
    grid-template-columns: 7.5rem minmax(0, 1fr);
    gap: 1.1rem;
  }

  .side-notes-tile__title {
    max-width: none;
  }

  .side-note-layout {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .side-note-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 9rem minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    padding-top: var(--space-md);
    border-top: 1px solid var(--line);
  }

  .side-note-sidebar__media {
    border-radius: var(--radius-sm);
  }

  .side-note-sidebar__meta {
    margin: 0;
  }

  .side-note-header h1 {
    max-width: none;
  }
}

@media (max-width: 560px) {
  .side-notes-tile {
    grid-template-columns: 1fr;
  }

  .side-notes-tile__media {
    width: 11rem;
  }
}
