/* Install controls sit in the page, separate from public-site header navigation. */
.ai-app-bar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 14px;max-width:1180px;width:calc(100% - 32px);margin:16px auto 0;color:var(--ds-text,#172338);font:14px/1.5 'DM Sans',system-ui,sans-serif}
.ai-app-bar a,.ai-app-bar button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 14px;border:1px solid var(--ds-border,#bac8dd);border-radius:12px;background:var(--ds-raised,#eaf0fa);color:var(--ds-link,#284f9a);font:inherit;font-weight:700;text-decoration:none;cursor:pointer;touch-action:manipulation}
.ai-app-bar p{flex-basis:100%;font-size:12px;margin:0;color:var(--ds-muted,#53627a)}
.ai-app-bar p:empty{display:none}
.ai-app-dialog{box-sizing:border-box;width:min(540px,calc(100% - 24px));max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);margin:auto;padding:24px;border:1px solid var(--ds-border,#bac8dd);border-radius:22px;overflow:auto;overscroll-behavior:contain;background:var(--ds-surface,#fff);color:var(--ds-text,#172338);box-shadow:0 20px 80px #0006;font:15px/1.5 'DM Sans',system-ui,sans-serif}
.ai-app-dialog::backdrop{background:#0b1424b3}
.ai-app-dialog h2{margin:0 0 8px;color:inherit;font:800 23px/1.25 Manrope,system-ui,sans-serif;letter-spacing:-.03em}
.ai-app-dialog p{margin:10px 0;color:inherit}
.ai-app-dialog .ai-app-platforms{display:flex;gap:8px;flex-wrap:wrap;margin:18px 0}
.ai-app-dialog button{font:inherit;min-height:44px;min-width:44px;padding:10px 14px;border:1px solid var(--ds-border,#bac8dd);border-radius:11px;background:var(--ds-raised,#eaf0fa);color:var(--ds-text,#172338);font-weight:700;cursor:pointer;touch-action:manipulation}
.ai-app-dialog button[aria-pressed=true],.ai-app-dialog .ai-app-close{background:var(--ds-accent,#4166db);color:var(--ds-on-accent,#fff);border-color:var(--ds-accent,#4166db)}
.ai-app-dialog .ai-app-close{display:block;width:100%;margin-top:20px}
.ai-app-dialog ol{padding-left:24px;margin:12px 0}
.ai-app-dialog li{padding:5px 0}
.ai-app-dialog .ai-app-note{font-size:12px;color:var(--ds-muted,#53627a)}
.ai-app-bar :is(a,button):focus-visible,.ai-app-dialog button:focus-visible{outline:3px solid var(--ds-focus,var(--ds-accent,#4166db));outline-offset:3px}
@media(max-width:680px){.ai-app-bar{width:calc(100% - 24px);margin-top:10px;font-size:12px}.ai-app-dialog{padding:20px 16px;padding-bottom:max(20px,env(safe-area-inset-bottom));max-height:calc(100vh - 24px);max-height:calc(100dvh - max(24px,env(safe-area-inset-top)))}.ai-app-dialog .ai-app-platforms button{flex:1;font-size:13px;padding:10px 8px}}
@media(prefers-reduced-motion:reduce){.ai-app-dialog{scroll-behavior:auto}}

/* Installation help uses the same scalable, readable controls as the app. */
html body .ai-app-bar{font-size:1rem;line-height:1.5}
html body .ai-app-bar :is(a,button){font-size:1.125rem;line-height:1.4;min-block-size:3.25rem!important;min-width:0;padding:.75rem 1rem;overflow-wrap:anywhere;white-space:normal}
html body .ai-app-bar p{font-size:1rem;line-height:1.5;overflow-wrap:anywhere}
html body .ai-app-dialog{font-size:1rem;line-height:1.6;padding:1.25rem;max-width:calc(100% - 24px);max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px)}
html body .ai-app-dialog h2{font-size:1.5rem;line-height:1.3;overflow-wrap:anywhere}
html body .ai-app-dialog :is(p,li,.ai-app-note){font-size:1rem;line-height:1.6;overflow-wrap:anywhere}
html body .ai-app-dialog button{font-size:1.125rem;line-height:1.4;min-block-size:3.25rem!important;min-width:0;padding:.75rem 1rem;overflow-wrap:anywhere;white-space:normal}
html body .ai-app-dialog .ai-app-platforms button{font-size:1.125rem;flex:1 1 8rem;padding:.75rem}
html body .ai-app-dialog ol{padding-left:1.5rem}
@media(max-width:680px){
  html body .ai-app-bar :is(a,button){flex:1 1 10rem}
  html body .ai-app-dialog{padding:1rem;padding-bottom:max(1rem,env(safe-area-inset-bottom))}
}
html body :is(.ai-app-bar,.ai-app-dialog) :is(button,a){-webkit-tap-highlight-color:transparent}

/* Keep dismissal in view while long instructions scroll inside the guide. */
html body .ai-app-dialog{padding:0;overflow:hidden;width:min(540px,calc(100% - 24px))}
html body .ai-app-dialog[open]{display:flex;flex-direction:column}
.ai-app-dialog-header{display:flex;align-items:center;gap:12px;flex:none;padding:1rem;border-bottom:1px solid var(--ds-border,#bac8dd)}
html body .ai-app-dialog-header h2{flex:1;margin:0}
html body .ai-app-dialog .ai-app-dismiss{flex:0 0 52px;width:52px;min-width:52px;padding:0;font-size:1.75rem;line-height:1;align-self:flex-start}
.ai-app-dialog-body{overflow:auto;overscroll-behavior:contain;min-height:0;padding:0 1rem 1rem}
.ai-app-dialog-footer{flex:none;padding:.75rem 1rem max(.75rem,env(safe-area-inset-bottom));border-top:1px solid var(--ds-border,#bac8dd)}
html body .ai-app-dialog-footer .ai-app-close{margin:0}
html body .ai-app-dialog .ai-app-lead{font-weight:600;margin:1rem 0}
html body .ai-app-dialog .ai-app-steps{padding-left:1.7rem;margin:.5rem 0}
html body .ai-app-dialog .ai-app-steps li{padding:.5rem 0 .75rem .15rem}
html body .ai-app-dialog .ai-app-steps strong{display:flex;align-items:center;gap:.5rem;color:inherit;font-size:1.125rem;line-height:1.4}
html body .ai-app-dialog .ai-app-steps p{margin:.3rem 0 0}
.ai-app-share-icon{width:1.5rem;height:1.5rem;flex:none}
html body .ai-app-dialog .ai-app-more{margin:1rem 0;border-top:1px solid var(--ds-border,#bac8dd);padding-top:.5rem}
html body .ai-app-dialog .ai-app-more summary{min-height:52px;display:flex;align-items:center;cursor:pointer;font-size:1rem;font-weight:700;list-style:revert}
html body .ai-app-dialog .ai-app-more summary:focus-visible{outline:3px solid var(--ds-focus,var(--ds-accent,#4166db));outline-offset:2px}
html body .ai-app-dialog .ai-app-platforms button{flex:1 1 100%}
html body .ai-app-dialog [hidden]{display:none!important}
@media(max-height:520px){.ai-app-dialog-header{padding:.5rem 1rem}.ai-app-dialog-footer{padding:.5rem 1rem}}

/* Let the whole guide scroll when large text or a short window needs it. */
@media(max-height:640px){
 html body .ai-app-dialog[open]{display:block;overflow:auto;overscroll-behavior:contain}
 .ai-app-dialog-header{position:static;background:var(--ds-surface,#fff)}
 .ai-app-dialog-body{overflow:visible}
}
