/* Card stories: simple film-style cards floating on the page (see card-story.js for markup and timing). */

/* Layout ----------------------------------------------------------------------------------------- */
.cs{position:relative;color:#0e2c2e;font-family:'Public Sans',Arial,sans-serif}
.cs:has(.cs-steps){display:grid;grid-template-columns:minmax(0,1.75fr) minmax(260px,.85fr);grid-template-rows:1fr auto;column-gap:28px}
.cs .cs-stage{position:relative;isolation:isolate;min-width:0}
.cs:has(.cs-steps) .cs-stage{grid-row:1/3}
/* Without JavaScript the scenes are listed in order */
.cs .cs-scene{position:relative;display:grid;place-items:center;padding:30px 26px}
.cs.is-live .cs-stage{min-height:max(var(--cs-height,460px),var(--cs-fit,0px))}
.cs.is-live .cs-scene{position:absolute;inset:0;opacity:0;pointer-events:none;z-index:1;transition:opacity 0s linear 460ms}
.cs.is-live .cs-scene.is-active{opacity:1;pointer-events:auto;z-index:2;transition:opacity 420ms cubic-bezier(.23,1,.32,1)}
.cs .cs-group{display:grid;gap:16px;justify-items:stretch;width:min(100%,var(--cs-width,540px));transform-origin:50% 50%;will-change:transform}
.cs .cs-group.cs-wide{--cs-width:720px}
.cs .cs-group.cs-narrow{--cs-width:420px}
.cs .cs-pair{display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start}
.cs .cs-pair.cs-pair--lead{grid-template-columns:1.25fr 1fr}
.cs .cs-pair.cs-pair--trail{grid-template-columns:1fr 1.35fr}

/* Cards ------------------------------------------------------------------------------------------ */
.cs .cs-card{position:relative;background:#fff;color:#0e2c2e;border:1px solid #dfe7e2;border-radius:18px;padding:22px 24px;box-shadow:0 30px 60px -28px #0e2c2e59,0 10px 22px -14px #0e2c2e2e}
.cs .cs-card.cs-flush{padding:0;overflow:hidden}
.cs .cs-card.cs-dark{background:#0e2c2e;color:#fff;border-color:#0e2c2e}
.cs .cs-card.cs-dark .cs-label{color:#88e789}
.cs .cs-card.cs-dark .cs-text,.cs .cs-card.cs-dark .cs-muted{color:#b9d2c8}
.cs .cs-card.cs-mint{background:#f1f7f3;border-color:#cfe3d7;box-shadow:none}
.cs .cs-label{display:block;font:750 0.9375rem/1.2 'Public Sans',Arial,sans-serif;letter-spacing:.12em;text-transform:uppercase;color:#117957}
.cs .cs-title{display:block;font:500 1.75rem/1.12 Newsreader,Georgia,serif;letter-spacing:-.02em;margin:6px 0 0}
.cs .cs-title.cs-lg{font-size:2.25rem}
.cs .cs-title.cs-sm{font-size:1.375rem}
.cs .cs-text{margin:8px 0 0;font:500 1rem/1.45 'Public Sans',Arial,sans-serif;color:#4f6466}
.cs .cs-muted{font:500 0.9375rem/1.4 'Public Sans',Arial,sans-serif;color:#62766c}
.cs .cs-strong{font:700 1.0625rem/1.3 'Public Sans',Arial,sans-serif}
.cs .cs-row{display:flex;align-items:center;justify-content:space-between;gap:12px}
.cs .cs-divide{border-top:1px solid #e3e8e5;margin-top:14px;padding-top:14px}
.cs .cs-stack{display:grid;gap:10px}

/* Header: icon or avatar, name, subtitle */
.cs .cs-head{display:flex;align-items:center;gap:12px}
.cs .cs-head>div{min-width:0}
.cs .cs-head strong{display:block;font:750 1.125rem/1.25 'Public Sans',Arial,sans-serif}
.cs .cs-head small{display:block;margin-top:2px;font:600 0.9375rem 'Public Sans',Arial,sans-serif;color:#62766c}
.cs .cs-head .cs-pill{margin-left:auto}
.cs .cs-head-rule{padding-bottom:14px;margin-bottom:14px;border-bottom:1px solid #e3e8e5}
.cs .cs-icon{display:grid;place-items:center;flex:none;width:40px;height:40px;border-radius:11px;background:#117957;color:#fff;font:800 1rem 'Public Sans',Arial,sans-serif}
.cs .cs-icon img,.cs .cs-icon svg{width:22px;height:22px}
.cs .cs-icon svg{stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.cs .cs-icon.cs-soft{background:#e1f7e2;color:#117957}
.cs .cs-icon.cs-img{background:none;padding:0}
.cs .cs-icon.cs-img img{width:100%;height:100%;border-radius:inherit}
.cs .cs-avatar{flex:none;width:44px;height:44px;border-radius:50%;object-fit:cover}
.cs .cs-avatar.cs-initials{display:grid;place-items:center;background:#e1f7e2;color:#117957;font:800 0.9375rem 'Public Sans',Arial,sans-serif}

/* Chips, pills, badges */
.cs .cs-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.cs .cs-chip{padding:8px 13px;border:1px solid #d5dfdb;border-radius:999px;background:#f6f8f5;color:#4f6466;font:600 0.9375rem 'Public Sans',Arial,sans-serif;transition:background-color 250ms ease,color 250ms ease,border-color 250ms ease}
.cs .cs-chip.is-primary{border-color:#9fcdb5;background:#e1f7e2;color:#0e2c2e}
.cs .cs-chip[data-done]{background:#117957;border-color:#117957;color:#fff}
.cs .cs-pill{display:inline-flex;align-items:center;gap:6px;flex:none;padding:7px 12px;border-radius:999px;background:#e1f7e2;color:#117957;font:750 0.9375rem/1.1 'Public Sans',Arial,sans-serif;white-space:nowrap;transition:background-color 250ms ease,color 250ms ease}
.cs .cs-pill.is-warn{background:#fff1ea;color:#a34d36}
.cs .cs-pill.is-quiet{background:#eef2ef;color:#4f6466}
.cs .cs-pill[data-done]{background:#117957;color:#fff}
.cs .cs-badge{display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border-radius:999px;background:#e1f7e2;color:#117957;font:750 0.9375rem 'Public Sans',Arial,sans-serif;opacity:0;transform:scale(.85);transition:opacity 280ms ease,transform 320ms cubic-bezier(.34,1.56,.64,1)}
.cs .cs-badge[data-done],.cs:not(.is-live) .cs-badge,.cs.is-still .cs-badge{opacity:1;transform:none}
/* A card that gets a confirming ring */
.cs .cs-ring{transition:border-color 300ms ease,box-shadow 300ms ease}
.cs .cs-ring[data-done]{border-color:#22ac78;box-shadow:0 30px 60px -28px #0e2c2e59,0 0 0 3px #88e78980}

/* Conversation */
.cs .cs-chat{display:grid;gap:10px}
.cs .cs-bubble{margin:0;max-width:84%;padding:12px 15px;border-radius:16px;font:500 1rem/1.4 'Public Sans',Arial,sans-serif}
.cs .cs-bubble small{display:block;margin-bottom:4px;font:750 0.8125rem 'Public Sans',Arial,sans-serif;letter-spacing:.1em;text-transform:uppercase;opacity:.7}
.cs .cs-bubble.cs-from{background:#eef2ef;border-bottom-left-radius:5px}
.cs .cs-bubble.cs-reply{justify-self:end;background:#0e2c2e;color:#fff;border-bottom-right-radius:5px}
.cs .cs-bubble.cs-reply.cs-light{background:#e1f7e2;color:#0e2c2e}

/* Elements that arrive during a scene (always visible when motion is reduced or JavaScript is off) */
.cs.is-live:not(.is-still) [data-cs-in]{transition:opacity 300ms ease,transform 360ms cubic-bezier(.23,1,.32,1)}
.cs.is-live:not(.is-still) [data-cs-in]:not([data-done]){opacity:0;transform:translateY(10px)}

/* Checklist and timeline */
.cs .cs-list{list-style:none;margin:12px 0 0;padding:0;display:grid;gap:11px}
.cs .cs-list li{display:flex;align-items:center;gap:12px;font:600 1rem/1.35 'Public Sans',Arial,sans-serif}
.cs .cs-list li small{display:block;font:500 0.9375rem 'Public Sans',Arial,sans-serif;color:#62766c}
.cs .cs-list li>i{display:grid;place-items:center;flex:none;width:26px;height:26px;border-radius:50%;background:#eef2ef;color:transparent;font:800 0.9375rem 'Public Sans',Arial,sans-serif;font-style:normal;transition:background-color 250ms ease,color 250ms ease}
.cs .cs-list li[data-done]>i,.cs .cs-list li.is-done>i{background:#117957;color:#fff}
.cs .cs-list li>b{margin-left:auto;font:700 0.9375rem 'Public Sans',Arial,sans-serif;color:#117957;white-space:nowrap}

/* Flow of nodes (left to right; top to bottom on phones) */
.cs .cs-flow{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;align-items:stretch;gap:24px;position:relative}
.cs .cs-node{display:grid;align-content:start;gap:8px;min-height:120px;transition:opacity 250ms ease,border-color 250ms ease,box-shadow 250ms ease}
.cs .cs-node .cs-title{font-size:1.3125rem;margin:0}
.cs.is-live:not(.is-still) .cs-node[data-cs-at]:not([data-done]){opacity:.5}
.cs .cs-node[data-done]{border-color:#22ac78;box-shadow:0 30px 60px -28px #0e2c2e59,0 0 0 3px #88e78966}
.cs .cs-node+.cs-node:before{content:"";position:absolute;right:100%;top:50%;width:24px;height:2px;background:#22ac78}

/* Form field, typing, toggle */
.cs .cs-field{display:block;margin-top:10px;padding:12px 14px;min-height:46px;border:1.5px solid #dfe6e2;border-radius:11px;background:#fbfcfa;font:500 1rem/1.35 'Public Sans',Arial,sans-serif;color:#0e2c2e;transition:border-color 250ms ease,background-color 250ms ease}
.cs .cs-field[data-done]{border-color:#9fcdb5;background:#f3fbf6}
.cs .cs-field-label{display:block;margin-top:12px;font:700 0.9375rem 'Public Sans',Arial,sans-serif;color:#4f6466}
.is-typing:after{content:"";display:inline-block;width:2px;height:1.05em;margin-left:2px;vertical-align:-2px;background:#117957;animation:cs-caret .7s steps(1) infinite}
@keyframes cs-caret{50%{opacity:0}}
.cs .cs-switch{position:relative;flex:none;width:46px;height:26px;border-radius:999px;background:#d6dcd9;transition:background-color 250ms ease}
.cs .cs-switch:after{content:"";position:absolute;left:3px;top:3px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 2px 5px #0003;transition:transform 250ms cubic-bezier(.23,1,.32,1)}
.cs .cs-switch[data-done],.cs .cs-switch.is-on{background:#22ac78}
.cs .cs-switch[data-done]:after,.cs .cs-switch.is-on:after{transform:translateX(20px)}
.cs .cs-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;margin-top:12px;padding:11px 18px;border-radius:999px;background:#0e2c2e;color:#fff;font:700 0.9375rem 'Public Sans',Arial,sans-serif;transition:background-color 250ms ease}
.cs .cs-button[data-done]{background:#117957}

/* Photo cards and mini website */
.cs .cs-photo{display:block;width:100%;height:170px;object-fit:cover}
.cs .cs-site{display:grid;grid-template-columns:40% 1fr}
.cs .cs-site>img{width:100%;height:100%;min-height:220px;object-fit:cover}
.cs .cs-site>div{padding:24px 22px;display:grid;align-content:center;gap:4px}

/* Calendar day picker */
.cs .cs-days{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin-top:12px}
.cs .cs-days span{display:grid;place-items:center;gap:2px;padding:10px 0;border-radius:11px;background:#f1f4f2;font:700 1rem 'Public Sans',Arial,sans-serif;transition:background-color 250ms ease,color 250ms ease}
.cs .cs-days span small{font:600 0.8125rem 'Public Sans',Arial,sans-serif;color:#62766c;letter-spacing:.06em;text-transform:uppercase}
.cs .cs-days span[data-done]{background:#117957;color:#fff}
.cs .cs-days span[data-done] small{color:#c9f0d0}

/* Key figure */
.cs .cs-figure{font:500 2.875rem/1 Newsreader,Georgia,serif;letter-spacing:-.03em;color:#117957}
.cs .cs-bars{display:flex;align-items:flex-end;gap:8px;height:90px;margin-top:14px}
.cs .cs-bars i{flex:1;border-radius:6px 6px 2px 2px;background:#88e789;transform-origin:bottom;transition:transform 500ms cubic-bezier(.23,1,.32,1)}
.cs.is-live:not(.is-still) .cs-bars i[data-cs-at]:not([data-done]){transform:scaleY(.15)}

/* Steps (tabs) ----------------------------------------------------------------------------------- */
.cs-steps{list-style:none;margin:0;padding:22px 0 8px;display:grid;align-content:center;gap:6px}
.cs-steps>li{display:flex;gap:12px;padding:13px 14px}
.cs.is-live .cs-steps>li{display:block;padding:0}
.cs-steps>li>span,.cs-tab>span{font:700 0.875rem 'Public Sans',Arial,sans-serif;color:#117957;padding-top:4px}
.cs-steps strong{display:block;font:700 1rem/1.3 'Public Sans',Arial,sans-serif;color:#0e2c2e}
.cs-steps p{font:400 0.9375rem/1.5 'Public Sans',Arial,sans-serif;color:#4f6466;margin:5px 0 0}
.cs-tab{all:unset;box-sizing:border-box;position:relative;display:flex;gap:12px;width:100%;padding:13px 14px 16px;border-radius:10px;cursor:pointer;opacity:1;transition:opacity 250ms cubic-bezier(.23,1,.32,1),background-color 250ms cubic-bezier(.23,1,.32,1)}
.cs-tab:hover{background:#f1f7f3}
.cs-tab[aria-selected="true"]{opacity:1;background:#e1f7e2}
.cs-tab:focus-visible,.cs-toggle:focus-visible{outline:2px solid #117957;outline-offset:2px}
.cs-word{display:inline-block}
.cs-tab-progress{position:absolute;left:14px;right:14px;bottom:6px;height:2px;border-radius:2px;background:#117957;transform:scaleX(0);transform-origin:left center}
.cs-controls{display:flex;align-items:center;gap:12px;padding:0 14px 22px;font:400 0.875rem/1.4 'Public Sans',Arial,sans-serif;color:#62766c}
.cs-controls[hidden],.cs-toggle[hidden]{display:none}
.cs-toggle{flex:none;padding:7px 14px;border:1px solid #bfcfc5;border-radius:999px;background:#fff;color:#0e2c2e;font:700 0.875rem 'Public Sans',Arial,sans-serif;cursor:pointer;transition:background-color 200ms ease,border-color 200ms ease,opacity 200ms ease}
.cs-toggle:hover{background:#f1f7f3;border-color:#117957}
.cs-toggle--corner{position:absolute;right:10px;bottom:6px;z-index:5;opacity:.7}
.cs-toggle--corner:hover,.cs-toggle--corner:focus-visible{opacity:1}

/* Cursor */
.cs-cursor{position:absolute;left:0;top:0;z-index:20;width:26px;height:26px;margin:-3px 0 0 -4px;opacity:0;pointer-events:none;transform-origin:4px 3px}
.cs-cursor svg{width:26px;height:26px;overflow:visible;filter:drop-shadow(0 4px 6px #0006)}
.cs-cursor path{fill:#0e2c2e;stroke:#fff;stroke-width:1.6;stroke-linejoin:round}
.cs-cursor i{position:absolute;left:-10px;top:-10px;width:28px;height:28px;border-radius:50%;background:#22ac78;opacity:0;transform:scale(.3)}
.cs-cursor.is-clicking i{animation:cs-click 500ms cubic-bezier(.23,1,.32,1)}
@keyframes cs-click{0%{opacity:.6;transform:scale(.3)}100%{opacity:0;transform:scale(1.6)}}

/* Dark theme: cards stay light; text that sits on the page is lifted */
html[data-site-theme="dark"] .cs-tab:not([aria-selected="true"]) strong,html[data-site-theme="dark"] .cs-steps>li:not(.is-current)>div strong{color:#e1f7e2}
html[data-site-theme="dark"] .cs-tab:not([aria-selected="true"]) p,html[data-site-theme="dark"] .cs-steps>li:not(.is-current)>div p{color:#a9c3ba}
html[data-site-theme="dark"] .cs-tab:not([aria-selected="true"])>span{color:#88e789}
html[data-site-theme="dark"] .cs-controls{color:#a9c3ba}

/* Tablet: stage on top, steps below */
@media(max-width:900px){
  .cs:has(.cs-steps){grid-template-columns:1fr;grid-template-rows:auto}
  .cs:has(.cs-steps) .cs-stage{grid-row:auto}
  .cs-steps{grid-template-columns:repeat(2,1fr);padding-top:16px}
}
/* Phone: smaller cards, stacked pairs and flows; the current step reads in full, the others become numbered buttons */
@media(max-width:650px){
  .cs.is-live .cs-stage{min-height:max(var(--cs-height-phone,430px),var(--cs-fit,0px))}
  .cs .cs-scene{padding:20px 14px}
  .cs .cs-group{gap:12px}
  .cs .cs-card{padding:18px}
  .cs .cs-title{font-size:1.4375rem}.cs .cs-title.cs-lg{font-size:1.75rem}.cs .cs-title.cs-sm{font-size:1.1875rem}
  .cs .cs-pair,.cs .cs-pair.cs-pair--lead,.cs .cs-pair.cs-pair--trail{grid-template-columns:1fr}
  .cs .cs-site{grid-template-columns:1fr}.cs .cs-site>img{min-height:0;height:130px}
  .cs .cs-chip{font-size:0.9375rem;padding:7px 11px}
  .cs .cs-bubble{font-size:0.9375rem;max-width:92%}
  .cs .cs-flow{grid-auto-flow:row;gap:14px}
  .cs .cs-node{min-height:0;padding:14px 16px}
  .cs .cs-node+.cs-node:before{right:auto;left:50%;top:auto;bottom:100%;width:2px;height:14px}
  .cs .cs-figure{font-size:2.375rem}
  .cs.is-live .cs-steps{display:flex;flex-wrap:wrap;gap:8px;padding:16px 0 10px}
  .cs.is-live .cs-steps>li:has([aria-selected="true"]){order:-1;flex:1 1 100%}
  .cs-tab[aria-selected="true"] p{min-height:4.35em}
  .cs-tab[aria-selected="false"]{width:auto;padding:9px 13px;background:#eef3ef;opacity:1}
  .cs-tab[aria-selected="false"]>div{display:none}
  .cs-tab[aria-selected="false"]>span{padding:0;font-size:0.9375rem}
}
@media(prefers-reduced-motion:reduce){.cs.is-live .cs-scene,.cs-tab,.cs .cs-chip,.cs .cs-pill,.cs .cs-badge{transition:none}}

/* Photo with caption, and message rows (shared inbox) */
.cs .cs-photo.cs-photo--tall{height:330px}
.cs .cs-caption{padding:16px 18px 18px}
.cs .cs-msgs{list-style:none;margin:0;padding:0;display:grid;gap:4px}
.cs .cs-msg{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;padding:10px 4px;border-bottom:1px solid #eef2ef}
.cs .cs-msg:last-child{border-bottom:0}
.cs .cs-msg strong{display:block;font:700 0.9375rem 'Public Sans',Arial,sans-serif}
.cs .cs-msg small{display:block;font:500 0.9375rem 'Public Sans',Arial,sans-serif;color:#62766c}
.cs .cs-msg p{margin:3px 0 0;font:500 0.9375rem/1.35 'Public Sans',Arial,sans-serif;color:#4f6466;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:650px){
  .cs .cs-photo.cs-photo--tall{height:190px}
  .cs .cs-msg{grid-template-columns:auto minmax(0,1fr);row-gap:6px}
  .cs .cs-msg .cs-pill{grid-column:2;justify-self:start}
}

/* Grid of equal cards, and checklist items that stay out of scope */
.cs .cs-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.cs .cs-list li.is-limited{color:#7b8c86}
.cs .cs-list li.is-limited>i{color:#62766c}
@media(max-width:650px){.cs .cs-grid{grid-template-columns:1fr;gap:12px}}
@media(max-width:650px){html[data-site-theme="dark"] .cs-tab[aria-selected="false"]{background:#173f3c;opacity:1}html[data-site-theme="dark"] .cs-tab[aria-selected="false"]>span{color:#c9f0d0}}
/* Looping stories keep their corner Pause button below the cards */
.cs:not(:has(.cs-steps)) .cs-stage{padding-bottom:60px}
.cs.is-live:not(:has(.cs-steps)) .cs-stage{min-height:calc(max(var(--cs-height,460px),var(--cs-fit,0px)) + 60px)}
@media(max-width:650px){.cs.is-live:not(:has(.cs-steps)) .cs-stage{min-height:calc(max(var(--cs-height-phone,430px),var(--cs-fit,0px)) + 60px)}}
/* Dark theme: cards stay light, so page-level dark text colors must not reach inside them */
html[data-site-theme="dark"] .cs .cs-card:not(.cs-dark){color:#0e2c2e}
html[data-site-theme="dark"] .cs .cs-card:not(.cs-dark) :is(small,.cs-muted){color:#62766c}
html[data-site-theme="dark"] .cs .cs-card:not(.cs-dark) .cs-text{color:#4f6466}
html[data-site-theme="dark"] .cs .cs-card:not(.cs-dark) .cs-bubble.cs-from{color:#0e2c2e}
html[data-site-theme="dark"] .cs .cs-card .cs-bubble.cs-reply small{color:inherit}
@media(max-width:650px){.cs .cs-head{flex-wrap:wrap}.cs .cs-head>div{flex:1 1 150px}}
/* Looping stories: the scene ends above the corner Pause button, so the button never sits on a card */
.cs.is-live:not(:has(.cs-steps)) .cs-scene{bottom:60px}

/* Wider than a phone: cards fill the space they are given, pairs and grids share one height,
   and each stage is exactly as tall as its tallest scene (no fixed minimums leaving empty bands). */
.cs .cs-pair,.cs .cs-grid{align-items:stretch}
.cs .cs-pair>.cs-card.cs-flush{display:flex;flex-direction:column}
.cs .cs-pair>.cs-card.cs-flush>.cs-photo{flex:1 1 auto;min-height:170px;height:auto}
@media(min-width:651px){
  .cs .cs-group,.cs .cs-group.cs-wide,.cs .cs-group.cs-narrow{width:min(100%,1080px)}
  .cs.is-live .cs-stage{min-height:var(--cs-fit,0px)}
  .cs.is-live:not(:has(.cs-steps)) .cs-stage{min-height:calc(var(--cs-fit,0px) + 60px)}
}
.cs .cs-pair>.cs-stack{display:flex;flex-direction:column}
.cs .cs-pair>.cs-stack>.cs-card:first-child{flex:1 1 auto}

/* Unselected steps stay fully legible: a softer colour, never transparency */
.cs-tab[aria-selected="false"] strong{color:#2f4a47}
.cs-tab[aria-selected="false"] p{color:#536a66}
/* The slow push-in must never widen the page */
.cs{overflow-x:clip;overflow-clip-margin:16px}
