.story-block {
  --story-ink: var(--brand-blue, #122f64);
  --story-accent: var(--brand-orange, #ec781d);
  --story-muted: #46566a;
  --story-line: #d4dce3;
  margin-block: clamp(2.5rem, 5vw, 4.5rem);
  color: var(--story-ink);
}
.story-block__header { max-width: 52rem; margin-bottom: 1.25rem; }
.story-block .story-block__header h3 {
  margin: 0 0 .55rem;
  font-size: clamp(1.5rem, 2.3vw, 2rem);
  line-height: 1.15;
  letter-spacing: -.035em;
}
.story-block p, .story-block dd { color: var(--story-muted); line-height: 1.6; }
.story-block .story-block__header p { margin: 0; }
.story-visually-hidden, .story-compare__radio {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.story-compare { margin: 0; padding: 0; min-width: 0; border: 0; }
.story-compare__switch {
  display: inline-block;
  padding: .72rem 1rem;
  border: 1px solid var(--story-ink);
  color: var(--story-ink); background: white;
  font-weight: 700; font-size: .9rem; cursor: pointer;
  transition: background .16s, color .16s;
}
.story-compare__radio:checked + .story-compare__switch { color: white; background: var(--story-ink); }
.story-compare__radio:focus-visible + .story-compare__switch,
.story-disclosure summary:focus-visible { outline: 3px solid #a95010; outline-offset: 3px; }
.story-compare__panel { display: none; }
#capability-before:checked ~ .story-compare__panel--before,
#capability-after:checked ~ .story-compare__panel--after { display: block; }
.story-comparison-list, .story-measurement {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.2rem, 3vw, 2.4rem);
  margin: 1.4rem 0 0;
}
.story-comparison-list > div, .story-measurement > div { border-top: 2px solid var(--story-ink); padding-top: .95rem; }
.story-compare__panel--after .story-comparison-list > div { border-top-color: var(--story-accent); }
.story-comparison-list dt, .story-measurement dt { font-weight: 700; font-size: 1.05rem; line-height: 1.35; }
.story-measurement dt span { display: block; font-size: .84rem; font-weight: 500; margin-top: .2rem; }
.story-block dd { margin: .55rem 0 0; font-size: .96rem; }
.story-benefits { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 6%; }
.story-benefits__list, .story-journey__steps { border-top: 1px solid var(--story-line); }
.story-disclosure { border-bottom: 1px solid var(--story-line); }
.story-block .story-disclosure summary {
  display: flex; align-items: center; gap: 1rem; list-style: none; cursor: pointer;
  color: var(--story-ink); font-size: 1.04rem; font-weight: 650;
  padding: .9rem .15rem; min-height: 3rem; border: 0;
}
.story-disclosure summary::-webkit-details-marker { display: none; }
.story-disclosure summary::after {
  content: ''; width: .53rem; height: .53rem; flex: 0 0 auto;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  margin-left: auto; margin-right: .3rem; transform: rotate(45deg); transition: transform .18s;
}
.story-disclosure[open] > summary::after { transform: rotate(225deg); }
.story-disclosure summary:hover { text-decoration: underline; text-underline-offset: .22em; }
.story-disclosure__body { padding: 0 1.1rem 1.05rem .15rem; }
.story-block .story-disclosure__body p { margin: 0 0 .6rem; }
.story-block .story-disclosure__body p:last-child { margin-bottom: 0; }
.story-disclosure__body strong { color: var(--story-ink); }
.story-journey { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 6%; }
.story-journey__steps { list-style: none; padding: 0; margin: 0; }
.story-journey__index { font: 500 .78rem/1 ui-monospace, monospace; color: #536371; letter-spacing: .04em; }
.story-journey .story-disclosure[open] > summary { box-shadow: inset 3px 0 var(--story-accent); padding-left: .8rem; }
.story-journey .story-disclosure__body { padding-left: 2.45rem; }
@media(prefers-reduced-motion: no-preference) {
  .story-compare__panel, .story-disclosure[open] > .story-disclosure__body { animation: story-enter .25s ease-out both; }
  .programme-reveal { animation: story-section-enter .45s ease-out both; }
  @keyframes story-enter { from { opacity: .4; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes story-section-enter { from { opacity: .72; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
}
@media(prefers-reduced-motion: reduce) {
  .story-block *, .programme-reveal { animation: none !important; transition: none !important; }
}
@media(max-width: 720px) {
  .story-benefits, .story-journey, .story-comparison-list, .story-measurement { grid-template-columns: 1fr; }
  .story-benefits, .story-journey { gap: 0; }
  .story-comparison-list, .story-measurement { gap: 1.1rem; }
  .story-compare__switch { padding-inline: .65rem; font-size: .84rem; }
}
@media(max-width: 420px) {
  .story-compare__switch span { display: block; font-size: .75rem; font-weight: 500; }
}

/* Connected stages retain native keyboard-operated disclosure controls. */
.timeline-marker {
  display: inline-grid; place-items: center;
  width: 46px; height: 46px; flex: none; position: relative;
  border: 2px solid var(--brand-blue); border-radius: 50%;
  background: white; color: var(--brand-blue);
}
.timeline-marker .programme-symbol { width: 24px; height: 24px; }
.programme-symbol { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.story-journey details[open] .timeline-marker { background: var(--brand-blue); color: white; box-shadow: 0 0 0 3px #ffe1c9; border-color: var(--brand-orange); }
.story-journey .story-disclosure[open] > summary { padding-left: .15rem; box-shadow: none; }
.story-journey__steps { border-top: 0; }
.story-journey__steps li { position: relative; }
.story-journey__steps li:not(:last-child)::before { content: ''; position: absolute; left: 24px; top: 36px; bottom: -36px; width: 2px; background: #aac3d1; }
.story-journey .story-disclosure__body { padding-left: 4rem; }
.story-measurement > div { background: var(--soft); padding: 20px; border-top: 3px solid var(--brand-blue); }
.story-measurement .programme-symbol, .story-measurement .impact-goal { display: block; margin: 0 0 15px; }
.story-measurement .impact-goal { width: 56px; height: 56px; object-fit: contain; }
@media(min-width:1100px) {
  .story-journey { display: block; }
  .story-journey__steps { display: grid; grid-template-columns: repeat(9,minmax(0,1fr)); container-type: inline-size; }
  .story-journey__steps li { min-width: 0; }
  .story-journey__steps li:not(:last-child)::before { left: 50%; top: 30px; bottom: auto; height: 2px; width: 100%; }
  .story-journey .story-disclosure { border: 0; }
  .story-journey .story-disclosure > summary {
    flex-direction: column; justify-content: flex-start; align-items: center;
    gap: 5px; padding: 7px 4px 0; min-height: 120px;
    text-align: center; font-size: .88rem; line-height: 1.26;
  }
  .story-journey .story-disclosure > summary::after { display: none; }
  .story-journey__index { margin-top: 4px; color: var(--brand-blue); }
  .story-journey .story-disclosure__body {
    width: 100cqw; margin-inline-start: calc(-100% * var(--stage-index,0));
    padding: 20px 24px; border-left: 3px solid var(--brand-orange); background: var(--soft);
  }
  .story-journey__steps li:nth-child(2) { --stage-index: 1; }
  .story-journey__steps li:nth-child(3) { --stage-index: 2; }
  .story-journey__steps li:nth-child(4) { --stage-index: 3; }
  .story-journey__steps li:nth-child(5) { --stage-index: 4; }
  .story-journey__steps li:nth-child(6) { --stage-index: 5; }
  .story-journey__steps li:nth-child(7) { --stage-index: 6; }
  .story-journey__steps li:nth-child(8) { --stage-index: 7; }
  .story-journey__steps li:nth-child(9) { --stage-index: 8; }
}

/* Matched viewpoints keep the equipment comparison legible at either size. */
.capability-figure { margin: 0; min-width: 0; align-self: start; background: white; border: 1px solid var(--story-line); }
.capability-figure img { display: block; width: 100%; height: auto; }
.capability-figure figcaption { padding: .75rem 1rem; border-top: 1px solid var(--story-line); font-size: .875rem; color: var(--brand-blue); }
.story-compare__panel .story-comparison-list { margin: 0; grid-template-columns: 1fr; gap: 1rem; }
#capability-before:checked ~ .story-compare__panel--before,
#capability-after:checked ~ .story-compare__panel--after { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: center; gap: clamp(1rem, 3vw, 3rem); margin-top: 1.5rem; }
@media (max-width: 700px) {
  #capability-before:checked ~ .story-compare__panel--before,
  #capability-after:checked ~ .story-compare__panel--after { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: no-preference) {
  .programme-reveal .section-kicker::before { transform-origin: left; animation: programme-rule-in .42s ease-out both; }
  @keyframes programme-rule-in { from { transform: scaleX(.2); } to { transform: scaleX(1); } }
  .capability-figure img { animation: equipment-arrive .32s ease-out; }
  @keyframes equipment-arrive { from { opacity: .68; } to { opacity: 1; } }
  .story-compare__switch, .institution summary, .story-disclosure summary { transition: background-color .18s ease, color .18s ease; }
  .story-compare__switch:active, .category-filter button:active { translate: 0 1px; }
  .button:focus-visible, .button:active { box-shadow: 0 3px 0 var(--deep-blue); }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .hero__photograph img { transition: transform .48s ease-out; }
  .hero__photograph:hover img { transform: scale(1.025); }
  .category-list .glyph, .story-measurement dt > :first-child { transition: transform .22s ease-out; }
  .category-list .card:hover .glyph, .story-measurement > div:hover dt > :first-child { transform: translateY(-3px); }
  .institution summary:hover, .story-benefits__list summary:hover { background-color: #ebf3f7; }
  .package { position: relative; }
  .package::before { content: ""; position: absolute; inset: -2px 0 auto; height: 2px; background: var(--brand-blue); transform: scaleX(0); transform-origin: left; transition: transform .24s ease-out; }
  .package:hover::before { transform: scaleX(1); }
  .story-journey__steps summary svg { transition: transform .18s ease; }
  .story-journey__steps summary:hover svg { transform: translateY(-2px); }
  .contact__email { transition: text-underline-offset .2s ease; }
  .contact__email:hover { text-underline-offset: .35em; }
}
