/* ============================================================
   INSIGHTS (blog) · Evergreen Standard, Spruce edition (2026-11)
   Shared by blog/index.html and every post. Tokens from /shared.css.
   ============================================================ */

/* ---------- Insights index: matrix hero ---------- */
.mx-wrap { position: relative; height: 210vh; background: var(--bg); }
.mx-stage {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% 110%, rgba(62,207,142,0.08) 0%, transparent 65%),
    var(--bg);
}
.mx-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* scrim keeps the DOM copy legible over the rain */
.mx-scrim {
  position: absolute; left: 0; right: 0; bottom: 0; height: 62%;
  background: linear-gradient(to bottom, rgba(15,42,34,0) 0%, rgba(15,42,34,0.78) 38%, rgba(15,42,34,0.94) 100%);
  pointer-events: none;
}
.mx-copy {
  position: absolute; left: 0; right: 0; bottom: 9vh;
  z-index: 2;
}
.mx-copy .page-hero-tag { margin-bottom: 18px; }
.mx-copy h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(42px, 6.6vw, 88px);
  line-height: 1.0;
  letter-spacing: -1px;
  color: var(--text);
  margin-bottom: 18px;
  max-width: 900px;
}
.mx-copy h1 em { font-style: italic; color: var(--accent); }
.mx-copy p {
  font-size: 18.5px; line-height: 1.65; color: var(--text-2);
  max-width: 600px; margin-bottom: 22px;
}
.mx-cue {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 1.8px;
  text-transform: uppercase; color: var(--text-3);
}
.mx-cue svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; animation: mx-bob 2.2s ease-in-out infinite; }
@keyframes mx-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* the list slides up over the (still sticky) rain */
.insights-list {
  position: relative; z-index: 3;
  margin-top: -34vh;
  padding-top: 24vh;
  background: linear-gradient(to bottom, rgba(15,42,34,0) 0, var(--bg) 20vh);
}
@media (prefers-reduced-motion: reduce) {
  .mx-wrap { height: auto; }
  .mx-stage { position: relative; }
  .insights-list { margin-top: 0; padding-top: 96px; background: var(--bg); }
  .mx-cue svg { animation: none; }
}
@media (max-width: 640px) {
  .mx-copy { bottom: 6vh; }
  .mx-copy p { font-size: 17px; }
  .mx-scrim { height: 70%; }
}

/* ---------- Insights index: featured + grid ---------- */
.feat-card {
  display: grid; grid-template-columns: 0.9fr 1.1fr;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  margin-bottom: 64px;
}
.feat-card:hover { border-color: rgba(62,207,142,0.35); box-shadow: var(--shadow-green); transform: translateY(-3px); }
.feat-art {
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  padding: 40px;
  min-height: 300px;
  background:
    radial-gradient(ellipse 80% 70% at 20% 0%, rgba(62,207,142,0.16) 0%, transparent 60%),
    radial-gradient(ellipse 60% 60% at 100% 100%, rgba(232,149,107,0.10) 0%, transparent 60%),
    var(--bg-subtle);
  border-right: 1px solid var(--border);
}
.feat-art-label { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--green-muted); }
.feat-art-quote { font-family: var(--font-display); font-style: italic; font-size: clamp(24px, 2.6vw, 32px); line-height: 1.2; color: var(--text); max-width: 340px; }
.feat-body { padding: 44px 44px 40px; display: flex; flex-direction: column; justify-content: center; }
.feat-body h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(30px, 3.4vw, 42px); line-height: 1.1; letter-spacing: -0.4px;
  color: var(--text); margin-bottom: 16px;
}
.feat-body p { font-size: 17.5px; color: var(--text-2); line-height: 1.7; margin-bottom: 22px; }
.feat-body .blog-read-link { margin-top: 18px; }
.feat-card:hover .blog-read-link { gap: 10px; }
@media (max-width: 820px) {
  .feat-card { grid-template-columns: 1fr; }
  .feat-art { min-height: 0; border-right: none; border-bottom: 1px solid var(--border); padding: 28px; gap: 24px; }
  .feat-body { padding: 28px; }
}

.list-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.list-head h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(30px, 3.6vw, 44px); line-height: 1.08; color: var(--text); }
.list-head h2 em { font-style: italic; color: var(--accent); }
.list-head p { font-size: 16.5px; color: var(--text-2); max-width: 420px; }

.insights-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 20px; }
.insights-grid .blog-card-body { padding: 28px; }
.insights-grid .ico { margin-bottom: 20px; }
.blog-card h3 { font-size: 19px; }
.blog-meta, .feat-meta { font-family: var(--font-mono); font-size: 13px; color: var(--text-3); display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; letter-spacing: 0.2px; }
.blog-meta .sep, .feat-meta .sep, .byline-meta .sep { color: var(--border-strong); }

/* ---------- Post page ---------- */
.post-hero {
  padding: 148px 0 56px;
  background:
    radial-gradient(ellipse 70% 90% at 85% -20%, rgba(62,207,142,0.08) 0%, transparent 60%),
    var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.post-wrap { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.post-hero .page-hero-tag { margin-bottom: 22px; }
.post-hero h1 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(36px, 5.2vw, 62px); line-height: 1.06; letter-spacing: -0.6px;
  color: var(--text); margin-bottom: 20px;
}
.post-hero h1 em { font-style: italic; color: var(--accent); }
.post-dek { font-size: 19.5px; line-height: 1.6; color: var(--text-2); margin-bottom: 32px; }
.byline { display: flex; align-items: center; gap: 14px; padding-top: 24px; border-top: 1px solid var(--border); }
.byline img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border-strong); flex-shrink: 0; }
.byline-name { font-size: 16px; font-weight: 600; color: var(--text); line-height: 1.35; }
.byline-meta { font-family: var(--font-mono); font-size: 13px; color: var(--text-3); display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 3px; }

.post-main { padding: 72px 0 96px; }
.prose { max-width: 70ch; margin: 0 auto; font-size: 18px; line-height: 1.78; color: var(--text-2); }
.prose > * { margin: 0; }
.prose > * + * { margin-top: 1.15em; }
.prose > p:first-child { font-size: 20px; line-height: 1.7; color: var(--text); }
.prose h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(28px, 3.2vw, 36px); line-height: 1.15; letter-spacing: -0.3px;
  color: var(--text); margin-top: 2.1em; margin-bottom: -0.2em;
}
.prose h3 { font-family: var(--font); font-size: 20px; font-weight: 600; color: var(--text); margin-top: 1.8em; margin-bottom: -0.4em; }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(62,207,142,0.4); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--accent); }
.prose ul { list-style: none; padding: 0; display: grid; gap: 12px; }
.prose ul li { position: relative; padding-left: 28px; }
.prose ul li::before {
  content: ''; position: absolute; left: 4px; top: 0.72em;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px rgba(62,207,142,0.12);
}
.note {
  padding: 20px 24px;
  background: var(--accent-light);
  border: 1px solid rgba(62,207,142,0.22);
  border-left: 3px solid var(--accent);
  border-radius: var(--r);
  font-size: 17px; line-height: 1.7; color: var(--text-2);
}
.note .note-label { display: block; font-family: var(--font-mono); font-size: 12px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.note-ember { background: var(--ember-light); border-color: rgba(232,149,107,0.28); border-left-color: var(--ember); }
.note-ember .note-label { color: var(--ember); }

/* comparison cards (retainer post) */
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .compare-grid { grid-template-columns: 1fr; } }
.compare-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 26px; }
.compare-card h3 { font-family: var(--font); font-size: 18px; font-weight: 600; color: var(--text); margin: 0 0 14px; }
.prose .compare-card ul { gap: 10px; }
.prose .compare-card li { font-size: 16px; line-height: 1.55; padding-left: 26px; }
.prose .compare-card li::before {
  left: 5px; top: 0.3em; width: 6px; height: 11px; border-radius: 0;
  background: none; box-shadow: none;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
}

/* numbered controls (security post) */
.control-list { display: grid; gap: 14px; }
.control-item { display: flex; gap: 18px; align-items: flex-start; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px 24px; }
.control-num {
  width: 38px; height: 38px; flex-shrink: 0;
  border: 1px solid rgba(62,207,142,0.45); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-style: italic; font-size: 19px; color: var(--accent);
}
.control-content h4 { font-family: var(--font); font-size: 18px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.control-content p { font-size: 16.5px; color: var(--text-2); line-height: 1.65; margin: 0; }

/* failure patterns (sprints post) */
.failure-list { display: grid; gap: 18px; }
.failure-item { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--bg-card); }
.failure-header { background: var(--ember-light); border-bottom: 1px solid rgba(232,149,107,0.25); padding: 16px 24px; }
.failure-header h4 { font-family: var(--font); font-size: 17.5px; font-weight: 600; color: var(--text); margin: 0; }
.failure-header h4 span { font-family: var(--font-mono); font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--ember); display: block; margin-bottom: 4px; font-weight: 500; }
.failure-body { padding: 20px 24px; }
.failure-body p { font-size: 16.5px; color: var(--text-2); line-height: 1.65; margin: 0 0 14px; }
.failure-fix { display: flex; gap: 12px; align-items: flex-start; padding-top: 14px; border-top: 1px solid var(--border); }
.fix-label { font-family: var(--font-mono); font-size: 12px; font-weight: 500; color: var(--accent); text-transform: uppercase; letter-spacing: 1.6px; flex-shrink: 0; padding-top: 4px; }
.failure-body .fix-text { margin: 0; }

/* risk table (OWASP post): stacks on small screens */
.risk-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 16px; border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.risk-table th { background: var(--bg-subtle); color: var(--text); font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 1.4px; text-transform: uppercase; padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); }
.risk-table td { padding: 16px 18px; border-bottom: 1px solid var(--border); color: var(--text-2); vertical-align: top; line-height: 1.55; background: var(--bg-card); }
.risk-table tr:last-child td { border-bottom: none; }
.risk-table td:first-child { font-weight: 600; color: var(--text); }
.risk-table td:first-child small { display: block; font-family: var(--font-mono); font-size: 12px; font-weight: 500; color: var(--accent); letter-spacing: 1px; margin-bottom: 2px; }
@media (max-width: 680px) {
  .risk-table, .risk-table tbody, .risk-table tr, .risk-table td { display: block; width: 100%; }
  .risk-table thead { display: none; }
  .risk-table tr { border-bottom: 1px solid var(--border); }
  .risk-table tr:last-child { border-bottom: none; }
  .risk-table td { border-bottom: none; padding: 6px 18px; }
  .risk-table td:first-child { padding-top: 18px; }
  .risk-table td:last-child { padding-bottom: 18px; }
  .risk-table td[data-label]:not(:first-child)::before { content: attr(data-label); display: block; font-family: var(--font-mono); font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--text-3); margin-bottom: 2px; }
}

/* author card + keep reading */
.author-card {
  display: flex; gap: 20px; align-items: flex-start;
  max-width: 70ch; margin: 64px auto 0;
  padding: 28px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--r-xl);
}
.author-card img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border-strong); flex-shrink: 0; }
.author-card h4 { font-family: var(--font); font-size: 18px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.author-card .author-role { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.6px; color: var(--accent); margin-bottom: 10px; }
.author-card p { font-size: 16px; line-height: 1.65; color: var(--text-2); }
@media (max-width: 520px) { .author-card { flex-direction: column; } }

.more-reading { padding: 0 0 96px; }
.more-reading .list-head { margin-bottom: 24px; }
.more-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 20px; }
