/* V89 · Source-backed editorial cells
   Image2 was used as an art-direction reference only. Production cards continue
   to render verified source artwork or an explicitly labelled Locus cover. */

.notes-screen {
  --notes-v88-surface: color-mix(in srgb, var(--notes-card) 96%, #fff 4%);
  --notes-v88-line: color-mix(in srgb, var(--notes-ink) 14%, transparent);
  --notes-v88-shadow: 0 1px 2px rgba(45, 35, 25, 0.045), 0 9px 26px rgba(45, 35, 25, 0.07);
}

.notes-screen .curated-note {
  position: relative;
  isolation: isolate;
  border: 1px solid var(--notes-v88-line);
  border-radius: 13px;
  background: var(--notes-v88-surface);
  background-image: none;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.82), var(--notes-v88-shadow);
}

.notes-screen .curated-note::before {
  position: absolute;
  z-index: 3;
  display: block;
  width: 42px;
  height: 2px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--notes-purple) 68%, var(--notes-red));
  content: "";
  pointer-events: none;
  inset: 0 auto auto 18px;
}

.notes-screen .curated-note::after {
  position: absolute;
  z-index: 3;
  display: block;
  width: 17px;
  height: 17px;
  background: color-mix(in srgb, var(--notes-paper) 76%, #c9bfaf 24%);
  box-shadow: -1px 1px 0 color-mix(in srgb, var(--notes-ink) 11%, transparent);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
  content: "";
  pointer-events: none;
  inset: 0 0 auto auto;
}

.notes-screen .curated-note__meta {
  color: var(--notes-red);
  font-size: 10px;
  letter-spacing: 0.09em;
}

.notes-screen .curated-note h2 {
  color: var(--notes-ink);
  font-size: clamp(22px, 1.75vw, 28px);
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.notes-screen .curated-note__byline {
  color: color-mix(in srgb, var(--notes-muted) 92%, var(--notes-ink));
  font-size: 13px;
  line-height: 1.55;
}

.notes-screen .curated-note__summary {
  color: color-mix(in srgb, var(--notes-ink) 78%, transparent);
  font-size: 14px;
  line-height: 1.7;
}

.notes-screen .curated-note blockquote {
  padding: 9px 0 9px 14px;
  border-left: 2px solid color-mix(in srgb, var(--notes-purple) 70%, transparent);
  background: transparent;
  color: color-mix(in srgb, var(--notes-ink) 88%, transparent);
  font-size: 13px;
  line-height: 1.65;
}

.notes-screen .curated-note__tags {
  gap: 6px;
  margin-bottom: 10px;
}

.notes-screen .curated-note__tags li {
  padding: 3px 7px;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--notes-ink) 5%, transparent);
  box-shadow: none;
  color: var(--notes-muted);
  font-size: 9px;
}

.notes-screen .curated-note__footer {
  min-height: 46px;
  border-top: 1px solid var(--notes-v88-line);
}

.notes-screen .curated-note__read,
.notes-screen .curated-note__source {
  font-size: 11px;
  font-weight: 700;
}

.notes-screen .curated-note__read {
  color: var(--notes-purple);
}

.notes-screen .curated-note__source {
  color: color-mix(in srgb, var(--notes-teal, #147d69) 82%, var(--notes-ink));
}

.notes-screen .curated-note__media {
  position: relative;
  min-width: 0;
  min-height: 0;
  margin: 0;
  background: color-mix(in srgb, var(--notes-paper) 80%, #fff 20%);
}

.notes-screen .curated-note__media-frame {
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: color-mix(in srgb, var(--notes-paper) 84%, #d8d2c8 16%);
  box-shadow: none;
}

.notes-screen .curated-note__media img {
  outline: 0;
  transition: opacity 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.notes-screen .curated-note__media figcaption {
  min-width: 0;
  padding: 9px 12px 10px;
  border-top: 1px solid var(--notes-v88-line);
  background: color-mix(in srgb, var(--notes-paper) 92%, #fff 8%);
}

.notes-screen .curated-note__media:not(.curated-note__media--generated) figcaption {
  position: absolute;
  z-index: 3;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
  min-height: 34px;
  padding: 9px 12px;
  border: 0;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(18, 22, 20, 0.84);
  white-space: nowrap;
  text-overflow: ellipsis;
  inset: auto 0 0;
}

.notes-screen .curated-note__media:not(.curated-note__media--generated) .curated-note__media-short {
  color: inherit;
}

.notes-screen .curated-note__media.is-fallback .recap-info-cover {
  padding-bottom: 64px;
}

.notes-screen .recap-info-cover {
  --cover-ink: #f7f2e9;
  --cover-muted: rgba(247, 242, 233, 0.72);
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  overflow: hidden;
  padding: 24px 22px;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  color: var(--cover-ink);
  background:
    radial-gradient(circle at 88% 9%, rgba(255, 255, 255, 0.16) 0 8%, transparent 8.4%),
    linear-gradient(152deg, rgba(255, 255, 255, 0.08), transparent 38%),
    var(--cover-color, #294e48);
}

.notes-screen .curated-note:nth-child(2) .recap-info-cover { --cover-color: #3f3b54; }
.notes-screen .curated-note:nth-child(3) .recap-info-cover { --cover-color: #815041; }
.notes-screen .curated-note:nth-child(4) .recap-info-cover { --cover-color: #294654; }

.notes-screen .recap-info-cover::before {
  position: absolute;
  width: 64%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  content: "";
  top: -22%;
  right: -25%;
}

.notes-screen .recap-info-cover::after {
  position: absolute;
  width: 52%;
  height: 1px;
  content: "";
  right: 0;
  bottom: 28%;
  background: rgba(255, 255, 255, 0.22);
  transform: rotate(-32deg);
  transform-origin: right center;
}

.notes-screen .recap-info-cover__brand,
.notes-screen .recap-info-cover small {
  position: relative;
  z-index: 1;
  color: var(--cover-muted);
  font: 700 9px/1.4 "SFMono-Regular", "JetBrains Mono", monospace;
  letter-spacing: 0.1em;
}

.notes-screen .recap-info-cover strong {
  position: relative;
  z-index: 1;
  display: -webkit-box;
  overflow: hidden;
  color: var(--cover-ink);
  font: 700 20px/1.3 var(--notes-serif);
  letter-spacing: -0.02em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.notes-screen .recap-info-cover > span:not(.recap-info-cover__brand) {
  position: relative;
  z-index: 1;
  color: var(--cover-muted);
  font: 650 10px/1.45 "Instrument Local", "PingFang SC", sans-serif;
}

@media (min-width: 901px) {
  .notes-screen .notes-index[data-notes-layout="grid"] .curated-notes__grid {
    gap: 20px;
  }

  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note,
  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note:nth-child(even):not(.curated-note--text-only) {
    display: grid;
    min-height: 428px;
    overflow: visible;
    padding: 0;
    grid-template-columns: minmax(204px, 40%) minmax(0, 1fr);
    grid-template-areas:
      "media meta"
      "media title"
      "media byline"
      "media summary"
      "media quote"
      "media tags"
      "media footer";
    grid-template-rows: auto auto auto auto minmax(54px, 1fr) auto auto;
    column-gap: 0;
  }

  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note__media {
    display: grid;
    height: 100%;
    overflow: hidden;
    border-right: 1px solid var(--notes-v88-line);
    border-radius: 12px 0 0 12px;
    grid-area: media;
    grid-template-rows: minmax(0, 1fr);
  }

  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note__media-frame,
  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note__media--portrait .curated-note__media-frame {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
  }

  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note__meta {
    grid-area: meta;
    margin: 23px 24px 11px;
  }

  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note h2,
  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note__byline,
  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note__summary,
  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note blockquote,
  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note__tags,
  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note__footer {
    margin-right: 24px;
    margin-left: 24px;
  }

  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note h2 { grid-area: title; }
  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note__byline { grid-area: byline; }
  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note__summary { grid-area: summary; margin-top: 13px; }
  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note blockquote { grid-area: quote; }
  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note__tags { grid-area: tags; }
  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note__footer { grid-area: footer; margin-bottom: 15px; }

  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note__byline,
  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note__summary {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note blockquote {
    display: -webkit-box;
    overflow: hidden;
    align-self: start;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note__media figcaption {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .notes-screen .notes-index[data-notes-layout="list"] .curated-note {
    min-height: 186px;
    padding: 0;
    grid-template-columns: 152px minmax(0, 1fr) minmax(176px, 0.46fr);
    grid-template-areas:
      "media meta quote"
      "media title quote"
      "media byline quote"
      "media summary quote"
      "media footer footer";
    grid-template-rows: auto auto auto 1fr auto;
    column-gap: 0;
  }

  .notes-screen .notes-index[data-notes-layout="list"] .curated-note__media {
    display: grid;
    height: 100%;
    overflow: hidden;
    border-right: 1px solid var(--notes-v88-line);
    border-radius: 12px 0 0 12px;
    grid-area: media;
    grid-template-rows: minmax(0, 1fr);
  }

  .notes-screen .notes-index[data-notes-layout="list"] .curated-note__media-frame,
  .notes-screen .notes-index[data-notes-layout="list"] .curated-note__media--portrait .curated-note__media-frame {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
  }

  .notes-screen .notes-index[data-notes-layout="list"] .curated-note__media figcaption,
  .notes-screen .notes-index[data-notes-layout="list"] .curated-note__tags {
    display: none;
  }

  .notes-screen .notes-index[data-notes-layout="list"] .curated-note__meta {
    grid-area: meta;
    margin: 18px 20px 8px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .notes-screen .notes-index[data-notes-layout="list"] .curated-note h2,
  .notes-screen .notes-index[data-notes-layout="list"] .curated-note__byline,
  .notes-screen .notes-index[data-notes-layout="list"] .curated-note__summary,
  .notes-screen .notes-index[data-notes-layout="list"] .curated-note__footer {
    margin-right: 20px;
    margin-left: 20px;
  }

  .notes-screen .notes-index[data-notes-layout="list"] .curated-note h2 { grid-area: title; }
  .notes-screen .notes-index[data-notes-layout="list"] .curated-note__byline { grid-area: byline; }
  .notes-screen .notes-index[data-notes-layout="list"] .curated-note__summary { grid-area: summary; }
  .notes-screen .notes-index[data-notes-layout="list"] .curated-note blockquote { grid-area: quote; margin: 22px 20px 16px 0; }
  .notes-screen .notes-index[data-notes-layout="list"] .curated-note__footer { grid-area: footer; margin-bottom: 10px; }
}

@media (max-width: 900px) {
  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note {
    display: grid;
    min-height: 0;
    padding: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "media"
      "meta"
      "title"
      "byline"
      "summary"
      "quote"
      "tags"
      "footer";
  }

  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note__media {
    overflow: hidden;
    border-bottom: 1px solid var(--notes-v88-line);
    border-radius: 12px 12px 0 0;
    grid-area: media;
  }

  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note__media-frame {
    aspect-ratio: 16 / 9;
  }

  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note__media--portrait .curated-note__media-frame {
    aspect-ratio: 4 / 3;
  }

  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note__media figcaption {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note__meta,
  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note h2,
  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note__byline,
  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note__summary,
  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note blockquote,
  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note__tags,
  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note__footer {
    margin-right: 18px;
    margin-left: 18px;
  }

  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note__meta { margin-top: 17px; grid-area: meta; }
  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note h2 { grid-area: title; }
  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note__byline { grid-area: byline; }
  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note__summary { grid-area: summary; }
  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note blockquote { grid-area: quote; }
  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note__tags { grid-area: tags; }
  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note__footer { grid-area: footer; margin-bottom: 12px; }

  .notes-screen .notes-index[data-notes-layout="list"] .curated-note {
    min-height: 154px;
    padding: 14px 112px 11px 17px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "meta"
      "title"
      "byline"
      "footer";
  }

  .notes-screen .notes-index[data-notes-layout="list"] .curated-note__media {
    position: absolute;
    width: 88px;
    height: calc(100% - 24px);
    overflow: hidden;
    border-radius: 10px;
    inset: 12px 12px 12px auto;
  }

  .notes-screen .notes-index[data-notes-layout="list"] .curated-note__media-frame,
  .notes-screen .notes-index[data-notes-layout="list"] .curated-note__media--portrait .curated-note__media-frame {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
  }

  .notes-screen .notes-index[data-notes-layout="list"] .curated-note__media figcaption,
  .notes-screen .notes-index[data-notes-layout="list"] .curated-note__summary,
  .notes-screen .notes-index[data-notes-layout="list"] .curated-note blockquote,
  .notes-screen .notes-index[data-notes-layout="list"] .curated-note__tags {
    display: none;
  }

  .notes-screen .notes-index[data-notes-layout="list"] .recap-info-cover {
    padding: 10px;
    gap: 5px;
  }

  .notes-screen .notes-index[data-notes-layout="list"] .recap-info-cover strong {
    font-size: 13px;
    -webkit-line-clamp: 4;
  }
}

@media (max-width: 340px) {
  .notes-screen .notes-index[data-notes-layout="list"] .curated-note {
    min-height: 150px;
    padding: 13px 96px 10px 14px;
  }

  .notes-screen .notes-index[data-notes-layout="list"] .curated-note__media {
    width: 76px;
    inset: 10px 10px 10px auto;
  }

  .notes-screen .notes-index[data-notes-layout="list"] .curated-note__meta {
    display: block;
    overflow: hidden;
    margin-bottom: 6px;
    font-size: 8px;
    letter-spacing: 0.045em;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .notes-screen .notes-index[data-notes-layout="list"] .curated-note h2 {
    display: -webkit-box;
    overflow: hidden;
    font-size: 17px;
    line-height: 1.22;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .notes-screen .notes-index[data-notes-layout="list"] .curated-note__byline {
    overflow: hidden;
    font-size: 10px;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .notes-screen .notes-index[data-notes-layout="list"] .curated-note__footer {
    display: flex;
    min-height: 44px;
    gap: 10px;
    align-items: stretch;
  }

  .notes-screen .notes-index[data-notes-layout="list"] .curated-note__read,
  .notes-screen .notes-index[data-notes-layout="list"] .curated-note__source {
    display: inline-flex;
    min-width: 0;
    min-height: 44px;
    align-items: center;
    font-size: 9px;
    line-height: 1.2;
    white-space: nowrap;
  }

  .notes-screen .notes-index[data-notes-layout="list"] .curated-note__read span[aria-hidden="true"],
  .notes-screen .notes-index[data-notes-layout="list"] .curated-note__source span[aria-hidden="true"] {
    display: none;
  }
}

@media (hover: hover) and (pointer: fine) {
  .notes-screen .notes-index[data-notes-layout="grid"] .curated-note:hover {
    border-color: color-mix(in srgb, var(--notes-purple) 22%, var(--notes-v88-line));
    box-shadow: 0 2px 4px rgba(45, 35, 25, 0.04), 0 20px 44px rgba(45, 35, 25, 0.095);
    transform: translateY(-2px);
  }

  .notes-screen .notes-index[data-notes-layout="list"] .curated-note:hover {
    box-shadow: 0 1px 3px rgba(45, 35, 25, 0.04), 0 10px 26px rgba(45, 35, 25, 0.065);
    transform: translateY(-1px);
  }
}

html[data-theme="dark"] .notes-screen {
  --notes-v88-surface: #24201c;
  --notes-v88-line: rgba(244, 234, 220, 0.14);
  --notes-v88-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 16px 38px rgba(0, 0, 0, 0.26);
}

html[data-theme="dark"] .notes-screen .curated-note,
html[data-theme="dark"] .notes-screen .curated-note__media figcaption {
  background-image: none;
}

@media (prefers-reduced-motion: reduce) {
  .notes-screen .curated-note,
  .notes-screen .curated-note__media img {
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .notes-screen .curated-note,
  .notes-screen .curated-note__media,
  .notes-screen .curated-note__media-frame {
    border-color: CanvasText;
    background: Canvas;
    box-shadow: none;
  }

  .notes-screen .recap-info-cover {
    color: CanvasText;
    background: Canvas;
  }
}
