.oss-story-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px clamp(32px, 7vw, 104px);
  border-top: 1px solid var(--case-border);
  padding-top: 24px;
}
.oss-story-head .eyebrow { grid-column: 1 / -1; margin: 0; color: #466271; }
.oss-story-head h3 { margin: 0; font-size: clamp(26px, 3vw, 40px); line-height: 1.16; font-weight: 400; letter-spacing: -.035em; text-wrap: balance; }
.oss-story-head > p:last-child { margin: 0; color: var(--case-muted); line-height: 1.65; max-width: 60ch; }
.oss-work .oss-story-head:not(:first-of-type) { margin-top: clamp(52px, 7vw, 100px); }
.oss-figure { min-width: 0; margin: 0; }
.oss-work > .oss-figure { max-width: 920px; margin: clamp(24px, 4vw, 48px) auto 0; }
.oss-display {
  padding: 3px; border: 1px solid #acb6bb; border-radius: 9px;
  background: #30373a; overflow: hidden; box-shadow: 0 5px 16px #172d3912;
}
.oss-display img { display: block; width: 100%; height: auto; border-radius: 5px; }
.oss-figure figcaption { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 10px; font-size: 14px; }
.oss-figure figcaption strong { font-weight: 500; }
.oss-figure .screen-link { color: #405963; }
.oss-figure .screen-link:hover { color: var(--blue); }
.oss-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 44px); max-width: 1220px; margin: clamp(24px, 4vw, 48px) auto 0; }
.oss-system { border-top: 1px solid var(--case-border); background: white; }
.query-model { max-width: 760px; margin: 40px auto; padding: clamp(16px, 3vw, 32px); background: #edf1f3; }
.query-model figcaption { font: 12px var(--mono); color: #435966; margin-bottom: 22px; }
.query-branches { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; }
.query-branches ul { margin: 0; padding: 0; display: grid; gap: 12px; list-style: none; }
.query-input, .query-branches li { position: relative; padding: 10px 14px; border-left: 2px solid #0f62fe; background: white; }
.query-branches strong, .query-branches span { display: block; }
.query-branches strong { font-weight: 500; }
.query-branches span { font-size: 13px; color: #435966; }
.query-input::after { content: ''; position: absolute; top: 50%; left: 100%; width: 20px; border-top: 1px solid #71818b; }
.query-branches li::before { content: ''; position: absolute; width: 20px; height: calc(50% + 6px); right: calc(100% + 2px); border-left: 1px solid #71818b; }
.query-branches li:first-child::before { top: 50%; border-top: 1px solid #71818b; }
.query-branches li:last-child::before { bottom: 50%; border-bottom: 1px solid #71818b; }
@media (max-width: 760px) {
  .oss-story-head, .oss-pair { grid-template-columns: 1fr; }
  .oss-pair { gap: 24px; }
  .oss-figure figcaption { font-size: 13px; }
}

/* The same grid carries each domain from its operator question to a worked example. */
.domain-figure, .scope-figure {
  margin: clamp(28px, 5vw, 64px) auto 0;
  padding: clamp(18px, 3.5vw, 48px);
  background: #fff;
  border: 1px solid #b9c9d0;
  color: #202a30;
}
.domain-figure { max-width: 1130px; }
.domain-figure figcaption, .scope-figure figcaption { display: grid; gap: 5px; margin-bottom: 28px; }
.domain-figure figcaption strong, .scope-figure figcaption strong { font-size: clamp(20px, 2.1vw, 28px); font-weight: 450; letter-spacing: -.025em; }
.domain-figure figcaption span, .scope-figure figcaption span { color: #485d69; font-size: 15px; line-height: 1.55; }
.domain-levels, .domain-lanes li { display: grid; align-items: center; grid-template-columns: 1fr 1.6fr 1fr; gap: 18px; }
.domain-levels, .workspace-strip > span, .scope-node small { font: 12px/1.5 var(--mono); color: #4b616f; }
.domain-levels { padding-bottom: 12px; border-bottom: 2px solid #354d5a; }
.domain-lanes { margin: 0; padding: 0; list-style: none; }
.domain-lanes li { min-height: 62px; border-bottom: 1px solid #d4dfe3; padding: 12px 0; }
.domain-name { display: flex; align-items: center; gap: 12px; }
.domain-name b { display: grid; place-items: center; flex: none; width: 32px; height: 32px; background: #e6eef2; color: #284452; font: 15px var(--mono); }
.domain-name strong, .scope-flow strong { font-weight: 500; }
.domain-question { color: #435761; font-size: 15px; line-height: 1.45; }
.domain-lanes a { justify-self: start; color: #0043ce; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; }
.domain-lanes a:hover { color: #002d9c; }
.workspace-strip { padding-top: 20px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px 20px; }
.workspace-strip div { display: flex; flex-wrap: wrap; gap: 2px; }
.workspace-strip div span { background: #edf1f3; padding: 7px 12px; font-size: 14px; }
.oss-story-head[id] { scroll-margin-top: 90px; }
.scope-figure { max-width: 1000px; background: #f4f7f8; }
.scope-flow { display: grid; grid-template-columns: .9fr .82fr 1.38fr; gap: 32px; align-items: center; }
.scope-node, .scope-paths li { display: grid; gap: 4px; position: relative; padding: 14px 16px; background: #fff; border: 1px solid #aabdc6; }
.scope-target { border-left: 3px solid #0f62fe; }
.scope-flow strong { font-size: 16px; }
.scope-flow span { color: #465c69; font-size: 14px; line-height: 1.45; }
.scope-paths { display: grid; gap: 10px; list-style: none; padding: 0; margin: 0; }
.scope-node:first-child::after, .scope-target::after, .scope-paths li::before { content: ''; position: absolute; top: 50%; left: 100%; width: 33px; border-top: 1px solid #6b8591; }
.scope-target::after, .scope-paths li::before { width: 17px; }
.scope-paths li::before { left: auto; right: 100%; }
.scope-paths li::after { content: ''; position: absolute; right: calc(100% + 16px); top: -12px; bottom: -12px; border-left: 1px solid #6b8591; }
.scope-paths li:first-child::after { top: 50%; }
.scope-paths li:last-child::after { bottom: 50%; }
@media (max-width: 700px) {
  .domain-levels { display: none; }
  .domain-lanes { border-top: 2px solid #354d5a; }
  .domain-lanes li { grid-template-columns: 1fr; gap: 5px; }
  .domain-question, .domain-lanes a { margin-left: 44px; }
  .scope-flow { grid-template-columns: 1fr; gap: 18px; }
  .scope-node:first-child::after, .scope-target::after { top: 100%; left: 18px; width: 0; height: 20px; border-left: 1px solid #6b8591; }
  .scope-paths { padding-left: 38px; }
  .scope-paths li::before { width: 20px; }
  .scope-paths li::after { right: calc(100% + 19px); }
  .scope-paths li:first-child::after { top: -20px; }
}
.scope-return { margin: 20px 0 0; padding-top: 14px; border-top: 1px solid #bccbd2; font-size: 15px; line-height: 1.55; color: #435761; }
.scope-return strong { margin-right: 8px; font-weight: 500; color: #243944; }
