.modern-case, .modern-project {
  --modern-ink: #172b40;
  --modern-muted: #52657a;
  --modern-line: #cbd4da;
  --modern-paper: #f0f2f4;
  --modern-green: #27645c;
}

.modern-case *, .modern-project * { box-sizing: border-box; }
.modern-case {
  margin: 0;
  background: #f5f7f8;
  color: var(--modern-ink);
  font: 16px/1.55 'Segoe UI', Arial, sans-serif;
}
.modern-case h1, .modern-case h2, .modern-case h3, .modern-case h4, .modern-case p, .modern-case figure,
.modern-case dl, .modern-case dd, .modern-case ol, .modern-case ul { margin: 0; }
.modern-case h1, .modern-case h2 {
  font-family: 'Segoe UI', Arial, sans-serif;
  font-weight: 720;
  letter-spacing: -.064em;
  line-height: 1;
}
.modern-case a { color: inherit; text-underline-offset: .25em; }
.modern-case button, .modern-case summary { font: inherit; color: inherit; cursor: pointer; }
.modern-case :focus-visible, .modern-project :focus-visible { outline: 2px solid #19746c; outline-offset: 4px; }
.modern-width { width: min(1184px, calc(100% - 2 * clamp(20px, 6vw, 106px))); margin-inline: auto; }
.modern-site-header, .modern-site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 18px;
  min-height: 69px;
  font-size: .85rem;
}
.modern-site-header { border-bottom: 1px solid var(--modern-line); }
.modern-site-footer { border-top: 1px solid var(--modern-line); margin-top: 54px; }
.modern-site-header nav { display: flex; align-items: center; gap: clamp(12px, 3vw, 30px); }
.modern-wordmark { font-weight: 700; font-size: 1.07rem; letter-spacing: -.045em; text-decoration: none; }
.modern-case .modern-case-back {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  color: #233f54;
  text-decoration: none;
}
.modern-case-back > span { color: var(--modern-green); font-size: 1.21rem; font-weight: 500; }
.modern-case-back:hover { text-decoration: underline; }
.modern-skip { position: fixed; z-index: 4; left: 16px; top: 16px; padding: 10px 16px; background: white; transform: translateY(-160%); }
.modern-skip:focus { transform: none; }
.modern-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(0, 1fr);
  grid-template-areas: 'copy drawing' 'metrics metrics';
  align-items: center;
  gap: clamp(34px, 5vw, 65px) clamp(32px, 5vw, 82px);
  padding-top: clamp(46px, 6vw, 96px);
}
.modern-hero-copy { grid-area: copy; }
.modern-hero-system { grid-area: drawing; }
.modern-kicker {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1.45;
  text-transform: uppercase;
}
.modern-kicker { color: var(--modern-green); }
.modern-case .modern-project-name { margin-block: 17px 9px; font-size: .92rem; font-weight: 700; }
.modern-case h1 { font-size: clamp(2.5rem, 5.25vw, 5rem); text-wrap: balance; }
.modern-case .modern-intro { margin-top: 22px; color: var(--modern-muted); max-width: 55ch; }
.modern-case .modern-role { margin-top: 25px; padding-left: 13px; border-left: 2px solid #83a9a0; }
.modern-role dt { color: var(--modern-muted); font-size: .76rem; }
.modern-role dd { font-size: .9rem; font-weight: 700; }

.modern-arrow, .modern-retained { color: #bcdfd4; }
.modern-retained { font-size: .76rem; }
.modern-retained span:first-child { margin-right: 4px; }

.modern-metrics { display: grid; }
.modern-metrics > div { display: flex; flex-direction: column; min-width: 0; }
.modern-metrics dt { order: 2; font-weight: 700; font-size: .82rem; line-height: 1.35; }
.modern-metrics dd { display: contents; }
.modern-metrics strong { order: 1; display: block; margin-bottom: 7px; font-size: clamp(1.7rem, 3.2vw, 2.9rem); line-height: 1.04; letter-spacing: -.06em; font-weight: 710; font-variant-numeric: tabular-nums; }
.modern-case .modern-metrics dd p { order: 3; margin-top: 8px; color: var(--modern-muted); font-size: .85rem; line-height: 1.5; }
.modern-hero-metrics { grid-area: metrics; grid-template-columns: 1fr 1fr 1.25fr 1.35fr; border-block: 1px solid var(--modern-line); }
.modern-hero-metrics > div { border-left: 1px solid var(--modern-line); padding: 18px clamp(10px, 2vw, 30px) 20px; }
.modern-hero-metrics > div:first-child { border-left: 0; padding-left: 0; }
.modern-hero-metrics > div:last-child strong { color: var(--modern-green); }
.modern-chapter-nav { display: flex; flex-wrap: wrap; gap: 1px 22px; padding-block: 12px; }
.modern-chapter-nav a { font-size: .78rem; font-weight: 700; padding-block: 9px; text-decoration: none; }
.modern-chapter-nav a:hover { text-decoration: underline; }
.modern-chapter-nav span { color: var(--modern-green); font-size: .66rem; margin-right: 3px; }

.modern-chapter { border-top: 1px solid var(--modern-line); padding-block: clamp(37px, 6vw, 78px); scroll-margin-top: 14px; }
.modern-chapter-head { margin-bottom: 24px; }
.modern-chapter-head h2 { font-size: clamp(2rem, 4vw, 3.85rem); margin-block: 10px 13px; max-width: 26ch; text-wrap: balance; }
.modern-lead { color: var(--modern-muted); max-width: 75ch; }
.modern-note { color: var(--modern-muted); max-width: 80ch; font-size: .9rem; }
.modern-case .modern-note { margin-block: 16px; }
.modern-case .modern-sequence-note { margin-top: -7px; }

.modern-case {
  --modern-dark: #132638;
  --modern-surface: #1c344b;
  --modern-bright: #a7e2d4;
  --modern-blueprint: linear-gradient(90deg, #adc9e114 1px, transparent 1px), linear-gradient(#adc9e114 1px, transparent 1px);
}
.modern-case .modern-chapter-head { margin-bottom: clamp(24px, 3vw, 42px); }
.modern-case .modern-project-name { color: #355168; }
.modern-hero-metrics strong { font-size: clamp(1.6rem, 3.4vw, 3.1rem); }
.modern-hero-metrics > div:nth-child(n+3) { border-top: 2px solid #63948b; margin-top: -1px; }
.modern-figure-header, .modern-system-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 4px 18px;
  min-height: 44px;
  padding-block: 4px;
}
.modern-figure-header h3, .modern-system-header > span, .modern-figure-header > span, .modern-hero-transition small {
  font-size: .73rem;
  font-weight: 720;
  letter-spacing: .10em;
  line-height: 1.35;
  text-transform: uppercase;
}
.modern-figure-header > span { font-size: .68rem; }
.modern-case .modern-replay {
  color: inherit;
  min-height: 44px;
  padding: 3px 1px;
  background: transparent;
  border: 0;
  font-size: .76rem;
  text-decoration: underline;
  text-underline-offset: .25em;
}
.modern-hero-system, .modern-map-wrap, .modern-results {
  color: #eef5fb;
  background-color: var(--modern-dark);
  background-image: var(--modern-blueprint);
  background-size: 24px 24px;
}
.modern-hero-system { padding: clamp(16px, 2.4vw, 34px); border-bottom: 3px solid #568c81; }
.modern-system-header { color: #c4d8ea; }
.modern-system-scene { position: relative; border-block: 1px solid #91afca40; }
.modern-system-scene p { font: 600 .68rem/1.3 'Segoe UI', sans-serif; color: #ccdfed; position: absolute; top: 10px; left: 0; }
.modern-system-scene svg { display: block; width: 100%; }
.hero-guide { fill: none; stroke: #8aacc76b; stroke-dasharray: 2 4; }
.hero-component-ports { fill: none; stroke: #97c1d9; stroke-width: 1.2; stroke-dasharray: 2 3; }
.hero-component { fill: #294762; stroke: #d3e6f4; stroke-width: 1.2; }
.hero-port { stroke: #b7dacf; stroke-width: 2; }
.hero-layer { fill: #357870; stroke: #a7e2d4; stroke-width: 1.2; }
.hero-layer-framework { fill: #27535a; }
.hero-layer path:nth-child(2) { fill: #183c48; }
.hero-layer .hero-layer-trace { fill: none; stroke: #9fe3d2; stroke-width: 1.8; stroke-dasharray: 3 4; }
.modern-hero-transition { display: grid; padding-block: 8px 7px; }
.modern-technology-labels, .modern-technology-pair { display: grid; grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1.06fr); align-items: center; gap: 4px; }
.modern-technology-labels { padding-inline: 5px; padding-bottom: 3px; }
.modern-technology-labels small { color: #beccda; }
.modern-technology-labels small:last-child { grid-column: 3; color: #a7e2d4; }
.modern-technology-pair { min-height: 29px; padding: 3px 5px; border-top: 1px solid #7693a456; }
.modern-technology-pair > span:first-child { color: #d3dee8; font-size: clamp(.72rem, 1.04vw, .93rem); line-height: 1.16; }
.modern-technology-pair .modern-arrow { justify-self: center; color: #87c4b5; font-size: .96rem; }
.modern-technology-pair strong { color: #c4f2e6; line-height: 1.08; font-size: clamp(.81rem, 1.32vw, 1.12rem); }
.modern-technology-pair .modern-framework-target { font-size: clamp(1.34rem, 2.45vw, 2.13rem); letter-spacing: -.05em; }
.modern-version { white-space: nowrap; }
.modern-hero-system figcaption { border-top: 1px solid #91afca40; padding-top: 9px; }

.modern-map-wrap, .modern-context, .modern-direction, .modern-migration, .modern-verification, .modern-results {
  padding: clamp(13px, 2.65vw, 34px);
}
.modern-map-wrap .modern-figure-header { color: #c5dcec; border-bottom: 1px solid #86a6bf59; }
.modern-map-composition { display: grid; grid-template-columns: minmax(0, 1.38fr) minmax(0, 1fr); gap: clamp(14px, 3vw, 36px); align-items: center; }
.modern-map-diagram { position: relative; isolation: isolate; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(6, minmax(56px, 1fr)); min-height: 340px; align-items: center; }
.modern-map-diagram svg { position: absolute; width: 100%; height: 100%; inset: 0; z-index: -1; overflow: visible; }
.modern-map-diagram path { fill: none; stroke: #829fb7; stroke-width: 1; vector-effect: non-scaling-stroke; }
.modern-map-diagram path.is-linked { stroke: #a7e2d4; stroke-width: 2; }
.modern-case .modern-map-button {
  display: grid;
  place-items: center;
  gap: 5px;
  min-height: 44px;
  justify-self: center;
  padding: 5px 6px;
  background: #20394f;
  color: #f0f7fd;
  border: 1px solid #7899b3;
  font-size: clamp(.69rem, 1vw, .84rem);
  font-weight: 650;
  line-height: 1.17;
  overflow-wrap: anywhere;
}
.modern-map-button:hover { border-color: #baebdf; }
.modern-case .modern-map-button[aria-pressed="true"] { background: #c8ece3; color: #173c3e; border-color: #c8ece3; }
.modern-map-button:is(.modern-map-button-0, .modern-map-button-1, .modern-map-button-2, .modern-map-button-6, .modern-map-button-7) { grid-column: 1 / -1; min-width: 44%; }
.modern-map-button-0 { grid-row: 1; }
.modern-map-button-1 { grid-row: 2; }
.modern-map-button-2 { grid-row: 3; }
.modern-map-button:is(.modern-map-button-3, .modern-map-button-4, .modern-map-button-5) { grid-row: 4; width: calc(100% - 6px); }
.modern-map-button-3 { grid-column: 1; }
.modern-map-button-4 { grid-column: 2; }
.modern-map-button-5 { grid-column: 3; }
.modern-map-button-6 { grid-row: 5; }
.modern-map-button-7 { grid-row: 6; }
.modern-area-tiles { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; }
.modern-area-tiles i { width: 7px; height: 5px; background: currentColor; opacity: .63; }
.modern-map-reading { padding-block: 13px; }
.modern-layer-detail { min-height: 90px; padding-block: 10px 11px; color: #ccdfec; font-size: .85rem; }
.modern-layer-detail strong { color: #a7e2d4; }
.modern-layer-detail p { padding-top: 4px; }
.modern-inventory { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.modern-inventory > div { padding: 10px 8px 11px 0; border-top: 1px solid #8daccc61; }
.modern-inventory strong { color: #fff; font-size: clamp(1.25rem, 2.35vw, 2.05rem); }
.modern-inventory dt { color: #c8ddeb; font-weight: 600; font-size: .71rem; }
.modern-map-original, .modern-map-wrap figcaption { color: #bdd2e2; font-size: .75rem; }
.modern-case .modern-map-original { padding-top: 8px; }
.modern-map-wrap figcaption { border-top: 1px solid #86a6bf59; padding-top: 9px; }

.modern-context {
  color: #edf5fa;
  background-color: var(--modern-dark);
  background-image: var(--modern-blueprint);
  background-size: 24px 24px;
  border-top: 3px solid #6c92a8;
}
.modern-context .modern-figure-header { border-bottom: 1px solid #829fb461; }
.modern-context :focus-visible { outline-color: #a7e2d4; }
.modern-context h4 { font-size: .85rem; line-height: 1.25; color: #ecf7fb; }
.modern-context-workbench {
  display: grid;
  grid-template-columns: minmax(0, .87fr) minmax(32px, .19fr) minmax(0, .65fr) minmax(32px, .19fr) minmax(0, 1.35fr);
  align-items: center;
  padding-block: 18px 4px;
}
.modern-context-workbench :is(ul, ol), .modern-context-decisions ul, .modern-cycle-core ul { padding: 0; list-style: none; }
.modern-context-source ul, .modern-context-library ol { display: grid; gap: 5px; padding-top: 8px; }
.modern-context-source li {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr) 7px;
  align-items: center;
  gap: 5px;
  min-height: 31px;
  padding-right: 6px;
  background: #233d54;
  border: 1px solid #66849d;
  color: #e1edf6;
  font-size: .75rem;
  line-height: 1.22;
}
.modern-source-glyph {
  min-height: 28px;
  display: grid;
  place-items: center;
  background: #304e67;
  color: #d8edf8;
  font: 700 .8rem/1 Consolas, monospace;
}
.modern-context-source li i { width: 5px; height: 5px; border: 1px solid #a1c9de; }
.modern-context-junction { width: 100%; height: 142px; color: #a4dacc; align-self: center; overflow: visible; }
.modern-context-junction path, .modern-cycle-paths > path { fill: none; vector-effect: non-scaling-stroke; }
.modern-context-rail { stroke: #769bb0; stroke-width: 1; }
.modern-context-signal { stroke: #a4e9d8; stroke-width: 2.5; opacity: 0; }
.modern-context-analysis {
  position: relative;
  border: 1px solid #8cc4b8;
  background: #1c3e48;
  padding: clamp(9px, 1.15vw, 15px);
}
.modern-context-analysis p { font-size: .76rem; line-height: 1.35; color: #d2e7e8; padding-top: 4px; }
.modern-analysis-window {
  position: relative;
  display: grid;
  align-content: center;
  gap: 5px;
  height: 42px;
  border-block: 1px solid #7bb8aa9c;
  margin-bottom: 9px;
  overflow: hidden;
}
.modern-analysis-window i { display: block; width: 83%; height: 2px; background: #85c1b6; }
.modern-analysis-window i:nth-child(2) { width: 64%; }
.modern-analysis-window i:nth-child(3) { width: 73%; }
.modern-analysis-window > span { position: absolute; inset: 3px auto 3px 0; width: 2px; background: #ccfbee; opacity: 0; }
.modern-context-library li, .modern-context-decisions li { --strand: #9dc9e1; }
:is(.modern-context-library, .modern-context-decisions) li:nth-child(2) { --strand: #a7e2d4; }
:is(.modern-context-library, .modern-context-decisions) li:nth-child(3) { --strand: #c6d5f3; }
.modern-context-library li { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; border-left: 2px solid var(--strand); padding-left: 10px; position: relative; }
.modern-context-library li::before, .modern-context-route { display: block; width: 6px; height: 6px; background: var(--strand); }
.modern-context-library li::before { content: ''; position: absolute; left: 0; top: calc(50% - 3px); }
.modern-context-library li:nth-child(2)::before, .modern-context-decisions li:nth-child(2) .modern-context-route { border-radius: 50%; }
.modern-context-library li:nth-child(3)::before, .modern-context-decisions li:nth-child(3) .modern-context-route { rotate: 45deg; }
.modern-context-document {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 42px;
  padding: 3px 4px;
  border: 1px solid #7794aa;
  background: #e7eff4;
  color: #203b51;
  font-size: .72rem;
  font-weight: 650;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.modern-context-document i {
  flex: none;
  width: 13px;
  height: 16px;
  color: #3d647c;
  border: 1px solid currentColor;
  border-radius: 1px 5px 1px 1px;
  background: linear-gradient(currentColor, currentColor) 2px 6px / 6px 1px no-repeat, linear-gradient(currentColor, currentColor) 2px 9px / 4px 1px no-repeat;
}
.modern-context-decisions {
  position: relative;
  margin-top: 17px;
  padding-top: 10px;
  border-top: 1px solid #7c9aad;
}
.modern-context-decisions::before { content: ''; position: absolute; right: 15%; bottom: 100%; height: 15px; border-right: 1px solid #7c9aad; }
.modern-context-decisions ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding-block: 7px; }
.modern-context-decisions li { display: flex; align-items: start; gap: 6px; padding: 6px 7px; border-top: 2px solid var(--strand); background: #244055; font-size: .76rem; line-height: 1.3; }
.modern-context-route { flex: none; margin-top: 4px; }
.modern-context-reuse { padding-top: 5px; color: #b6e4d8; font-size: .81rem; }
.modern-context-reuse > span { font-size: 1.08rem; margin-right: 5px; }
.modern-context figcaption { margin-top: 9px; color: #c6d9e7; font-size: .76rem; }

.modern-direction { background: #e0ede9; border-top: 3px solid #397d76; }
.modern-direction .modern-figure-header { border-bottom: 1px solid #9ab9b1; color: #275e56; }
.modern-direction-scene {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .85fr) minmax(0, 1fr);
  grid-template-rows: 1fr auto 1fr;
  grid-template-areas: 'direct . execute' '. core .' 'approve . review';
  padding: 8px 9%;
  margin-block: 7px;
}
.modern-direction-stages { display: contents; list-style: none; }
.modern-direction-stages li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  align-self: center;
  padding: 7px 8px;
  background: #eef6f3;
  border: 1px solid #87afa6;
}
.modern-direction-stages li:nth-child(1) { grid-area: direct; }
.modern-direction-stages li:nth-child(2) { grid-area: execute; }
.modern-direction-stages li:nth-child(3) { grid-area: review; }
.modern-direction-stages li:nth-child(4) { grid-area: approve; }
.modern-direction-marker {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  color: #fff;
  background: #28645b;
  font-size: .69rem;
  font-weight: 750;
}
.modern-direction-stages h4 { font-size: .85rem; line-height: 1.2; padding-block: 3px 2px; }
.modern-direction-stages p { font-size: .77rem; line-height: 1.31; color: #35565d; }
.modern-cycle-core {
  grid-area: core;
  align-self: center;
  padding: 9px;
  border: 1px solid #6ba29a;
  background: #20494b;
  color: #ecf8f6;
}
/* A document stack anchors the four stages and their return paths. */
.modern-direction-scene {
  border-radius: 10px;
  background: radial-gradient(circle, #47867b29 .8px, transparent 1px) 0 0 / 14px 14px, #e8f2ee;
  padding-block: 14px;
}
.modern-direction-stages li {
  border-radius: 9px; background: #f9fcfa; border-color: #aac7bd;
  box-shadow: 0 2px 4px #254a4210; padding: 9px;
}
.modern-direction-marker {
  width: 23px; height: 23px; border-radius: 6px; background: #e2eee8;
  color: #306258; font: 600 .68rem/1 monospace;
}
.modern-cycle-core {
  background: linear-gradient(125deg,#f8fffb,#e3f2ea); color: #193f39;
  border-radius: 9px; border-color: #67998b; padding: 11px 13px;
  box-shadow: 0 3px 0 -1px #bad3c8, 0 5px 0 -1px #769f90, 0 8px 12px #294b4120;
}
@keyframes direction-focus {
  22%,72% { border-color: #377c69; background: #e2f2e9; box-shadow: inset 3px 0 #377c69; }
}
@keyframes direction-record {
  42% { border-color: #215e4d; background-color: #c3dece; transform: translateY(-1.5px); }
}
.modern-cycle-core h4 { font-size: .85rem; line-height: 1.18; }
.modern-cycle-core ul { display: flex; flex-wrap: wrap; gap: 3px; padding-top: 6px; }
.modern-cycle-core li { flex: 1 1 100%; padding: 2px 0 1px 9px; border-top: 1px solid #bad2c6; background: radial-gradient(circle at 2px 55%, #549080 1.4px, transparent 1.8px); font-size: .66rem; line-height: 1.25; }
.modern-cycle-paths { position: absolute; z-index: -1; width: 100%; height: 100%; inset: 0; color: #34766d; }
.modern-cycle-track { stroke: #82a89c; stroke-width: 1; }
.modern-cycle-arrows { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.modern-cycle-arrows i { position: absolute; width: 8px; height: 8px; border-top: 2px solid #34766d; border-right: 2px solid #34766d; translate: -50% -50%; }
.modern-cycle-arrows i:nth-child(1) { left: 50%; top: 14%; rotate: 45deg; }
.modern-cycle-arrows i:nth-child(2) { left: 94%; top: 50%; rotate: 135deg; }
.modern-cycle-arrows i:nth-child(3) { left: 50%; top: 86%; rotate: 225deg; }
.modern-cycle-arrows i:nth-child(4) { left: 6%; top: 50%; rotate: 315deg; }
.modern-cycle-spoke { stroke: #698f84; stroke-width: 1.2; stroke-linecap: round; }
.modern-cycle-signal, .modern-cycle-return { stroke: #167965; stroke-width: 3; opacity: 0; }
.modern-feedback { padding-top: 6px; color: #2a5c55; border-top: 1px solid #8fb0a8; font-size: .78rem; }
.modern-feedback > span:first-child { font-size: 1.1rem; margin-right: 4px; }
.modern-direction figcaption { padding-top: 5px; color: #3d5d63; font-size: .75rem; }

.modern-responsibilities { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 14px; }
.modern-responsibilities > div { padding: 8px 0 0; border-top: 1px solid var(--modern-line); }
.modern-responsibilities h3, .modern-reflections h3, .modern-scope h3 { font-size: 1rem; line-height: 1.3; }
.modern-case :is(.modern-responsibilities, .modern-reflections, .modern-scope) p { padding-top: 5px; color: var(--modern-muted); font-size: .89rem; }

.modern-migration { background-color: var(--modern-dark); background-image: var(--modern-blueprint); background-size: 24px 24px; color: #eff5fa; }
.modern-migration .modern-figure-header { color: #c5dcec; border-bottom: 1px solid #86a6bf59; }
.modern-stage-state { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(16px, 3vw, 45px); align-items: start; padding-block: 18px; min-height: 315px; }
.modern-stage-description { padding-block: 7px; }
.modern-stage-description h4 { font-size: clamp(1.1rem, 2.8vw, 1.9rem); line-height: 1.14; letter-spacing: -.035em; }
.modern-stage-description p { color: #d0e1ec; font-size: .9rem; padding-top: 7px; }
.modern-stage-position { color: #9bd6c7; font: 650 .77rem/1.4 'Segoe UI', sans-serif; font-variant-numeric: tabular-nums; margin-bottom: 7px; }
.modern-migration-app { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px dashed #88adc8; padding: 0 0 9px; font-size: .76rem; color: #cfdfed; }
.modern-app-tiles { display: flex; gap: 3px; }
.modern-app-tiles i { display: block; width: clamp(7px, 1.1vw, 15px); height: 9px; border: 1px solid #9abbd4; background: #3a5a73; }
.modern-migration-layer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 6px; background: #263f56; border: 1px solid #6b89a0; border-left-width: 3px; padding: 5px 8px; margin-top: 5px; font-size: .75rem; }
.modern-migration-layer strong { font-size: .8rem; }
.modern-migration-layer.is-migrated, .modern-models .is-migrated { background: #21564f; color: #e6faf4; border-color: #72ac9e; }
.modern-models { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); list-style: none; padding: 13px 0 0; gap: 4px; position: relative; }
.modern-models::before { content: ''; position: absolute; top: 5px; inset-inline: 16.66%; border-top: 1px solid #7897ad; }
.modern-models li { padding: 6px; display: grid; align-content: start; background: #253e53; border: 1px solid #6b89a0; font-size: .73rem; line-height: 1.22; overflow-wrap: anywhere; position: relative; }
.modern-models li::before { content: ''; position: absolute; bottom: 100%; left: 50%; height: 8px; border-left: 1px solid #7897ad; }
.modern-models li strong { margin-top: 4px; font-size: .8rem; }
.modern-models small { color: #bfe7df; }
.modern-model-progress { display: flex; flex-wrap: wrap; gap: 5px; padding-top: 7px; }
.modern-case .modern-model-progress button, .modern-case .modern-step-footer button { min-height: 44px; padding: 5px 9px; color: #e3f0f7; background: #21364a; border: 1px solid #7b98af; font-size: .77rem; }
.modern-case .modern-model-progress button[aria-pressed="true"] { background: #bceadd; color: #163d39; border-color: #bceadd; }
.modern-pilot { margin-top: 8px; padding: 5px 8px; color: #e5d7b4; border: 1px dashed #bda76f; font-size: .75rem; }
.modern-step-buttons { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; list-style: none; padding: 0; }
.modern-case .modern-step-buttons button { min-height: 54px; width: 100%; height: 100%; text-align: left; padding: 6px 5px; border: 0; border-top: 2px solid #7897ad; background: #1e364a; color: #e3f0f7; font-size: .71rem; line-height: 1.2; overflow-wrap: anywhere; }
.modern-step-number { display: block; color: #acd0e6; font-size: .66rem; font-variant-numeric: tabular-nums; padding-bottom: 3px; }
.modern-case .modern-step-buttons button[aria-pressed="true"] { background: #c0ebdf; border-color: #80bdaf; color: #183e3c; }
.modern-case .modern-step-buttons button[aria-pressed="true"] .modern-step-number { color: #285d56; }
.modern-step-footer { display: flex; justify-content: space-between; gap: 8px; padding-top: 9px; }
.modern-case .modern-step-footer button:is(:disabled, [aria-disabled="true"]) { color: #a6b8c5; cursor: default; }
.modern-migration :focus-visible, .modern-hero-system :focus-visible, .modern-map-wrap :focus-visible { outline-color: #a7e2d4; }
.modern-scope { border-left: 2px solid #7899af; padding-left: 14px; margin-top: 20px; }
.modern-detail { max-width: 75ch; padding-top: 3px; font-size: .88rem; }
.modern-detail summary { font-weight: 650; padding-block: 7px; }

.modern-evidence { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 2vw, 24px); }
.modern-evidence > div { border-block: 1px solid #a4b8c7; padding-block: 13px; }
.modern-evidence strong { color: #245c53; }
.modern-verification { background: #e0e8ee; border-top: 3px solid #566e87; }
.modern-verification .modern-figure-header { color: #304c63; }
.modern-verify-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(12px, 2.5vw, 30px); align-items: start; padding-top: 10px; }
.modern-window { border: 1px solid #8ba2b5; border-radius: 7px 7px 2px 2px; overflow: hidden; background: #fbfcfe; box-shadow: 0 10px 24px #1c344b15; }
.modern-titlebar, .modern-window-tools, .modern-window-actions { display: flex; gap: 8px; align-items: center; padding: 6px 9px; }
.modern-titlebar { min-height: 38px; color: #edf5fb; background: #213f58; font-size: .81rem; }
.modern-app-icon { color: #a9ddd3; }
.modern-window-chrome { margin-left: auto; flex: none; color: #d4e4f0; }
.modern-window-tools { flex-wrap: wrap; gap: 0 8px; min-height: 44px; border-bottom: 1px solid #afbfcd; background: #edf2f6; font-size: .75rem; }
.modern-window-tools > span { padding-block: 5px; color: #52687d; }
.modern-window-tools > .is-open { border-bottom: 2px solid #34786c; color: #184a43; font-weight: 700; }
.modern-case [data-verify-filter] { background: #f7fafb; color: #244354; border: 1px solid #91abc0; font-size: .73rem; min-height: 36px; margin-left: auto; padding: 4px 6px; }
.modern-case [data-verify-filter][aria-pressed="true"] { background: #d0ebe1; border-color: #4b847a; }
.modern-window-body { min-height: 158px; padding: 8px 10px; }
.modern-window-body table { width: 100%; border-collapse: collapse; text-align: left; font-size: .78rem; }
.modern-window-body th, .modern-window-body td { padding: 5px 6px; border-bottom: 1px solid #d5e0e7; }
.modern-window-body thead { background: #e8eff4; }
.modern-bar { display: inline-block; vertical-align: middle; width: calc(var(--units) * .19rem); margin-right: 7px; height: .39rem; background: #397d76; }
.modern-build-screen, .modern-correction { padding: 17px 4px; color: #225e53; font-size: .89rem; }
.modern-build-screen > span, .modern-correction > span { display: inline-grid; place-items: center; width: 28px; height: 28px; color: white; background: #296858; border-radius: 50%; margin-right: 5px; }
.modern-build-screen p { padding-top: 6px; color: #4b6578; font-size: .8rem; }
.modern-failure { color: #7a3427; background: #f7e9e5; border-left: 3px solid #a95242; display: flex; align-items: center; gap: 9px; padding: 10px; margin-top: 7px; font-size: .85rem; }
.modern-failure > span { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border: 1px solid currentColor; border-radius: 50%; font-weight: 700; }
.modern-passes { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; padding: 4px 0; font-size: .77rem; }
.modern-passes li { background: #e4f1ed; border-left: 2px solid #488579; padding: 5px; }
.modern-passes span { color: #225e53; font-weight: 700; }
.modern-window-actions { border-top: 1px solid #b2c2cf; background: #edf2f6; }
.modern-case [data-verify-action] { min-height: 44px; background: #23465d; color: #fff; border: 1px solid #23465d; border-radius: 3px; padding: 5px 11px; font-size: .8rem; font-weight: 700; }
.modern-verify-log { min-height: 240px; padding: 4px 0; color: #2a4960; }
.modern-verify-log h4 { font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; }
.modern-verify-log ol { list-style: none; padding: 6px 0; font-size: .76rem; }
.modern-verify-log li { border-top: 1px solid #aebfcc; padding: 3px 0; }
.modern-verify-log li[aria-current] { color: #22564f; font-weight: 750; }
.modern-verify-log li span:first-child { font-variant-numeric: tabular-nums; padding-right: 4px; }
.modern-verify-log p { font-size: .8rem; line-height: 1.32; }

.modern-result-milestones { display: grid; grid-template-columns: minmax(0, .9fr) auto minmax(0, 1.15fr); gap: clamp(10px, 3vw, 34px); align-items: start; }
.modern-result-milestones .modern-kicker { color: #b4d7e5; }
.modern-result-milestones h3 { font-size: clamp(1.9rem, 4.5vw, 4.1rem); line-height: 1; letter-spacing: -.06em; padding-block: 5px; }
.modern-result-milestones > div:last-child h3 { color: #a7e2d4; }
.modern-result-milestones p { color: #d7e4ed; font-size: .86rem; padding-top: 3px; }
.modern-result-arrow { color: #a7e2d4; font-size: clamp(1.5rem, 4vw, 3rem); align-self: center; }
.modern-case .modern-outcomes { margin-top: 22px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.modern-outcomes > div { border-top: 1px solid #81a99e; padding: 10px 8px 2px 0; }
.modern-outcomes strong { font-size: clamp(.98rem, 2.1vw, 1.6rem); color: #a7e2d4; letter-spacing: -.025em; }
.modern-outcomes dt { color: #d9e7ee; font-size: .73rem; font-weight: 600; }
.modern-reflections { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 20px; }
.modern-reflections li { padding-block: 8px; border-top: 1px solid var(--modern-line); }
.modern-toolkit { margin-top: 25px; padding: 12px clamp(10px, 2vw, 24px); border-top: 2px solid #6f94a9; background: #eaf0f3; }
.modern-toolkit h3 { font-size: clamp(1.28rem, 2.4vw, 1.7rem); letter-spacing: -.035em; }
.modern-toolkit dl { padding-top: 6px; }
.modern-toolkit dl > div { display: grid; grid-template-columns: minmax(140px, .8fr) minmax(0, 3fr); gap: 4px 10px; align-items: center; padding-block: 4px; border-top: 1px solid #b1c2cd; }
.modern-toolkit dt { font-weight: 700; font-size: .79rem; }
.modern-toolkit ul { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 0; list-style: none; }
.modern-toolkit li { display: flex; align-items: center; gap: 5px; padding: 2px 6px; border: 1px solid #a6bac9; background: #f9fbfc; color: #29475d; font-size: .76rem; font-weight: 650; }
.modern-toolkit li img { display: block; flex: none; width: 17px; height: 17px; }

@media (max-width: 820px) {
  .modern-hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'copy' 'metrics' 'drawing'; row-gap: 24px; }
  .modern-hero-transition { padding-block: 4px; }
  .modern-case h1 { max-width: 18ch; }
  .modern-stage-state { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  .modern-step-buttons { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .modern-case h1 { font-size: clamp(1.9rem, 9.5vw, 2.7rem); }
  .modern-case h1, .modern-chapter-head h2, .modern-metrics dt { hyphens: auto; overflow-wrap: anywhere; }
  .modern-hero-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modern-hero-metrics > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .modern-chapter-nav { gap: 1px 14px; }
  .modern-map-composition, .modern-verify-layout, .modern-stage-state { grid-template-columns: minmax(0, 1fr); }
  .modern-map-reading { padding-top: 0; }
  .modern-stage-state { gap: 8px; min-height: 0; }
  .modern-verify-log { min-height: 224px; }
  .modern-evidence, .modern-reflections { grid-template-columns: 1fr; gap: 6px; }
  .modern-evidence > div { border-bottom: 0; }
  .modern-result-milestones { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .modern-result-arrow { line-height: 1; transform: rotate(90deg); transform-origin: center; justify-self: start; }
  .modern-context-workbench { grid-template-columns: minmax(0, 1fr); align-items: start; padding-top: 13px; }
  .modern-context-source ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modern-context-junction { display: block; justify-self: center; width: 32px; height: 52px; margin-block: -10px; transform: rotate(90deg); }
  .modern-context-analysis { width: min(100%, 290px); justify-self: center; }
  .modern-context-library { padding-top: 5px; }
  .modern-context-library ol { gap: 4px; }
  .modern-context-document { min-height: 33px; }
  .modern-context-decisions ul { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .modern-context-decisions li { border-top-width: 0; border-left: 2px solid var(--strand); }
  .modern-direction-scene {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 1fr auto 1fr;
    grid-template-areas: 'direct execute' 'core core' 'approve review';
    gap: 16px 20px;
    padding: 8px 8%;
  }
  .modern-direction-stages li { grid-template-columns: minmax(0, 1fr); align-self: stretch; padding: 5px; gap: 2px; }
  .modern-direction-stages p { overflow-wrap: anywhere; }
  .modern-cycle-core { width: min(88%, 290px); justify-self: center; }
  .modern-cycle-track { stroke-width: .95; }
  .modern-toolkit dl > div { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 601px) and (max-width: 980px) {
  .modern-context-workbench { grid-template-columns: minmax(0, 1fr) 26px minmax(0, .8fr) 26px minmax(0, 1.35fr); }
  .modern-direction-scene { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); padding-inline: 7%; }
}
@media (max-width: 460px) {
  .modern-case .modern-map-button { padding-inline: 3px; }
  .modern-inventory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modern-step-buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modern-case .modern-step-buttons button { min-height: 45px; }
  .modern-models { grid-template-columns: minmax(0, 1fr); gap: 3px; padding: 7px 0 0 8px; }
  .modern-models::before { top: 0; bottom: 13px; inset-inline: 2px auto; border-top: 0; border-left: 1px solid #7897ad; }
  .modern-models li { display: flex; align-items: baseline; gap: 4px; padding: 4px 5px; }
  .modern-models li::before { bottom: auto; top: 50%; left: -7px; height: 0; width: 7px; border-left: 0; border-top: 1px solid #7897ad; }
  .modern-models li strong { margin: 0 0 0 auto; white-space: nowrap; }
  .modern-case .modern-outcomes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modern-outcomes > div:last-child { grid-column: 1 / -1; }
}
@media (max-width: 350px) {
  .modern-context-source ul { grid-template-columns: minmax(0, 1fr); }
  .modern-direction-scene { column-gap: 14px; }
  .modern-direction-stages h4 { font-size: .79rem; overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: no-preference) {
  .modern-map-diagram path, .modern-models li { transition: background-color 200ms, stroke 200ms, border-color 200ms; }
  .modern-in-motion .hero-layer { animation: modern-replace-layer 2.45s ease both; }
  .modern-in-motion .hero-layer-access { animation-delay: .6s; }
  .modern-in-motion .hero-component-ports { animation: modern-ports 1.5s 1.5s ease both; }
  .modern-in-motion .modern-context-source li { animation: modern-assemble .38s calc(var(--index) * .10s) ease-out both; }
  .modern-in-motion .modern-context-collect .modern-context-signal { animation: modern-trace-path .72s calc(.32s + var(--index) * .07s) ease-in-out both; }
  .modern-in-motion .modern-analysis-window > span { animation: modern-scan-records .8s .82s ease-in-out both; }
  .modern-in-motion .modern-context-sort .modern-context-signal { animation: modern-trace-path .74s calc(1.53s + var(--index) * .14s) ease-in-out both; }
  .modern-in-motion .modern-context-library li { animation: modern-assemble .52s calc(1.86s + var(--index) * .14s) ease-out both; }
  .modern-in-motion .modern-context-decisions li { animation: modern-assemble .52s calc(2.57s + var(--index) * .14s) ease-out both; }
  .modern-in-motion .modern-context-reuse { animation: modern-assemble .45s 3.13s ease-out both; }
  .modern-in-motion .modern-direction-stages > li { animation: direction-focus 1.38s var(--at) ease both; }
  .modern-in-motion .modern-direction-stages > li:nth-child(n+3) { animation-duration: 1.85s; }
  .modern-in-motion .modern-cycle-return { animation: modern-trace-path .7s var(--at) ease-in-out both; }
  .modern-in-motion .context-read { animation-direction: reverse; }
  .modern-in-motion .modern-cycle-core { animation: direction-record .64s .78s, direction-record .64s 2.89s, direction-record .64s 5.09s, direction-record .64s 6.79s; }
  .modern-direction-scene:not(.modern-motion-visible) * { animation-play-state: paused; }
}
@keyframes modern-replace-layer {
  0%, 28% { fill: #425e77; stroke: #a5bcd0; }
  43% { fill: #50768b; stroke: #dfedf9; }
  58% { opacity: .48; transform: translateX(10px); }
  75%, 100% { opacity: 1; transform: none; }
}
@keyframes modern-ports { 50% { stroke: #c5faea; stroke-width: 2.4; } }
@keyframes modern-assemble { from { opacity: .20; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
@keyframes modern-trace-path {
  from { opacity: 0; stroke-dasharray: .3 1; stroke-dashoffset: .3; }
  16%, 74% { opacity: 1; }
  to { opacity: 0; stroke-dasharray: .3 1; stroke-dashoffset: -1; }
}
@keyframes modern-scan-records { from { opacity: 0; left: 0; } 25%, 75% { opacity: 1; } to { opacity: 0; left: 100%; } }
@keyframes modern-stage-ready { 40% { background: #144741; box-shadow: 0 0 0 4px #75bbae80; } }
@keyframes modern-context-updated { 45% { box-shadow: 0 0 0 4px #72ad9e88; } }

.grid .work:has(> .modern-project) {
  grid-template-rows: auto;
  grid-auto-rows: 1fr;
}
.grid .work:has(> .modern-project) > .project { align-self: stretch; }
.grid .work > .modern-project {
  --card-dark: #142a3d;
  --card-steel: #41647f;
  --card-line: #b2c5d3;
  --card-teal: #b4eedf;
  border: 1px solid var(--card-line);
  border-radius: 12px;
  color: var(--modern-ink);
}
.grid .project-visual.modern-project-visual {
  display: flex;
  width: 100%;
  height: auto;
  min-height: 0;
  align-self: stretch;
  border-radius: 11px 0 0 11px;
  background: var(--card-dark);
}
.modern-card-system {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  min-width: 0;
  color: #d3e2ed;
  padding: clamp(16px, 2.8vw, 40px);
  background-image:
    linear-gradient(90deg, #adc9e11c 1px, transparent 1px),
    linear-gradient(#adc9e11c 1px, transparent 1px);
  background-size: 23px 23px;
}
.modern-card-diagram { position: relative; }
.modern-card-diagram > p {
  position: absolute;
  inset: 3px auto auto 0;
  margin: 0;
  font: 650 .71rem/1.35 'Segoe UI', sans-serif;
  letter-spacing: .085em;
  text-transform: uppercase;
}
.modern-card-diagram svg { display: block; width: 100%; max-height: 290px; }
.modern-card-transition { border-top: 1px solid #799ab278; padding-top: 8px; }
.modern-card-versions, .modern-card-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr);
  gap: 2px 6px;
  align-items: center;
  line-height: 1.2;
}
.modern-card-versions { padding: 1px 5px 5px; font-size: .65rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.modern-card-versions span:last-child { grid-column: 3; color: var(--card-teal); }
.modern-card-pair { min-height: 36px; border-top: 1px solid #799ab247; padding: 4px 5px; font-size: clamp(.74rem, 1vw, .89rem); }
.modern-card-pair > span:first-child { font-weight: 550; }
.modern-card-pair strong { color: var(--card-teal); font-weight: 750; }
.modern-card-direction { color: #9ed5c8; text-align: center; }
.grid .modern-project .modern-project-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: stretch;
  min-width: 0;
  max-width: none;
  padding: clamp(21px, 3.2vw, 46px);
  border-radius: 0 11px 11px 0;
  background: #eaf0f4;
  font-family: 'Segoe UI', Arial, sans-serif;
  container-type: inline-size;
}
.grid .modern-project .modern-project-copy .eyebrow {
  margin: 0 0 10px;
  font-weight: 750;
  color: var(--modern-green);
}
.grid .modern-project-copy h3 {
  margin-block: 0 13px;
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: clamp(1.82rem, 3.4vw, 3.25rem);
  font-weight: 720;
  letter-spacing: -.06em;
  line-height: 1.02;
  overflow-wrap: anywhere;
}
.grid .modern-project-copy:lang(sv) h3 { font-size: clamp(1.48rem, 10.05cqi, 3.05rem); }
.grid .modern-project .modern-project-copy p.modern-project-summary {
  color: #37536a;
  font-size: clamp(16px, 1.24vw, 19px);
  line-height: 1.52;
  text-wrap: pretty;
  margin: 0 0 15px;
}
.modern-card-evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
  margin: 0 0 9px;
  padding: 8px 0;
  list-style: none;
  border-block: 1px solid var(--card-line);
  font-size: .82rem;
  line-height: 1.35;
}
.modern-card-evidence strong { font-weight: 750; }
.modern-card-production { color: var(--modern-green); font-weight: 750; }
.modern-card-production::before { content: ''; display: inline-block; width: 7px; height: 7px; background: currentColor; margin: 0 .45em .08em 0; border-radius: 50%; }
.modern-card-capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 11px;
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  color: #3c5971;
  font-size: .8125rem;
  font-weight: 650;
  line-height: 1.3;
}
.modern-card-capabilities li { border-inline-start: 2px solid #78a99e; padding-inline-start: 6px; }
.modern-project-link {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 59px;
  padding: 10px clamp(13px, 1.55vw, 23px);
  border: 1px solid #142a3d;
  border-radius: 6px;
  color: #f3fbff;
  background: #1c3c54;
  font-size: clamp(16px, 1.42vw, 22px);
  font-weight: 700;
  line-height: 1.2;
}
.modern-project-link:hover { background: #284f65; }
.modern-project-link:active { background: #142a3d; }
.modern-project-link span:last-child { flex: none; color: var(--card-teal); font-size: 1.5em; font-weight: 500; line-height: 1; }
@media (min-width: 801px) {
  .grid .work:has(> .modern-project) > .project > .project-visual {
    align-self: stretch;
  }
  .grid .work > .modern-project {
    border: 0;
    border-radius: 0;
  }
  .grid .project-visual.modern-project-visual {
    aspect-ratio: 4 / 5;
    border-radius: 0;
  }
  .modern-card-diagram svg { max-height: none; }
  .grid .modern-project .modern-project-copy {
    padding: clamp(24px, 2.8vw, 46px);
    border: 1px solid var(--card-line);
    border-radius: 0 15px 15px 0;
  }
  .grid .modern-project-copy h3 { font-size: clamp(1.34rem, min(3.4vw, 14cqi), 3.25rem); }
  .grid .modern-project-copy:lang(sv) h3 { font-size: clamp(1.23rem, 10.05cqi, 3.05rem); }
}
@media (min-width: 801px) and (max-width: 1120px) {
  .grid .modern-project .modern-project-copy { padding: 18px; }
  .modern-card-capabilities { margin-bottom: 10px; }
}
@media (min-width: 1537px) {
  .grid .modern-project .modern-project-copy { padding-inline: clamp(43px, calc(4.5vw - 26px), 60px); }
}
@media (max-width: 800px) {
  .grid .work:has(> .modern-project) > .project > .project-copy { flex-grow: 1; }
  .grid .work > .modern-project {
    width: min(600px, calc(100vw - 32px));
    margin-inline: calc((100% - min(600px, 100vw - 32px)) / 2);
  }
  .grid .project-visual.modern-project-visual {
    flex-grow: 2;
    border-radius: 11px 11px 0 0;
  }
  .grid .modern-project .modern-project-copy { border-radius: 0 0 11px 11px; }
  .modern-card-system { padding-inline: clamp(14px, 5vw, 34px); }
}
@media (prefers-reduced-motion: no-preference) {
  .modern-card-system .hero-layer { --layer-start: #526e85; --layer-line: #a7bfd1; }
  .modern-card-framework { --change-delay: .4s; }
  .modern-card-data { --change-delay: 1.52s; }
  .modern-card-system:not(.modern-in-motion) .hero-layer { fill: var(--layer-start); stroke: var(--layer-line); }
  .modern-card-system .hero-layer-trace { opacity: .16; }
  .modern-card-system .modern-card-pair strong { opacity: .74; }
  .modern-card-system.modern-in-motion .hero-layer-framework { animation: modern-card-replace 1.12s .4s ease both; }
  .modern-card-system.modern-in-motion .hero-layer-access { animation: modern-card-replace 1.12s 1.52s ease both; }
  .modern-card-system.modern-in-motion .hero-layer-trace { animation: modern-card-connected .7s 2.62s ease-out both; }
  .modern-card-system.modern-in-motion .modern-card-pair strong { animation: modern-card-target 1.12s var(--change-delay) ease both; }
  .modern-card-system.modern-in-motion .modern-card-pair .modern-card-direction { animation: modern-card-target 1.12s var(--change-delay) ease both; }
}
@keyframes modern-card-replace {
  0%, 15% { fill: var(--layer-start); stroke: var(--layer-line); }
  34% { fill: #668aa1; stroke: #e3f0f8; }
  56% { opacity: .56; transform: translate(-9px, 5px); }
  78%, 100% { opacity: 1; transform: none; }
}
@keyframes modern-card-connected { 0% { opacity: .16; } 100% { opacity: 1; } }
@keyframes modern-card-target { 0%, 31% { opacity: .74; } 100% { opacity: 1; } }


.rebuild { overflow: hidden; fill: none; stroke-linejoin: round; }
.rebuild .datum { stroke: #8caac1; opacity: .38; stroke-width: .8; stroke-dasharray: 4 3; }
.rebuild .modules, .rebuild .old-deck { --front: #2a435a; --side: #142a3e; --top: #496780; stroke: #acc4d7; stroke-width: .9; }
.rebuild .old-deck { opacity: 0; }
.rebuild .rail { --front: #315774; --side: #172f48; --top: #487797; stroke: #a4c4db; }
.rebuild .cassette { --front: #295e63; --side: #173c48; --top: #427e80; stroke: #a5d6cd; }
.rebuild .part { stroke-width: .9; }
.rebuild .engraving { fill: none; stroke: #c3d9df; opacity: .66; stroke-width: .8; }
.rebuild .bus, .rebuild .pins { stroke: #a2cec8; stroke-width: 1; }
.rebuild .pins { stroke-dasharray: 3 3; }
.rebuild .probe, .rebuild .confirm { stroke: #d3fff2; stroke-width: 2; opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .modern-in-motion .rebuild .old-deck { animation: rebuild-withdraw 1.68s cubic-bezier(.49,0,.26,1) both; }
  .rebuild .old-base { --stack: -62px; --exit: -63px; }
  .rebuild .old-data { --stack: -36px; --exit: 63px; }
  .modern-in-motion .rebuild .part { animation: rebuild-seat .86s var(--delay) cubic-bezier(.24,.74,.19,1) both; }
  .modern-in-motion .rebuild .probe { animation: rebuild-scan .84s linear both; }
  .modern-in-motion .rebuild .pins { animation: rebuild-connect .52s 3.2s ease-out both; }
  .modern-in-motion .rebuild .confirm { animation: rebuild-check .69s 3.52s ease-out both; }
  .modern-system-scene:not(.modern-motion-visible) .rebuild * { animation-play-state: paused; }
}
@keyframes rebuild-withdraw {
  0%,35% { transform: translateY(var(--stack)); opacity: 1; }
  69% { transform: translate(0); opacity: 1; }
  100% { transform: translateX(var(--exit)); opacity: 0; }
}
@keyframes rebuild-seat {
  0% { transform: translate(var(--dx),var(--dy)); opacity: 0; }
  26% { opacity: 1; }
  100% { transform: translate(0); opacity: 1; }
}
@keyframes rebuild-scan {
  0% { stroke-dasharray: 16 84; stroke-dashoffset: 16; opacity: 0; }
  14%,82% { opacity: 1; }
  100% { stroke-dasharray: 16 84; stroke-dashoffset: -84; opacity: 0; }
}
@keyframes rebuild-connect { from { opacity: 0; } to { opacity: 1; } }
@keyframes rebuild-check {
  0% { stroke-dasharray: 7 82; stroke-dashoffset: 8; opacity: 0; }
  20%,75% { opacity: .95; }
  100% { stroke-dasharray: 7 82; stroke-dashoffset: -65; opacity: 0; }
}

.modern-milestone-stack { display: grid; }
.modern-milestone-stack > .modern-stage-state { grid-area: 1 / 1; align-self: start; min-width: 0; }
.modern-milestone-stack > [inert] { visibility: hidden; }
.modern-milestone-stack > [inert] .modern-stage-description,
.modern-milestone-stack > [inert] .migration-layer-change { animation: none; }

.modern-shared-data strong:has(.model-label-space) { display: grid; }
.modern-shared-data strong > span { grid-area: 1 / 1; }
.model-label-space { visibility: hidden; }

/* Migration instrument panel */
.modern-migration .modern-tech-state {
  padding: clamp(10px, 1.5vw, 20px);
  background: linear-gradient(135deg,#20384b,#172c3c);
  border: 1px solid #536e80; border-radius: 12px;
  box-shadow: inset 0 1px #accce51c, 0 5px 12px #07152235;
}
.modern-migration .modern-migration-app { border-bottom: 1px solid #607c8b; margin-bottom: 10px; }
.modern-migration .modern-app-tiles i { transform: skewY(-12deg); border-radius: 2px; box-shadow: 1px 3px #162b3b; }
.modern-migration .modern-migration-layer { border-radius: 5px; padding: 7px 9px; }
.modern-migration .modern-models li { border-radius: 5px; }
.modern-migration .milestone-mark { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.modern-migration .modern-stage-position { display: flex; gap: .4em; align-items: center; flex-wrap: wrap; }
.modern-migration .modern-stage-position .milestone-mark { width: 29px; height: 29px; margin-right: 4px; padding: 4px; border: 1px solid #66958d; border-radius: 6px; }
.modern-migration .modern-stage-position::after { content: ''; width: 100%; height: 3px; margin: 6px 0; background: linear-gradient(to right,#9bd6c7 calc(100% * var(--stage-progress)),#425767 0); }
.modern-migration .modern-step-number { display: flex; align-items: center; justify-content: space-between; padding-bottom: 7px; font-family: monospace; }
.modern-case .modern-migration .modern-step-buttons button { border: 1px solid #527084; border-radius: 7px; padding: 8px; }
.modern-case .modern-migration .modern-step-buttons button[aria-pressed=true] { border-color: #b6dfd3; box-shadow: inset 0 -3px #69ac9b; }
.modern-migration :is(.modern-model-progress,.modern-step-footer) button { border-radius: 6px; }
@media (prefers-reduced-motion: no-preference) {
  .modern-migration .modern-stage-description { animation: milestone-select .32s ease-out both; }
  .modern-migration .migration-layer-change { animation: milestone-seat .55s cubic-bezier(.2,.8,.2,1); }
}
@keyframes milestone-select { from { transform: translateX(var(--stage-offset,0)); opacity: .7; } }
@keyframes milestone-seat {
  0% { transform: translateX(-4px); }
  35% { box-shadow: inset 3px 0 #c6f4e4; border-color: #b7dfd4; }
  100% { transform: translateX(0); }
}

@media (max-width: 460px) {
  .modern-migration .modern-models li strong { flex: 0 0 6em; text-align: right; }
}

/* A shared grid cell reserves the largest translated state in each region. */
.modern-verification [inert] { visibility: hidden; }
.modern-window-body, .verify-notes, .modern-case [data-verify-action] { display: grid; }
.verify-screen, .verify-notes > p, [data-verify-action] > span { grid-area: 1 / 1; min-width: 0; align-self: start; }
.modern-verification .modern-window { border-radius: 12px; box-shadow: 0 2px 3px #29435814, 0 10px 24px #1c344b12; }
.modern-verification .modern-window-body {
  padding: clamp(10px,1.3vw,18px);
  background: radial-gradient(circle,#779aa921 .8px,transparent 1px) 0 0 / 14px 14px, #f8fafb;
}
.verify-screen table { background: #fff; font-variant-numeric: tabular-nums; }
.modern-verification .modern-titlebar { background: linear-gradient(110deg,#223d50,#36586d); padding: 9px 12px; }
.modern-verification .modern-window-actions { padding: 9px; }
.modern-case [data-verify-action] { width: 100%; align-content: center; border-radius: 7px; background: #224a52; }
[data-verify-action] > span { display: flex; justify-content: space-between; align-items: center; gap: 8px; text-align: left; }
[data-verify-action] b { font-size: 1.05rem; }
.modern-verification .modern-window-tools > span { border-bottom: 2px solid transparent; }
.modern-verification .modern-window-tools > .is-open { border-color: #34786c; }
.modern-verification .modern-failure, .modern-verification .modern-passes li { border-radius: 6px; }
.modern-verification .modern-verify-log { background: #f2f7f6; border: 1px solid #becfc9; padding: 12px; border-radius: 10px; }
.modern-verification .modern-verify-log li { border: 0; border-left: 1px solid #adc8be; padding: 4px 8px; }
.modern-verification .modern-verify-log li[aria-current] { border-left: 3px solid #357768; padding-left: 6px; background: #dfede6; }
.modern-verify-log li span:first-child { font-family: monospace; color: #476d60; }
@media (prefers-reduced-motion: no-preference) {
  .verify-screen:not([inert]), .verify-notes p:not([inert]) { animation: verify-inspect .32s ease-out; }
  .verify-screen:not([inert]) .modern-passes li { animation: verify-inspect .32s backwards; }
  .modern-passes li:nth-child(2) { animation-delay: .07s !important; }
  .modern-passes li:nth-child(3) { animation-delay: .14s !important; }
  .modern-passes li:nth-child(4) { animation-delay: .21s !important; }
  .verify-screen:not([inert]) .modern-bar { transform-origin: left; animation: verify-bar .45s ease-out; }
}
@keyframes verify-inspect { from { opacity: .5; transform: translateY(3px); } }
@keyframes verify-bar { from { transform: scaleX(.1); } }
