/* Notes: short posts, the notes list, topic pages, and the homepage "Latest" strip */

/* Shared bits */
.note-meta { font-size:0.75rem; font-weight:500; letter-spacing:0.12em; text-transform:uppercase; color:#9a928c; display:flex; flex-wrap:wrap; align-items:center; gap:0.6rem; margin-bottom:0.75rem; }
.note-topic { color:var(--purple); background:rgba(107,63,160,0.08); padding:0.2rem 0.6rem; text-decoration:none; }
a.note-topic:hover { background:rgba(107,63,160,0.16); }
.note-more { font-size:0.78rem; font-weight:500; letter-spacing:0.1em; text-transform:uppercase; color:var(--purple); display:inline-flex; gap:0.5rem; transition:gap 0.2s; }
.note-more::after { content:'→'; }

/* Homepage strip */
.latest-notes { padding:6rem 4rem; background:white; }
.latest-grid { display:grid; grid-template-columns:repeat(4, 1fr); gap:1.5rem; }
.latest-card { display:flex; flex-direction:column; text-decoration:none; color:inherit; padding:1.75rem; background:var(--cream); border-top:3px solid var(--accent); transition:transform 0.3s, box-shadow 0.3s; }
.latest-card:hover { transform:translateY(-4px); box-shadow:0 16px 48px rgba(61,31,107,0.10); }
.latest-card h3 { font-family:'Playfair Display',serif; font-size:1.2rem; line-height:1.3; color:var(--dark); margin-bottom:0.75rem; }
.latest-card p { font-size:0.9rem; line-height:1.65; color:var(--mid); margin-bottom:1.25rem; }
.latest-card .note-more { margin-top:auto; }
.latest-card:hover .note-more { gap:0.9rem; }
@media (max-width: 1100px) { .latest-grid { grid-template-columns:repeat(2, 1fr); } }

/* Notes list + topic pages */
.notes-hero { padding:10rem 4rem 4rem; background:var(--purple-dark); color:white; position:relative; overflow:hidden; }
.notes-hero::before { content:''; position:absolute; top:-80px; right:-80px; width:400px; height:400px; border:1px solid rgba(201,168,76,0.15); border-radius:50%; }
.notes-hero .hero-label { font-size:0.75rem; font-weight:500; letter-spacing:0.18em; text-transform:uppercase; color:var(--accent); margin-bottom:1rem; display:flex; align-items:center; gap:0.75rem; }
.notes-hero .hero-label::before { content:''; display:block; width:32px; height:1px; background:var(--accent); }
.notes-hero h1 { font-family:'Playfair Display',serif; font-size:clamp(2.5rem,5vw,4rem); font-weight:700; line-height:1.15; margin-bottom:1rem; }
.notes-hero h1 em { font-style:italic; color:var(--purple-light); }
.notes-hero p { font-size:1.05rem; line-height:1.8; color:rgba(255,255,255,0.65); max-width:560px; }
.topic-chips { display:flex; flex-wrap:wrap; gap:0.6rem; margin-top:2rem; }
.topic-chip { font-size:0.75rem; font-weight:500; letter-spacing:0.1em; text-transform:uppercase; text-decoration:none; color:rgba(255,255,255,0.8); border:1px solid rgba(255,255,255,0.25); padding:0.45rem 0.9rem; transition:all 0.2s; }
.topic-chip:hover, .topic-chip.active { background:var(--accent); border-color:var(--accent); color:var(--purple-dark); }

.notes-feed { max-width:860px; margin:0 auto; padding:4rem 2rem 5rem; }
.feed-item { display:grid; grid-template-columns:130px 1fr; gap:2rem; padding:2.25rem 0; border-bottom:1px solid var(--warm-gray); }
.feed-item:first-child { padding-top:0; }
.feed-date { font-size:0.8rem; font-weight:500; color:#9a928c; letter-spacing:0.04em; padding-top:0.35rem; line-height:1.5; }
.feed-date .kind { display:block; font-size:0.68rem; letter-spacing:0.14em; text-transform:uppercase; color:var(--purple); margin-top:0.3rem; }
.feed-item.is-analysis .feed-date .kind { color:#7a6220; }
.feed-item h2 { font-family:'Playfair Display',serif; font-size:1.55rem; line-height:1.3; margin-bottom:0.6rem; }
.feed-item h2 a { color:var(--dark); text-decoration:none; }
.feed-item h2 a:hover { color:var(--purple); }
.feed-item .feed-topics { display:flex; flex-wrap:wrap; gap:0.5rem; margin-bottom:0.9rem; }
.feed-item .feed-topics .note-topic { font-size:0.68rem; font-weight:500; letter-spacing:0.12em; text-transform:uppercase; }
.feed-summary { font-size:1rem; line-height:1.8; color:var(--mid); margin-bottom:0.9rem; }
.feed-item.is-analysis { background:white; margin:0 -1.5rem; padding:2rem 1.5rem; border-left:3px solid var(--accent); border-bottom:none; margin-bottom:1px; }
.empty-note { color:var(--mid); font-size:1rem; }

/* Single note */
.note-page { max-width:720px; margin:0 auto; padding:9rem 2rem 4rem; }
.note-back { font-size:0.78rem; font-weight:500; letter-spacing:0.1em; text-transform:uppercase; color:var(--purple); text-decoration:none; display:inline-flex; gap:0.5rem; margin-bottom:2.5rem; transition:gap 0.2s; }
.note-back::before { content:'←'; }
.note-back:hover { gap:0.9rem; }
.note-title { font-family:'Playfair Display',serif; font-size:clamp(2rem,4vw,2.7rem); font-weight:700; line-height:1.2; color:var(--dark); margin-bottom:1rem; }
.note-byline { font-size:0.85rem; color:#9a928c; padding-bottom:1.75rem; margin-bottom:2rem; border-bottom:1px solid var(--warm-gray); }

/* Body text, shared by single notes and full notes shown in the feed */
.prose { font-size:1.06rem; line-height:1.85; color:var(--mid); }
.prose > * + * { margin-top:1.1rem; }
.prose h2 { font-family:'Playfair Display',serif; font-size:1.45rem; color:var(--dark); line-height:1.3; margin-top:2.25rem; padding-bottom:0.5rem; border-bottom:1px solid var(--warm-gray); }
.prose h3 { font-size:0.8rem; font-weight:500; letter-spacing:0.08em; text-transform:uppercase; color:var(--purple); margin-top:1.75rem; }
.prose a { color:var(--purple); text-underline-offset:3px; }
.prose a:hover { color:var(--purple-dark); }
.prose strong { color:var(--dark); font-weight:500; }
.prose ul, .prose ol { padding-left:1.4rem; }
.prose li + li { margin-top:0.4rem; }
.prose blockquote { border-left:3px solid var(--accent); padding:0.25rem 0 0.25rem 1.25rem; font-family:'Playfair Display',serif; font-style:italic; color:var(--dark); }
.prose img { max-width:100%; display:block; border:1px solid var(--warm-gray); background:white; }
.prose figure { margin:1.75rem 0; }
.prose figcaption { font-size:0.82rem; color:#8a827c; margin-top:0.6rem; line-height:1.6; }
.prose code { font-size:0.88em; background:rgba(107,63,160,0.07); padding:0.1rem 0.35rem; color:var(--purple-dark); }
.prose hr { border:none; height:1px; background:var(--warm-gray); margin:2rem 0; }

/* "Why it matters" closing line: start a paragraph with **Why it matters:** */
.why-it-matters { background:rgba(201,168,76,0.1); border-left:3px solid var(--accent); padding:1rem 1.25rem; color:var(--dark); }

.note-related { margin-top:2.5rem; display:block; text-decoration:none; color:inherit; background:white; border-top:3px solid var(--purple); padding:1.5rem 1.75rem; transition:box-shadow 0.3s; }
.note-related:hover { box-shadow:0 12px 36px rgba(61,31,107,0.10); }
.note-related .label { font-size:0.7rem; font-weight:500; letter-spacing:0.14em; text-transform:uppercase; color:var(--purple); margin-bottom:0.4rem; }
.note-related .title { font-family:'Playfair Display',serif; font-size:1.2rem; color:var(--dark); line-height:1.35; }

.note-pager { display:grid; grid-template-columns:1fr 1fr; gap:1rem; margin-top:3rem; padding-top:2rem; border-top:1px solid var(--warm-gray); }
.note-pager a { text-decoration:none; color:inherit; }
.note-pager .dir { font-size:0.7rem; font-weight:500; letter-spacing:0.14em; text-transform:uppercase; color:#9a928c; margin-bottom:0.3rem; }
.note-pager .t { font-family:'Playfair Display',serif; font-size:1.05rem; color:var(--dark); line-height:1.35; }
.note-pager a:hover .t { color:var(--purple); }
.note-pager .next { text-align:right; grid-column:2; }

@media (max-width: 768px) {
  .latest-notes { padding:3.5rem 1.5rem; }
  .latest-grid { grid-template-columns:1fr; }
  .notes-hero { padding:7rem 1.5rem 3rem; }
  .notes-feed { padding:2.5rem 1.5rem 3.5rem; }
  .feed-item { grid-template-columns:1fr; gap:0.4rem; }
  .feed-item.is-analysis { margin:0 -0.75rem; padding:1.5rem 0.75rem; }
  .note-page { padding:7rem 1.5rem 3rem; }
  .note-pager { grid-template-columns:1fr; }
  .note-pager .next { grid-column:1; text-align:left; }
}

/* ── Ribbons: cool blue for Notes, gold for Analysis ── */
.feed-item { background:white; border-left:3px solid var(--note-blue); border-bottom:none; margin:0 -1.5rem 1rem; padding:2rem 1.5rem; }
.feed-item:first-child { padding-top:2rem; }
.feed-item .feed-date .kind { color:var(--note-blue-dark); }
.feed-item.is-analysis { border-left-color:var(--accent); margin:0 -1.5rem 1rem; }
.latest-card { border-top-color:var(--note-blue); }
.latest-card .note-more { color:var(--note-blue-dark); }
.note-page .note-meta time { color:var(--note-blue-dark); }
.note-kind { display:inline-block; font-size:0.7rem; font-weight:500; letter-spacing:0.14em; text-transform:uppercase; color:white; background:var(--note-blue); padding:0.2rem 0.6rem; }
@media (max-width: 768px) {
  .feed-item, .feed-item.is-analysis { margin:0 -0.75rem 0.75rem; padding:1.5rem 0.75rem; }
}
.feed-item:not(.is-analysis) .note-more { color:var(--note-blue-dark); }

/* ── Burgundy ribbon for Articles (explainers built on others' reporting and documents) ── */
.feed-item.is-article { border-left-color:var(--article); }
.feed-item.is-article .feed-date .kind { color:var(--article); }
.feed-item.is-article .note-more { color:var(--article-dark); }
.feed-item.is-article h2 a:hover { color:var(--article); }
.latest-card.is-article { border-top-color:var(--article); }
.latest-card.is-article .note-more { color:var(--article-dark); }
.article-kind { display:inline-block; font-size:0.68rem; font-weight:500; letter-spacing:0.14em; text-transform:uppercase; color:white; background:var(--article); padding:0.15rem 0.55rem; }
.feed-item.is-article .note-topic { color:var(--article); background:rgba(123,30,58,0.08); }
.latest-card.is-article .note-topic { color:var(--article); background:rgba(123,30,58,0.08); }
