.drive-flow {
  width: min(1040px, calc(100vw - 32px));
  max-width: none;
  max-height: min(820px, calc(100dvh - 32px));
  padding: 0;
  overflow: hidden;
  border: 1px solid #b6c8d2;
  border-radius: 16px;
  background: #fff;
  color: var(--lor-navy, #082948);
  box-shadow: 0 22px 76px #08294838;
  font-family: var(--sans, Arial, sans-serif);
}
.drive-flow[open] { display: flex; flex-direction: column; }
.drive-flow::backdrop { background: #0d233d89; }
.df-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 26px 17px;
  border-bottom: 1px solid #dae4e9;
}
.df-head h2 {
  margin: 0;
  color: #102f4b;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  line-height: 1.1;
  letter-spacing: -.035em;
}
.df-context, .df-kind, .df-source-head > span {
  margin: 0 0 5px;
  color: #43677b;
  font: 650 .72rem/1.35 var(--mono, monospace);
}
.df-close, .df-back, .df-choice, .df-block {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  cursor: pointer;
}
.df-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  padding: 0;
  border: 1px solid #bdcfda;
  border-radius: 50%;
  background: #fff;
  color: #173d5c;
}
.df-close:hover, .df-back:hover { background: #eaf2f9; }
.df-close svg { width: 19px; height: 19px; stroke: currentColor; stroke-width: 1.7; fill: none; }
.df-scroll {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 16px 26px 25px;
}
.df-intro, .df-description, .df-example {
  margin: 0;
  color: #365065;
  font-size: .94rem;
  line-height: 1.5;
}
.df-outcome {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 9px;
  margin-top: 10px;
  padding: 6px 10px;
  border-left: 3px solid #30846a;
  color: #164939;
  background: #eef8f3;
  font-size: .86rem;
}
.df-outcome strong { font-weight: 700; }
.df-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(265px, 1fr);
  align-items: start;
  gap: 22px;
  margin-top: 15px;
}
.df-chart {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #c4d4df;
  border-radius: 12px;
  background-color: #f1f6f8;
  background-image: radial-gradient(#c5d3da 1px, transparent 1.1px);
  background-size: 13px 13px;
}
.df-board { height: 409px; position: relative; isolation: isolate; }
.df-wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.df-wire {
  fill: none;
  stroke: #738997;
  stroke-width: 1.5px;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.df-wire.df-active { stroke: #0656b3; stroke-width: 2.1px; }
.df-wire-label {
  position: absolute;
  z-index: 1;
  padding: 1px 3px;
  transform: translate(-50%, -50%);
  background: #f1f6f8;
  color: #3f5666;
  font: 650 max(13px, .81rem)/1.15 var(--mono, monospace);
  pointer-events: none;
}
.df-wire-label.df-active { color: #003f97; }
.df-block {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 34%;
  min-height: 44px;
  padding: 5px 6px;
  border: 1.4px solid #9bb4c5;
  border-radius: 7px;
  background: #fff;
  color: #163a52;
  box-shadow: 0 2px 0 #aabcce48;
  font: 680 .86rem/1.22 var(--sans, Arial, sans-serif);
  text-align: center;
  transform: translate(-50%, -50%);
}
.df-block::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border: 1.4px solid currentColor;
  border-radius: 1.5px;
  color: #36799b;
}
.df-block[data-kind="input"], .df-block[data-kind="rest"] { border-radius: 24px; }
.df-block[data-kind="input"]::before, .df-block[data-kind="rest"]::before { border-radius: 50%; }
.df-block[data-kind="decision"] { border: 1.6px solid #af8743; border-radius: 4px; background: #fff5df; color: #64440f; }
.df-block[data-kind="decision"]::before { width: 9px; height: 9px; border-radius: 0; color: #875f13; background: #f4d995; transform: rotate(45deg); }
.df-block[data-kind="rest"] { background: #eff7f1; border-color: #92b59f; color: #2a5743; }
.df-block[data-kind="rest"]::before { color: #2a7051; }
.df-block:hover { border-color: #155893; box-shadow: 0 2px 4px #4669843b; }
.df-block[aria-pressed="true"] {
  border-color: #0f4177;
  background: #10487f;
  color: white;
  box-shadow: 0 0 0 2px #f6faff, 0 0 0 3px #3971a4;
}
.df-block[aria-pressed="true"]::before { color: #fff; background: transparent; }
.df-block[aria-pressed="true"]:focus-visible { box-shadow: 0 0 0 3px #fff; outline: 3px solid #0454fc; outline-offset: 3px; }
.drive-flow button:focus-visible, .df-detail h3:focus-visible {
  outline: 3px solid #0454fc;
  outline-offset: 3px;
}
.df-detail { min-width: 0; padding: 2px 0; }
.df-kind { margin-bottom: 5px; color: #186483; }
.df-detail h3 {
  margin: 0 0 9px;
  font-size: clamp(1.21rem, 2.1vw, 1.55rem);
  line-height: 1.16;
  letter-spacing: -.02em;
  color: #11344e;
}
.df-example { margin-top: 8px; font-size: .85rem; color: #4c6372; }
.df-source {
  overflow: hidden;
  margin-top: 15px;
  border: 1px solid #173956;
  border-radius: 8px;
  background: #173044;
  color: #e4eef7;
}
.df-source-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 3px 8px;
  padding: 8px 11px;
  background: #11283a;
  border-bottom: 1px solid #375269;
}
.df-source-head > span { margin: 0; color: #a8c6d8; }
.df-file, .df-function, .df-code { font-family: var(--mono, monospace); }
.df-file { color: #fff; font-size: .75rem; }
.df-source pre {
  margin: 0;
  padding: 11px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  text-align: left;
  tab-size: 2;
  color: #e6f0fa;
  font: .76rem/1.5 var(--mono, monospace);
}
.df-code { color: inherit; font-size: inherit; }
.df-keyword { color: #9fd4ff; }
.df-string { color: #b9e9bd; }
.df-function {
  padding: 0 11px 9px;
  color: #afcadb;
  font-size: .69rem;
}
.df-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-top: 12px;
}
.df-choice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 6px 9px;
  border: 1px solid #b8cbd7;
  border-radius: 6px;
  background: #fff;
  color: #174770;
  font: 650 .8rem/1.3 var(--sans, Arial, sans-serif);
}
.df-choice:hover { background: #eaf3fa; border-color: #7394ab; }
.df-choice-label { font: 600 .68rem/1.15 var(--mono, monospace); color: #506978; }
.df-back { display: none; }
@media (max-width: 760px) {
  .drive-flow { width: min(100% - 16px, 605px); max-height: calc(100dvh - 16px); border-radius: 12px; }
  .df-head { padding: 13px 15px 11px; }
  .df-scroll { padding: 10px 12px 15px; }
  .df-layout { grid-template-columns: minmax(0, 1fr); gap: 13px; margin-top: 10px; }
  .df-intro { font-size: .86rem; }
  .df-board { height: 358px; }
  .df-block { gap: 4px; min-height: 44px; font-size: .8rem; }
  .df-block::before { width: 6px; height: 6px; }
  .df-wire-label { font-size: max(12px, .75rem); }
  .df-detail { padding: 0 2px; }
  .df-back {
    display: inline-block;
    min-height: 38px;
    margin-top: 6px;
    border: 0;
    padding: 4px 2px;
    background: transparent;
    color: #124b80;
    font: 650 .82rem/1.25 var(--sans, Arial, sans-serif);
    text-decoration: underline;
    text-underline-offset: 3px;
  }
}
@media (max-width: 365px) {
  .df-block { font-size: .76rem; }
  .df-block:not([data-kind="decision"])::before { display: none; }
  .df-block[data-kind="decision"]::before { width: 7px; height: 7px; }
}
@media (forced-colors: active) {
  .df-wire { stroke: CanvasText; }
  .df-wire.df-active { stroke: Highlight; }
  .df-block[aria-pressed="true"] { outline: 2px solid Highlight; }
}
