/* Case studies: /case-studies/ index cards and the single case study pages.
   Loaded last. Single pages also load the VC industry sheet and attio.css and
   reuse their .atx-* sections, checklists, tiles, link list and FAQ.
   No serif, no italic. Everything new is prefixed .csp. */

/* ---------- single page: hero ---------- */
.csp-hero { padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(2.5rem, 5vw, 3.5rem); }
.csp-hero .eyebrow { margin-bottom: 1.1rem; }
.csp-hero__title { margin: 0 0 1.3rem; max-width: 22ch; font-size: clamp(2.2rem, 5vw, 3.9rem); font-weight: 600; line-height: 1.05; letter-spacing: -0.03em; text-wrap: balance; }
.csp-hero__lede { margin: 0; max-width: 64ch; font-size: clamp(1.05rem, 1.5vw, 1.22rem); line-height: 1.6; color: var(--text-muted); }
.csp-hero__lede a,
.csp-quote figcaption a { color: var(--text); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.csp-hero__lede a:hover,
.csp-quote figcaption a:hover { text-decoration-color: var(--vcx-sage); }
.csp-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; margin: 2rem 0 clamp(2.2rem, 4vw, 3rem); }
.csp-hero__meta { margin: 1rem 0 0; font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-soft); }

/* ---------- single page: "In short" facts strip ---------- */
.csp-facts { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; }
.csp-facts__label { margin: 0; padding: 0.85rem 1.3rem; border-bottom: 1px solid var(--border); font-family: var(--font-mono); font-size: 0.64rem; font-weight: 400; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-soft); }
.csp-facts dl { margin: 0; display: grid; grid-template-columns: 1fr 0.8fr 1.1fr 1.3fr 1fr; }
.csp-facts dl > div { padding: 1.2rem 1.3rem; border-left: 1px solid var(--border); min-width: 0; }
.csp-facts dl > div:first-child { border-left: 0; }
.csp-facts dt { margin: 0 0 0.5rem; font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-soft); }
.csp-facts dd { margin: 0; font-weight: 500; line-height: 1.4; color: var(--text); }
.csp-facts__note { display: block; margin-top: 0.2rem; font-weight: 400; font-size: 0.86rem; color: var(--text-muted); }
.csp-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.csp-chips .atx-logo { white-space: normal; }
.csp-chips li { max-width: 100%; padding: 0.28rem 0.65rem; border: 1px solid var(--border); border-radius: 99px; background: var(--bg-elev); font-size: 0.86rem; font-weight: 500; }
.csp-live { display: inline-block; position: relative; padding-left: 1.05rem; }
.csp-live::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 8px; height: 8px; border-radius: 50%; background: var(--vcx-sage); }

/* ---------- single page: sections ---------- */
.csp-pain { max-width: 760px; }
.csp .atx-tiles.csp-tiles--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.csp-result { max-width: 760px; }

/* how it runs: a row of plain boxes with arrows. A diagram, not an app screen. */
.csp-flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 1.6rem; }
.csp-flow__step { position: relative; min-width: 0; padding: 1.2rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.csp-flow__step:not(:last-child)::after { content: ""; position: absolute; top: 50%; right: -1.6rem; width: 1.6rem; height: 12px; transform: translateY(-50%); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 12' fill='none' stroke='%23a1a1aa' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18M17 2l4 4-4 4'/%3E%3C/svg%3E") center / contain no-repeat; }
.csp-flow__top { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.9rem; min-height: 20px; }
.csp-flow__top img { display: block; width: 20px; height: 20px; object-fit: contain; }
.csp-flow__n { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; color: var(--text-soft); }
.csp-flow__title { margin: 0; font-size: 1.05rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; }
.csp-flow__step p { margin: 0.45rem 0 0; font-size: 0.92rem; line-height: 1.5; color: var(--text-muted); }

/* one real number, where one is public */
.csp-stat { display: flex; align-items: baseline; gap: 0.9rem; margin: 0 0 2rem; }
.csp-stat__n { font-size: clamp(3.2rem, 7vw, 5rem); font-weight: 600; line-height: 1; letter-spacing: -0.04em; color: var(--text); }
.csp-stat__l { max-width: 22ch; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; line-height: 1.5; text-transform: uppercase; color: var(--text-soft); }

/* public quote */
.csp-quote { margin: clamp(2rem, 4vw, 2.8rem) 0 0; max-width: 760px; padding: clamp(1.4rem, 3vw, 2rem); border: 1px solid var(--border); border-left: 3px solid var(--vcx-sage); border-radius: var(--radius-sm); background: var(--surface); }
.csp-quote blockquote { margin: 0; }
.csp-quote blockquote p { margin: 0; font-size: clamp(1.1rem, 1.8vw, 1.35rem); font-weight: 500; line-height: 1.5; letter-spacing: -0.01em; color: var(--text); }
.csp-quote__tr { margin: 0.9rem 0 0; font-size: 0.92rem; line-height: 1.55; color: var(--text-muted); }
.csp-quote figcaption { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; margin-top: 1.2rem; font-size: 0.9rem; color: var(--text-muted); }
.csp-quote figcaption strong { font-weight: 600; color: var(--text); }

/* ---------- index: card top with the stack logos ---------- */
.csp-list { padding-top: 0; }
.csp-viz { aspect-ratio: 16 / 8; display: flex; align-items: center; justify-content: center; padding: 2.6rem 1.2rem 1.2rem; }
.csp-viz__logos { position: relative; z-index: 1; list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.csp-viz__logos li { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.85rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow-sm); font-size: 0.9rem; font-weight: 500; color: var(--text); }
.csp-viz__logos img { display: block; width: 22px; height: 22px; object-fit: contain; }
.csp-list .csx__cta { margin-top: auto; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .csp-facts dl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .csp-facts dl > div:nth-child(4) { border-left: 0; }
  .csp-facts dl > div:nth-child(n + 4) { border-top: 1px solid var(--border); }
  .csp .atx-tiles.csp-tiles--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .csp-flow { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; max-width: 520px; }
  .csp-flow__step:not(:last-child)::after { top: auto; bottom: -1.6rem; right: auto; left: 1.6rem; transform: rotate(90deg); }
}
@media (max-width: 760px) {
  .csp-facts dl { grid-template-columns: minmax(0, 1fr); }
  .csp-facts dl > div { border-left: 0; border-top: 1px solid var(--border); }
  .csp-facts dl > div:first-child { border-top: 0; }
  .csp .atx-tiles.csp-tiles--4 { grid-template-columns: minmax(0, 1fr); }
  .csp-stat { flex-direction: column; gap: 0.5rem; }
}
