/* A single, semantic Human-in-the-Loop diagram; CSS changes its flow at 800px. */
/* Extend the desktop frame by 20px per side while preserving content positions. */
.dx-ai { position:relative; isolation:isolate; color:#070e36; background:linear-gradient(120deg,#f5fbff,#edf7ff 55%,#f8fcff); padding:52px calc(4.6% - 20px); }
.dx-ai__inner { max-width:1348px; margin:auto; padding:48px 60px 36px; border:1px solid #c8e4f7; border-radius:28px; background:linear-gradient(130deg,#fff,#f7fcff); box-shadow:0 5px 30px #8bc4e012; }
.dx-ai__labels { display:flex; align-items:center; gap:22px; flex-wrap:wrap; margin-bottom:18px; }
.dx-ai__eyebrow { margin:0; color:#087bcd; font-size:18px; font-weight:700; line-height:1.5; letter-spacing:.04em; }
.dx-ai__badge { margin:0; padding:4px 16px; border:1px solid #cce6fa; border-radius:100px; background:#e8f5ff; color:#1a68a7; font-size:15px; font-weight:700; line-height:1.5; }
.dx-ai__heading h2 { margin:0; font-size:clamp(36px,3.7vw,54px); font-weight:800; line-height:1.35; letter-spacing:-.045em; }
.dx-ai__heading h2 span { display:inline-block; color:#0873c4; }
.dx-ai__heading h2 .dx-ai__title-data { color:inherit; }
.dx-ai__lead { margin:18px 0 0; color:#294a67; font-size:18px; line-height:1.85; }
.human-loop { display:grid; grid-template-columns:minmax(0,1fr) 6% minmax(0,1fr) 11% minmax(0,1fr) 6% minmax(0,1fr); position:relative; align-items:center; gap:0; padding:32px 0 68px; margin-top:12px; }
.human-loop__node { min-width:0; align-self:stretch; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:26px 12px; border:1px solid #bcdcf3; border-radius:20px; background:#fff; text-align:center; }
.human-loop__node > img { display:block; width:84px; height:84px; object-fit:contain; margin:0 auto 10px; }
.human-loop__node h3 { margin:0 0 10px; font-size:25px; font-weight:800; line-height:1.4; letter-spacing:-.04em; }
.human-loop__node p { margin:0; color:#164775; font-size:16px; font-weight:700; line-height:1.7; }
.human-loop__node p span { white-space:nowrap; }
.human-loop__node > span { margin-top:8px; color:#4b647c; font-size:14px; line-height:1.8; }
.human-loop__ai { aspect-ratio:1; align-self:center; min-height:0; padding:18px 6px; border-radius:50%; border-color:#8bc9f2; background:linear-gradient(150deg,#f1faff,#e5f3ff); box-shadow:0 6px 24px #2787d112; }
.human-loop__ai > img { width:80px; height:80px; }
.human-loop__ai h3 { margin-bottom:6px; font-size:28px; }
.human-loop__arrow { align-self:center; color:#2378ba; text-align:center; }
.human-loop__arrow > span { display:block; margin-bottom:8px; font-size:12px; font-weight:600; white-space:nowrap; }
.human-loop__arrow i,.human-loop__exchange i { display:block; height:2px; margin:0 8px; background:#2583c7; position:relative; }
.human-loop__arrow i::after,.human-loop__exchange i::after { content:''; position:absolute; right:0; top:-4px; width:8px; height:8px; border-top:2px solid #2583c7; border-right:2px solid #2583c7; transform:rotate(45deg); }
.human-loop__exchange { display:grid; gap:18px; padding-inline:3px; color:#156db1; text-align:center; font-size:13px; line-height:1.55; font-weight:600; }
.human-loop__proposal span { display:block; margin-bottom:8px; }
.human-loop__recheck span { display:block; margin-top:8px; }
.human-loop__recheck i { background:#6c9ec4; }
.human-loop__recheck i::after { right:auto; left:0; transform:rotate(-135deg); border-color:#6c9ec4; }
.human-loop__return { position:absolute; bottom:22px; left:9.6%; right:9.6%; height:46px; border:2px solid #3988c5; border-top:0; border-radius:0 0 14px 14px; }
.human-loop__return::before { content:''; position:absolute; top:0; left:-5px; width:8px; height:8px; border-top:2px solid #3988c5; border-right:2px solid #3988c5; transform:rotate(-45deg); }
.human-loop__return span { display:none; }
.human-loop__feedback { position:absolute; bottom:5px; left:50%; transform:translateX(-50%); width:max-content; max-width:80%; margin:0; padding:6px 20px; border:1px solid #d7eaf8; border-radius:100px; background:#eef8ff; color:#175b93; text-align:center; font-size:15px; line-height:1.8; }
.human-loop__feedback strong { font-weight:700; }
.human-loop__warning { display:flex; align-items:center; justify-content:center; gap:20px; padding:12px 16px; border:1px solid #efddce; border-radius:12px; background:#fffaf5; color:#a6602c; }
.human-loop__warning p { margin:0; font-size:14px; line-height:1.7; font-weight:600; }
.human-loop__stops { margin-top:28px; }
.human-loop__stops > h3 { margin:0 0 14px; font-size:23px; line-height:1.5; }
.human-loop__stop-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; align-items:start; }
.human-loop__stops details { border:1px solid #cfe3f2; border-radius:10px; background:#fff; }
.human-loop__stops summary { display:flex; align-items:center; gap:10px; min-height:60px; padding:14px; font-size:16px; font-weight:700; line-height:1.65; cursor:pointer; list-style:none; }
.human-loop__stops summary::-webkit-details-marker { display:none; }
.human-loop__stops summary > span { color:#5187b3; font-size:12px; }
.human-loop__stops summary::after { content:'＋'; margin-left:auto; color:#2784c8; font-size:18px; }
.human-loop__stops details[open] summary::after { content:'−'; }
.human-loop__stops details > div { padding:0 16px 16px; }
.human-loop__stops p { margin:0; color:#3a5470; font-size:14px; line-height:1.85; }
.human-loop__stops p + p { margin-top:8px; color:#1264aa; font-weight:600; }
@media(max-width:1100px) and (min-width:801px){
 .dx-ai { padding-inline:calc(3% - 20px); }
 .dx-ai__inner { padding:38px 46px 30px; }
 .human-loop__node { padding-inline:8px; }
 .human-loop__node h3 { font-size:22px; }
 .human-loop__node p { font-size:14px; }
 .human-loop__node > span { font-size:13px; }
 .human-loop__ai > img { width:62px; height:62px; }
 .human-loop__ai { padding:12px 4px; }
 .human-loop__ai > span { display:none; }
 .human-loop__exchange { font-size:12px; }
 .human-loop__stops summary { font-size:15px; gap:6px; padding:12px; }
}
@media(max-width:800px){
 .dx-ai { padding:36px 24px; }
 .dx-ai__inner { padding:30px 24px; border-radius:22px; }
 .dx-ai__heading h2 { font-size:36px; }
 .dx-ai__lead { font-size:16px; }
 .dx-ai__lead br { display:none; }
 .human-loop { max-width:540px; margin:24px auto 0; padding:0 0 64px; grid-template-columns:minmax(0,1fr) 54px minmax(0,1fr); grid-template-rows:auto 90px auto; }
 .human-loop__data { grid-area:1/1; }
 .human-loop__input { grid-area:1/2; }
 .human-loop__ai { grid-area:1/3; }
 .human-loop__human { grid-area:3/3; }
 .human-loop__execute { grid-area:3/1; }
 .human-loop__decision { grid-area:3/2; }
 .human-loop__node { padding:16px 8px; border-radius:16px; }
 .human-loop__node > img { width:62px; height:62px; margin-bottom:6px; }
 .human-loop__node h3 { font-size:22px; margin-bottom:7px; }
 .human-loop__node p { font-size:15px; }
 .human-loop__node > span { font-size:14px; margin-top:5px; }
 .human-loop__ai { border-radius:50%; }
 .human-loop__decision i::after { right:auto; left:0; transform:rotate(-135deg); }
 .human-loop__arrow > span { font-size:11px; white-space:normal; }
 .human-loop__exchange { grid-area:2/3; display:grid; grid-template-columns:.85fr 1.15fr; gap:0; padding:0; align-self:stretch; font-size:12px; line-height:1.45; }
 .human-loop__exchange > div { display:flex; align-items:center; justify-content:center; gap:6px; }
 .human-loop__proposal span,.human-loop__recheck span { margin:0; max-width:3em; }
 .human-loop__recheck span { max-width:none; white-space:nowrap; }
 .human-loop__proposal { flex-direction:row-reverse; }
 .human-loop__exchange i { flex:0 0 2px; width:2px; height:72px; margin:4px; }
 .human-loop__proposal i::after { top:auto; bottom:0; right:-4px; transform:rotate(135deg); }
 .human-loop__recheck i::after { top:0; left:-4px; transform:rotate(-45deg); }
 .human-loop__return { grid-area:2/1; position:relative; inset:auto; width:2px; height:72px; margin:auto; border:0; border-radius:0; background:#3988c5; }
 .human-loop__return::before { left:-3px; }
 .human-loop__return span { display:block; position:absolute; left:10px; top:20px; white-space:nowrap; color:#25699d; font-size:12px; }
 .human-loop__feedback { bottom:0; width:100%; max-width:none; padding:8px; border-radius:10px; font-size:14px; }
 .human-loop__feedback strong { display:inline-block; }
 .human-loop__warning { margin-top:16px; flex-wrap:wrap; gap:4px 16px; padding:10px; }
 .human-loop__stop-grid { grid-template-columns:1fr; gap:8px; }
 .human-loop__stops > h3 { font-size:21px; }
 .human-loop__stops summary { min-height:52px; font-size:15px; }
}
@media(max-width:600px){
 .dx-ai { padding:30px 12px; }
 .dx-ai__inner { padding:26px 12px 24px; border-radius:18px; }
 /* Keep the mobile frame size; align the heading with its inner content edge. */
 .dx-ai .dx-ai__heading { margin-inline:0; }
 .dx-ai__labels { gap:10px; margin-bottom:14px; }
 .dx-ai__eyebrow { font-size:13px; }
 .dx-ai__badge { padding:4px 10px; font-size:12px; }
 .dx-ai__heading h2 { font-size:30px; line-height:1.45; }
 .dx-ai__lead { font-size:15px; line-height:1.85; margin-top:16px; }
 .human-loop { grid-template-columns:minmax(0,1fr) 38px minmax(0,1fr); margin-top:22px; padding-bottom:78px; }
 .human-loop__node { padding:14px 6px; }
 .human-loop__node > img { width:48px; height:48px; }
 .human-loop__node h3 { font-size:20px; }
 .human-loop__node p { font-size:14px; line-height:1.65; }
 .human-loop__node > span { font-size:13px; line-height:1.65; }
 .human-loop__ai { padding:16px 5px; aspect-ratio:1; }
 .human-loop__ai > span { display:none; }
 .human-loop__arrow i { margin-inline:5px; }
 .human-loop__return span { left:10px; font-size:11px; }
 .human-loop__warning p { font-size:14px; }
 .human-loop__stops { margin-top:24px; }
 .human-loop__stops > h3 { font-size:20px; }
}
@media(max-width:359px){
 .dx-ai__inner { padding-inline:10px; }
 /* Preserve the approved two-line title at 320px while adding 1px of inset. */
 .dx-ai .dx-ai__heading { margin-inline:-2px; }
 .dx-ai__labels { gap:8px; }
 .dx-ai__eyebrow { font-size:12px; }
 .dx-ai__badge { padding-inline:8px; font-size:11px; }
 .dx-ai__heading h2 { font-size:28px; }
 .human-loop { grid-template-columns:minmax(0,1fr) 32px minmax(0,1fr); }
 .human-loop__node h3 { font-size:18px; }
 .human-loop__ai { padding:10px 4px; }
 .human-loop__ai > img { width:38px; height:38px; }
 .human-loop__node p { font-size:14px; }
 .human-loop__exchange { font-size:11px; }
 .human-loop__exchange > div { gap:1px; }
 .human-loop__node > span { font-size:13px; }
}

/* Text-only caution and compact mobile hierarchy; core route geometry stays shared. */
.dx-ai__lead,.human-loop__node p,.human-loop__node > span,.human-loop__stops p { color:#222831; }
.dx-ai__term { white-space:nowrap; }
.human-loop__warning { display:block; padding:12px 16px; background:#fffaf6; border-color:#eadbcf; color:#734724; text-align:center; }
.human-loop__warning p { font-size:15px; font-weight:600; }
.human-loop__stops summary .human-loop__stop-title { color:inherit; font-size:inherit; }
@media(max-width:600px){
 .dx-ai__inner { padding-top:22px; padding-bottom:20px; }
 .dx-ai__lead { margin-top:14px; line-height:1.8; }
 .human-loop { margin-top:18px; padding-bottom:68px; grid-template-rows:auto 76px auto; }
 .human-loop__node { padding:10px 6px; }
 .human-loop__node > img { width:42px; height:42px; margin-bottom:5px; }
 .human-loop__node > span { display:none; }
 .human-loop__ai { padding:12px 5px; }
 .human-loop__exchange i,.human-loop__return { height:60px; }
 .human-loop__warning { margin-top:12px; padding:10px; text-align:left; }
 .human-loop__stops { margin-top:18px; }
 .human-loop__stops > h3 { margin-bottom:10px; }
 .human-loop__stop-grid { grid-template-columns:1fr; gap:7px; }
 .human-loop__stops summary { gap:8px; min-height:44px; padding:9px 12px; background:white; font-size:15px; line-height:1.6; }
 .human-loop__stops summary::after { font-size:17px; }
 .human-loop__stops details > div { padding:12px; border-top:1px solid #cfe3f2; background:#fff; }
 .human-loop__stops details:not([open]) > div { display:none; }
 .human-loop__stops details[open] summary { background:#edf7ff; }
 .human-loop__stops details > div p { font-size:15px; }
}
@media(max-width:359px){
 .human-loop__ai { padding:8px 4px; }
 .human-loop__ai > img { width:36px; height:36px; }
 .human-loop__stops summary { padding-inline:10px; }
}

/* Route labels use dark text; arrows retain their existing blue. */
.human-loop__arrow > span,.human-loop__exchange,.human-loop__return span { color:#111827; font-weight:700; }
.human-loop__arrow > span { font-size:13px; }
.human-loop__feedback { background:#123a61; color:#fff; border-color:#123a61; border-radius:14px; }
.human-loop__warning { display:flex; flex-wrap:nowrap; align-items:center; justify-content:center; gap:10px; width:100%; max-width:500px; margin:24px auto 0; padding:11px 16px; background:#fffbf7; color:#111827; border-color:#eadfd5; text-align:left; }
.human-loop__warning p { min-width:0; }
.human-loop__arrow > span,.human-loop__proposal span { word-break:keep-all; }
.human-loop__warning > svg { flex:0 0 20px; width:20px; height:20px; fill:none; stroke:#b76c32; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
@media(max-width:800px){
 .human-loop__arrow > span,.human-loop__exchange,.human-loop__return span { font-size:12px; }
}
@media(max-width:600px){
 .human-loop__exchange { grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr); }
 .human-loop__exchange i { margin-inline:3px; }
 .human-loop__proposal span { max-width:none; }
}
@media(max-width:359px){
 .human-loop { grid-template-columns:minmax(0,1fr) 38px minmax(0,1fr); }
}

.human-loop__warning p > span { white-space:nowrap; }

/* The warning alone adopts the approved high-contrast orange. */
.human-loop__warning { color:#fff; background:#9a3412; border-color:#9a3412; border-radius:12px; }
.human-loop__warning p { color:#fff; font-weight:700; }
.human-loop__warning svg { color:#fff; stroke:#fff; }
