* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body.flow-page { margin: 0; background: #fff; color: #242923; font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
.flow-page { --flow-muted: #59635d; --flow-line: #dfe4df; --flow-green: #27654b; --flow-red: #ad3930; --flow-blue: #0067cf; }
.flow-page main { min-width: 0; }
.flow-page :is(h1,h2,h3,p,figure,pre) { margin: 0; }
.flow-page :is(h1,h2,h3) { font-family: var(--display); line-height: 1.17; font-weight: 600; text-wrap: balance; }
.flow-page h1 { font-size: 26px; }
.flow-page h2 { font-size: 36px; }
.flow-page h3 { font-size: 19px; }
.flow-page p { color: var(--flow-muted); }
.flow-page a { color: inherit; text-underline-offset: 4px; }
.flow-page button { font: inherit; cursor: pointer; }
.flow-page button,.flow-page a,.flow-page summary { -webkit-tap-highlight-color: transparent; }
.flow-page :focus-visible { outline: 3px solid #0067cf; outline-offset: 4px; }
.flow-page ::selection { background: #dcece0; color: #182e21; }
.flow-page svg { width: 20px; height: 20px; flex-shrink: 0; vertical-align: middle; }
.flow-page code,.flow-page pre { font-family: var(--mono); }
.shell { width: min(1200px, calc(100% - 80px)); margin-inline: auto; }
.section { padding-block: 88px; }
.text-link:hover { color: var(--flow-blue); }
.page-intro { padding-block: 48px 42px; }
.page-intro h1 { color: var(--flow-green); margin-bottom: 18px; }
.headline { font-size: 54px; font-family: var(--display); font-weight: 600; line-height: 1.08; color: #242923 !important; text-wrap: balance; }
.lead { max-width: 690px; font-size: 18px; line-height: 1.65; margin-top: 22px !important; }
.actions { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; margin-top: 26px; }
.button { display: inline-flex; min-height: 46px; padding: 11px 20px; justify-content: center; align-items: center; gap: 16px; border-radius: 6px; background: var(--flow-blue); color: #fff !important; text-decoration: none; font-size: 14px; font-weight: 500; transition: background .18s; }
.button:hover { background: #0055ad; }
.text-link { display: inline-flex; align-items: center; gap: 12px; font-size: 14px; text-decoration: none; font-weight: 500; }
.story .page-intro { text-align: center; }
.story .lead { margin-inline: auto; }
.story .actions { justify-content: center; }
.example-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 17px; border-bottom: 1px solid var(--flow-line); font-size: 13px; }
.example-heading > span:first-child { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.story-example { border-top: 1px solid var(--flow-line); padding-bottom: 48px; }
.story-statement { display: grid; grid-template-columns: 1fr 1fr; gap: 65px; align-items: center; padding-block: 30px; }
.story-statement h2 { font-size: 27px; }
.story-statement p { font-size: 15px; max-width: 490px; }
.sequence-pair { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--flow-line); border-radius: 6px; overflow: hidden; }
.sequence-pair > section { min-width: 0; background: #fafcf9; }
.sequence-pair > section + section { border-left: 1px solid var(--flow-line); background: #fff; }
.sequence-pair h3 { display: flex; align-items: center; gap: 9px; min-height: 54px; padding: 13px 20px; border-bottom: 1px solid var(--flow-line); font-size: 14px; }
.state-dot { width: 7px; height: 7px; background: #7b8580; border-radius: 50%; flex-shrink: 0; }
.state-dot.after { background: var(--flow-green); }
.change-tag { display: inline-block; background: #f9eee4; color: #81481c; padding: 3px 8px; border-radius: 3px; font-size: 11px; font-weight: 500; line-height: 1.5; }
.sequence-pair h3 .change-tag { margin-left: auto; }
.diagram-scroll { overflow-x: auto; scrollbar-color: #819987 #edf1ed; scrollbar-width: thin; }
.sequence { position: relative; min-width: 410px; min-height: 280px; padding: 22px 10px 10px; isolation: isolate; }
.participants { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); align-items: center; position: relative; z-index: 1; }
.participants > span { text-align: center; font-size: 11px; font-weight: 600; padding: 8px 3px; margin-inline: 6px; background: #edf1ec; border: 1px solid #dbe3da; border-radius: 3px; }
.sequence-lines { position: absolute; inset: 57px 10px 24px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); z-index: -1; }
.sequence-lines b { width: 0; height: 100%; border-left: 1px dashed #c4cfc5; justify-self: center; }
.sequence-rows { margin: 10px 0 0; padding: 0; list-style: none; }
.sequence-row { height: 61px; position: relative; }
.call-label { position: absolute; left: var(--from); width: var(--length); top: 5px; text-align: center; font: 11px/1.25 var(--mono); padding-inline: 3px; color: #4b5850; }
.call-arrow { position: absolute; left: var(--from); width: var(--length); top: 41px; border-top: 1.5px solid #627568; }
.call-arrow::after { content: ''; position: absolute; right: 0; top: -4px; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-top: 1.5px solid currentColor; transform: rotate(45deg); }
.moved .call-arrow { border-color: var(--flow-red); color: var(--flow-red); }
.moved .call-label { color: var(--flow-red); font-weight: 600; }
.finding { display: flex; gap: 18px; padding: 22px; background: #f7eee7; margin-top: 16px; border-radius: 5px; }
.finding > span { color: #874b26; padding-top: 2px; }
.finding h3 { font-size: 16px; margin-bottom: 6px; }
.finding p { max-width: 850px; font-size: 14px; color: #6c4e38; }
.finding a { margin-left: auto; align-self: center; padding: 10px; }
.leadership-band { background: #edf3ef; }
.leadership-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 75px; }
.large-copy { font-size: 23px; color: #273c30 !important; line-height: 1.45; }
.leadership-layout p + p { margin-top: 20px; }
.leadership-layout .text-link { margin-top: 24px; }
.section-heading { display: grid; grid-template-columns: 1fr 1fr; gap: 75px; align-items: end; margin-bottom: 42px; }
.section-heading p { max-width: 520px; }
.featured-cases { background: #f3f6f7; border-block: 1px solid #dce3e6; }
.featured-case-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.flow-case { --case-accent: #0066cc; --case-copy: #465a65; --case-line: #cfdde5; display: flex; flex-direction: column; min-width: 0; padding: 30px; background: #fff; border: 1px solid var(--case-line); border-radius: 8px; transition: border-color 180ms ease; }
.flow-case:hover { border-color: var(--case-accent); }
.flow-case-behavior { --case-accent: #a63135; --case-copy: #71474a; --case-line: #efcfcd; background: #fff0ef; }
.flow-case-branches { --case-accent: #226249; --case-copy: #365e48; --case-line: #c6dece; background: #e3f3e9; }
.flow-case-dependencies { --case-copy: #38566e; --case-line: #cbdfee; background: #e9f2fa; }
.flow-case-title { display: flex; align-items: flex-start; gap: 14px; }
.flow-case-title > svg { width: 26px; height: 26px; color: var(--case-accent); margin-top: 1px; }
.flow-case-title h3 { font-size: 25px; line-height: 1.2; }
.flow-case-copy > p { color: var(--case-copy); font-size: 15px; line-height: 1.65; margin-top: 16px; max-width: 53ch; }
.flow-case-topics { padding: 0; margin: 26px 0 24px; list-style: none; }
.flow-case-topics li { display: grid; grid-template-columns: .9fr 1.1fr; gap: 16px; padding-block: 13px; border-top: 1px solid var(--case-line); font-size: 13px; line-height: 1.55; }
.flow-case-topics strong { font-weight: 500; }
.flow-case-topics span { color: var(--case-copy); }
.flow-case-link { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; padding-top: 12px; margin-top: auto; color: var(--case-accent) !important; text-decoration: none; font-size: 14px; font-weight: 500; }
.flow-case-link:hover { text-decoration: underline; }
.flow-case-refactors-ai { --case-accent: #8cc4ff; --case-copy: #c5d5dd; --case-line: #4c6370; grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1.1fr; column-gap: 48px; background: #20292d; border-color: #20292d; color: #fff; }
.flow-case-refactors-ai .flow-case-copy { grid-column: 1; grid-row: 1; }
.flow-case-refactors-ai .flow-case-topics { grid-column: 2; grid-row: 1 / 3; align-self: center; margin: 0; }
.flow-case-refactors-ai .flow-case-link { grid-column: 1; grid-row: 2; margin-top: 18px; justify-content: flex-start; }
.method { border-bottom: 1px solid var(--flow-line); }
.method-steps { padding: 0; margin: 0; list-style: none; display: grid; grid-template-columns: repeat(4,1fr); gap: 32px; }
.method-steps li { border-top: 1px solid #b8c9bd; padding-top: 20px; }
.method-steps li > span { display: inline-flex; width: 27px; height: 27px; justify-content: center; align-items: center; background: #e6eee7; color: #31553c; font: 12px var(--mono); border-radius: 50%; margin-bottom: 20px; }
.method-steps h3 { font-size: 18px; margin-bottom: 12px; }
.method-steps p { font-size: 14px; }
.command-section { display: grid; grid-template-columns: 1.2fr 1fr; gap: 90px; border-top: 1px solid var(--flow-line); }
.command-section h2 { margin-bottom: 20px; }
.command-section p { font-size: 15px; }
.command-example { min-width: 0; }
.command-comment { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border: 1px solid #c4cbc5; border-radius: 6px; background: #fff; margin-top: 24px; }
.command-comment code { min-width: 0; font-size: 15px; overflow-wrap: anywhere; user-select: all; }
.command-comment button { display: grid; place-items: center; width: 36px; height: 36px; border: 0; background: transparent; color: var(--flow-muted); flex-shrink: 0; border-radius: 4px; }
.command-comment button:hover { background: #edf3f8; color: var(--flow-blue); }
.command-section .command-copy-status { min-height: 20px; font-size: 12px; margin: 5px 0; }
.command-section .command-alt { font-size: 12px; overflow-wrap: anywhere; }
.command-example .text-link { margin-top: 24px; color: var(--flow-blue); }
.command-note { padding-top: 10px; }
.command-note > svg { color: var(--flow-blue); margin-bottom: 20px; }
.command-note h3 { font-size: 24px; margin-bottom: 18px; }
.closing { background: #edf3ef; padding-block: 60px; }
.closing > div { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.closing h2 { font-size: 32px; }
.closing p { max-width: 650px; margin-top: 15px; }
.closing .button { flex-shrink: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (min-width: 1500px) { .story .page-intro { padding-block: 50px 45px; } }
@media (max-width: 1000px) {
  .flow-case { padding: 24px; }
  .flow-case-title h3 { font-size: 22px; }
  .flow-case-topics li { grid-template-columns: 1fr; gap: 5px; }
  .shell { width: calc(100% - 48px); }
  .section-heading,.leadership-layout,.command-section { gap: 35px; }
}
@media (max-width: 700px) {
  .featured-case-grid { grid-template-columns: 1fr; gap: 18px; }
  .flow-case { padding: 20px; }
  .flow-case-title { gap: 11px; }
  .flow-case-copy > p { font-size: 14px; }
  .flow-case-refactors-ai { display: flex; }
  .flow-case-refactors-ai .flow-case-topics { align-self: stretch; margin: 26px 0 24px; }
  .flow-case-refactors-ai .flow-case-link { margin-top: auto; justify-content: space-between; }
  .shell { width: calc(100% - 36px); }
  .page-intro { padding-block: 32px; }
  .flow-page h1 { font-size: 23px; }
  .headline { font-size: 38px; }
  .lead { font-size: 16px; }
  .actions { gap: 19px; }
  .story .page-intro { text-align: left; }
  .story .actions { justify-content: flex-start; }
  .example-heading { align-items: flex-start; flex-direction: column; gap: 7px; font-size: 12px; }
  .story-statement { grid-template-columns: 1fr; gap: 16px; padding-block: 25px; }
  .sequence-pair { grid-template-columns: 1fr; }
  .sequence-pair > section + section { border-left: 0; border-top: 1px solid var(--flow-line); }
  .sequence-pair h3 { padding-inline: 13px; }
  .sequence-pair h3 .change-tag { font-size: 10px; }
  .participants > span { font-size: 11px; margin-inline: 2px; }
  .finding { padding: 18px 14px; gap: 10px; }
  .finding > a { display: none; }
  .finding h3 { font-size: 15px; }
  .finding p { font-size: 13px; }
  .section { padding-block: 52px; }
  .flow-page h2 { font-size: 28px; }
  .leadership-layout,.section-heading,.command-section { grid-template-columns: 1fr; gap: 23px; }
  .command-section { gap: 30px; }
  .command-comment { padding: 10px 12px; }
  .command-comment code { font-size: 13px; }
  .command-note { border-top: 1px solid var(--flow-line); padding-top: 26px; }
  .large-copy { font-size: 21px; }
  .section-heading { margin-bottom: 30px; }
  .method-steps { grid-template-columns: 1fr 1fr; gap: 30px 20px; }
  .method-steps h3 { font-size: 16px; }
  .method-steps p { font-size: 13px; }
  .closing > div { flex-direction: column; align-items: start; gap: 25px; }
  .closing h2 { font-size: 27px; }
  .closing p { font-size: 15px; }
}
@media (max-width: 359px) {
  .shell { width: calc(100% - 28px); }
  .headline { font-size: 32px; }
  .method-steps { grid-template-columns: 1fr; }
  .sequence { padding-inline: 3px; }
  .sequence-lines { left: 3px; right: 3px; }
  .sequence-pair h3 { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .flow-page *, .flow-page *::before, .flow-page *::after { transition: none !important; animation: none !important; }
}
