/* ClearPrecedent Insights — static-site stylesheet.
 * Generated for the public marketing surface at clearprecedent.com/insights.
 * Design tokens match the homepage palette (cream/ink/teal) plus the
 * app's reading typography (DM Serif Display for hero, DM Sans for body). */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --cream: #FAF8F4;
  --cream-2: #F3EFE7;
  --cream-3: #EDE7DB;
  --ink: #1C1A17;
  --ink-2: #4A4640;
  --ink-3: #8A8480;
  --ink-4: #B8B2AA;
  --teal: #1A7A6E;
  --teal-2: #22A393;
  --teal-3: #0F5B52;
  --teal-bg: #EAF6F4;
  --teal-mid: #C8EBE7;
  --teal-deep: #0F5B52;
  --border: #E2DDD6;
  --border-2: #D4CEC4;
  --white: #FFFFFF;
  --shadow-sm: 0 2px 8px rgba(28,26,23,.06);
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --tracking-tight: -0.01em;
  --tracking-label: 0.14em;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-3); }

/* ── PUBLIC NAV ───────────────────────────────────────────────────── */
.cp-public-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  max-width: 1280px;
  margin: 0 auto;
}
.cp-wordmark {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.cp-wordmark span { color: var(--teal); }
.cp-public-nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}
.cp-public-nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
}
.cp-public-nav-link:hover { color: var(--ink); }
.cp-public-nav-link.is-active { color: var(--ink); }
.cp-btn-primary {
  display: inline-block;
  background: var(--teal-deep);
  color: var(--cream);
  font-weight: 600;
  font-size: 14px;
  padding: 9px 20px;
  border-radius: 8px;
  transition: background .15s;
}
.cp-btn-primary:hover { background: var(--teal); color: var(--cream); }

/* ── MAIN LAYOUTS ─────────────────────────────────────────────────── */
.cp-page {
  max-width: 920px;
  margin: 0 auto;
  padding: 56px 28px 96px;
}
.cp-page--wide { max-width: 1280px; }

.cp-learn-hero { margin-bottom: 48px; }
.cp-learn-eyebrow {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 14px;
}
.cp-learn-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(34px, 4.4vw, 52px);
  line-height: 1.1;
  letter-spacing: var(--tracking-tight);
  margin: 0 0 16px;
  color: var(--ink);
}
.cp-learn-title em { font-style: italic; font-weight: 400; color: var(--teal); }
.cp-learn-sub {
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 620px;
}
.cp-learn-section { margin-top: 44px; }
.cp-learn-section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 26px;
  letter-spacing: var(--tracking-tight);
  margin: 0 0 8px;
  color: var(--ink);
}
.cp-learn-section-sub {
  font-size: 14.5px;
  color: var(--ink-3);
  margin: 0 0 22px;
}

/* ── INSIGHTS LIST (divider list, sans titles, category chip) ─────── */
.cp-insights-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}
.cp-insights-list-item {
  margin: 0;
  border-bottom: 1px solid var(--border);
}
.cp-insights-list-link {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 20px 12px;
  text-decoration: none;
  color: var(--ink);
  transition: background .15s;
}
.cp-insights-list-link:hover { background: #FBFAF7; }
.cp-insights-list-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--cream-2);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.cp-insights-list-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.cp-insights-list-title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.cp-insights-list-desc {
  font-size: 14px;
  color: var(--ink-3);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cp-insights-list-meta {
  font-size: 12px;
  color: var(--ink-4);
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.cp-insights-list-meta-dot {
  width: 2px; height: 2px;
  border-radius: 50%;
  background: var(--ink-4);
}
.cp-insights-list-arrow {
  flex: 0 0 auto;
  align-self: center;
  font-size: 18px;
  color: var(--ink-4);
  opacity: 0;
  transition: opacity .15s, transform .15s, color .15s;
}
.cp-insights-list-link:hover .cp-insights-list-arrow {
  opacity: 1;
  color: var(--teal-deep);
  transform: translateX(3px);
}

/* ── ARTICLE READER (TOC sidebar + 760px reading column) ──────────── */
.cp-learn-article-layout {
  max-width: 1140px;
  margin: 0 auto;
  padding: 40px 28px 96px;
  display: grid;
  grid-template-columns: 220px minmax(0, 760px);
  gap: 56px;
  justify-content: center;
}
.cp-insights-toc {
  position: sticky;
  top: 40px;
  align-self: start;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
}
.cp-insights-toc-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-4);
  margin-bottom: 14px;
}
.cp-insights-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--border);
}
.cp-insights-toc-list a {
  display: block;
  padding: 7px 0 7px 14px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--ink-3);
}
.cp-insights-toc-list a:hover { color: var(--teal-deep); }
.cp-insights-toc-list a.is-active {
  color: var(--ink);
  border-left-color: var(--teal-deep);
  font-weight: 500;
}
.cp-insights-article-col { min-width: 0; }
.cp-learn-back {
  display: inline-block;
  font-size: 13.5px;
  color: var(--ink-3);
  margin-bottom: 24px;
}
.cp-learn-back:hover { color: var(--ink); }
.cp-learn-article-meta {
  font-size: 13px;
  color: var(--ink-3);
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
}
.cp-learn-article-meta-dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--ink-4);
}
.cp-learn-article-body {
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.72;
  color: var(--ink-2);
  margin-top: 28px;
}
.cp-learn-article-body h1 { display: none; }
.cp-learn-article-body h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 28px;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 44px 0 14px;
  scroll-margin-top: 20px;
}
.cp-learn-article-body h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 19px;
  color: var(--ink);
  margin: 30px 0 8px;
}
.cp-learn-article-body h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
  margin: 22px 0 6px;
}
.cp-learn-article-body p { margin: 0 0 18px; }
.cp-learn-article-body ul,
.cp-learn-article-body ol {
  margin: 0 0 22px 24px;
  padding: 0;
}
.cp-learn-article-body li { margin-bottom: 6px; }
.cp-learn-article-body strong { color: var(--ink); font-weight: 600; }
.cp-learn-article-body em { font-style: italic; }
.cp-learn-article-body a {
  color: var(--teal);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.cp-learn-article-body a:hover { color: var(--teal-3); }
.cp-learn-article-body a[href*="/insights/glossary/"] {
  color: inherit;
  text-decoration: underline dotted var(--teal-mid);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: help;
}
.cp-learn-article-body a[href*="/insights/glossary/"]:hover {
  color: var(--teal-deep);
  text-decoration-style: solid;
}

/* ── CTA card (sign-up prompt at the bottom of articles) ──────────── */
.cp-article-cta {
  margin: 56px 0 0;
  padding: 28px 32px;
  background: var(--cream-2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--teal-deep);
  border-radius: 12px;
}
.cp-article-cta-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 24px;
  color: var(--ink);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.cp-article-cta-sub {
  font-size: 15px;
  color: var(--ink-2);
  margin: 0 0 18px;
  line-height: 1.55;
}
.cp-article-cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── GLOSSARY TERM PAGE ───────────────────────────────────────────── */
.cp-glossary-term-short {
  font-size: 19px;
  color: var(--ink);
  line-height: 1.5;
  margin: 0 0 24px;
  font-weight: 500;
}
.cp-glossary-term-long {
  font-size: 17px;
  color: var(--ink-2);
  line-height: 1.7;
}
.cp-glossary-term-long p { margin: 0 0 16px; }
.cp-glossary-related-block {
  margin-top: 48px;
  padding: 22px 26px;
  background: var(--cream-2);
  border-radius: 14px;
}
.cp-glossary-related-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 12px;
}
.cp-glossary-related-list { display: flex; flex-direction: column; gap: 8px; }
.cp-glossary-related-list a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── FOOTER ───────────────────────────────────────────────────────── */
.cp-footer {
  border-top: 1px solid var(--border);
  padding: 40px 28px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-3);
}
.cp-footer-links { display: flex; gap: 18px; justify-content: center; margin-bottom: 12px; }
.cp-footer a { color: var(--ink-3); }
.cp-footer a:hover { color: var(--ink); }

@media (max-width: 980px) {
  .cp-learn-article-layout {
    grid-template-columns: minmax(0, 760px);
    gap: 0;
  }
  .cp-insights-toc { display: none; }
}
@media (max-width: 640px) {
  .cp-public-nav { padding: 16px 20px; }
  .cp-public-nav-links { gap: 16px; }
  .cp-page { padding: 32px 20px 64px; }
  .cp-insights-list-link { padding: 18px 4px; gap: 16px; }
  .cp-insights-list-arrow { display: none; }
}
