/* Criar Sin Culpas · mobile editorial refinement
   Loaded last so the living case-study markup remains portable. */

.csc-v0 {
  --csc-paper: #f5e9e7;
  --csc-paper-deep: #ead9d6;
  --csc-peach-soft: #f5e9e7;
  --csc-peach: #efb2a6;
  --csc-terra: #d94a3a;
  --csc-terra-deep: #b92f24;
  --csc-navy-soft: #39322f;
  --csc-navy: #181514;
  --ink: #181514;
  --ivory: #fffaf7;
  --ivory-alt: #f5e9e7;
  --terracotta: #d94a3a;
  --teal: #327066;
  --ink-raised: #26211f;
  --text-muted: #796f6b;
  --text-secondary: #4d4541;
  --rule: #d9c8c4;
  --font-ed: var(--font-editorial, "Fraunces", Georgia, serif);
  --font-mono: var(--font-system, "JetBrains Mono", ui-monospace, monospace);
  --accent-sun: #e5a62a;
  --pad: clamp(1.25rem, 5.2vw, 3.5rem);
  --radius-editorial: 6px;
  background: var(--ivory);
  letter-spacing: 0;
}

.csc-v0 .h-display,
.csc-v0 .h-lead,
.csc-v0 .h-mid,
.csc-v0 .pull,
.csc-v0 .hero__h1 {
  letter-spacing: 0;
}

/* Eyebrows and chapter numbers stay in Inter: Big Shoulders Display is too
   condensed to read at label sizes on small screens. */
.csc-v0 .eyebrow,
.csc-v0 .num,
.csc-v0 .formation__node,
.csc-v0 .exist-block__label,
.csc-v0 .behavior-ledger__eyebrow,
.csc-v0 .proof-limit__eyebrow,
.csc-v0 .sys-xform__eyebrow,
.csc-v0 .struct-synth__eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

.csc-v0 .ev {
  letter-spacing: 0.1em;
}

.csc-v0 .start-card,
.csc-v0 .artifact,
.csc-v0 figure img,
.csc-v0 .ops-tile,
.csc-v0 .behavior-ledger__plate {
  border-radius: var(--radius-editorial);
}

.csc-v0 .chap-head > .num {
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  color: var(--ink);
  background: var(--accent-sun);
  border-radius: 50%;
}

.csc-v0 [data-surface="ink"] .chap-head > .num {
  color: var(--ink);
  background: var(--accent-sun);
}

.csc-v0 .chap--brief {
  border-top: 0.5rem solid var(--accent-sun);
}

.csc-v0 .chap--brief .h-mid {
  max-width: 12ch;
  font-size: clamp(2.6rem, 7vw, 5.75rem);
  line-height: 0.96;
}

.csc-v0 .chap--brief .start-card {
  position: relative;
  overflow: hidden;
  border: 0;
  border-top: 1px solid var(--rule);
  background: transparent;
}

.csc-v0 .chap--brief .start-card::before {
  content: counter(summary, decimal-leading-zero);
  position: absolute;
  right: 1.5rem;
  top: 0.75rem;
  color: var(--terracotta);
  font: 600 0.68rem/1 var(--font-body);
}

.csc-v0 .chap--brief .start-grid {
  counter-reset: summary;
}

.csc-v0 .chap--brief .start-card {
  counter-increment: summary;
}

.csc-v0 .chap:nth-of-type(even)[data-surface="paper"] {
  background: var(--ivory);
}

.csc-v0 .chap:nth-of-type(odd)[data-surface="paper"] {
  background: color-mix(in oklab, var(--csc-paper) 42%, var(--ivory));
}

.csc-v0 figcaption {
  font-family: var(--font-body);
}

@media (max-width: 767px) {
  .csc-v0 {
    --space-chap: 4.9rem;
    --space-chap-sm: 3.35rem;
    --space-block: 2.6rem;
    --pad: clamp(1.5rem, 5.5vw, 1.75rem);
    font-size: 1rem;
    line-height: 1.64;
    overflow: hidden;
    --nav-offset: var(--lg-studio-nav-h, 52px);
  }

  /* CSC mobile: single compact nav — hide ecosystem identity strip */
  body.has-ecosystem-nav.studio-shell:has(.csc-v0) {
    padding-top: 0 !important;
    --lg-eco-strip-offset: 0px;
  }

  body.has-ecosystem-nav.studio-shell:has(.csc-v0) .lg-eco {
    display: none;
  }

  body.has-ecosystem-nav.studio-shell:has(.csc-v0) .nav {
    top: 0 !important;
  }

  body.studio-shell:has(.csc-v0) .nav-in {
    padding: 0.5rem 1.25rem;
    min-height: 0;
  }

  body.studio-shell:has(.csc-v0) .nav-brand img {
    height: 26px;
    width: 26px;
  }

  body.studio-shell:has(.csc-v0) .nav-name {
    font-size: 0.95rem;
    letter-spacing: 0.1em;
  }

  body.studio-shell:has(.csc-v0) .nav-cta {
    height: 30px;
    padding: 0 12px;
    font-size: 9.5px;
    letter-spacing: 0.1em;
    border-radius: 10px;
  }

  body.studio-shell:has(.csc-v0) .ed-menu-toggle {
    min-width: 44px;
    min-height: 44px;
  }

  .csc-v0 [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .csc-v0 .shell,
  .csc-v0 .shell--narrow {
    width: min(100% - 3rem, 40rem);
  }

  /* ---------- Cinematic mobile hero ---------- */
  .csc-v0 .hero--cinematic {
    color: var(--ivory);
    background: #0a0b0a;
  }

  .csc-v0 .hero--cinematic .hero__stage {
    position: relative;
    display: grid;
    grid-template-rows: clamp(68svh, 72svh, 76svh) auto;
    min-height: 0;
    align-items: stretch;
    padding: 0;
    background: #0a0b0a;
  }

  .csc-v0 .hero--cinematic .hero__media {
    position: relative;
    inset: auto;
    grid-row: 1;
    grid-column: 1;
    z-index: 0;
    width: 100%;
    min-height: clamp(68svh, 72svh, 76svh);
    overflow: hidden;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
  }

  .csc-v0 .hero--cinematic .hero__media picture,
  .csc-v0 .hero--cinematic .hero__media .hero__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  .csc-v0 .hero--cinematic .hero__img {
    object-fit: cover;
    object-position: center 42%;
  }

  .csc-v0 .hero--cinematic .hero__scrim {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: clamp(68svh, 72svh, 76svh);
    z-index: 1;
    margin: 0;
    pointer-events: none;
    background:
      linear-gradient(
        180deg,
        rgba(10, 11, 10, 0.42) 0%,
        rgba(10, 11, 10, 0.08) 34%,
        rgba(10, 11, 10, 0.04) 52%,
        rgba(10, 11, 10, 0.62) 78%,
        rgba(10, 11, 10, 0.88) 100%
      ),
      linear-gradient(
        90deg,
        rgba(10, 11, 10, 0.72) 0%,
        rgba(10, 11, 10, 0.28) 42%,
        transparent 72%
      );
  }

  .csc-v0 .hero--cinematic .hero__content {
    display: contents;
  }

  .csc-v0 .hero--cinematic .hero__copy {
    position: relative;
    z-index: 2;
    grid-row: 1;
    grid-column: 1;
    align-self: end;
    width: min(100% - 3rem, 40rem);
    max-width: none;
    margin-inline: auto;
    padding:
      0
      max(1.5rem, env(safe-area-inset-right, 0px))
      max(1.35rem, env(safe-area-inset-bottom, 0px))
      max(1.5rem, env(safe-area-inset-left, 0px));
    box-sizing: border-box;
  }

  .csc-v0 .hero--cinematic .hero__eyebrow {
    margin-bottom: 0.65rem;
  }

  .csc-v0 .hero--cinematic .eyebrow {
    display: block;
    width: auto;
    padding: 0;
    color: #e8a48f;
    background: transparent;
    border-radius: 0;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    line-height: 1.45;
    text-shadow: none;
    white-space: normal;
  }

  .csc-v0 .hero--cinematic .hero__h1 {
    margin: 0 0 0.85rem;
    max-width: 11.5ch;
    color: var(--ivory);
    font-size: clamp(2.65rem, 8.4vw, 3.6rem);
    line-height: 1.02;
    letter-spacing: -0.025em;
    text-shadow: 0 1px 18px rgba(0, 0, 0, 0.28);
  }

  .csc-v0 .hero--cinematic .hero__dek {
    display: block;
    margin: 0;
    max-width: 34ch;
    color: rgba(247, 242, 233, 0.9);
    font-size: 0.94rem;
    line-height: 1.5;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.22);
  }

  .csc-v0 .hero--cinematic .hero__lede {
    grid-row: 2;
    grid-column: 1;
    position: relative;
    z-index: 2;
    width: min(100% - 3rem, 34rem);
    max-width: none;
    margin-inline: auto;
    padding:
      1.65rem
      max(1.5rem, env(safe-area-inset-right, 0px))
      1.35rem
      max(1.5rem, env(safe-area-inset-left, 0px));
    background: var(--ivory);
    box-sizing: border-box;
  }

  .csc-v0 .hero--cinematic .hero__support {
    max-width: none;
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.58;
  }

  .csc-v0 .hero--cinematic .hero__support p + p {
    margin-top: 0.9rem;
  }

  .csc-v0 .formation-band {
    background: var(--ink);
    color: var(--ivory);
  }

  .csc-v0 .formation-band .formation {
    padding: 2.25rem 0 2.5rem;
  }

  .csc-v0 .formation__track {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    margin-inline: -1.25rem;
    padding: 0.25rem 1.25rem 0.75rem;
    scrollbar-width: none;
  }

  .csc-v0 .formation__track::-webkit-scrollbar {
    display: none;
  }

  .csc-v0 .formation__node {
    flex: 0 0 auto;
    font-family: var(--font-body);
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--ivory);
    background: var(--ink-raised);
    border-color: color-mix(in oklab, var(--ivory) 18%, transparent);
  }

  .csc-v0 .formation__node:first-child {
    background: var(--terracotta);
  }

  .csc-v0 .formation__node:last-child {
    color: var(--ink);
    background: var(--accent-sun);
  }

  .csc-v0 .formation__cap {
    max-width: 26ch;
    color: color-mix(in oklab, var(--ivory) 76%, transparent);
  }

  .csc-v0 .chap-head {
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 0.75rem;
    align-items: center;
  }

  .csc-v0 .chap-head .h-lead,
  .csc-v0 .chap-head .h-mid,
  .csc-v0 .chap-head .lede {
    grid-column: 1 / -1;
  }

  .csc-v0 .h-lead--chapter,
  .csc-v0 .h-lead--peak {
    max-width: 13ch;
    font-size: clamp(2.55rem, 12.25vw, 3.85rem);
    line-height: 1.02;
  }

  .csc-v0 .lede {
    max-width: 36rem;
    font-size: 1.02rem;
    line-height: 1.62;
  }

  .csc-v0 .start-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .csc-v0 .start-card {
    min-width: 0;
    padding: 1.45rem 2rem 1.6rem 0;
  }

  .csc-v0 .chap--brief .start-card {
    padding: 1.6rem 1.5rem 1.75rem 1.35rem;
  }

  .csc-v0 .start-card__v {
    max-width: 18ch;
    font-family: var(--font-ed);
    font-size: 1.68rem;
    line-height: 1.1;
  }

  .csc-v0 .start-card__body {
    max-width: 33rem;
    margin-top: 0.65rem;
  }

  /* ---------- What already existed · compact editorial stack ---------- */
  .csc-v0 .exist-block {
    margin-bottom: 2rem;
  }

  .csc-v0 .exist-block__label {
    margin-bottom: 0.65rem;
  }

  .csc-v0 .exist-block .start-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
    margin-top: 0;
    background: transparent;
    border: 0;
  }

  .csc-v0 .exist-block .start-card {
    min-height: 0;
    padding: 1.15rem 1.55rem 1.3rem;
    border: 1px solid var(--rule);
    border-radius: var(--radius-editorial);
    background: var(--ivory);
    box-shadow: none;
  }

  .csc-v0 .exist-block .start-card:nth-child(even) {
    background: color-mix(in oklab, var(--csc-paper) 30%, var(--ivory));
  }

  .csc-v0 .exist-block .start-card__k {
    font-size: 0.7rem;
    letter-spacing: 0.13em;
  }

  .csc-v0 .exist-block .start-card__v {
    max-width: 22ch;
    font-size: 1.45rem;
    line-height: 1.08;
  }

  .csc-v0 .exist-block .start-card__body {
    max-width: 30rem;
    margin-top: 0.45rem;
    font-size: 0.92rem;
    line-height: 1.5;
  }

  .csc-v0 .causal article,
  .csc-v0 .owned-beat,
  .csc-v0 .ops-tile,
  .csc-v0 .product-layer,
  .csc-v0 .proof-cell {
    border-radius: var(--radius-editorial);
  }

  .csc-v0 .artifact,
  .csc-v0 .scan-care__figure,
  .csc-v0 .social-system,
  .csc-v0 .social-proof,
  .csc-v0 .owned-beat__figure,
  .csc-v0 .product-evidence__media {
    margin-inline: -1.25rem;
  }

  .csc-v0 .artifact img,
  .csc-v0 .scan-care__img,
  .csc-v0 .social-system__img,
  .csc-v0 .social-proof__img,
  .csc-v0 .owned-beat__media img,
  .csc-v0 .product-evidence__media img {
    width: 100%;
    border-radius: 0;
  }

  .csc-v0 .visual-lib-gallery,
  .csc-v0 .gen-lineage__history,
  .csc-v0 .ops-group__grid {
    gap: 0.9rem;
  }

  .csc-v0 .visual-lib-gallery__item:nth-child(even),
  .csc-v0 .gen-lineage__history .gen-card:nth-child(even) {
    transform: translateY(1.25rem);
  }

  .csc-v0 .behavior-ledger__row,
  .csc-v0 .struct-synth__row {
    border-top-width: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .csc-v0 .visual-lib-gallery__item,
  .csc-v0 .gen-lineage__history .gen-card {
    transform: none;
  }
}