/* Customer stories: /stories and /stories/{slug}.
   Loaded after /site.css and /landing.css. Colours, fonts and the button come from
   site.css; the page frame (.wrap.lp, kicker, h1, lede, lp-close) from landing.css.
   This file adds the story furniture only.

   Status has no hue of its own. The brand defines no success/warning colour
   (knowledge/brand-identity.md), so a pill is told apart by its icon and label:
   amber check = works, outlined clock = too slow, gold loop = fixed. */

/* ---- shared ----------------------------------------------------------- */
.st-wide.wrap.lp{width:min(92vw,1080px)}
.st-wide .lp-hero > h1,.st-wide .lp-hero > .lede{max-width:880px}
.st-index .lp-hero{padding-bottom:clamp(32px,5vh,48px);margin-bottom:clamp(32px,5vh,48px)}

.pill{display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 10px 0 8px;border-radius:999px;font-family:var(--mono);font-size:11.5px;font-weight:500;letter-spacing:.02em;line-height:1;white-space:nowrap;border:1px solid transparent}
.pill svg{flex:none;width:13px;height:13px}
.pill.ok{color:var(--v2);background:rgba(248,164,52,.1);border-color:rgba(248,164,52,.32)}
.pill.slow{color:var(--muted);background:transparent;border-color:var(--line-2)}
.pill.fixed{color:var(--ink);background:rgba(250,205,97,.08);border-color:rgba(250,205,97,.45)}
.pill.plan{color:var(--dim);background:rgba(255,255,255,.03);border-color:var(--line-2)}
.pill.plan.on{color:var(--on-accent);background:var(--grad);border-color:transparent}
/* Translated pills run long ("Passage de l'offre gratuite à une offre payante"): on phones they wrap instead of widening the page. */
@media (max-width:720px){.pill{white-space:normal;height:auto;min-height:26px;max-width:100%;padding-top:5px;padding-bottom:5px;line-height:1.3;border-radius:13px}}

/* The placeholder a missing video or poster falls back to: the lattice idea
   (threads converging on a lit point) drawn in CSS, with the sparkle on top. */
.st-frame{position:relative;overflow:hidden;background:
  radial-gradient(60% 70% at 50% 46%,rgba(248,164,52,.20),rgba(248,164,52,0) 70%),
  repeating-linear-gradient(60deg,rgba(250,205,97,.07) 0 1px,transparent 1px 34px),
  repeating-linear-gradient(-60deg,rgba(250,205,97,.07) 0 1px,transparent 1px 34px),
  repeating-linear-gradient(0deg,rgba(250,205,97,.05) 0 1px,transparent 1px 29.4px),
  #0d0e0c}
.st-frame::before{content:"";position:absolute;left:50%;top:50%;width:56px;height:56px;transform:translate(-50%,-50%);
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='.6' y2='1'%3E%3Cstop offset='0' stop-color='%23facd61'/%3E%3Cstop offset='.47' stop-color='%23f8a434'/%3E%3Cstop offset='1' stop-color='%23d96c27'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url(%23g)' d='M12 1Q13.92 9.92 22.17 12Q13.92 14.08 12 23Q10.08 14.08 1.83 12Q10.08 9.92 12 1Z'/%3E%3C/svg%3E") center/contain no-repeat;
  filter:drop-shadow(0 0 18px rgba(248,164,52,.45))}
.st-frame > img,.st-frame > video{position:relative;z-index:1;display:block;width:100%;height:100%;object-fit:cover}

.vbadge{display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 9px 0 7px;border-radius:999px;font-family:var(--mono);font-size:10.5px;font-weight:500;letter-spacing:.16em;text-transform:uppercase;color:var(--on-accent);background:var(--grad)}
.vbadge svg{width:11px;height:11px}

/* ---- index: /stories -------------------------------------------------- */
.st-cards{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,340px),1fr));gap:18px}
.st-card{position:relative;display:flex;flex-direction:column;background:var(--bg-2);border:1px solid var(--line);border-radius:18px;overflow:hidden;transition:border-color .2s,transform .2s,box-shadow .2s}
.st-card:hover{border-color:rgba(248,164,52,.42);transform:translateY(-2px);box-shadow:0 24px 60px -30px rgba(248,164,52,.45)}
.st-card:focus-within{border-color:rgba(248,164,52,.42)}
.st-card-media{aspect-ratio:16/9;border-bottom:1px solid var(--line)}
.st-card-media .vbadge{position:absolute;left:14px;top:14px;z-index:2}
.st-card-play{position:absolute;right:14px;bottom:14px;z-index:2;display:grid;place-items:center;width:44px;height:44px;border-radius:50%;background:rgba(10,10,10,.6);border:1px solid rgba(250,205,97,.45);color:var(--v2);backdrop-filter:blur(6px)}
.st-card-play svg{width:16px;height:16px;margin-left:2px}
.st-card-body{display:flex;flex-direction:column;gap:14px;padding:22px 22px 24px;flex:1}
.st-card .kicker{margin:0}
.lp .st-card h2{font-size:clamp(20px,2.2vw,24px);line-height:1.25;letter-spacing:-.015em;margin:0}
.st-card h2 a{color:var(--ink);text-decoration:none}
.st-card h2 a::after{content:"";position:absolute;inset:0;z-index:3}  /* whole card is the link */
.st-card h2 a:focus-visible{outline:none}
.st-card:has(h2 a:focus-visible){outline:2px solid var(--v2);outline-offset:3px}
.st-card-stat{display:flex;flex-direction:column;gap:6px;margin:auto 0 0;padding-top:16px;border-top:1px solid var(--line)}
.st-card-stat b{font-size:26px;font-weight:700;letter-spacing:-.02em;background:var(--grad);-webkit-background-clip:text;background-clip:text;color:transparent}
.st-card-stat span{color:var(--muted);font-size:14.5px;line-height:1.4}
.st-card-more{display:inline-flex;align-items:center;gap:8px;font-size:14.5px;font-weight:600;color:var(--v1)}
.st-card-more svg{width:16px;height:16px;transition:transform .2s}
.st-card:hover .st-card-more svg{transform:translateX(3px)}

/* The newest story leads: full width, media beside the text. */
@media (min-width:820px){
  .st-cards > .st-card:first-child{grid-column:1 / -1;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr)}
  .st-cards > .st-card:first-child .st-card-media{order:2;aspect-ratio:auto;min-height:100%;border-bottom:0;border-left:1px solid var(--line)}
  .st-cards > .st-card:first-child .st-card-body{padding:34px 34px 32px;gap:18px}
  .lp .st-cards > .st-card:first-child h2{font-size:clamp(24px,2.6vw,30px);line-height:1.2}
  .st-cards > .st-card:first-child .st-card-stat b{font-size:34px}
}
.st-index-note{color:var(--muted);font-size:14px;margin:28px 0 0;max-width:66ch}

/* ---- story page ------------------------------------------------------- */
.st-hero.lp-hero{border-bottom:0;padding-bottom:0;margin-bottom:0}
.st-hero .lede{margin-bottom:0}
.lp .st-hero h1{font-size:clamp(29px,4.6vw,48px);line-height:1.1}

/* The challenge, right under the lede: what the business was trying to solve. */
.st-challenge{margin:clamp(24px,4vh,36px) 0 0;max-width:880px;padding:2px 0 2px 22px;border-left:2px solid var(--v1)}
.lp .st-challenge h2{font-family:var(--mono);font-size:11.5px;font-weight:500;letter-spacing:.16em;text-transform:uppercase;color:var(--v1);margin:0 0 10px}
.lp .st-challenge p{color:var(--ink);font-size:clamp(16.5px,2vw,18px);line-height:1.6;margin:0 0 10px;max-width:66ch}
.lp .st-challenge p:last-child{margin-bottom:0}

/* Video, right under the lede. 16:9 at every width. */
.st-video{margin:clamp(28px,5vh,44px) 0 0;aspect-ratio:16/9;border-radius:18px;border:1px solid var(--line-2);box-shadow:0 40px 90px -50px rgba(248,164,52,.5)}
.st-video video{background:transparent}
.st-frame > wistia-player{position:relative;z-index:1;display:block;width:100%;height:100%}
.st-video[data-state="missing"] video{visibility:hidden}
.st-video wistia-player{background:#000}

/* Stat strip */
.st-stats{list-style:none;margin:clamp(20px,4vh,32px) 0 clamp(48px,8vh,80px);padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid var(--line);border-radius:18px;background:var(--bg-2)}
.st-stats li{padding:24px 24px 22px;min-width:0}
.st-stats li + li{border-left:1px solid var(--line)}
.st-stats b{display:block;font-size:clamp(32px,4.4vw,48px);font-weight:700;letter-spacing:-.035em;line-height:1;margin:0 0 10px;background:var(--grad);-webkit-background-clip:text;background-clip:text;color:transparent;padding-bottom:.06em}
.st-stats span{display:block;color:var(--dim);font-size:15px;line-height:1.45;max-width:26ch}

/* Journey + at a glance */
.st-body{display:grid;grid-template-columns:minmax(0,1fr);gap:32px;margin:0 0 clamp(56px,9vh,88px)}
@media (min-width:980px){
  .st-body{grid-template-columns:minmax(0,1fr) 300px;gap:56px;align-items:start}
  .st-glance{order:2;position:sticky;top:88px}
}
.st-glance{background:linear-gradient(180deg,rgba(248,164,52,.07),rgba(248,164,52,.015));border:1px solid color-mix(in oklab,var(--v1) 30%,transparent);border-radius:18px;padding:22px 22px 8px}
.st-glance .kicker{margin:0 0 6px}
.st-glance dl{margin:0}
.st-glance dl > div{padding:12px 0;border-top:1px solid var(--line)}
.st-glance dl > div:first-child{border-top:0}
.st-glance dt{font-family:var(--mono);font-size:10.5px;letter-spacing:.16em;text-transform:uppercase;color:var(--label);margin:0 0 4px}
.st-glance dd{margin:0;color:var(--ink);font-size:15.5px;line-height:1.45}
.st-glance dd a{color:var(--ink);text-decoration:none;border-bottom:1px solid rgba(248,164,52,.45)}
.st-glance dd a:hover{border-color:var(--v1)}

/* The timeline: one rail, one node per beat. */
.st-tl{list-style:none;margin:28px 0 0;padding:0;position:relative}
.st-tl::before{content:"";position:absolute;left:15px;top:10px;bottom:24px;width:2px;border-radius:2px;background:linear-gradient(180deg,var(--v1),rgba(248,164,52,.35) 40%,rgba(248,164,52,.08))}
.st-beat{position:relative;padding:0 0 40px 56px}
.st-beat:last-child{padding-bottom:0}
.st-node{position:absolute;left:0;top:0;width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:#0d0e0c;border:1px solid rgba(248,164,52,.45);color:var(--v1);box-shadow:0 0 0 6px var(--bg)}
.st-node svg{width:14px;height:14px}
.st-beat.is-key .st-node{background:var(--grad);border-color:transparent;color:var(--on-accent);box-shadow:0 0 0 6px var(--bg),0 0 24px rgba(248,164,52,.5)}
.st-when{display:block;font-family:var(--mono);font-size:11.5px;letter-spacing:.16em;text-transform:uppercase;color:var(--v1);margin:6px 0 8px}
.lp .st-beat h3{font-size:clamp(19px,2.2vw,22px);font-weight:650;letter-spacing:-.015em;line-height:1.3;margin:0 0 10px}
.st-beat > p{color:var(--dim);font-size:16.5px;line-height:1.65;margin:0 0 14px;max-width:62ch}
.st-pills{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:4px 0 0}
.st-pills .arr{width:16px;height:16px;color:var(--label)}

/* Version steps inside a beat */
.st-vers{list-style:none;margin:18px 0 0;padding:0;display:grid;gap:10px}
.st-vers li{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 16px;align-items:start;padding:14px 16px;border:1px solid var(--line);border-radius:14px;background:var(--bg-2)}
.st-vers li.is-slow{background:transparent;border-style:dashed;border-color:var(--line-2)}
.st-vers li.is-best{border-color:rgba(248,164,52,.42);background:linear-gradient(180deg,rgba(248,164,52,.08),rgba(248,164,52,.02))}
.st-vers .t{display:block;margin:0;color:var(--dim);font-size:15.5px;line-height:1.55}
.st-vers b{font-weight:650;color:var(--ink)}
.st-vers li.is-best b{color:var(--v1)}
.st-vers .pill{margin-top:1px}

/* Five reports, one check each */
.st-done{list-style:none;margin:14px 0 12px;padding:0;display:grid;gap:8px}
.st-done li{display:flex;align-items:flex-start;gap:12px;color:var(--ink);font-size:16px;line-height:1.5}
.st-done svg{flex:none;width:22px;height:22px;margin-top:0;padding:4px;border-radius:50%;color:var(--v2);background:rgba(248,164,52,.12);border:1px solid rgba(248,164,52,.32)}

/* What he built */
.st-built table{width:100%;border-collapse:separate;border-spacing:0;border:1px solid var(--line);border-radius:18px;overflow:hidden;background:var(--bg-2);font-size:15.5px}
.st-built th{text-align:left;font-family:var(--mono);font-size:10.5px;font-weight:500;letter-spacing:.16em;text-transform:uppercase;color:var(--label);padding:14px 20px;border-bottom:1px solid var(--line-2);background:rgba(255,255,255,.02)}
.st-built td{padding:16px 20px;border-top:1px solid var(--line);vertical-align:middle;color:var(--dim);line-height:1.5}
.st-built tbody tr:first-child td{border-top:0}
.st-built td:first-child{color:var(--ink);font-weight:600;width:28%}
.st-built td:last-child{width:1%;white-space:nowrap}
.st-built tbody tr{transition:background .15s}
.st-built tbody tr:hover{background:rgba(248,164,52,.035)}
.st-built .st-fn{color:var(--muted);font-size:14px;margin:14px 0 0}

/* Why it worked */
.st-why{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:16px}
.st-why li{position:relative;padding:24px 22px 24px;background:var(--bg-2);border:1px solid var(--line);border-radius:18px;overflow:hidden}
.st-why li::after{content:"";position:absolute;left:0;right:0;top:0;height:2px;background:linear-gradient(90deg,var(--v1),rgba(248,164,52,0) 70%)}
.st-why .n{display:block;font-family:var(--mono);font-size:11.5px;letter-spacing:.16em;color:var(--v1);margin:0 0 14px}
.lp .st-why h3{font-size:18px;line-height:1.3;margin:0 0 10px}
.st-why p{margin:0;color:var(--dim);font-size:15.5px;line-height:1.6}

/* Close */
.st-close.lp-close{position:relative;overflow:hidden;padding:clamp(28px,5vw,48px);background:
  radial-gradient(circle at 100% 0%,rgba(248,164,52,.15),rgba(248,164,52,0) 62%) no-repeat,var(--bg-2);
  border-color:color-mix(in oklab,var(--v1) 30%,transparent)}
.st-close h2{margin-bottom:22px}
.st-note{color:var(--muted);font-size:13.5px;line-height:1.55;max-width:70ch;margin:-32px 0 0}

/* Four stat tiles: two by two, so a worded figure ("Every 15 min") keeps its size. */
.st-stats.st-stats-4{grid-template-columns:repeat(2,minmax(0,1fr))}
.st-stats.st-stats-4 li:nth-child(odd){border-left:0}
.st-stats.st-stats-4 li:nth-child(n+3){border-top:1px solid var(--line)}
.st-stats.st-stats-4 span{max-width:34ch}

/* A results column in words rather than a pill: let it wrap. */
.st-built.st-built-text td:last-child{width:30%;white-space:normal;color:var(--ink)}

/* Hub cards: the heading leads the source (and the Markdown twin); the kicker is drawn above it. */
.st-card-body > .kicker{order:-1}

/* More stories, near the end of a story page */
.st-more-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:16px}
.st-more-list a{display:flex;flex-direction:column;gap:12px;height:100%;padding:22px 22px 20px;background:var(--bg-2);border:1px solid var(--line);border-radius:18px;color:var(--ink);text-decoration:none;font-size:17px;font-weight:600;line-height:1.4;letter-spacing:-.01em;transition:border-color .2s,transform .2s}
.st-more-list a:hover,.st-more-list a:focus-visible{border-color:rgba(248,164,52,.42);transform:translateY(-2px)}
.st-more-list .kicker{margin:0;font-weight:500}
.st-more-go{display:inline-flex;align-items:center;gap:8px;margin-top:auto;font-size:14.5px;font-weight:600;color:var(--v1)}
.st-more-go svg{width:16px;height:16px;transition:transform .2s}
.st-more-list a:hover .st-more-go svg{transform:translateX(3px)}

/* ---- phones ----------------------------------------------------------- */
@media (max-width:720px){
  .st-stats,.st-stats.st-stats-4{grid-template-columns:minmax(0,1fr)}
  .st-stats li{padding:20px 20px 18px}
  .st-stats li + li,.st-stats.st-stats-4 li + li{border-left:0;border-top:1px solid var(--line)}
  .st-stats b{margin:0 0 8px;font-size:32px}
  .st-stats span{font-size:14.5px}
  .st-video{border-radius:14px}
  .st-beat{padding-left:48px}
  .st-vers li{grid-template-columns:minmax(0,1fr)}
  .st-vers .pill{justify-self:start}
  /* The table becomes one card per report. */
  .st-built table,.st-built tbody,.st-built tr,.st-built td{display:block;width:auto}
  .st-built thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .st-built tr{padding:16px 18px;border-top:1px solid var(--line)}
  .st-built tbody tr:first-child{border-top:0}
  .st-built td{padding:0;border:0}
  .st-built td:first-child{width:auto;margin:0 0 4px}
  .st-built td:last-child{width:auto;margin:10px 0 0}
  .st-note{margin-top:-24px}
  .st-built.st-built-text td:last-child{width:auto}
}
@media (prefers-reduced-motion:reduce){.st-card,.st-card-more svg,.st-more-list a,.st-more-go svg{transition:none}.st-card:hover,.st-more-list a:hover,.st-more-list a:focus-visible{transform:none}}

/* Button alignment for the story pages only (kept out of landing.css so other landing pages do not move). */
.lp .btn{display:inline-flex;align-items:center;justify-content:center}
.lp .btn-ghost{display:inline-flex;align-items:center;justify-content:center;height:48px;padding:0 18px}

/* ---- /stories: search and app filter ----
   The box is a dark well with a strong edge; the chips are transparent on the hairline, so
   the input never reads as one more chip. The pressed chip is the only filled one. */
.st-find{display:flex;flex-direction:column;gap:14px;margin:0 0 26px}
.st-find-box{position:relative;display:block;max-width:560px}
.st-find-lab{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.st-find-box svg{position:absolute;left:16px;top:50%;width:16px;height:16px;margin-top:-8px;color:var(--muted);pointer-events:none}
.st-find-box input{width:100%;height:50px;padding:0 16px 0 44px;border-radius:14px;background:rgba(0,0,0,.55);border:1px solid rgba(255,255,255,.24);color:var(--ink);font:inherit;font-size:16px}
.st-find-box input::placeholder{color:var(--muted)}
.st-find-box input:focus{outline:none;border-color:var(--v2);box-shadow:0 0 0 3px rgba(248,164,52,.18)}
.st-chips{display:flex;flex-wrap:wrap;gap:8px}
.st-chip{display:inline-flex;align-items:center;gap:7px;min-height:36px;padding:0 14px;border-radius:999px;background:transparent;border:1px solid var(--line-2);color:var(--ink);font:inherit;font-size:14px;cursor:pointer;transition:border-color .15s,background .15s}
.st-chip:hover{border-color:rgba(248,164,52,.5)}
.st-chip:focus-visible{outline:2px solid var(--v2);outline-offset:2px}
.st-chip[aria-pressed="true"]{background:rgba(248,164,52,.14);border-color:rgba(248,164,52,.6);color:var(--v2)}
.st-chip-n{font-family:var(--mono);font-size:11.5px;color:var(--muted)}
.st-chip[aria-pressed="true"] .st-chip-n{color:inherit}
.st-count{margin:0;min-height:1.2em;color:var(--muted);font-size:14px}
.st-none{color:var(--muted);margin:0 0 26px}
.st-none a{color:var(--v1)}
.st-cards > .st-card[hidden]{display:none !important}  /* beats the lead-card grid rules */
/* Tags on each card: plain labels (the whole card is already the link). */
.st-tags{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:0}
.st-tags-h{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.st-tag{display:inline-flex;align-items:center;height:24px;padding:0 9px;border-radius:999px;border:1px solid var(--line-2);font-family:var(--mono);font-size:11.5px;color:var(--muted)}
/* While a filter is on, every card is a plain grid card (no full-width lead card). */
@media (min-width:820px){
  .st-cards.st-filtered > .st-card:first-child{grid-column:auto;display:flex}
  .st-cards.st-filtered > .st-card:first-child .st-card-media{order:0;aspect-ratio:16/9;min-height:0;border-left:0;border-bottom:1px solid var(--line)}
  .st-cards.st-filtered > .st-card:first-child .st-card-body{padding:22px 22px 24px;gap:14px}
  .lp .st-cards.st-filtered > .st-card:first-child h2{font-size:clamp(20px,2.2vw,24px);line-height:1.25}
  .st-cards.st-filtered > .st-card:first-child .st-card-stat b{font-size:26px}
}
@media (prefers-reduced-motion:reduce){.st-chip{transition:none}}
.st-trailer{margin-bottom:clamp(36px,6vh,56px)}

/* App tags under the story hero: one link per app the story used, to its /connections hub. */
.st-apps-row{margin:22px 0 0;display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px}
.st-apps-k{margin:0;font-family:var(--mono);font-size:10.5px;letter-spacing:.16em;text-transform:uppercase;color:var(--label)}
.st-apps{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:8px}
.st-app{display:inline-flex;align-items:center;gap:9px;height:40px;padding:0 16px 0 6px;border-radius:999px;border:1px solid color-mix(in oklab,var(--v1) 45%,transparent);background:rgba(248,164,52,.08);color:var(--ink);font-family:var(--display);font-size:15px;font-weight:600;line-height:1;text-decoration:none;transition:border-color .15s,background .15s}
.st-app:hover{border-color:var(--v1);background:rgba(248,164,52,.16)}
.st-app:focus-visible{outline:2px solid var(--v2);outline-offset:2px}
.st-app-ico{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#fff;overflow:hidden;flex:0 0 auto}
.st-app-ico img{width:20px;height:20px;object-fit:contain}
