/* Unicus AI — customer stories carousel and shared dialog. Scoped styles. */
.stories-section,
.story-dialog {
  --story-blue: #245AE2;
  --story-ink: #0B0B0B;
  --story-gray: #909898;
  --story-border: #DCE2E9;
  color: var(--story-ink);
}
.stories-section *, .story-dialog * { box-sizing: border-box; }
.stories-section { overflow: hidden; background: #fff; padding: var(--section-space) 22px; }
.stories-container { width: 100%; max-width: 1420px; margin: 0 auto; }
.stories-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: clamp(32px, 5vw, 95px); align-items: center; }
.stories-copy { min-width: 0; }
.stories-mark { width: 45px; height: 40px; color: var(--story-blue); display: block; margin-bottom: 10px; }
.stories-eyebrow { font-size: 15px; font-weight: 650; letter-spacing: .055em; color: var(--story-blue); margin-bottom: 30px; }
.stories-heading { font-size: clamp(33px, 3vw, 48px); line-height: 1.17; font-weight: 650; letter-spacing: normal; margin: 0 0 30px; }
.stories-gradient { background: linear-gradient(90deg, #909898 0%, #6584B8 46%, #245AE2 100%); color: transparent; -webkit-background-clip: text; background-clip: text; }
.stories-copy > p { max-width: 475px; color: #43505c; font-size: clamp(17px, 1.35vw, 20px); line-height: 1.65; margin: 0; }
.story-carousel { min-width: 0; position: relative; }
.story-viewport { --story-card-width: min(650px,calc(100vw - 150px)); --story-side-space: calc((100% - var(--story-card-width))/2); width: max(100%,calc(var(--story-card-width) + 160px)); overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 18px 0 30px; margin: -18px 0 -30px; scrollbar-width: none; overscroll-behavior-x: contain; outline-offset: 5px; }
.story-viewport::-webkit-scrollbar { display: none; }
.story-viewport.is-dragging { cursor: grabbing; user-select: none; }
.story-viewport:focus-visible { outline: 2px solid var(--story-blue); border-radius: 22px; }
.story-track { display: flex; width: max-content; min-width: 100%; gap: 0px; align-items: stretch; padding-inline: var(--story-side-space); }
.story-card { position: relative; flex: 0 0 var(--story-card-width); min-width: 0; min-height: 335px; padding: clamp(24px,2.6vw,42px); background: #fff; border: 1px solid var(--story-border); border-radius: 22px; scroll-snap-align: center; color: var(--story-ink); display: flex; flex-direction: column; cursor: pointer; box-shadow: 0 15px 20px rgba(20,36,76,.12); }
.story-card:focus-visible { outline: 2px solid var(--story-blue); outline-offset: 4px; }
.story-person { display: flex; align-items: center; gap: 18px; }
.person-icon { display: grid; place-items: center; width: 60px; height: 60px; flex: 0 0 60px; border-radius: 50%; background: #e4e7eb; color: #646b73; }
.person-icon svg { width: 29px; height: 29px; }
.story-person small, .story-person strong { display: block; }
.story-person small { font-size: 15px; color: var(--story-ink); margin-bottom: -3px; }
.story-person strong { color: var(--story-blue); font-size: clamp(18px,1.5vw,24px); font-weight: 650; }
.story-summary { max-width: 500px; font-size: clamp(17px,1.75vw,18px); line-height: 1.5; margin: 15px 0 30px; flex: 1 1 auto; }
.story-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; padding: 10px 0 0; border-top: 1px solid var(--story-border); margin-top: auto; margin-right: 23px; }
.story-metrics b, .story-metrics span { display: block; }
.story-metrics b { font-size: clamp(20px, 1.8vw,29px); font-weight: 650; white-space: nowrap; }
.story-metrics span { color: #737a80; font-size: 14px; margin-top: 0px; }
.story-open { position: absolute; right: 38px; bottom: -21px; display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%; background: transparent; color: #fff; font-size: 25px; line-height: 1; cursor: pointer; transition: transform .22s ease, background .22s ease; padding: 0; }
.story-open:hover { transform: translateY(-3px);background: transparent; }
.story-open:focus-visible, .story-nav:focus-visible, .story-dot:focus-visible, .dialog-close:focus-visible, .dialog-story-nav button:focus-visible { outline: 2px solid var(--story-blue); outline-offset: 4px; }
.carousel-footer { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 38px; }
.story-dots { display: flex; align-items: center; justify-content: center; gap: 5px; }
.story-dot { display: block; width: 3px; height: 3px; border: 0; padding: 0; border-radius: 50%; background: #0B0B0B; cursor: pointer; transition: background .2s ease, transform .2s ease; }
.story-dot[aria-current="true"] { background: var(--story-blue); transform: scale(1.22);    width: 5px;
    height: 5px; }
.story-nav { appearance: none; width: 34px; height: 34px; border: none; border-radius: 50%; background: #fff; color: var(--story-ink); display: grid; place-items: center; font-size: 25px; cursor: pointer; }
.story-nav:hover { color: var(--story-blue); border-color: #adc3fd; }
.story-nav:disabled { opacity: .35; cursor: not-allowed; }

/* A SINGLE shared customer story popup */
.story-dialog { width: min(790px,calc(100vw - 32px)); max-width: none; max-height: min(92dvh,800px); padding: 0; border: 4px solid #fff; border-radius: 20px; background: #f4f4f4; color: #111; overflow: hidden; margin: auto; box-shadow: 0 24px 70px rgba(0,0,0,.28); }
.story-dialog::backdrop { background: rgba(0,0,0,.52); }
.story-dialog-shell { display: flex; flex-direction: column; max-height: min(92dvh,800px); background: #f4f4f4; overflow: hidden; }
.story-dialog-header { flex: 0 0 auto; min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px clamp(20px,3vw,29px) 10px; }
.story-dialog-heading { min-width: 0; }
.story-dialog-label, .story-dialog-heading strong { display: block; }
.story-dialog-label { font-size: 12px; color: #73777b; }
.story-dialog-heading strong { margin-top: 2px; font-size: 16px; font-weight: 650; }
.dialog-close { flex: 0 0 auto; border: 0; border-radius: 30px; background: #050505; color: #fff; padding: 8px 18px; font-size: 12px; font-weight: 600; cursor: pointer; }
.dialog-close:hover { background: var(--story-blue); }
.story-dialog-content { min-height: 0; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; }
.story-dialog-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; padding: 4px clamp(20px,3vw,29px) 18px; }
.story-quote-pane { display: flex; flex-direction: column; min-width: 0; padding: 0; }
.story-quote-mark {  color: #e53e46; font-size: 44px; font-weight: 700; line-height: .8; }
.story-quote-pane blockquote { font-size: 15px; line-height: 1.72; margin: 12px 0 0; font-weight: 400; }
.story-quote-author { font-size: 12px; line-height: 1.45; }
.story-quote-author b, .story-quote-author span { display: block; }
.story-quote-author b { font-weight: 600; }
.story-quote-author span { font-size: 16px;
    color: #245AE2;
    font-weight: 600; }
.story-detail-pane { min-width: 0; padding: 0; }
.story-detail-eyebrow { color: var(--story-blue); font-weight: 650; font-size: 13px; letter-spacing: .09em; margin: 0 0 12px; }
.story-detail-title { font-size: clamp(26px,2.7vw,37px); line-height: 1.2; letter-spacing: -.035em; font-weight: 670; margin: 0 0 28px; }
.story-facts { display: grid; gap: 10px; margin: 0; }
.story-facts div { margin: 0; }
.story-facts dt { color: #777; font-size: 11px; margin-bottom: 1px; }
.story-facts dd { margin: 0; font-size: 13px; line-height: 1.35; }
.story-dialog-summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid #c9cacc; padding-top: 15px; }
.story-dialog-summary .story-quote-author { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.story-dialog-summary .person-icon { width: 38px; height: 38px; flex: 0 0 38px; display: flex;
    align-items: center;
    justify-content: center; }
.story-dialog-summary .person-icon svg { width: 20px; height: 20px; }
.story-detail-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 0; flex: 1 1 auto; max-width: 420px; }
.story-detail-metrics > div { padding: 0 12px; border-left: 1px solid #c9cacc; }
.story-detail-metrics > div:first-child { border: 0; }
.story-detail-metrics b, .story-detail-metrics span { display: block; }
.story-detail-metrics b { font-size: 15px; font-weight: 650; white-space: nowrap; }
.story-detail-metrics span { font-size: 10px; color: #777; }
.story-dialog-footer { flex: 0 0 auto; padding: 0 clamp(20px,3vw,29px) 9px; }
.story-dialog-navigation { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 30px; margin-top: 20px;}
.story-dialog-navigation .story-dots { gap: 5px; }
.story-dialog-navigation .story-dot { width: 4px; height: 4px; background: #111; }
.story-dialog-navigation .story-dot[aria-current="true"] { transform: scale(1.15); }
.dialog-story-nav { display: flex; gap: 2px; }
.dialog-story-nav button { width: 17px; height: 20px; padding: 0; border: 0; background: transparent; color: var(--story-ink); font: inherit; font-size: 17px; line-height: 1; cursor: pointer; }
.dialog-story-nav button:hover { color: var(--story-blue); }
.dialog-story-nav button:disabled { opacity: .4; cursor: default; }
body.has-story-dialog { overflow: hidden; }

@media (min-width: 1200px) {
  .story-viewport { width: max(100%,calc(var(--story-card-width) + 260px)); margin-left: -150px; }
}
@media (max-width: 1100px) {
  .stories-layout { grid-template-columns: minmax(0,1fr); gap: 40px; }
  .stories-section { padding-inline: 20px; }
  .story-viewport { width: 100%; }
  .stories-copy > p { max-width: 700px; }
  .story-card { min-height: 350px; }
}
@media (max-width: 680px) {
  .stories-section { padding-inline: 14px; }
  .stories-heading { font-size: clamp(31px,8vw,42px); }
  .story-viewport { --story-card-width: calc(100vw - 43px); --story-side-space: calc((100% - var(--story-card-width))/2); width: 100%; }
  .story-card { min-height: 420px; padding: 23px 20px 28px; border-radius: 17px; }
  .story-person { gap: 12px; }
  .person-icon { width: 50px; height: 50px; flex-basis: 50px; }
  .person-icon svg { width: 22px; height: 22px; }
  .story-summary { font-size: 18px; margin-block: 24px; }
  .story-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; padding-top: 20px; }
  .story-metrics b { font-size: 22px; }
  .story-open { right: 24px; }
  .story-dialog { width: calc(100vw - 14px); max-height: calc(100dvh - 14px); }
  .story-dialog-shell { max-height: calc(100dvh - 14px); }
  .story-dialog-header { min-height: 63px; padding: 12px 17px; }
  .story-dialog-columns { grid-template-columns: 1fr; }
  .story-quote-pane blockquote { font-size: 15px; margin-top: 10px; color: #4e4e4e; }
  .story-dialog-summary { align-items: flex-start; flex-direction: column; gap: 12px; }
  .story-detail-metrics { width: 100%; max-width: none; }
  .story-detail-metrics > div { padding-inline: 8px; }
  .story-detail-metrics > div:first-child { padding-left: 0; }
  .story-dialog-footer { padding: 0 17px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .story-viewport { scroll-behavior: auto; }
  .story-open, .story-dot { transition: none; }
}
