/* ============================================================
   notes.css - article-only styles for the static /notes/ pages.
   Reuses tokens + shared classes from src/styles/globals.css
   (.eyebrow, .link-underline, .section-shell, .display, .lede-ish).
   No new colors. No Tailwind classes. Pure static, no JS.
   ============================================================ */

/* ---------- shared top bar ---------- */
.note-topbar {
  border-bottom: 1px solid var(--line);
}
.note-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.note-wordmark {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.note-toplinks {
  display: flex;
  align-items: center;
  gap: 26px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.note-toplinks a {
  padding-bottom: 2px;
}

/* ---------- shared page footer ---------- */
.note-page-footer {
  border-top: 1px solid var(--line);
  margin-top: clamp(56px, 8vw, 96px);
}
.note-page-footer-inner {
  padding: 22px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
}
.note-page-footer-inner a {
  color: var(--ink-soft);
}

/* ---------- note article ---------- */
.note-article {
  max-width: 72ch;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 88px) 0 clamp(56px, 8vw, 96px);
}
.note-eyebrow {
  color: var(--clay);
}
.note-h1 {
  margin: 16px 0 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.note-article .lede {
  margin: 20px 0 0;
  max-width: 54ch;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.5;
  color: var(--ink-soft);
}
.note-tags {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.note-tags li { list-style: none; }

/* ---------- hero figure ---------- */
.note-hero {
  margin: clamp(28px, 4vw, 44px) 0;
  border: 1px solid var(--line-strong);
  background: var(--paper-2);
}
.note-hero img {
  display: block;
  width: 100%;
  height: auto;
}
.note-hero figcaption {
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
  border-top: 1px solid var(--line);
}

/* ---------- prose body ---------- */
.prose {
  margin-top: clamp(20px, 3vw, 32px);
  font-family: var(--font-body);
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.65;
  color: var(--ink);
}
.prose p { margin: 0 0 1.4em; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { font-weight: 600; }
.prose a {
  color: var(--clay);
  background-image: linear-gradient(var(--clay), var(--clay));
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.prose a:hover { background-size: 100% 1px; }
.prose ul, .prose ol { margin: 0 0 1.4em; padding-left: 1.3em; }
.prose li { margin: 0 0 0.5em; }
.prose blockquote {
  margin: 0 0 1.4em;
  padding-left: 1.1em;
  border-left: 2px solid var(--line-strong);
  color: var(--ink-soft);
}
.prose code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--paper-2);
  padding: 0.1em 0.35em;
}

/* ---------- sources ---------- */
.sources {
  margin-top: clamp(32px, 4vw, 52px);
  padding-top: clamp(24px, 3vw, 36px);
  border-top: 1px solid var(--line);
}
.sources ol {
  margin: 16px 0 0;
  padding-left: 1.3em;
  font-size: 15px;
  line-height: 1.7;
}
.sources a {
  color: var(--ink);
}
.sources a:hover { color: var(--clay); }
.note-source-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
}

/* ---------- footer row + prev/next ---------- */
.note-footrow {
  margin-top: clamp(40px, 5vw, 64px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.02em;
}
.note-footrow a { padding-bottom: 4px; }
.note-discuss { color: var(--clay); }

.note-prevnext {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.note-pn-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px;
  border: 1px solid var(--line);
}
.note-pn-card:last-child { text-align: right; align-items: flex-end; }
.note-pn-title {
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.3;
}
.note-pn-empty { border-color: transparent; }

/* ---------- notes index page ---------- */
.notes-index-header {
  padding: clamp(48px, 7vw, 88px) 0 clamp(28px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
}
.notes-index-h1 {
  margin: 16px 0 0;
  font-weight: 500;
  font-size: clamp(30px, 4.6vw, 54px);
  max-width: 20ch;
}
.notes-index-lede {
  margin: 20px 0 0;
  max-width: 52ch;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink-soft);
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.6;
}
.notes-count {
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

.notes-list {
  padding: clamp(12px, 2vw, 20px) 0 clamp(24px, 4vw, 40px);
}
.notes-list-row {
  display: grid;
  grid-template-columns: 172px 1fr;
  gap: 24px;
  padding: clamp(24px, 3vw, 36px) 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.notes-list-eyebrow {
  color: var(--ink-faint);
}
.notes-list-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(20px, 2.4vw, 27px);
  line-height: 1.2;
}
.notes-list-title:hover { color: var(--clay); }
.notes-list-summary {
  margin: 10px 0 0;
  max-width: 60ch;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.6;
}
.notes-list-tags {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.notes-list-tags li { list-style: none; }

.notes-index-footer {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: clamp(16px, 2vw, 24px) 0 clamp(40px, 5vw, 64px);
  font-family: var(--font-mono);
  font-size: 13px;
}

/* ---------- responsive ---------- */
@media (max-width: 700px) {
  .note-prevnext { grid-template-columns: 1fr; }
  .note-pn-card:last-child { text-align: left; align-items: flex-start; }
  .notes-list-row { grid-template-columns: 1fr; gap: 8px; }
}
