/* ============================================================
   /insights/, page-local styles, loaded after css/main.css
   Components new to this page only: editorial policy grid,
   featured-essay split, cluster filter chips, insight rows,
   and the subscribe band on slate. Tokens come from main.css.
   ============================================================ */

/* ---------- How we publish ---------- */

.publish__lead { max-width:var(--text-max); color:var(--muted); }
.publish__grid {
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:var(--s-6) var(--s-7);
  margin-top:var(--s-7);
}
.publish__item { border-top:1px solid var(--gold-500); padding-top:var(--s-4); }
.publish__item h3 { margin-bottom:var(--s-3); }
.publish__item p { color:var(--muted); }

/* ---------- Featured essay ---------- */

.featured__split {
  display:grid;
  grid-template-columns:7fr 5fr;
  gap:var(--s-8);
  align-items:center;
  margin-top:var(--s-7);
}
.featured__kicker { text-transform:uppercase; color:var(--muted); margin-bottom:var(--s-3); }
.featured__copy h3 { margin-bottom:var(--s-4); }
.featured__dek { color:var(--muted); max-width:var(--text-max-body); margin-bottom:var(--s-4); }
.featured__meta { color:var(--muted); }
.featured__visual {
  aspect-ratio:3 / 2;
  background:var(--paper);
  border:1px solid var(--border-light);
  display:flex; align-items:flex-end;
  padding:var(--s-5);
}
.featured__visual .mono { color:var(--muted); }

/* ---------- The library: filters + editorial rows ---------- */

/* Filters are progressive enhancement, hidden without JS (all rows render) */
.filters { display:none; }
.js .filters { display:flex; flex-wrap:wrap; gap:var(--s-2); margin:var(--s-6) 0 var(--s-5); }
.filters__chip {
  font-family:var(--font-sans); font-size:var(--fs-small); font-weight:500; line-height:1;
  /* V3: --ivory is a light TEXT colour now, and a navy border is
     invisible on the dark canvas. Matches .router__chip. */
  background:var(--paper); color:var(--ink);
  border:1px solid var(--line-hi); border-radius:var(--r-pill);
  padding:14px var(--s-4); /* 44px total height, locked touch-target minimum (spec §18) */
  cursor:pointer;
  transition:border-color var(--t-hover) var(--ease), background-color var(--t-hover) var(--ease), color var(--t-hover) var(--ease);
}
.filters__chip:hover { border-color:var(--green-600); }
/* Signal fill takes the dark ink; light text on #3BE884 is ~1.3:1. */
.filters__chip[aria-pressed="true"] { background:var(--green-600); border-color:var(--green-600); color:var(--green-900); }

.library__status { text-transform:uppercase; color:var(--muted); margin:var(--s-6) 0 var(--s-4); }
.js .library__status { margin-top:0; }

.library__rows { border-top:1px solid var(--border-light); }
.insight-row {
  display:grid;
  grid-template-columns:220px 1fr;
  gap:var(--s-6);
  padding:var(--s-6) 0;
  border-bottom:1px solid var(--border-light);
}
.insight-row[hidden] { display:none; } /* display:grid would otherwise defeat [hidden] */
.insight-row__cluster { text-transform:uppercase; color:var(--muted); padding-top:6px; }
.insight-row__title { margin-bottom:var(--s-3); max-width:34ch; }
.insight-row__dek { color:var(--muted); max-width:var(--text-max-body); margin-bottom:var(--s-3); }
.insight-row__meta { color:var(--muted); }
.library__note { color:var(--muted); margin-top:var(--s-5); max-width:var(--text-max-body); }

/* ---------- Subscribe band (The Notes, on slate) ---------- */

.subscribe h2 { margin-bottom:var(--s-5); }
.subscribe__body { max-width:var(--text-max); margin-bottom:var(--s-6); }
.subscribe__form {
  display:flex;
  align-items:flex-start;
  gap:var(--s-4);
  flex-wrap:wrap;
  max-width:560px;
}
.subscribe__form .field { flex:1 1 280px; margin-bottom:0; }
.subscribe__form .btn { padding-top:18px; padding-bottom:18px; } /* matches the 52px field height */
.section--slate .field__label { color:var(--muted-dark); }
/* The V3 --error is already the light salmon tint that holds AA on a
   dark band, so the one-off hex this rule used to carry is gone. */
.section--slate .field__error { color:var(--error); }
.subscribe__confirm { color:var(--ivory); }
.subscribe__confirm:focus { outline:none; }
.subscribe__stub { margin-top:var(--s-5); }

/* ---------- Responsive ---------- */

@media (max-width:900px) {
  .featured__split { grid-template-columns:1fr; gap:var(--s-6); }
  .featured__visual { order:-1; }
  .publish__grid { grid-template-columns:1fr; gap:var(--s-6); }
}
@media (max-width:720px) {
  .insight-row { grid-template-columns:1fr; gap:var(--s-2); }
  .insight-row__cluster { padding-top:0; }
}

/* Launch: featured essay carries a real image; titles are links */
.featured__visual--img { padding:0; overflow:hidden; display:block; }
.featured__visual--img img { width:100%; height:100%; object-fit:cover; display:block; border-radius:inherit; }
.insight-row__title a, .featured__copy h3 a { color:inherit; text-decoration:none; }
.insight-row__title a:hover, .featured__copy h3 a:hover { color:var(--green-600); }
