/* ==========================================================================
   SDLC: THE OUTER LOOP (#lifecycle; 12 Nov, Rohit's mock; reworked 17 Nov
   after his second mock, "Added a few elements based on some feedback calls
   with external folks", then after the user's audit the same day)
   A Sage running track of five lanes with the Unlock.ai mark and its line in
   the infield. On
   it, clockwise from the top, four stops where the mock puts its four
   labels: a mark on the middle lane (an Ember gate diamond where a person
   approves, a Sage ring for the incident) and plain text just outside the
   track: the use case's icon, the handoff that follows it, and its approval
   or what the incident becomes. Two chevrons on the curves show the way
   round. Below, the use cases (the tabs' names and order) as open columns
   split by hairlines, standing on the shared software context; each column
   and its stop light together on hover or focus (outer-loop.js). The lede
   is the mock's closing line. Markup and coordinates:
   web/explorations/outer-loop-build.py.
   The drawing's numbers live in the generator: the track (runner's lane r
   70, straights 300; 17 Nov, user: "too much empty space"), the stops, the
   leaders, and the viewBox cropped to the labels; it writes the stage's
   ratio (--view) and each label's point (--lx, --ly, % of the stage).
   Motion (from 1280px): one Sage runner laps the middle lane (16s); each
   stop lights as it passes (--at, its place round the lap): the ring fills
   Sage, a gate fills Ember and pings. Off screen it pauses (base.css);
   below 1280px and for reduced motion it holds still. Below 1024px the
   small track carries the icons only and each column ends on its handoff.
   Before, in web/versions/: outer-loop-columns (before the audit fixes),
   outer-loop-corners, outer-loop-roles, and the rounds in the archive.
   ========================================================================== */

.outer-loop { --lap: 16s; --stage: min(100%, 825px); position: relative; margin-top: 0; }   /* 825: the generator's viewBox width × 1.25px a unit (18 Nov, the mock's layout; 1100, 900, 1000, 1200 before) */

/* Stretched (26 Nov, user: Problems and Use cases run edge to edge, the loop
   didn't; "loop has to stay center only, lets try stretching"), then held
   to the shared context (user: "too stretched … based on the shared
   software context … 8px gap and that will be the max width … add a
   padding on the outside of loop so it will contain"): the context row,
   its six 24px apart (about 1188px; user: "use 24px gap", 8 for an hour),
   is the widest the section goes, and the loop sits inside it from 1280
   up, its outer labels 48px in from the row's ends (user: "try 48"; a
   1137px stage). The generator draws one track per screen width, only the
   straights growing (300 units below 1280, 550 from 1280), the curves, lanes and height the
   same, so the drawing keeps 1.25px a unit and its words their size. Each
   width's stage, ratio, lap (the runner keeps its speed), label points
   (--lx, --at) and use-case points (--cx) come inline as --name-<width>;
   these rules pick the set for the screen. (Straights to 860, 1525px, for
   an hour before: too stretched; then inside a 64px-gap row.) Before:
   web/versions/outer-loop-before-stretch/. */
.outer-loop { --stage: min(100%, var(--stage-1024)); --lap: var(--lap-1024); }
.outer-loop__map, .outer-loop__cases { --view: var(--view-1024); }
.outer-loop__station-label { --lx: var(--lx-1024); --at: var(--at-1024); }
.outer-loop__case { --cx: var(--cx-1024); }
.outer-loop__track--1280, .outer-loop__track--1440 { display: none; }
@media (min-width: 1280px) {
  .outer-loop { --stage: min(100%, var(--stage-1280)); --lap: var(--lap-1280); }
  .outer-loop__map, .outer-loop__cases { --view: var(--view-1280); }
  .outer-loop__station-label { --lx: var(--lx-1280); --at: var(--at-1280); }
  .outer-loop__case { --cx: var(--cx-1280); }
  .outer-loop__track--1024 { display: none; }
  .outer-loop__track--1280 { display: block; }
}
/* No 1440 track since 28 Nov (user: the loop as wide as the context block,
   895px from 1280 up, so one track serves both; outer-loop-build.py). */

/* ---- the stage: the track, centred */
.outer-loop__map {
  position: relative; isolation: isolate;
  width: var(--stage); aspect-ratio: var(--view, 820 / 296);   /* the viewBox's, written by the generator */
  margin-inline: auto;
}
.outer-loop__track { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }   /* its viewBox is the stage */
.outer-loop__band { fill: color-mix(in srgb, var(--accent-text) 6%, transparent); }
.outer-loop__lane { fill: none; stroke: color-mix(in srgb, var(--accent-text) 26%, transparent); stroke-width: 1; vector-effect: non-scaling-stroke; }
.outer-loop__lane--edge { stroke: color-mix(in srgb, var(--accent-text) 75%, transparent); stroke-width: 1.5; }
/* The way round on the small track (below 1024px): two still chevrons on
   the middle lane, heading down on the right and up on the left. On the big
   track the labels carry the mock's own arrows instead (18 Nov). */
.outer-loop__chevron {
  fill: none; stroke: color-mix(in srgb, var(--accent-text) 80%, transparent); stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke;
}

/* The glow (12 Nov, user: "add gradient"): two soft Sage B900 fields, now
   centred on the track itself rather than on the band, so they follow the
   drawing at every width (17 Nov, after the audit: at 62% of the band they
   lit the columns, 175px below the track at 1440 and 640px on phones). The
   band clips them, so its edges stay plain teal and the steps to Problems
   and Use cases still carry the joins. Before: web/versions/before-loop-gradient/. */
.outer-loop__map::before {
  content: ""; position: absolute; inset: -80% -30%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(29% 31% at 50% 50%, color-mix(in srgb, var(--sage-ink) 30%, transparent), transparent 100%),
    radial-gradient(52% 50% at 50% 50%, color-mix(in srgb, var(--sage-ink) 22%, transparent), transparent 100%);
}
.sdlc-section { overflow: clip; }

/* The ticks (18 Nov, the mock's): a hairline from each use case's panel to
   the track, where a curve meets a straight. */
.outer-loop__tick { fill: none; stroke: color-mix(in srgb, var(--heading) 24%, transparent); stroke-width: 1; vector-effect: non-scaling-stroke; }

/* One runner, Sage (17 Nov, user, after the audit: with the approvals as
   Ember gates, an Ember runner made Ember mean two things; the work moving
   is Sage's job, and each gate still fills Ember as the runner reaches it,
   so Ember marks only the people. The Ember runner, 12 Nov to 17 Nov:
   web/versions/outer-loop-columns/). A comet on the middle lane after
   sv-animations' Animated Beam: a crisp trail 9% of the lap long that fades
   in from nothing, a short solid core and a pale tip (Sage into the heading
   colour), blurred together so the front is one piece; no glow. The trail
   is 36 overlapping dashes, all ending on the tip; butt caps so no dash
   start shows as a bead. Each dash ends its 100-unit pattern, so one
   keyframe moves them all. It keeps a scaling stroke: a non-scaling one
   draws its dashes in screen space and split the comet in two. */
.outer-loop__beam {
  fill: none; stroke: var(--accent-text); stroke-linecap: round;
  animation: outer-loop-beam var(--lap) linear infinite;
}
.outer-loop__beam--tail { stroke-width: 2; stroke-linecap: butt; opacity: 0.09; }
.outer-loop__beam--core { stroke-width: 2.5; }
.outer-loop__beam--head { stroke-width: 2; stroke: color-mix(in srgb, var(--accent-text) 50%, var(--heading)); }
@keyframes outer-loop-beam { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -100; } }
.outer-loop__beams { transition: opacity 600ms var(--motion-ease) 400ms; }
.outer-loop.is-armed:not(.is-in) .outer-loop__beams { opacity: 0; }

/* ---- the infield: the Unlock.ai mark alone, no wordmark, over its line
   (17 Nov, user: "show logo only, no wordmark, bring back the below text").
   The track grew to r 84 the same day so the mark and its line breathe. */
.outer-loop__centre {
  position: absolute; left: 50%; top: 50%; width: 50%;
  transform: translate(-50%, -50%);
  display: grid; justify-items: center;
  text-align: center;
}
.outer-loop__mark { width: 40px; height: 40px; color: var(--heading); --logo-in: var(--mint-green); }
.outer-loop__tagline { margin: var(--space-3) 0 0; font-size: 14px; line-height: 1.5; color: var(--ink); white-space: nowrap; }   /* two lines, as the mock breaks it */

/* ---- the labels, on the track as the mock sets them (18 Nov, user: "4
   labels are on the track"; at the ends of leaders before,
   web/versions/outer-loop-corner-panels/): each centred on its stop, the
   handoff line's middle on the middle lane, the lanes cut away under both
   lines (the generator's mask), so the runner passes under it. The handoff
   at 16 weight 500 in the heading colour with the mock's marks in it — the
   gate diamond (Ember outline) where the approval falls and the arrow for
   the way round (muted) — then the approval or "Next request" at 14 in the
   body colour. */
.outer-loop__stations { position: absolute; inset: 0; pointer-events: none; }
.outer-loop__station-label {
  position: absolute; left: var(--lx); top: var(--ly); translate: -50% -12px;
  display: grid; justify-items: center; gap: var(--space-1);
  white-space: nowrap; text-align: center; pointer-events: auto;
}
.outer-loop__station-label :where(p) { margin: 0; }
.outer-loop__station-label .outer-loop__handoff { flex-wrap: nowrap; justify-content: center; gap: 0 var(--space-2); font-size: 16px; }
.outer-loop__station-label .outer-loop__arrow { width: 16px; height: 16px; }
.outer-loop__station-label .outer-loop__gate-mark { margin: 0 2px; }
.outer-loop__station-gate { font-size: 14px; line-height: 1.5; color: var(--ink); }

/* ---- the caption under the drawing: the mock's closing line (17 Nov,
   user: "not lede friendly", so out of the heading). Off the homepage since
   26 Nov (Rohit: "it raises more questions than it answers"); kept for the
   outer-loop sketches that still carry it. Its first sentence in
   the heading colour, the rest in the body colour; centred under the
   drawing from 1280px, left-aligned below with the rest. */
.outer-loop__caption {
  max-width: none; margin: var(--space-7) 0 0;   /* 48 under the drawing (32 for part of 17 Nov: too tight, user) */
  font-size: 14px; line-height: 1.5; color: var(--ink); text-align: center; text-wrap: balance;   /* 14px (17 Nov, user; 16 before) */
}
.outer-loop__caption span { color: var(--heading); font-weight: 500; }

/* ---- the use cases: open columns, no dividers (17 Nov, user), in the
   tabs' names and order, over the context's top rule */
.outer-loop__cases {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 var(--space-6);   /* open, no dividers (17 Nov, user) */
  margin: var(--space-7) 0 0; padding: 0; list-style: none;   /* 48 under the caption, so it stands on its own (32 for part of 17 Nov) */
}
.outer-loop__case {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 0 0 var(--space-5);   /* 24 over the context (48 before) */
}
.outer-loop__case :where(p, ul, h3) { margin: 0; }
/* The name (icon, name, arrow: a link to its tab; the tabs' size, Inter 16
   with a 20px icon) and the teams under it, one per line as the mock lists
   them (17 Nov, after the audit: on one line they broke mid-list), in the
   quiet colour. What Unlock does there is told in Use cases below. */
.outer-loop__case-head { display: flex; align-items: center; gap: var(--space-3); }
.outer-loop__case-icon { flex: none; display: grid; place-items: center; }
.outer-loop__case-icon .icon { width: 20px; height: 20px; color: var(--heading); transition: color var(--motion-colour, 200ms) var(--motion-ease); }
.outer-loop__case-title { font: 500 var(--size-body)/1.3 var(--font-body); letter-spacing: 0; text-wrap: balance; }
.outer-loop__case-title { transition: color var(--motion-colour, 200ms) var(--motion-ease); }
/* The name links to its use case's tab further down (18 Nov, user: back,
   without the arrow): no underline, Sage on hover, a focus ring for keys. */
.outer-loop__case-title a { color: inherit; text-decoration: none; transition: color var(--motion-colour, 200ms) var(--motion-ease); }
.outer-loop__case-title a:hover { color: var(--accent-text); }
.outer-loop__case-title a:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 4px; border-radius: 2px; }
.outer-loop__people {
  display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-1);   /* side by side, 4px apart (18 Nov, user: one a line took too much height) */
  margin-top: var(--space-3); padding: 0; list-style: none;
}
/* The teams as tags (18 Nov, user: "show the roles as pills tags"; pills
   are off the brand, so a box with 6px corners and a 1px line): Inter 12 in
   the quiet colour, so two fit side by side (DM Mono uppercase, the Label
   style, for part of the day: one a line, too tall, user). */
.outer-loop__people li {
  padding: 0 var(--space-2); border: var(--border-w, 1px) solid color-mix(in srgb, var(--heading) 14%, transparent); border-radius: var(--r-box, 6px);
  font-size: 12px; line-height: 24px; white-space: nowrap;   /* 12 (18 Nov, user; 14 before) */
  color: color-mix(in oklab, var(--heading) 60%, var(--ground));   /* the .h-quiet mix */
}

/* Below 1024px each column ends on its handoff, in line with the name. */
.outer-loop__next { display: none; padding: var(--space-3) 0 0; }   /* from the left edge, with the tags and line (18 Nov, user; 32px in line with the name before) */
.outer-loop__handoff { display: flex; align-items: center; flex-wrap: wrap; gap: 0 6px; font-size: 14px; font-weight: 500; line-height: 1.5; color: var(--heading); }
.outer-loop__arrow { width: 14px; height: 14px; color: var(--ink-muted); }
.outer-loop__gate { display: flex; align-items: flex-start; gap: var(--space-2); margin-top: var(--space-1); font-size: 14px; line-height: 1.5; color: var(--ink); }
.outer-loop__gate-mark { flex: none; width: 8px; height: 8px; margin: 7px 2px 0; border: 1.5px solid var(--accent); border-radius: 2px; rotate: 45deg; }
.outer-loop__turn-mark { flex: none; width: 14px; height: 14px; margin-top: 3.5px; color: var(--ink-muted); }

/* ---- LINK: a use case and its label light together (outer-loop.js sets
   data-active on hover or focus): the use case's name, icon and arrow and
   the label's handoff turn Sage, the label's gate diamond fills Ember.
   Nothing else dims (18 Nov, user: the hover focus wasn't good; the panels'
   places and ticks pair them now, the hover only confirms it). */
.outer-loop__case.is-active .outer-loop__case-title,
.outer-loop__case.is-active .outer-loop__case-icon .icon,
.outer-loop__station-label.is-active .outer-loop__handoff { color: var(--accent-text); }
.outer-loop__station-label.is-active .outer-loop__gate-mark { animation: none; background: var(--accent); }
.outer-loop__station-label .outer-loop__handoff { transition: color var(--motion-colour, 200ms) var(--motion-ease); }

/* ---- under the columns: the shared software context — Rohit's band, our
   spin (19 Nov, user: "dont match exactly, add our better spin on it"; the
   mock's plain two centred lines with dots for part of the day, a ticker
   from 17 Nov): between two hairlines, the label set into a gap cut in the
   top one (after oxide.computer), the six items as a 3 x 2 grid whose
   columns line up — your software over your process — each after its
   Phosphor icon (16px, muted) at 14 in the heading colour. Below 768px one
   column, still centred as a block. */
/* No hairlines (19 Nov, user: "remove the horizontal lines"; the label sat
   in a gap in the top one for part of the day): the label centred over the
   grid. */
.outer-loop__context { display: grid; gap: var(--space-5); width: max-content; max-width: 100%; margin-inline: auto; }   /* as wide as its grid, centred; open at the foot (26 Nov, user: the closing hairline 24px under the grid, from 19 Nov, removed) */
@media (max-width: 1023px) { .outer-loop__context { margin-top: var(--space-6); } }   /* 32 under the columns, now that no rule parts them */
/* Two groups (26 Nov, later, Rohit: "the last three are not software
   context, so one title over all six is wrong"): Shared software context
   over code, architecture and the tickets-to-observability item; Your
   delivery process over the playbooks, checks and approval owners.
   As tags, key and values (26 Nov, later, user: the joined rule "looks
   uneven, can you show them like pills? or something in line with
   developer something"; pills are off the brand, so the site's tag, a size
   up): each group one row, its label in a muted DM Mono column at the left,
   its three as tags — Inter 14 in the heading colour after the 16px muted
   icon, 32px tall, 12px side padding, a 1px line at heading 14%, a 4% fill,
   6px corners (the Platform layer cards' make) — 8px apart. The two rows
   start on one line, so neither centres over the other's width; the block
   centred under the loop (no longer the section's widest: the loop keeps
   its straights). Below 1280 each label over its tags. Before: one rule
   broken by the labels with a divider (web/versions/outer-loop-context-rule/),
   and each label between its own hairlines
   (web/versions/outer-loop-context-titles/). */
.outer-loop__context { grid-template-columns: max-content minmax(0, max-content); justify-content: center; align-items: center; gap: var(--space-3) var(--space-5); }
.outer-loop__context-group { display: contents; }
.outer-loop__context-title { margin: 0; color: var(--ink-muted); white-space: nowrap; }
.outer-loop__context-list { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.outer-loop__context-list li {
  display: inline-flex; align-items: center; gap: var(--space-2); height: 32px; padding: 0 var(--space-3);
  border: var(--border-w, 1px) solid color-mix(in srgb, var(--heading) 14%, transparent); border-radius: var(--r-box, 6px);
  background: color-mix(in srgb, var(--heading) 4%, transparent);
  font-size: 14px; line-height: 1; color: var(--heading); white-space: nowrap;
}
.outer-loop__context-list .icon { flex: none; width: 16px; height: 16px; color: var(--ink-muted); }
@media (max-width: 1279px) {   /* the key over its tags (at 1024 the first row ran 7px past the content width) */
  .outer-loop__context { grid-template-columns: minmax(0, max-content); row-gap: var(--space-5); }
  .outer-loop__context-group { display: grid; gap: var(--space-3); }
}
@media (max-width: 767px) {
  .outer-loop__context { grid-template-columns: minmax(0, 1fr); width: auto; justify-content: stretch; row-gap: var(--space-6); }
  .outer-loop__context-list li { white-space: normal; height: auto; min-height: 32px; padding-block: var(--space-1); line-height: 1.35; }
}

/* ---- motion */
.outer-loop__case { transition: opacity 500ms var(--motion-ease) calc(var(--i) * 90ms); }
.outer-loop.is-armed:not(.is-in) .outer-loop__case { opacity: 0; }

/* Each gate on its turn (--at): as the runner passes under a label, its
   diamond fills Ember. */
.outer-loop__station-label .outer-loop__gate-mark {
  animation: outer-loop-gate var(--lap) linear infinite; animation-delay: calc((var(--at) - 1) * var(--lap));
}
@keyframes outer-loop-gate {
  0%, 9%    { background: var(--accent); }
  16%, 100% { background: transparent; }
}
/* The use cases' icons no longer act out their jobs (17 Nov, after the
   audit: at 16px nobody saw it); the runner and the stops carry the motion.
   The acting icons: web/versions/outer-loop-columns/. */

@media (prefers-reduced-motion: reduce) {
  .outer-loop__beams { display: none; }
  .outer-loop__station-label .outer-loop__gate-mark { animation: none; }
  .outer-loop__case { transition: none; }
  .outer-loop.is-armed:not(.is-in) .outer-loop__case { opacity: 1; }
}

/* ---- below 1280px: still (13 Nov, user: "fine with things being static").
   Columns two per row below 1200px (where they show, under 1024). */
@media (max-width: 1279px) {
  .outer-loop__beams { display: none; }
  .outer-loop__station-label .outer-loop__gate-mark { animation: none; }
  .outer-loop__mark { width: 32px; height: 32px; }
  .outer-loop__tagline { margin-top: var(--space-2); font-size: 14px; line-height: 1.4; }
}
@media (max-width: 1199px) {
  .outer-loop__cases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Below 1024px, and on phones, the small still drawing (13 Nov, user: "use
   only the unlock logo, not word and the loop track can be modified to be
   more mobile layout fitted"): a rounder slim track drawn at 340 × 210 (up
   to 400px wide), the four use cases' icons in tiles on its middle lane,
   the chevrons, and the mark and its line in the infield. The labels don't
   fit at this size, so each column ends on its handoff, in line with the
   name. On phones the columns stack, split by hairlines. */
.outer-loop__mini { display: none; }
@media (max-width: 1023px) {
  .outer-loop { --stage: 100%; }
  .outer-loop__map { aspect-ratio: auto; }
  .outer-loop__track, .outer-loop__stations, .outer-loop__centre { display: none; }
  .outer-loop__mini { display: block; position: relative; width: 100%; max-width: 400px; aspect-ratio: 340 / 210; }
  .outer-loop__mini-track { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
  .outer-loop__mini-centre {
    position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 72%;
    display: grid; justify-items: center; text-align: center;
  }
  .outer-loop__mini-mark { width: 32px; height: 32px; color: var(--heading); --logo-in: var(--mint-green); }
  .outer-loop__mini-centre .outer-loop__tagline { margin-top: var(--space-2); font-size: 12px; line-height: 1.4; white-space: normal; text-wrap: balance; }
  .outer-loop__mini-centre .outer-loop__break { display: none; }
  .outer-loop__chip {
    position: absolute; left: calc(var(--x) / 340 * 100%); top: calc(var(--y) / 210 * 100%); translate: -50% -50%;
    display: grid; place-items: center; width: 32px; height: 32px; box-sizing: border-box;
    border: var(--border-w, 1px) solid color-mix(in srgb, var(--heading) 16%, var(--ground)); border-radius: var(--r-box, 6px);
    background: color-mix(in srgb, var(--heading) 8%, var(--ground));
  }
  .outer-loop__chip .icon { width: 16px; height: 16px; color: var(--heading); }
  .outer-loop__next { display: block; }
  /* the caption stays centred under the centred context band (19 Nov; left-aligned before) */
}
@media (max-width: 639px) {
  .outer-loop__cases { grid-template-columns: minmax(0, 1fr); }
  .outer-loop__case { padding: 0 0 var(--space-6); }
}

/* ---- phones, tap to open (17 Nov, user: "any better option for mobile?"):
   each use case one row (icon, name, a caret at the right) between
   hairlines; a tap anywhere on the row opens its teams and handoff under it
   and closes the one open before; the first starts open (outer-loop.js sets
   .has-toggles and .is-open). Its name opens the row there rather than
   jumping to the tab. Without the script every row stays open. */
.outer-loop__case-body { align-self: stretch; display: grid; grid-template-rows: 1fr; }
.outer-loop__case-inner { min-height: 0; overflow: hidden; }
.outer-loop__case-toggle { display: none; }
@media (max-width: 639px) {
  .outer-loop.has-toggles .outer-loop__cases { margin-top: var(--space-6); }
  .outer-loop.has-toggles .outer-loop__case { padding: 0; border-top: var(--border-w, 1px) solid var(--line); }
  .outer-loop.has-toggles .outer-loop__case:last-child { border-bottom: var(--border-w, 1px) solid var(--line); }   /* the last row closes on its own hairline (the context's top rule did, until 19 Nov) */
  .outer-loop.has-toggles .outer-loop__case-head { position: relative; align-self: stretch; min-height: 56px; padding-right: 44px; }
  .outer-loop.has-toggles .outer-loop__case-toggle {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end;
    padding: 0; border: 0; background: none; color: var(--ink-muted); cursor: pointer;
  }
  .outer-loop.has-toggles .outer-loop__case-toggle:focus-visible { outline: 2px solid var(--accent-text); outline-offset: -2px; border-radius: var(--r-box, 6px); }
  .outer-loop.has-toggles .outer-loop__case-toggle .icon { width: 20px; height: 20px; transition: rotate var(--motion-colour, 200ms) var(--motion-ease), color var(--motion-colour, 200ms) var(--motion-ease); }
  .outer-loop.has-toggles .outer-loop__case.is-open .outer-loop__case-toggle .icon { rotate: 180deg; color: var(--accent-text); }
  .outer-loop.has-toggles .outer-loop__case-body { grid-template-rows: 0fr; transition: grid-template-rows var(--motion-colour, 200ms) var(--motion-ease); }
  .outer-loop.has-toggles .outer-loop__case.is-open .outer-loop__case-body { grid-template-rows: 1fr; }
  .outer-loop.has-toggles .outer-loop__case-inner { padding-bottom: 0; transition: padding var(--motion-colour, 200ms) var(--motion-ease); }
  .outer-loop.has-toggles .outer-loop__case.is-open .outer-loop__case-inner { padding-bottom: var(--space-5); }
  .outer-loop.has-toggles .outer-loop__people { margin-top: 0; }
}
@media (max-width: 639px) and (prefers-reduced-motion: reduce) {
  .outer-loop.has-toggles .outer-loop__case-body, .outer-loop.has-toggles .outer-loop__case-inner, .outer-loop.has-toggles .outer-loop__case-toggle .icon { transition: none; }
}

/* The section's heading, centred over the track (12 Nov, user). This
   section only, and from 1024px, where the drawing is centred (18 Nov; from
   1280 before); below that it runs left-aligned with the rest. */
@media (min-width: 1024px) {
  .sdlc-section .section-head { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: var(--space-4); text-align: center; }
  .sdlc-section .section-head .eyebrow { justify-content: center; }
}
/* The line under the heading (24 Nov, Rohit): "end to end" and
   "human-in-the-loop" never break inside; centred, it balances its two lines, and below 1024 no
   word is left alone on the last line. */
/* Trying a split head (26 Nov, user: "can we try left right layout for
   this"): from 1280px the homepage's own section head — the heading left,
   the line right, sharing a top line (index.html, 6 Oct) — held to the
   shared context row's
   width (about 1188px, outer-loop__context-list at 24px gaps) and centred,
   so the head, the loop and the row share their edges. Not used (user:
   "nah not working, revert"): the head stays centred as above; the class
   sdlc-section--head-split on the section brings it back. */
@media (min-width: 1280px) {
  .sdlc-section--head-split .section-head {
    grid-template-columns: auto minmax(0, 1fr); justify-items: stretch; gap: clamp(32px, 5vw, 80px);   /* the heading at its own two lines (at half width it broke Rohit's first line in three), the line taking the rest */
    max-width: 1188px; margin-inline: auto; text-align: left;
  }
  .sdlc-section--head-split .section-head .eyebrow { justify-content: flex-start; }
  .sdlc-section--head-split .section-head p { text-wrap: pretty; }
}
.sdlc-section__term { white-space: nowrap; }
.sdlc-section .section-head p { text-wrap: pretty; }   /* below 1024: no last word alone */
@media (min-width: 1024px) { .sdlc-section .section-head p { text-wrap: balance; } }

/* ---- the use cases outside the loop, as the mock sets them (18 Nov,
   Rohit: "We needed to have the team names around the loop"; user: "their
   teams sit outside of loop and 4 labels are on the track"): wherever the
   big drawing shows (from 1024px) the list lies over the stage, the same
   box as the map, and each use case — name and teams — sits on a quiet
   panel, Specs and Verification above the loop, Support and Release
   readiness below, each centred over the point where a curve meets a
   straight (--cx, --cy from the generator), a hairline tick (in the SVG)
   joining it to the track. All four panels one size: 256px wide, at least
   98px tall; heading 3% over the teal, fill not line, 6px corners, 12 ×
   16px padding. (Two more ticks ran from the bottom pair down into the
   context's rule for part of 18 Nov; user: they read as overshooting.)
   Below 1024px the columns stay under the drawing.
   Before: web/versions/outer-loop-below/ (a row of columns),
   web/versions/outer-loop-corner-panels/ (panels by the curves). */
@media (min-width: 1024px) {
  .outer-loop__cases {
    position: absolute; top: 0; left: 50%; translate: -50% 0; z-index: 1;
    display: block; width: var(--stage); aspect-ratio: var(--view, 820 / 296); margin: 0;
    pointer-events: none;
  }
  .outer-loop__case {
    position: absolute; left: var(--cx); translate: -50% 0;
    box-sizing: border-box; width: max-content;   /* as wide as its name and tags (18 Nov, user; 352px for the descriptions before) */
    padding: 0;   /* open, no box (18 Nov, user: border and padding off; a fill, a colour field and a line were tried the same day) */
    pointer-events: auto;
    transition: opacity 500ms var(--motion-ease) calc(var(--i) * 90ms);
    align-items: center;   /* name and tags centred on each other, and on the tick (26 Nov, user; tags from the name's left edge before) */
  }
  .outer-loop__people { justify-content: center; }
  .outer-loop__case--top    { bottom: calc(100% - var(--cy)); }
  .outer-loop__case--bottom { top: var(--cy); }
  .outer-loop__context { margin-top: var(--space-7); }
}

/* The heading in two lines (19 Nov, user): Rohit's sentence breaks after
   its comma from 768px; phones wrap it as it falls. */
@media (min-width: 768px) {
  .sdlc-section__title-line { display: block; }
}
