/* Stage 04 only. The controller owns aria-hidden, inert, and the selected button. */
.handoff-demo{height:398px;min-width:0;align-self:center;padding:14px;display:flex;flex-direction:column;gap:10px;color:#393b35;box-sizing:border-box}
.handoff-demo *{box-sizing:border-box}
.handoff-demo-nav{display:flex;gap:16px;flex-shrink:0;height:28px;align-items:stretch;border-bottom:1px solid #e6e7df}
.handoff-demo-nav button{font:inherit;font-size:10px;font-weight:500;line-height:1.4;color:#96998f;background:none;border:0;border-bottom:1px solid transparent;padding:0 1px 9px;margin:0 0 -1px;white-space:nowrap;cursor:pointer}
.handoff-demo-nav button>span{font-size:8px;margin-right:5px;color:#a7aa9f;font-variant-numeric:tabular-nums}
.handoff-demo-nav button[aria-selected=true]{color:#a9432c;border-color:#bb5136}
.handoff-demo-nav button[aria-selected=true]>span{color:#b66a54}
.handoff-demo-nav button:focus-visible{outline:2px solid #bd5136;outline-offset:3px;border-radius:2px}
.handoff-demo-views{display:grid;flex:1;min-height:0;min-width:0;isolation:isolate}
.handoff-demo-view{grid-area:1/1;min-width:0;min-height:0;border:1px solid #e3dfd8;border-radius:14px;background:#f8f7f4;display:flex;flex-direction:column;overflow:hidden;opacity:0;pointer-events:none}
.handoff-demo-view[aria-hidden=false]{opacity:1;pointer-events:auto;z-index:1}
.handoff-demo-heading{display:flex;align-items:center;gap:10px;padding:14px 17px;border-bottom:1px solid #e6e2da;background:#fffefc;min-height:65px;flex-shrink:0}
.handoff-demo-heading>div{min-width:0}
.handoff-demo-heading h3{margin:0;font-size:14px;font-weight:700;line-height:1.4;letter-spacing:-.045em;color:#353630}
.handoff-demo-heading p{margin:4px 0 0;font-size:10px;line-height:1.4;letter-spacing:-.025em;color:#8a877e}
.handoff-demo-badge{margin-left:auto;flex-shrink:0;padding:5px 7px;border-radius:6px;background:#f2f0eb;color:#888478;font-size:9px;white-space:nowrap;line-height:1.4}
.handoff-accounts-content{display:flex;flex-direction:column;justify-content:space-between;flex:1;min-height:0;padding:9px 17px 15px}
.handoff-account-list{margin:0;padding:0;list-style:none}
.handoff-account-list li{display:flex;gap:11px;align-items:center;padding:13px 0;border-bottom:1px solid #e8e5dd}
.handoff-account-list li:last-child{border-bottom:0}
.handoff-account-mark{width:30px;height:30px;flex-shrink:0;display:grid;place-items:center;color:#71796a;background:#eeeee7;border-radius:9px;font-size:23px;line-height:1}
.handoff-account-mark svg{height:21px;width:21px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
.handoff-account-code{font-size:12px;letter-spacing:-.08em;font-weight:600}
.handoff-account-list li>div{min-width:0}
.handoff-account-list strong{display:block;font-size:12px;line-height:1.5;letter-spacing:-.01em;font-weight:600}
.handoff-account-list li>div>span{display:block;margin-top:2px;font-size:10px;line-height:1.5;letter-spacing:-.035em;color:#929285}
.handoff-account-role{margin-left:auto;font-size:9px;line-height:1.5;color:#8b8f81;white-space:nowrap}
.handoff-ownership{margin:7px 0 0;padding-top:12px;border-top:1px solid #e4e2d8;letter-spacing:-.035em}
.handoff-ownership strong{display:block;font-size:11px;font-weight:600;line-height:1.6;color:#66715c}
.handoff-ownership>span{display:block;margin-top:3px;font-size:10px;line-height:1.6;color:#99998d;word-break:keep-all}
.handoff-spark{flex-shrink:0;width:20px;height:24px;color:#b64a2d}
.handoff-spark svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.handoff-edit-content{padding:13px 17px 15px;display:flex;flex-direction:column;gap:10px;flex:1;min-height:0}
.handoff-edit-message{display:flex;flex-direction:column;gap:5px;transform:translateY(var(--edit-y,0px));min-width:0}
.handoff-edit-speaker{font-size:10px;line-height:1.4;color:#837f75;padding:0 2px}
.handoff-edit-user{align-items:flex-end}
.handoff-edit-message>p{font-size:12px;line-height:1.75;letter-spacing:-.025em;margin:0;padding:11px 13px;border:1px solid #e4e0d9;word-break:keep-all;overflow-wrap:anywhere}
.handoff-edit-user>p{max-width:92%;background:#fbe8df;border-color:#f4d2c3;border-radius:12px 3px 12px 12px;color:#57473d}
.handoff-edit-sent{font-size:8px;line-height:1.4;color:#a1998e;padding-right:2px}
.handoff-edit-sent>span{margin-left:3px;letter-spacing:-.3em}
.handoff-edit-answer>p{max-width:95%;background:#fffefc;border-radius:3px 12px 12px 12px;color:#666154}
.handoff-edit-answer .handoff-edit-speaker>span{font-size:14px;margin-right:3px;vertical-align:-1px}
.handoff-edit-input{margin-top:auto;min-height:35px;display:flex;align-items:center;gap:9px;border:1px solid #e4dfd6;border-radius:11px;padding:6px 9px;color:#a39b90;background:#fffefc;font-size:10px;line-height:1.4;flex-shrink:0}
.handoff-edit-plus{font-size:20px;font-weight:300;line-height:1}
.handoff-edit-send{margin-left:auto;display:grid;place-items:center;flex-shrink:0;width:23px;height:23px;border-radius:50%;background:#514e46;color:white;font-size:19px;line-height:1}
.handoff-check-content{display:flex;flex-direction:column;padding:13px 17px 14px;gap:12px;flex:1;min-height:0}
.handoff-check-answer{display:flex;align-items:flex-start;gap:8px;font-size:10px;line-height:1.7;letter-spacing:-.03em;color:#8a8478;margin:0}
.handoff-check-answer>span:first-child{font-size:19px;line-height:1.5;color:#a27559}
.handoff-preview-pair{flex:1;min-height:0;position:relative;padding-right:25px;padding-bottom:4px}
.handoff-preview-desktop{height:100%;border:1px solid #d7d6cb;border-radius:7px;overflow:hidden;background:#eeece3;box-shadow:0 4px 12px #51482c05}
.handoff-preview-browser{height:20px;display:flex;align-items:center;justify-content:space-between;padding:0 8px;background:#fcfbf7;border-bottom:1px solid #deddd2;font-size:6px;letter-spacing:.04em;color:#a5a191}
.handoff-preview-browser>span:first-child{display:flex;gap:3px}
.handoff-preview-browser i{display:block;height:3px;width:3px;border-radius:50%;background:#d0ccbe}
.handoff-preview-site{height:calc(100% - 20px);padding:11px 13px 12px;display:flex;flex-direction:column;gap:10px}
.handoff-preview-brand{font-family:Georgia,serif;font-size:9px;letter-spacing:.08em;line-height:1.1;color:#59604e;display:flex;align-items:center;gap:7px}
.handoff-preview-brand>span{font-family:inherit;font-size:4px;letter-spacing:.08em;color:#9c9c88}
.handoff-preview-hero{display:grid;grid-template-columns:.9fr 1.1fr;gap:13px;flex:1;min-height:0}
.handoff-preview-hero>div{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:12px}
.handoff-preview-hero p{font-size:18px;line-height:1.35;letter-spacing:-.07em;color:#505643;margin:0;word-break:keep-all}
.handoff-preview-hero img{height:100%;width:100%;object-fit:cover;min-height:0;border-radius:24px 0 0 0}
.handoff-preview-consult{display:flex;justify-content:space-between;align-items:center;gap:15px;border-radius:3px;background:#c15f3b;color:#fff5e9;padding:7px 8px;font-size:7px;line-height:1.3;white-space:nowrap}
.handoff-preview-consult b{font-size:10px;font-weight:400}
.handoff-preview-mobile{position:absolute;right:0;bottom:0;width:75px;height:133px;border:2px solid #676c5c;border-radius:11px;background:#eeece3;padding:13px 6px 6px;display:flex;flex-direction:column;gap:6px;box-shadow:0 4px 15px #373d2412;overflow:hidden}
.handoff-preview-mobile-speaker{position:absolute;width:17px;height:2px;border-radius:2px;background:#939580;left:calc(50% - 8px);top:5px}
.handoff-preview-mobile-brand{font-family:Georgia,serif;font-size:5px;letter-spacing:.07em;color:#6e755f;line-height:1}
.handoff-preview-mobile>p{font-size:10px;line-height:1.3;letter-spacing:-.065em;color:#505643;margin:0}
.handoff-preview-mobile img{height:33px;min-height:0;flex:1;width:100%;object-fit:cover;border-radius:12px 0 0 0}
.handoff-preview-mobile .handoff-preview-consult{padding:5px 4px;font-size:5px;gap:2px;border-radius:2px}
.handoff-preview-mobile .handoff-preview-consult b{font-size:7px}
.handoff-check-list{display:flex;align-items:center;justify-content:space-between;gap:7px;list-style:none;margin:0;padding:0;font-size:9px;line-height:1.5;letter-spacing:-.04em;color:#838976;flex-shrink:0}
.handoff-check-list li{white-space:nowrap}
.handoff-check-list li>span{color:#7d8a67;margin-right:3px}
@media(min-width:601px) and (max-width:1100px){.handoff-demo{padding:12px}.handoff-demo-heading{padding:13px}.handoff-demo-heading h3{font-size:13px}.handoff-demo-heading p{font-size:9px}.handoff-demo-badge{font-size:8px;padding:5px}.handoff-edit-content{padding:12px}.handoff-edit-message>p{font-size:11px;padding:10px}.handoff-account-role{display:none}.handoff-preview-hero p{font-size:15px}.handoff-preview-consult{gap:7px}}
@media(max-width:600px){
 .handoff-demo{height:348px;padding:10px;gap:8px}
 .handoff-demo-nav{height:27px;gap:18px}.handoff-demo-nav button{font-size:10px;padding-bottom:8px}.handoff-demo-nav button>span{font-size:8px;margin-right:4px}
 .handoff-demo-view{border-radius:11px}.handoff-demo-heading{padding:10px 12px;min-height:55px;gap:8px}.handoff-demo-heading h3{font-size:13px}.handoff-demo-heading p{font-size:9px;margin-top:3px}.handoff-demo-badge{font-size:8px;padding:5px 6px}
 .handoff-accounts-content{padding:5px 12px 12px}.handoff-account-list li{padding:10px 0;gap:9px}.handoff-account-mark{width:28px;height:28px;border-radius:7px}.handoff-account-list strong{font-size:11px}.handoff-account-list li>div>span{font-size:9px}.handoff-account-role{font-size:8px}.handoff-ownership{padding-top:10px;margin-top:5px}.handoff-ownership strong{font-size:10px}.handoff-ownership>span{font-size:9px;line-height:1.6}
 .handoff-spark{width:18px;height:23px}.handoff-edit-content{padding:10px 12px 11px;gap:8px}.handoff-edit-message{gap:4px}.handoff-edit-message>p{font-size:11px;line-height:1.7;padding:8px 10px}.handoff-edit-user>p{max-width:94%}.handoff-edit-speaker{font-size:9px;line-height:1.3}.handoff-edit-sent{display:none}.handoff-edit-input{min-height:32px;padding:5px 8px;font-size:9px;gap:6px}.handoff-edit-send{width:21px;height:21px;font-size:18px}.handoff-edit-answer .handoff-edit-speaker>span{font-size:12px}
 .handoff-check-content{padding:10px 12px 12px;gap:9px}.handoff-check-answer{font-size:9px;line-height:1.6;gap:6px}.handoff-check-answer>span:first-child{font-size:16px}.handoff-preview-pair{padding-right:19px}.handoff-preview-site{padding:10px;gap:9px}.handoff-preview-hero{gap:9px;grid-template-columns:1fr 1fr}.handoff-preview-hero>div{gap:10px}.handoff-preview-hero p{font-size:15px}.handoff-preview-brand{font-size:8px}.handoff-preview-brand>span{font-size:3px}.handoff-preview-consult{font-size:6px;gap:10px;padding:6px}.handoff-preview-mobile{width:65px;height:123px;padding:12px 5px 5px;gap:5px;border-radius:10px}.handoff-preview-mobile>p{font-size:9px}.handoff-check-list{font-size:8px;gap:4px}
}
@media(max-width:360px){.handoff-demo-nav{gap:12px}.handoff-account-role{display:none}.handoff-demo-heading h3{font-size:12px}.handoff-edit-content{padding:9px 10px}.handoff-edit-message>p{font-size:10.5px;padding:8px 9px}.handoff-preview-hero p{font-size:13px}.handoff-preview-consult{gap:6px}}
@media(prefers-reduced-motion:reduce){.handoff-demo [data-edit-part]{transform:none}}

/* The handoff preview continues the dental project shown in stages 01 and 03. */
.handoff-preview-desktop,.handoff-preview-mobile{background:#edf3fc;border-color:#a8bbce}
.handoff-preview-browser{background:#f9fcff;border-color:#d7e3ef;color:#71879c}
.handoff-preview-brand,.handoff-preview-mobile-brand{font-family:inherit;font-weight:700;color:#143351}
.handoff-preview-brand>span{color:#527c99;font-family:inherit}
.handoff-preview-hero p,.handoff-preview-mobile>p{color:#143351}
.handoff-preview-hero img,.handoff-preview-mobile img{object-fit:contain;object-position:center bottom;border-radius:0;background:#e6eff8}
.handoff-preview-consult{background:#1679b4;color:#fff}
.handoff-preview-mobile-speaker{background:#6988a1}

/* Desktop handoff tabs share the content width; mobile keeps its story layout. */
@media (min-width: 1101px) {
  #creation .handoff-demo-nav {
    --handoff-tab-index: 0;
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    height: 48px;
    min-height: 48px;
    padding: 0;
    gap: 0;
    border-bottom: 1px solid #e3dfd8;
    border-radius: 10px 10px 0 0;
    background: #f8f7f4;
  }
  #creation .handoff-demo-nav::after {
    content: '';
    position: absolute;
    inset: auto auto -1px 0;
    width: calc(100% / 3);
    height: 2px;
    background: var(--orange, #ff4f2e);
    transform: translateX(calc(var(--handoff-tab-index) * 100%));
    transition: transform .22s ease;
    pointer-events: none;
  }
  #creation .handoff-demo-nav .action-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 48px;
    margin: 0;
    padding: 10px 8px;
    gap: 7px;
    border: 0;
    border-radius: 8px 8px 0 0;
    box-shadow: none;
    background: transparent;
    color: #74766d;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
    text-align: center;
    transform: none;
  }
  #creation .handoff-demo-nav .action-link > span {
    margin: 0;
    font-size: 10px;
    line-height: 1.4;
    color: #96998f;
  }
  #creation .handoff-demo-nav .action-link[aria-selected=true] {
    color: #253128;
    background: #fffefc;
    font-weight: 700;
  }
  #creation .handoff-demo-nav .action-link[aria-selected=true] > span { color: #a9432c; }
  #creation .handoff-demo-nav .action-link:focus-visible { outline-offset: -4px; }
  @media (hover: hover) {
    #creation .handoff-demo-nav .action-link:hover { color: #253128; background: #f0f0e9; }
  }
}
@media (prefers-reduced-motion: reduce) {
  #creation .handoff-demo-nav::after { transition: none; }
}
