html:has(.workflow-stories:target, .story-anchor:target, #law-firm-results:target) { scroll-behavior: auto; }
.workflow-stories {
  --surface: #122d40;
  --card: #18384b;
  --text: #f3f8fa;
  --body: #d0e1e8;
  --rail: #52707e;
  --accent: #91ded9;
  --dot-x: 50%;
  --dot-y: 33px;
  position: relative;
  background: var(--surface);
  color: var(--text);
}
.story-anchor { position: absolute; inset: 0 auto auto 0; }
.story-anchor:focus { outline: none; }
.story-bar { position: sticky; top: 0; z-index: 3; background: #122d40; border-block: 1px solid #42606f; }
.story-switch { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-block: 12px; }
.story-switch > span { color: #d3e4e9; font-size: .94rem; font-weight: 600; }
.story-switch nav { display: flex; align-items: stretch; gap: 6px; }
.story-switch a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid #63818d; border-radius: 6px; padding: 8px 15px; color: var(--text); font-size: .93rem; font-weight: 600; text-decoration: none; }
.story-switch a:hover { border-color: #b0dfdf; }
.story-switch a[aria-current="true"],
.workflow-stories:not(:has(#manufacturing:target)) [data-choice="law-firms"],
.workflow-stories:has(#manufacturing:target) [data-choice="manufacturing"] { background: #d4eeeb; color: #102f40; border-color: #d4eeeb; }
.story-version { display: none; padding-block: clamp(33px,4vw,65px) clamp(35px,4vw,64px); }
[data-case="law-firms"] { display: block; }
#manufacturing:target ~ [data-case="law-firms"] { display: none; }
#manufacturing:target ~ [data-case="manufacturing"] { display: block; }
.workflow-stories .story-version[hidden] { display: none; }
.story-kicker { margin: 0 0 12px; font: 650 .875rem/1.3 DM,sans-serif; color: #9de4df; letter-spacing: .055em; }
.handoff-intro { text-align: center; max-width: 900px; margin: 0 auto clamp(28px,3.5vw,52px); }
.handoff-intro h2 { margin: 0; font: 530 clamp(2.8rem,4.65vw,5.2rem)/1.03 DM,sans-serif; letter-spacing: -.055em; color: #edf7f5; text-wrap: balance; }
.handoff-intro h2 em { color: #99e1dc; font-family: RelayEditorial,Georgia,serif; font-weight: 400; letter-spacing: -.03em; }
.handoff-intro > p:not(.story-kicker) { max-width: 62ch; margin: 15px auto 0; font-size: clamp(1.03rem,1.25vw,1.19rem); line-height: 1.55; color: var(--body); }
.story-path { position: relative; max-width: 1020px; margin-inline: auto; min-width: 0; }
.story-list { list-style: none; margin: 0; padding: 0; }
.story-step { position: relative; display: flex; padding-bottom: clamp(12px,1.6vw,24px); }
.story-step:last-child { padding-bottom: 0; }
.story-step:nth-child(even) { justify-content: flex-end; }
.story-dot { position: absolute; z-index: 1; width: 13px; height: 13px; border: 2px solid var(--rail); background: var(--surface); border-radius: 50%; top: var(--dot-y); left: var(--dot-x); transform: translate(-50%,-50%); }
.story-step::before { content: ""; position: absolute; top: var(--dot-y); left: var(--dot-x); bottom: calc(0px - var(--dot-y)); width: 2px; transform: translateX(-50%); background: var(--rail); }
.story-step:last-child::before { content: none; }
.story-spine { display: none; }
.workflow-stories[data-active] .story-spine { display: block; position: absolute; pointer-events: none; top: var(--rail-top,0); height: var(--rail-height,0); width: 2px; background: var(--rail); left: var(--dot-x); transform: translateX(-50%); overflow: hidden; }
.workflow-stories[data-active] .story-step::before { content: none; }
.story-spine i { display: block; height: 100%; background: var(--accent); transform: scaleY(var(--rail-progress,0)); transform-origin: top; }
.story-step.reached .story-dot { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 3px var(--surface); }
.story-card { container-type: inline-size; position: relative; width: calc(50% - 34px); background: var(--card); color: var(--text); border: 1px solid #3c5c6a; border-radius: 5px; padding: clamp(17px,2vw,30px); }
.story-step::after { content: ""; position: absolute; width: 34px; left: var(--dot-x); top: var(--dot-y); border-top: 1px solid var(--rail); pointer-events: none; }
.story-step:nth-child(odd)::after { transform: translateX(-100%); }
.story-card h3 { font: 565 clamp(1.32rem,1.88vw,2rem)/1.15 DM,sans-serif; letter-spacing: -.041em; color: inherit; margin: 0; text-wrap: pretty; }
.story-card p { margin: 10px 0 0; font-size: 1rem; line-height: 1.53; color: var(--body); }
.story-proof { display: grid; grid-template-columns: minmax(0,1.52fr) minmax(0,1fr); gap: clamp(12px,1.35vw,21px); align-items: center; border-top: 1px solid #40606d; margin-top: 16px; padding-top: 14px; }
.story-record span, .story-record strong { display: block; }
.story-record span { font-weight: 580; font-size: .875rem; color: #a4d8d7; }
.story-record strong { margin-top: 5px; font-size: .98rem; font-weight: 530; color: var(--text); line-height: 1.4; }
.story-sketch { position: relative; display: block; margin: 0; min-width: 0; isolation: isolate; overflow: hidden; aspect-ratio: 3/2; border-radius: 4px; background: var(--card); }
.story-sketch > img, .sketch-ink { display: block; width: 100%; height: 100%; }
.story-sketch > img { object-fit: contain; }
.sketch-ink { display: none; position: absolute; inset: 0; pointer-events: none; }
.workflow-stories a:focus-visible { outline: 2px solid white; outline-offset: 3px; }
.story-value > .wrap { padding-block: clamp(35px,4vw,65px); display: flex; align-items: center; justify-content: space-between; gap: 27px; }
.story-value h2 { max-width: 22ch; }
.story-value .wrap p:not(.eyeline) { margin-bottom: 0; }
.story-value a { flex-shrink: 0; }
@container (max-width: 335px) {
  .story-proof { grid-template-columns: 1fr; gap: 10px; }
  .story-sketch { width: 100%; max-width: 300px; }
}
@media(prefers-reduced-motion: no-preference) {
  .story-sketch.is-drawing > img { opacity: .16; }
  .story-sketch.is-drawing .sketch-ink { display: block; }
  .is-drawing .sketch-sweep { stroke-dasharray: 1; animation: sketch-strokes 1.35s cubic-bezier(.19,.42,.5,1) both; }
  @keyframes sketch-strokes { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
}
@media(prefers-reduced-motion: reduce) { .story-spine i { transform: none; } }
@media(max-width: 740px) {
  .workflow-stories { --dot-x: 7px; --dot-y: 26px; }
  .story-switch { display: block; padding-block: 9px; }
  .story-switch > span { display: none; }
  .story-switch nav { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
  .story-switch a { padding: 7px 3px; font-size: .89rem; text-align: center; line-height: 1.2; }
  .handoff-intro { text-align: left; margin-bottom: 25px; }
  .handoff-intro h2 { font-size: clamp(2.6rem,8.6vw,3.8rem); }
  .handoff-intro > p:not(.story-kicker) { margin-inline: 0; }
  .story-step { display: block; padding: 0 0 20px 28px; }
  .story-card { width: 100%; }
  .story-step::after, .story-step:nth-child(odd)::after { width: 21px; transform: none; }
  .story-value > .wrap { align-items: flex-start; flex-direction: column; gap: 17px; }
}
@media print {
  .story-bar, .story-anchor, .sketch-ink { display: none !important; }
  .story-card { break-inside: avoid; }
  .story-sketch > img { opacity: 1 !important; }
}
.story-card p.story-stage { margin: 0 0 8px; color: #a4d8d7; font-size: .875rem; font-weight: 600; line-height: 1.35; }

/* The result reads as the last page of each illustrated workflow. */
.result-plate { max-width: 1020px; margin: clamp(32px, 5vw, 68px) auto 0; padding-top: clamp(24px, 3.5vw, 46px); border-top: 1px solid var(--rail); display: grid; grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr); align-items: center; gap: clamp(24px, 4vw, 64px); }
.result-plate figcaption { margin: 0; }
.result-plate h3 { margin: 0; font: 520 clamp(1.95rem, 3.55vw, 3.5rem)/1.06 DM,sans-serif; letter-spacing: -.048em; text-wrap: pretty; color: var(--text); }
.result-plate figcaption > p:last-child { margin: 16px 0 0; max-width: 46ch; color: var(--body); font-size: 1.02rem; line-height: 1.55; }
.result-sheet { --paper: #193c4d; min-width: 0; padding: clamp(17px, 2.2vw, 29px); border: 1px solid #557382; background: var(--paper); border-radius: 5px; color: var(--text); }
.result-sheet h4 { margin: 0; font: 570 clamp(1.05rem, 1.5vw, 1.35rem)/1.3 DM,sans-serif; letter-spacing: -.018em; color: inherit; }
.result-metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin: 20px 0 0; padding: 14px 0 0; border-top: 1px solid #5b7886; }
.result-metrics > div { display: flex; flex-direction: column; gap: 5px; padding-right: 13px; }
.result-metrics > div + div { border-left: 1px solid #5b7886; padding-left: clamp(12px, 2vw, 23px); padding-right: 0; }
.result-metrics dt { max-width: 20ch; font-size: .895rem; line-height: 1.32; color: var(--body); }
.result-metrics dd { margin: auto 0 0; color: var(--text); font: 520 clamp(2rem,3.5vw,3.2rem)/1.1 DM,sans-serif; letter-spacing: -.046em; font-variant-numeric: tabular-nums; }
.result-metrics > div + div dd { color: #a6e8e1; }
.result-footnote { margin: 16px 0 0; color: #d0e1e5; font-size: .9rem; line-height: 1.48; }
.order-sketch { display: grid; gap: 13px; list-style: none; margin: 18px 0; padding: 0; }
.order-sketch li { min-width: 0; }
.order-reading { display: flex; align-items: baseline; gap: 7px; font-size: .94rem; line-height: 1.3; }
.order-reading b { font-weight: 620; }
.order-reading span { color: var(--body); }
.kit-line { height: 8px; width: calc(var(--units) * 5%); display: flex; gap: 2px; margin: 6px 0 3px; border-radius: 1px; overflow: hidden; transform-origin: left; }
.kit-line i { flex-basis: 0; }
.stock-local { background: #e1ddc9; }
.stock-north { background: #83d0c5; }
.stock-south { background: #8ab5d9; }
.order-sketch p { margin: 0; font-size: .875rem; color: var(--body); line-height: 1.4; }
@media (max-width: 760px) {
  .result-plate { grid-template-columns: minmax(0,1fr); gap: 20px; }
  .result-plate h3 { max-width: 23ch; }
}
@media (max-width: 380px) {
  .result-sheet { padding-inline: 13px; }
}
@media (prefers-reduced-motion: no-preference) {
  .plant-sheet.is-drawing .kit-line { animation: result-spread .85s cubic-bezier(.2,.62,.3,1) both; }
  .plant-sheet.is-drawing li:nth-child(2) .kit-line { animation-delay: .15s; }
  .plant-sheet.is-drawing li:nth-child(3) .kit-line { animation-delay: .3s; }
  @keyframes result-spread { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}
@media print { .result-plate { break-inside: avoid; } }

.legal-scorecard { --score-ink: #102f3a; --score-teal: #09776f; --score-muted: #415b60; --score-rule: #a7bdb8; max-width: 1020px; margin: clamp(36px,5vw,70px) auto 0; padding-top: clamp(26px,4vw,48px); border-top: 1px solid var(--rail); scroll-margin-block-start: 80px; }
.legal-scorecard figcaption { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,.85fr); align-items: end; column-gap: clamp(28px,6vw,84px); margin: 0 0 clamp(19px,2.8vw,31px); }
.legal-scorecard figcaption .story-kicker { grid-column: 1/-1; margin: 0 0 9px; }
.legal-scorecard h3 { font: 520 clamp(2.5rem,5vw,4.6rem)/1.015 DM,sans-serif; letter-spacing: -.057em; margin: 0; color: var(--text); text-wrap: balance; }
.legal-scorecard figcaption > p:last-child { margin: 0; max-width: 47ch; font-size: 1.04rem; line-height: 1.5; color: var(--body); }
.score-paper { display: grid; grid-template-columns: 1fr 1fr; border-radius: 9px; padding: clamp(17px,3vw,36px); background: #edf4ef; color: var(--score-ink); }
.score-paper h4 { color: var(--score-ink); margin: 0 0 18px; font: 600 clamp(1.1rem,1.9vw,1.5rem)/1.2 DM,sans-serif; letter-spacing: -.03em; }
.score-comparison { padding-right: clamp(16px,3vw,43px); }
.score-ratios { border-left: 1px solid var(--score-rule); padding-left: clamp(16px,3vw,43px); }
.score-bars, .score-ratios ul { list-style: none; padding: 0; margin: 0; }
.score-bars { display: grid; gap: 21px; }
.score-bar-label { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 1rem; }
.score-bar-label b { font-variant-numeric: tabular-nums; line-height: 1.15; }
.score-bar-track { height: 12px; position: relative; background: #cbdad4; overflow: hidden; margin-block: 7px 6px; border-radius: 2px; }
.score-bar-track::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(to right, transparent 0 calc(20% - 2px),#edf4ef calc(20% - 2px) 20%); }
.score-bar-track i { display: block; width: var(--bar-size); height: 100%; background: #506872; transform-origin: left; }
.score-bars li:last-child i { background: var(--score-teal); }
.score-bars li p, .score-ratios li p { color: var(--score-muted); font-size: .91rem; line-height: 1.38; margin: 4px 0 0; }
.score-ratios ul { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: clamp(12px,2vw,24px); }
.score-dial { width: clamp(84px,8.2vw,116px); max-width: 100%; aspect-ratio: 1; display: grid; place-items: center; margin-bottom: 8px; }
.score-dial svg, .score-dial strong { grid-area: 1/1; }
.score-dial svg { display: block; width: 100%; fill: none; stroke-width: 7; }
.score-track { stroke: #c7d7cf; }
.score-arc { stroke: var(--score-teal); }
.score-ratios li:last-child .score-arc { stroke: #305767; }
.score-dial strong { font: 560 clamp(1.4rem,2.3vw,2.05rem)/1 DM,sans-serif; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.score-dial small { font-size: .55em; vertical-align: .25em; margin-inline-start: 1px; }
.score-ratios li > b { display: block; font-size: 1rem; line-height: 1.24; text-wrap: balance; }
.score-receipt { grid-column: 1/-1; display: grid; grid-template-columns: 1fr 1fr; margin: clamp(21px,3vw,34px) 0 0; padding: 16px 0 0; border-top: 1px solid var(--score-rule); }
.score-receipt div + div { padding-left: clamp(16px,3vw,43px); }
.score-receipt dt { font-size: .9rem; font-weight: 500; color: var(--score-muted); }
.score-receipt dd { margin: 3px 0 0; color: var(--score-ink); font: 550 clamp(1.18rem,2vw,1.65rem)/1.2 DM,sans-serif; letter-spacing: -.033em; }
.score-note { grid-column: 1/-1; max-width: 93ch; margin: 16px 0 0; font-size: .88rem; line-height: 1.43; color: var(--score-muted); }
@media (max-width: 760px) {
  .legal-scorecard figcaption, .score-paper { grid-template-columns: minmax(0,1fr); }
  .legal-scorecard figcaption > p:last-child { margin-top: 10px; }
  .score-comparison { padding: 0; }
  .score-ratios { margin-top: 21px; padding: 19px 0 0; border-left: 0; border-top: 1px solid var(--score-rule); }
  .score-ratios ul { gap: 13px; }
  .score-receipt { gap: 12px; }
  .score-receipt div + div { padding: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .score-comparison.is-drawing .score-bar-track i { animation: result-spread .85s cubic-bezier(.22,.61,.36,1) both; }
  .score-comparison.is-drawing li + li i { animation-delay: .16s; }
  .score-ratios.is-drawing .score-arc { animation: score-sweep 1.1s cubic-bezier(.22,.58,.25,1) both; }
  .score-ratios.is-drawing li + li .score-arc { animation-delay: .14s; }
  @keyframes score-sweep { from { stroke-dasharray: 0 100; } }
}
@media print { .legal-scorecard { break-inside: avoid; } }
