/* Full case studies share their reading layout with the client-story side sheet. */
.story-read-link { margin-top: 10px; }
.story-read-link:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
.story-feature-dark .story-read-link,
.cu-chat-page .story-feature-dark .story-read-link:hover { color: white; }
.story-read-link .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.case-story-page { background: var(--lilac-paper); }
.case-story-container { max-width: 880px; margin-inline: auto; padding: clamp(28px, 5vw, 64px) 24px clamp(56px, 7vw, 100px); }
.case-story-back, .story-reader-page-link { color: var(--purple); text-decoration: underline; text-underline-offset: .22em; font-weight: 600; }
.case-story-header { margin-block: 40px 36px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.case-story-logo { width: auto; max-width: 180px; height: auto; max-height: 60px; margin-bottom: 28px; }
.case-story h1, .case-story .case-story-title { max-width: 24ch; margin: 0; color: var(--purple-deep); font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 500; line-height: 1.12; letter-spacing: -.03em; text-wrap: balance; }
.case-story-intro { margin: 20px 0 0; max-width: 48ch; color: var(--purple); font-size: 1.25rem; line-height: 1.5; }
.case-story-prose { max-width: 70ch; color: var(--ink-body); font-size: 1.125rem; line-height: 1.75; }
.case-story-prose h2, .case-story-prose h3 { margin: 40px 0 14px; color: var(--purple-deep); font-size: 1.5rem; font-weight: 600; line-height: 1.3; letter-spacing: -.02em; text-wrap: balance; }
.case-story-prose p { margin: 0 0 18px; }
.case-story-prose ul { margin: 12px 0 24px; padding-left: 24px; }
.case-story-prose li { margin-block: 8px; padding-left: 4px; }
.case-story-prose blockquote { margin: 28px 0; padding: 24px clamp(20px, 4vw, 32px); background: var(--lilac-field); color: var(--purple-deep); border-radius: 12px; }
.case-story-prose blockquote p { color: inherit; }
.case-story-prose blockquote footer { margin-top: 20px; font-size: .95rem; font-weight: 600; line-height: 1.5; }
.case-story-source { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--ink-muted); font-size: .95rem; line-height: 1.6; }
.case-story-source p { margin: 0 0 12px; }
.case-story-source a { text-decoration: underline; text-underline-offset: .22em; }
.case-story-next { margin-top: 36px; }
.story-reader { position: fixed; inset: 0 0 0 auto; width: min(820px, 90vw); height: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--lilac-paper); color: var(--navy); box-shadow: -16px 0 64px rgba(19, 33, 57, .2); overflow: hidden; }
.story-reader[open] { display: flex; flex-direction: column; }
.story-reader { transform: translateX(100%); opacity: 0; transition: transform 280ms var(--ease-out), opacity 280ms var(--ease-out); }
.story-reader.is-visible { transform: translateX(0); opacity: 1; }
.story-reader::backdrop { background: rgba(19, 33, 57, .55); opacity: 0; transition: opacity 280ms var(--ease-out); }
.story-reader.is-visible::backdrop { opacity: 1; }
.story-reader-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-shrink: 0; padding: 16px clamp(20px, 4vw, 40px); border-bottom: 1px solid var(--line); background: var(--paper); }
.story-reader-close { display: inline-flex; align-items: center; gap: 8px; min-width: 44px; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); color: var(--purple-deep); font: inherit; font-weight: 600; cursor: pointer; }
.story-reader-close:hover { background: var(--lilac-field); }
.story-reader-close svg { width: 18px; height: 18px; }
.story-reader :focus-visible, .case-story-page :focus-visible { outline: 2px solid var(--purple); outline-offset: 4px; }
.story-reader-content { flex: 1; overflow-y: auto; overscroll-behavior: contain; scrollbar-color: var(--lilac) var(--lilac-paper); scrollbar-width: thin; padding: 0 clamp(24px, 5vw, 48px) 48px; }
.story-reader-status { margin-block: 36px; color: var(--ink-body); font-size: 1.125rem; }
.story-reader-content .case-story-header { margin-top: 32px; }
.story-reader-content .case-story-title { font-size: clamp(2rem, 3.5vw, 2.75rem); }
.story-reader ::selection, .case-story-page ::selection { background: var(--lilac-wash); color: var(--purple-deep); }
html.story-reader-open { overflow: hidden; scrollbar-gutter: stable; }
@media (prefers-reduced-motion: reduce) {
  .story-reader, .story-reader.is-visible { transform: none; transition: opacity 120ms ease; }
  .story-reader::backdrop { transition-duration: 120ms; }
}
@media (max-width: 600px) {
  .story-reader { width: 100%; }
  .story-reader-toolbar { padding: 12px 20px; }
  .case-story-container { padding-inline: 20px; }
  .case-story-header { margin-top: 28px; }
  .case-story-prose { font-size: 1.0625rem; }
}
@media print {
  .case-story-page { background: white; }
  .case-story-back, .case-story-next { display: none; }
  .case-story-container { max-width: none; padding: 0; }
  .case-story-prose blockquote { break-inside: avoid; }
}
