/* ============================================================
   CCE — INSIGHTS LAYER
   Sits on top of brand.css + site.css + editorial.css. Same tokens,
   editorial posture: photography leads the card, the headline carries
   the weight, separation comes from whitespace rather than boxes.
   Nothing here introduces a new font, palette, or radius convention.
   ============================================================ */

/* ---------- page shell ----------
   Insights opens on paper, not on a full-bleed photograph, so the header
   is solid from the first pixel and scrolls with the page instead of
   dissolving over a hero. (No id="edHeader" — editorial.js leaves it be.) */
.ins .ed-header { position: sticky; top: 0; left: auto; right: auto; }

/* ---------- hero — deliberately shallow ---------- */
.ins-hero { padding-block: clamp(44px, 7vh, 88px) clamp(28px, 4vh, 48px); }
.ins-hero__h {
  font-family: var(--font-display); font-weight: var(--w-black);
  font-size: clamp(2.4rem, 5.6vw, 4.4rem); line-height: 1.0;
  letter-spacing: -0.045em; color: var(--ink);
  max-width: 17ch; text-wrap: balance;
}
.ins-hero__lead {
  margin-top: clamp(18px, 2.2vw, 28px);
  font-size: clamp(1.02rem, 1.3vw, 1.22rem); line-height: 1.55;
  color: var(--body); max-width: 62ch;
}

/* ---------- shared metadata rows ---------- */
.imeta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px;
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--n-400);
}
.imeta__dot { width: 7px; height: 7px; border-radius: 999px; background: var(--cat, var(--n-300)); flex: none; }
.imeta__sep { color: var(--n-300); }
.imeta__cat { color: var(--n-500); }

/* n-400 / n-500 rather than n-300: these run at 0.66rem, and n-300 lands
   at 3.4:1 on paper — under AA for text this size. */
.iby {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px;
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--n-400);
}
.iby__name { color: var(--n-500); }

/* ---------- featured insight ---------- */
.ins-featured { border-top: 1px solid var(--hairline); padding-top: clamp(28px, 3.6vw, 52px); }
.ins-feature {
  display: grid; grid-template-columns: 1.12fr 0.88fr;
  gap: clamp(24px, 4vw, 64px); align-items: center;
}
.ins-feature__media {
  aspect-ratio: 3 / 2; border-radius: var(--r-ed); overflow: hidden; background: var(--mist);
}
.ins-feature__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-out); }
.ins-feature:hover .ins-feature__media img { transform: scale(1.03); }
.ins-feature__t {
  font-family: var(--font-display); font-weight: var(--w-black);
  font-size: clamp(1.75rem, 3.3vw, 2.9rem); line-height: 1.04;
  letter-spacing: -0.04em; color: var(--ink);
  margin: 16px 0 14px; text-wrap: balance;
}
.ins-feature__x { color: var(--body); font-size: clamp(1rem, 1.15vw, 1.1rem); line-height: 1.55; max-width: 46ch; }
.ins-feature__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: clamp(18px, 2.2vw, 28px); }
.ilink {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-family: var(--font-display); font-weight: var(--w-semi); font-size: 0.95rem;
  color: var(--ink); border-bottom: 1px solid var(--ink);
  transition: gap var(--dur) var(--ease), color var(--dur) var(--ease);
}
.ins-feature:hover .ilink, .ilink:hover { gap: 14px; }
@media (max-width: 900px) {
  .ins-feature { grid-template-columns: 1fr; gap: 20px; }   /* image first — DOM order */
  .ins-feature__foot { gap: 12px 20px; }
}

/* ---------- category filters ---------- */
.ins-filterbar { margin-top: clamp(40px, 6vw, 88px); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.ins-filters {
  display: flex; align-items: center; gap: clamp(18px, 2.6vw, 34px);
  overflow-x: auto; overscroll-behavior-x: contain;
  scrollbar-width: none; -ms-overflow-style: none;
}
.ins-filters::-webkit-scrollbar { display: none; }
.ifilter {
  flex: none; background: none; border: 0; cursor: pointer;
  font-family: var(--font-display); font-weight: var(--w-semi); font-size: 0.98rem;
  letter-spacing: -0.01em; color: var(--n-400); white-space: nowrap;
  min-height: 52px; padding: 0; border-bottom: 2px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.ifilter:hover { color: var(--n-600); }
.ifilter[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--yellow); }
.ins-count { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--n-400); padding-block: 14px 0; }

/* ---------- the grid ---------- */
.ins-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(36px, 4vw, 60px) clamp(20px, 2.4vw, 34px);
}
@media (max-width: 1024px) { .ins-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .ins-grid { grid-template-columns: 1fr; gap: 40px; } }

.icard { display: flex; flex-direction: column; }
.icard[hidden] { display: none; }
.icard__media { aspect-ratio: 3 / 2; border-radius: var(--r-ed); overflow: hidden; background: var(--mist); }
.icard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-out); }
.icard:hover .icard__media img { transform: scale(1.04); }
.icard .imeta { margin-top: 18px; }
.icard__t {
  font-family: var(--font-display); font-weight: var(--w-bold);
  font-size: clamp(1.15rem, 1.5vw, 1.42rem); line-height: 1.2;
  letter-spacing: -0.028em; color: var(--ink); margin: 12px 0 8px;
  text-wrap: balance; transition: color var(--dur) var(--ease);
}
.icard:hover .icard__t { color: var(--n-600); }
.icard__x {
  color: var(--body); font-size: 0.95rem; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.icard .iby { margin-top: 14px; }
/* colour comes from the site-wide :focus-visible rule; cards just need room */
.icard:focus-visible { outline-offset: 8px; border-radius: var(--r-ed); }

.ins-empty { padding-block: clamp(40px, 6vw, 80px); color: var(--n-400); max-width: 46ch; }
.ins-empty[hidden] { display: none; }

/* ---------- subscription ---------- */
.ins-sub { background: var(--mist); border-block: 1px solid var(--hairline); }
.ins-sub__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 72px); align-items: start; }
@media (max-width: 900px) { .ins-sub__grid { grid-template-columns: 1fr; gap: 28px; } }
.ins-sub__h {
  font-family: var(--font-display); font-weight: var(--w-black);
  font-size: clamp(1.7rem, 2.8vw, 2.5rem); line-height: 1.06;
  letter-spacing: -0.038em; color: var(--ink); max-width: 18ch; text-wrap: balance;
}
.ins-sub__b { color: var(--body); margin-top: 16px; max-width: 50ch; }
.ins-sub__form { display: flex; flex-wrap: wrap; gap: 10px; }
/* honeypot — site.css scopes .hp to .form, so this form needs its own rule */
.ins-sub__form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ins-sub__form label {
  flex: 1 1 100%;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--n-500);
}
.ins-sub__input {
  flex: 1 1 260px; min-width: 0; min-height: 48px;
  font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--r-sm);
  padding: 12px 16px;
  transition: border-color var(--dur) var(--ease);
}
.ins-sub__input:focus { outline: none; border-color: var(--ink); }
.ins-sub__form .btn { flex: 0 0 auto; }
@media (max-width: 480px) { .ins-sub__form .btn { flex: 1 1 100%; } }
.ins-sub__fine { font-size: 0.82rem; line-height: 1.5; color: var(--n-400); margin-top: 14px; max-width: 46ch; }
.ins-sub__fine a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- resources bridge — small on purpose ---------- */
.ins-bridge {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px;
  margin-top: clamp(28px, 3.4vw, 44px); padding-top: clamp(20px, 2.4vw, 28px);
  border-top: 1px solid var(--hairline); font-size: 0.95rem; color: var(--n-400);
}
.ins-bridge__cta { font-family: var(--font-display); font-weight: var(--w-semi); color: var(--n-500); }
/* Live state once /resources exists — swap the span for <a class="ins-bridge__cta"> */
a.ins-bridge__cta { color: var(--ink); border-bottom: 1px solid var(--hairline); transition: border-color var(--dur) var(--ease); }
a.ins-bridge__cta:hover { border-bottom-color: var(--ink); }
.ins-bridge__soon { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--n-400); }

/* ---------- closing CTA — restrained, no photography ---------- */
.ins-close { border-top: 1px solid var(--hairline); }
.ins-close__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(24px, 4vw, 72px); align-items: center; }
@media (max-width: 900px) { .ins-close__grid { grid-template-columns: 1fr; gap: 24px; } }
.ins-close__h {
  font-family: var(--font-display); font-weight: var(--w-black);
  font-size: clamp(1.7rem, 3vw, 2.6rem); line-height: 1.06;
  letter-spacing: -0.04em; color: var(--ink); max-width: 20ch; text-wrap: balance;
}
.ins-close p { color: var(--body); max-width: 50ch; }

/* ============================================================
   ARTICLE DETAIL — the reusable template
   ============================================================ */
.iart { padding-block: clamp(40px, 6vh, 80px) 0; }
.iart__back {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--n-400);
  transition: color var(--dur) var(--ease);
}
.iart__back:hover { color: var(--ink); }
.iart__h {
  font-family: var(--font-display); font-weight: var(--w-black);
  font-size: clamp(2rem, 4.4vw, 3.5rem); line-height: 1.02;
  letter-spacing: -0.045em; color: var(--ink);
  max-width: 20ch; margin-top: 14px; text-wrap: balance;
}
.iart__deck { font-size: clamp(1.05rem, 1.4vw, 1.3rem); line-height: 1.5; color: var(--n-500); max-width: 54ch; margin-top: clamp(16px, 2vw, 24px); }
.iart__by { margin-top: clamp(20px, 2.4vw, 30px); padding-bottom: clamp(20px, 2.4vw, 30px); border-bottom: 1px solid var(--hairline); }
.iart__hero { margin-top: clamp(28px, 3.6vw, 52px); aspect-ratio: 16 / 9; border-radius: var(--r-ed); overflow: hidden; background: var(--mist); }
.iart__hero img { width: 100%; height: 100%; object-fit: cover; }

.iart__body { max-width: 68ch; margin-top: clamp(32px, 4vw, 56px); color: var(--body); font-size: 1.06rem; line-height: 1.72; }
.iart__body h2 {
  font-family: var(--font-display); font-weight: var(--w-bold);
  font-size: clamp(1.3rem, 2vw, 1.75rem); line-height: 1.2;
  letter-spacing: -0.028em; color: var(--ink);
  margin: clamp(30px, 3.4vw, 46px) 0 12px;
}
.iart__body h2:first-child { margin-top: 0; }
.iart__body p + p { margin-top: 16px; }
.iart__body ul { margin-top: 16px; padding-left: 1.15em; }
.iart__body li { margin-top: 8px; }
.iart__body li::marker { color: var(--n-200); }
.iart__body blockquote {
  border-left: 3px solid var(--yellow); padding-left: clamp(16px, 2vw, 26px); margin-top: 24px;
  font-family: var(--font-display); font-weight: var(--w-bold); font-size: clamp(1.2rem, 1.8vw, 1.6rem);
  line-height: 1.24; letter-spacing: -0.025em; color: var(--ink);
}

.iart__sources { max-width: 68ch; margin-top: clamp(40px, 5vw, 68px); padding-top: clamp(20px, 2.4vw, 28px); border-top: 1px solid var(--hairline); }
.iart__sources h2 { font-family: var(--font-mono); font-size: 0.7rem; font-weight: var(--w-med); letter-spacing: 0.18em; text-transform: uppercase; color: var(--n-400); }
.iart__sources ul { list-style: none; margin-top: 14px; }
.iart__sources li + li { margin-top: 10px; }
.iart__sources a { color: var(--ink); border-bottom: 1px solid var(--hairline); transition: border-color var(--dur) var(--ease); }
.iart__sources a:hover { border-bottom-color: var(--ink); }
.iart__sources .muted { display: block; margin-top: 12px; font-size: 0.92rem; color: var(--n-400); }

.iart__related { border-top: 1px solid var(--hairline); }
.iart__related .ins-grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1024px) { .iart__related .ins-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .iart__related .ins-grid { grid-template-columns: 1fr; } }

/* Sample-content banner — visible while the section is unpublished. */
.ins-samplebar {
  background: var(--surface-2); border-bottom: 1px solid var(--hairline);
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--n-500);
}
.ins-samplebar p { padding-block: 10px; }

/* ---------- mobile refinements: less air, same rhythm ---------- */
@media (max-width: 640px) {
  .ins-hero { padding-block: 36px 26px; }
  /* the filter row already reads as a divider — the section below it does not
     need a full band of air under it as well */
  .ins-gridsec { padding-block: 32px 56px; }
  .ins-hero__h { letter-spacing: -0.035em; max-width: none; }
  .ins-feature__t { letter-spacing: -0.03em; }
  .ins-feature__foot { flex-direction: column; align-items: flex-start; gap: 10px; }
  .ins-sub__form .btn { width: 100%; }
  .iart__h { letter-spacing: -0.035em; max-width: none; }
  .iart__hero { aspect-ratio: 3 / 2; }
  .iart__body { font-size: 1.02rem; }
}
