/* SM Cases voor en na: pillen per klant, een vak met toen en nu over elkaar, een sleepbare lijn.
   Kop en badge volgen de gedeelde maten uit sm-base (--sm-kop-font, --sm-kop, --sm-badge-accent). */
.sm-cs {
  --cs-bg: #0a0e0d;
  --cs-ink: #ffffff;
  --cs-stil: rgba(255, 255, 255, .72);
  --cs-zacht: rgba(255, 255, 255, .58);
  --cs-rand: rgba(255, 255, 255, .12);
  --cs-accent: #d2f65a;
  --cs-groen: #3DC78F;
  --cs-mono: ui-monospace, "SF Mono", "Fira Code", "JetBrains Mono", Menlo, monospace;
  --sm-badge-accent: var(--cs-accent);
  background: var(--cs-bg); color: var(--cs-ink);
  padding: 96px 32px; overflow-x: clip;
}
.sm-cs-in { max-width: 1180px; margin: 0 auto; }

/* ---------- kop ---------- */
.sm-cs-kopblok { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 32px 64px; align-items: end; margin: 0 0 40px; }
.sm-cs .sm-cs-kop {
  font-family: var(--sm-kop-font); font-size: var(--sm-kop); line-height: var(--sm-kop-regel); letter-spacing: var(--sm-kop-sp);
  font-weight: 600; color: var(--cs-ink); margin: 0; text-wrap: balance;
}
.sm-cs-licht { color: var(--cs-accent); }
.sm-cs-intro { color: var(--cs-stil); font-size: calc(var(--sm-tekst, 16px) * 1.02); line-height: 1.7; margin: 0; max-width: 460px; justify-self: end; }

/* ---------- pillen ---------- */
.sm-cs-pillen { display: grid; grid-template-columns: repeat(var(--cs-n, 3), minmax(0, 1fr)); gap: 12px; margin: 0 0 14px; }
.sm-cs-pil {
  position: relative; display: flex; align-items: center; gap: 12px; min-width: 0;
  padding: 10px 18px 10px 10px; border-radius: 999px; border: 1px solid var(--cs-rand);
  background: rgba(255, 255, 255, .04); color: var(--cs-ink); text-align: left; cursor: pointer; overflow: hidden;
  font: inherit; transition: background .35s ease, color .35s ease, border-color .35s ease;
}
.sm-cs-pil:hover { border-color: rgba(255, 255, 255, .28); }
.sm-cs-pil.is-actief { background: #ffffff; color: #0d1512; border-color: #ffffff; }
.sm-cs-pil:focus-visible { outline: 2px solid var(--cs-accent); outline-offset: 3px; }
.sm-cs-pil-beeld { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%; overflow: hidden; background: #ffffff; display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(13, 21, 18, .08); }
.sm-cs-pil-beeld img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sm-cs-pil-tekst { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.sm-cs-pil-naam { font-size: 15px; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-cs-pil-getal { font-family: var(--cs-mono); font-size: 12.5px; font-weight: 600; letter-spacing: .02em; color: var(--cs-accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-cs-pil.is-actief .sm-cs-pil-getal { color: #2f7f2a; }
.sm-cs-pil-regel { color: var(--cs-zacht); font-weight: 500; }
.sm-cs-pil.is-actief .sm-cs-pil-regel { color: rgba(13, 21, 18, .6); }
.sm-cs-voortgang { position: absolute; left: 22%; right: 22%; bottom: 0; height: 3px; border-radius: 3px; background: var(--cs-accent); transform: scaleX(0); transform-origin: left center; opacity: 0; }
.sm-cs-pil.is-actief.loopt .sm-cs-voortgang { opacity: 1; animation: sm-cs-loop var(--cs-duur, 8s) linear forwards; }
@keyframes sm-cs-loop { to { transform: scaleX(1); } }

/* voorbeeldcijfer, alleen zichtbaar voor wie ingelogd is */
.sm-cs-vb { border-bottom: 1px dashed currentColor; }
.sm-cs-vb em { font-style: normal; font-family: var(--cs-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; margin-left: 6px; padding: 1px 6px; border-radius: 6px; background: #ff5c8a; color: #fff; vertical-align: middle; }
.sm-cs-getal .sm-cs-vb em { font-size: 12px; }

/* ---------- weergave: home of een pagina ---------- */
.sm-cs-paneel[hidden] { display: none; }
.sm-cs-weergaven { display: inline-flex; gap: 4px; padding: 4px; margin: 0 0 12px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid var(--cs-rand); }
.sm-cs-weergave {
  font-family: var(--cs-mono); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  padding: 8px 16px; border-radius: 999px; border: 0; background: transparent; color: var(--cs-stil); cursor: pointer;
}
.sm-cs-weergave.is-actief { background: var(--cs-accent); color: #10210f; }
.sm-cs-weergave:focus-visible { outline: 2px solid var(--cs-accent); outline-offset: 2px; }

/* ---------- het vak met toen en nu ---------- */
.sm-cs-podium {
  --pos: 50%;
  position: relative; aspect-ratio: 16 / 10; border-radius: 22px; overflow: hidden; background: #111614;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05); user-select: none; -webkit-user-select: none;
  isolation: isolate;
}
/* het vak neemt de verhouding van het beeld over (gezet in de widget), dus er valt niets weg */
.sm-cs-podium[data-weergave="home"] { aspect-ratio: var(--cs-r-home, 16 / 10); }
.sm-cs-podium[data-weergave="pagina"] { aspect-ratio: var(--cs-r-pagina, 16 / 10); }
.sm-cs-paar { position: absolute; inset: 0; display: none; }
.sm-cs-podium[data-weergave="home"] .sm-cs-paar[data-paar="home"],
.sm-cs-podium[data-weergave="pagina"] .sm-cs-paar[data-paar="pagina"] { display: block; }
.sm-cs-beeld { position: absolute; inset: 0; display: block; }
.sm-cs-beeld img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; pointer-events: none; }
.sm-cs-toen { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.sm-cs-toen img { filter: grayscale(1) contrast(.92) brightness(.82); }
.sm-cs-schaduw { position: absolute; inset: auto 0 0 0; height: 58%; z-index: 1; pointer-events: none; background: linear-gradient(to top, rgba(5, 8, 7, .9) 0%, rgba(5, 8, 7, .55) 45%, rgba(5, 8, 7, 0) 100%); }
.sm-cs-streep { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #ffffff; z-index: 3; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); pointer-events: none; }
.sm-cs-greep {
  position: absolute; top: 50%; left: var(--pos); z-index: 4; width: 64px; height: 64px; margin: -32px 0 0 -32px; padding: 0;
  border-radius: 50%; border: 2px solid var(--cs-accent); background: rgba(10, 14, 12, .78); color: #ffffff;
  display: grid; place-items: center; cursor: grab; box-shadow: 0 0 0 6px rgba(210, 246, 90, .12), 0 10px 30px rgba(0, 0, 0, .35);
  touch-action: none; /* alleen het knopje sleept; de rest van het beeld scrollt gewoon */
}
.sm-cs-greep:active { cursor: grabbing; }
.sm-cs-greep svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sm-cs-greep:focus-visible { outline: 3px solid #ffffff; outline-offset: 3px; }

/* de lijn die omhoog gaat (sier, geen grafiek met data) */
.sm-cs-lijn { position: absolute; left: 0; right: 0; bottom: 0; height: 46%; width: 100%; z-index: 2; pointer-events: none; overflow: visible; }
/* geen non-scaling-stroke: dan rekent de stippellijn-truc in schermpixels en valt de lijn in streepjes uiteen */
.sm-cs-lijn path { fill: none; stroke: var(--cs-accent); stroke-width: .38; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 0; filter: drop-shadow(0 0 4px rgba(210, 246, 90, .45)); }
.sm-cs-paneel.teken .sm-cs-lijn path { animation: sm-cs-teken 1.6s cubic-bezier(.65, 0, .35, 1) both; }
@keyframes sm-cs-teken { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* labels op het beeld */
.sm-cs-chip, .sm-cs-maat {
  position: absolute; top: 22px; z-index: 3; font-family: var(--cs-mono); font-size: 12px; font-weight: 600; letter-spacing: .08em;
  padding: 8px 14px; border-radius: 999px; line-height: 1.2; pointer-events: none; max-width: calc(50% - 30px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sm-cs-chip { left: 22px; background: #ffffff; color: #0d1512; }
.sm-cs-chip i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--cs-groen); margin-right: 9px; vertical-align: 1px; }
.sm-cs-maat { right: 22px; background: rgba(10, 14, 12, .78); color: #ffffff; border: 1px solid rgba(255, 255, 255, .16); text-transform: uppercase; }
.sm-cs-maat-onder { display: none; font-family: var(--cs-mono); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--cs-zacht); margin: 10px 0 0; }
.sm-cs-kant { position: absolute; bottom: 26px; z-index: 3; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.sm-cs-kant--toen { left: 26px; align-items: flex-start; }
.sm-cs-kant--nu { right: 26px; align-items: flex-end; text-align: right; }
.sm-cs-woord {
  font-family: var(--cs-mono); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  padding: 6px 13px; border-radius: 999px; line-height: 1.2;
}
.sm-cs-kant--toen .sm-cs-woord { color: #ffffff; border: 1px solid rgba(255, 255, 255, .45); background: rgba(10, 14, 12, .45); }
.sm-cs-kant--nu .sm-cs-woord { color: #10210f; background: var(--cs-accent); }
.sm-cs-kant--nu .sm-cs-woord i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #ff5c8a; margin-right: 8px; vertical-align: 1px; }
.sm-cs-toen-label {
  display: none; font-family: "Google Sans", Inter, sans-serif; font-weight: 600; font-size: clamp(34px, 4.6vw, 64px); line-height: .95; letter-spacing: -.03em;
  color: transparent; -webkit-text-stroke: 1.5px rgba(255, 255, 255, .85);
}
.sm-cs-podium[data-weergave="home"] .sm-cs-toen-label[data-paar="home"],
.sm-cs-podium[data-weergave="pagina"] .sm-cs-toen-label[data-paar="pagina"] { display: block; }
.sm-cs-getal {
  font-family: "Google Sans", Inter, sans-serif; font-weight: 600; font-size: clamp(56px, 9.4vw, 136px); line-height: 1; letter-spacing: -.045em;
  color: var(--cs-accent); text-shadow: 0 6px 30px rgba(0, 0, 0, .35); display: block; margin-top: 4px;
}

/* ---------- wat er toen miste, wat er nu beter is (per weergave) ---------- */
.sm-cs-verschil { display: none; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin: 14px 0 0; }
.sm-cs-paneel[data-weergave="home"] .sm-cs-verschil[data-paar="home"],
.sm-cs-paneel[data-weergave="pagina"] .sm-cs-verschil[data-paar="pagina"] { display: grid; }
.sm-cs-lijst { border-radius: 18px; padding: 18px 20px 16px; border: 1px solid var(--cs-rand); background: rgba(255, 255, 255, .03); }
.sm-cs-lijst--nu { border-color: rgba(210, 246, 90, .38); background: rgba(210, 246, 90, .05); }
.sm-cs-lijst-kop { font-family: var(--cs-mono); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--cs-zacht); margin: 0 0 12px; }
.sm-cs-lijst--nu .sm-cs-lijst-kop { color: var(--cs-accent); }
.sm-cs-lijst ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sm-cs-lijst li { display: flex; gap: 11px; align-items: flex-start; font-size: 15px; line-height: 1.5; color: var(--cs-stil); }
.sm-cs-lijst--nu li { color: var(--cs-ink); }
.sm-cs-lijst li i {
  flex: 0 0 auto; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; display: grid; place-items: center;
  font-style: normal; font-family: var(--cs-mono); font-size: 14px; font-weight: 700; line-height: 1;
  background: rgba(255, 107, 107, .14); color: #ff8a8a;
}
.sm-cs-lijst--nu li i { background: var(--cs-accent); color: #10210f; }

/* ---------- tegeltjes per kanaal ---------- */
.sm-cs-tegels { display: grid; grid-template-columns: repeat(var(--cs-t, 3), minmax(0, 1fr)); gap: 12px; margin: 26px 0 0; }
.sm-cs-tegel { border-radius: 18px; padding: 18px 20px; border: 1px solid var(--cs-rand); background: rgba(255, 255, 255, .04); min-width: 0; }
.sm-cs-tegel-label { font-family: var(--cs-mono); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--cs-accent); margin: 0 0 8px; }
.sm-cs-tegel-waarde { font-family: "Google Sans", Inter, sans-serif; font-weight: 600; font-size: clamp(28px, 2.6vw, 36px); line-height: 1.05; letter-spacing: -.03em; color: var(--cs-ink); margin: 0 0 8px; }
.sm-cs-tegel-regel { font-size: 14px; line-height: 1.5; color: var(--cs-stil); margin: 0; }
/* geen los woord op de laatste regel */
.sm-cs-lijst li, .sm-cs-tegel-regel, .sm-cs-wat, .sm-cs-intro { text-wrap: pretty; }

/* ---------- onder het beeld ---------- */
.sm-cs-onder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 64px; margin: 30px 0 0; }
.sm-cs-meta { font-family: var(--cs-mono); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--cs-zacht); margin: 0 0 12px; }
.sm-cs .sm-cs-h3 { font-size: clamp(24px, 2.5vw, 34px); line-height: 1.15; letter-spacing: -.02em; font-weight: 600; color: var(--cs-ink); margin: 0; text-wrap: balance; }
.sm-cs-wat { color: var(--cs-stil); font-size: var(--sm-tekst, 16px); line-height: 1.65; margin: 0 0 18px; }
.sm-cs-rij { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.sm-cs-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.sm-cs-tags span { font-family: var(--cs-mono); font-size: 12px; font-weight: 600; letter-spacing: .04em; padding: 6px 13px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .22); color: var(--cs-ink); }

/* ---------- tablet ---------- */
@media (max-width: 1024px) {
  .sm-cs { padding: 80px 24px; }
  .sm-cs-kopblok { grid-template-columns: 1fr; align-items: start; }
  .sm-cs-intro { justify-self: start; }
  .sm-cs-pil-regel { display: none; }
}

/* ---------- telefoon: pillen klein naast elkaar, vak staand ---------- */
@media (max-width: 767px) {
  .sm-cs { padding: 64px 16px; }
  .sm-cs-kopblok { margin-bottom: 28px; gap: 16px; }
  .sm-cs-pillen { gap: 8px; }
  .sm-cs-pil { flex-direction: column; justify-content: center; gap: 7px; padding: 10px 6px 12px; border-radius: 18px; text-align: center; }
  .sm-cs-pil-beeld { width: 38px; height: 38px; }
  .sm-cs-pil-tekst { align-items: center; }
  .sm-cs-pil-naam { display: none; }
  .sm-cs-pil-getal { font-size: 12px; }
  .sm-cs-voortgang { left: 18%; right: 18%; }
  .sm-cs-weergaven { display: flex; }
  .sm-cs-weergave { flex: 1 1 0; padding: 9px 8px; }
  .sm-cs-podium { aspect-ratio: 4 / 5; border-radius: 18px; }
  .sm-cs-podium[data-weergave="home"] { aspect-ratio: var(--cs-r-home-tel, 4 / 5); }
  .sm-cs-podium[data-weergave="pagina"] { aspect-ratio: var(--cs-r-pagina-tel, 4 / 5); }
  .sm-cs-greep { width: 52px; height: 52px; margin: -26px 0 0 -26px; }
  .sm-cs-greep svg { width: 22px; height: 22px; }
  /* op de telefoon geen labels over de schermafdruk: die blijft helemaal vrij */
  .sm-cs-chip, .sm-cs-maat { display: none; }
  .sm-cs-maat-onder { display: block; }
  .sm-cs-kant { bottom: 16px; gap: 8px; }
  .sm-cs-kant--toen { left: 14px; }
  .sm-cs-kant--nu { right: 14px; }
  .sm-cs-woord { font-size: 11px; padding: 5px 10px; }
  /* op de telefoon houden cijfer, lijn en schaduw de schermafdruk zo vrij mogelijk */
  .sm-cs-toen-label { font-size: 26px; -webkit-text-stroke-width: 1.1px; }
  .sm-cs-getal { font-size: 46px; }
  .sm-cs-schaduw { height: 30%; }
  .sm-cs-lijn { height: 26%; }
  .sm-cs-lijn path { stroke-width: .6; }
  .sm-cs-kant { bottom: 12px; gap: 6px; }
  .sm-cs-onder { grid-template-columns: 1fr; gap: 14px; margin-top: 22px; }
  .sm-cs-verschil { grid-template-columns: 1fr; gap: 10px; }
  .sm-cs-lijst { padding: 16px 16px 14px; }
  .sm-cs-lijst li { font-size: 14.5px; }
  .sm-cs-tegels { grid-template-columns: 1fr; gap: 10px; margin-top: 20px; }
  .sm-cs-tegel { padding: 14px 16px; }
  .sm-cs-tegel-label { margin-bottom: 4px; }
  .sm-cs-tegel-waarde { font-size: 26px; margin: 0 0 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html:not(.sm-rustig):not(.sm-beweeg) .sm-cs-pil.is-actief.loopt .sm-cs-voortgang { animation: none; opacity: 0; }
  html:not(.sm-rustig):not(.sm-beweeg) .sm-cs-paneel.teken .sm-cs-lijn path { animation: none; }
}
