/* Shared interaction and layout repairs; intentional stimulus classes are excluded. */
html{font-family:var(--af-font);font-size:100%;line-height:1.55;background:var(--af-bg);color:var(--af-text);scroll-padding-block:7rem 3rem}
body{background-color:var(--af-bg);color:var(--af-text)}
:where(button,input,select,textarea){font:inherit}
:where(button,select,input:not([type=checkbox]):not([type=radio]):not([type=range])){min-height:44px}
:where(button){min-width:44px}
:where(input,select,textarea,button){border-color:var(--af-border-control)}
:where(input,select,textarea){background-color:var(--af-bg);color:var(--af-text);max-width:100%}
:where(input[type=checkbox],input[type=radio],input[type=range]){accent-color:var(--af-primary)}
:where(input[type=checkbox],input[type=radio]){min-width:24px;min-height:24px}
button.primary,a.primary,#account-submit{background:var(--af-primary);color:var(--af-on-primary);border-color:var(--af-primary)}
button.primary:hover:not(:disabled),a.primary:hover,#account-submit:hover{background:var(--af-primary-hover);color:var(--af-on-primary)}
button.primary:active:not(:disabled),a.primary:active{background:var(--af-primary-active);color:var(--af-on-primary)}
:where(button:disabled,input:disabled,select:disabled,textarea:disabled){opacity:.75}
:where(a,button,input,select,textarea,summary,[tabindex]):focus-visible{outline:3px solid var(--af-focus)!important;outline-offset:4px!important;scroll-margin-block:7rem 3rem}
:where(p,li,dd) a{text-decoration:underline;text-underline-offset:.2em}
:where(nav:not(.site-header nav) a[aria-current=page],.nav-selected){border-inline-start:3px solid var(--af-primary);font-weight:650}
:where(dialog){background:var(--af-surface);border:1px solid var(--af-border-control);color:var(--af-text);overflow:auto;max-height:calc(100dvh - 2rem)}
dialog::backdrop{background:color-mix(in srgb,var(--af-bg) 80%,transparent);backdrop-filter:none}
:where(main,section,article,form,fieldset){min-width:0}
:where(p,label,legend,summary,h1,h2,h3,button,a){overflow-wrap:normal}
:where(fieldset){max-width:100%}
:where(textarea){resize:vertical}
.skip{position:fixed;inset-block-start:-8rem;inset-inline-start:1rem;z-index:10000;padding:.75rem 1rem;background:var(--af-primary);color:var(--af-on-primary)}
.skip:focus{inset-block-start:1rem}
/* Opaque reading surfaces keep text contrast independent of photography. */
.hero-content,.immersive-copy,.investor-hero-copy{background:var(--af-bg);border-radius:var(--af-radius)}
.hero,.investor-hero{height:auto;max-height:none}
.hero h1{font-size:clamp(3rem,7.7vw,7.25rem)}
.spark,.cta-orbit,.duo-trace-halo{box-shadow:none;display:none}
.light i,.touch i{box-shadow:none}.light i::before{display:none}
.duo-signal,.client-directory section{background:var(--af-surface)}
.duo-trace{stroke:var(--af-signal);animation:none}.duo-grid{stroke:var(--af-border-control)}
.site-header,.client-bar{background:var(--af-bg);backdrop-filter:none;height:auto;min-height:4.75rem;flex-wrap:wrap}
.client-session:not(.bls-in-progress){overflow:auto}
.client-session:not(.bls-in-progress)>main{height:auto;min-height:calc(100dvh - 4.75rem)}
.cast-page[data-session=idle]{overflow:auto}
@media(max-width:700px){
 .site-header nav{display:flex;flex-wrap:wrap;gap:.5rem 1rem;width:100%;padding-block:.5rem}
 .site-header nav a{min-height:24px;display:inline-flex;align-items:center}
 .wrap{padding-inline:1rem}.hero-content{padding-inline:1rem}
 .client-session:not(.bls-in-progress)>main{grid-template-columns:minmax(0,1fr)}
 header{height:auto;min-height:60px;flex-wrap:wrap;gap:.5rem;padding-block:.5rem}
 .rail{min-width:0;max-width:100%}main{min-width:0}
}
@media(prefers-reduced-motion:reduce){
 html{scroll-behavior:auto}
 button,input,select,textarea,.hero-content,.client-preview-label{transition:none}
 .spark,.duo-trace,.compact-heart,.projected-heart-icon,.client-preview-heart,.wrist-device [data-role=wrist-status]{animation:none!important}
}
@media(forced-colors:active){
 button,.primary,a.primary{border:1px solid ButtonText;background:ButtonFace;color:ButtonText}
 :where(a,button,input,select,textarea,summary,[tabindex]):focus-visible{outline-color:Highlight!important}
 :where(svg text){fill:CanvasText}.duo-trace{stroke:CanvasText}
}

/* Patient stop remains visible throughout playback, including fullscreen. */
body.patient-focus .display-actions,body.patient-focus.show-tools .display-actions,body.patient-focus .display-actions:focus-within{opacity:1;background:var(--af-bg);padding:.5rem;border-radius:var(--af-control-radius);z-index:30}
body.patient-focus #display-options{opacity:1;background:var(--af-bg);color:var(--af-text)}
.guide-metrics{padding:.75rem 1rem;border-bottom:1px solid var(--af-border-subtle)}
@media(forced-colors:active){.site-header nav,.site-header nav a,.duo-concept,.duo-note p,#workspace-language-select{color:CanvasText!important;background:Canvas!important}}

#pulse-line{stroke:var(--af-signal)}#pulse-points circle{fill:var(--af-signal)}#pulse-grid text{fill:var(--af-text-muted)}#pulse-grid line{stroke:var(--af-border-control)}
.connection,.device.connected .device-status{color:var(--af-success)}
.stop,button.danger{border-color:var(--af-danger);color:var(--af-danger);background:var(--af-surface)}
.stop:hover:not(:disabled),button.danger:hover:not(:disabled){background:var(--af-surface-raised)}
.investor-hero>img{filter:none}
.rail-bottom,.rail-label,.brand-sub,.device-help,.session-foot{line-height:1.55}

.eda-data-region{max-width:100%;overflow:auto;max-height:24rem}.eda-data-region table{border-collapse:collapse;width:100%}.eda-data-region th,.eda-data-region td{text-align:start;padding:.5rem;border-bottom:1px solid var(--af-border-subtle)}.eda-data-region caption{text-align:start;padding:.75rem;font-weight:650}

@media(forced-colors:active){.duo-trust p{color:CanvasText}}
@media(max-width:700px){.guide-shell{grid-template-columns:minmax(0,1fr)}.guide-phases{grid-template-columns:repeat(2,minmax(0,1fr));padding:.5rem;border-right:0}.guide-phases button{min-width:0;grid-template-columns:24px minmax(0,1fr);padding:.5rem;font-size:.8rem}.guide-card{padding:1rem}.guide-card>header{flex-wrap:wrap}.guide-progress{white-space:normal}.studio-widgets{position:static;width:100%;border-left:0}.studio-widget-list{flex-direction:row;flex-wrap:wrap}.guide-metrics{display:flex;flex-wrap:wrap}}

@media(max-width:820px){
 body:has(.rail){display:block}.rail{position:relative;inset:auto;width:100%;padding:1rem}
 body.studio-has-widgets main{margin:0;width:100%;padding:1rem;max-width:100%}
 .studio-header-actions{flex-wrap:wrap;margin:0;min-width:0;max-width:100%}
 .studio-header-actions button{max-width:100%;white-space:normal}
 .guide-shell,.guide-card,.guide-prompt{min-width:0;max-width:100%}
 legend{max-width:100%;white-space:normal}.guide-metrics label{white-space:normal}
 .guide-card>header>div{min-width:0;max-width:100%}
}
@media(max-width:820px){.rail{margin:0}.rail>.brand{position:static;width:auto;height:auto;max-width:100%;margin-bottom:1rem}.studio-header-actions{grid-column:1/-1}.workspace-language{min-width:0;max-width:100%}.workspace-language select{min-width:0}}

.accessibility-statement{max-width:var(--af-reading-width);padding-block:2rem 4rem}.accessibility-statement h1{font-size:clamp(2rem,6vw,3.5rem);line-height:1.2}
body[data-page]{background:var(--af-bg)}body[data-page]>header{background:var(--af-bg)}

.ear-copy{display:grid;gap:.25rem}.ear-copy strong{font-size:1rem;color:var(--af-text)}.ear-copy>span{font-size:.8rem;color:var(--af-text-muted)}.emdr2-sud-entry>div{display:flex;gap:.5rem;align-items:center}.emdr2-sud-entry input{min-width:0;max-width:100%}

/* Whole words wrap at spaces in every locale; emphasis remains inline. */
:where(h1,h2,h3,h4,h5,h6,p,li,dt,dd,label,legend,summary,button,a,span,strong,em){word-break:normal;overflow-wrap:normal;hyphens:none}
.site-header{gap:1rem;padding-block:1rem}
.site-header>.wordmark{flex:0 0 auto}
.site-header>nav{flex:1 1 16rem;min-width:0;flex-wrap:wrap;justify-content:center;gap:.5rem 1rem}
.site-header .header-logins{flex:0 1 auto;flex-wrap:wrap;justify-content:flex-end;gap:.75rem;min-width:0;max-width:100%}
.site-header .header-logins>*{flex:0 1 auto;min-width:0;max-width:100%;white-space:normal}
.site-header .workspace-language{margin:0;width:auto;justify-content:flex-end}
.site-header .workspace-language select{border-color:var(--af-border-control)}
:where(.hero-content,.immersive-copy,.investor-hero-copy){min-width:0;max-width:100%}
@media(max-width:1100px){
 .site-header{align-items:center;gap:.75rem 1rem}
 .site-header>nav{flex-basis:100%;justify-content:flex-start}
 .site-header .header-logins{flex:1 1 auto}
}
@media(max-width:700px){
 .site-header{padding:1rem}
 .site-header>nav{width:100%;gap:.5rem 1rem}
 .site-header .header-logins{width:100%;justify-content:flex-start}
 .site-header .header-logins>*{flex:1 1 10rem;justify-content:center}
 .site-header .workspace-language{flex-basis:100%;justify-content:flex-start}
 .hero h1,.research-hero h1,.investor-hero h1{font-size:clamp(2rem,9vw,3.25rem);line-height:1.12;letter-spacing:-.035em}
 .feature-copy h2,.immersive h2,.final-cta h2,.duo-title{font-size:clamp(1.75rem,7vw,2.5rem);line-height:1.2}
 .senses article{padding-right:0}
 .senses p{max-width:100%}
 .sense-symbol{position:relative;inset:auto;transform:none;margin-block:1rem;height:3rem}
 .client-access-grid{grid-template-columns:minmax(0,1fr)}
}

/* Controls remain outside the disclosure summary, in one aligned toolbar. */
.guide-tools{display:flex;align-items:center;flex-wrap:wrap;gap:1rem;padding:1rem 1.25rem;border-bottom:1px solid var(--af-border-subtle);background:var(--af-surface)}
.guide-tools .guide-sync{margin:0;min-height:44px;padding:.5rem 1rem}
.guide-tools .guide-metrics{display:flex;align-items:center;flex-wrap:wrap;gap:.5rem 1rem;min-width:0;margin:0;padding:.5rem .75rem;border:1px solid var(--af-border-control);border-radius:var(--af-control-radius)}
.guide-tools .guide-metrics legend{padding-inline:.25rem;font-size:.75rem;color:var(--af-text-muted)}
.guide-tools .guide-metrics label{display:inline-flex;align-items:center;gap:.5rem;min-height:32px;margin:0}
@media(max-width:700px){
 /* Reserve image space outside the opaque reading panel, rather than hiding
    the image behind hundreds of pixels of ink-coloured internal padding. */
 .hero,.immersive,.investor-hero{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;min-height:0;height:auto;max-height:none}
 .hero-image,.immersive>img,.investor-hero>img{height:clamp(14rem,65vw,25rem);object-position:65% center}
 .hero-content,.immersive-copy,.investor-hero-copy{margin-top:clamp(14rem,65vw,25rem);padding:1.5rem 1rem 2rem;max-width:100%;border-radius:0}
 .hero-shade,.immersive:after,.investor-hero-shade{background:linear-gradient(0deg,var(--af-bg),transparent 80%)}
 .hero-caption,.investor-hero-caption{position:static;padding:.75rem 1rem;align-self:stretch;text-align:end}
 .investors-page .login-button{font-size:.875rem;gap:.75rem}
 .investors-page .login-button:before{content:none}
 .investors-page .login-button span{margin:0}
 .guide-tools{padding:.75rem 1rem;gap:.75rem}
}

/* Shared confirmation presentation must not require inline style permission. */
.affect-confirm{width:min(420px,calc(100% - 30px));box-sizing:border-box;padding:28px;background:var(--af-surface);color:var(--af-text);border:1px solid var(--af-border-control);border-radius:var(--af-radius)}.affect-confirm::backdrop{background:color-mix(in srgb,var(--af-bg) 75%,transparent);backdrop-filter:none}.affect-confirm h2{margin:0 0 12px;color:var(--af-text);font:600 1.5rem/1.2 var(--af-font)}.affect-confirm p{margin:0;color:var(--af-text-muted);font-size:13px;line-height:1.7}.affect-confirm-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}.affect-confirm-actions button{min-height:44px;padding:10px 16px;border:1px solid var(--af-border-control);border-radius:8px;background:var(--af-surface-raised);color:var(--af-text);font:inherit}.affect-confirm-actions button:focus-visible{outline:3px solid var(--af-focus);outline-offset:2px}.affect-confirm-actions [data-confirm]{border-color:var(--af-primary);background:var(--af-primary);color:var(--af-on-primary)}.affect-confirm-actions [data-confirm][data-danger=true]{border-color:var(--af-danger);background:var(--af-danger)}.affect-confirm-actions [data-confirm]:hover{filter:brightness(1.12)}

/* Studio hierarchy: continuous rails and open sections, with borders reserved
   for editable controls, dialogs and meaningful selection/focus states. */
body:has(>.rail) .rail{top:0;bottom:0;left:0;padding-top:112px;border:0;border-right:1px solid var(--af-border-subtle);border-radius:0;box-shadow:none}
body:has(>.rail) .rail>.brand{top:0;left:0;height:96px;border:0;border-radius:0;box-shadow:none;background:var(--af-surface)}
body:has(>.rail) main>header{margin-top:0;border:0;border-bottom:1px solid var(--af-border-subtle);border-radius:0;box-shadow:none;background:var(--af-bg)}
body:has(>.rail) main>header>.connection{border:0;background:transparent;padding-inline:0}
body:has(>.rail) .studio-widgets{inset:0 0 0 auto;border:0;border-left:1px solid var(--af-border-subtle);border-radius:0;box-shadow:none;background:var(--af-surface)}
body:has(>.rail) .studio-widget-button{border-color:transparent;background:transparent;border-radius:8px}
body:has(>.rail) .studio-widget-button:hover{background:var(--af-surface-raised)}
body:has(>.rail) :is(.session-guide,.session-panel,.device-panel,.modality-panel,.ear-card,.patient-sharing.collapsible-panel,.bio-graph-card,.eda-chart){border:0;border-radius:0;box-shadow:none;background:transparent}
body:has(>.rail) .session-guide{overflow:visible;margin-block:24px}
body:has(>.rail) .session-guide>summary{padding:12px 0}
body:has(>.rail) .guide-tools{padding:12px 0;background:transparent}
body:has(>.rail) .guide-tools .guide-metrics{border:0;border-radius:0;padding:0}
body:has(>.rail) .guide-shell{border:0;gap:24px;margin-top:20px}
body:has(>.rail) .guide-phases{padding:0;border:0;background:transparent}
body:has(>.rail) .guide-phases button{border-color:transparent;border-inline-start:3px solid transparent;border-radius:0}
body:has(>.rail) .guide-phases button.active{border-color:transparent;border-inline-start-color:var(--af-primary);background:var(--af-surface)}
body:has(>.rail) .guide-phases button span{border:0}
body:has(>.rail) .guide-card{padding:0}
body:has(>.rail) .guide-progress{border:0;border-radius:0;padding-inline:0}
body:has(>.rail) .guide-prompt{background:transparent;border-radius:0;padding:12px 18px}
body:has(>.rail) .guide-note-toggle{border:0;border-radius:0;padding:0;gap:8px;background:transparent}
body:has(>.rail) .sidebar-devices{border:0;margin-top:24px;padding-top:0}
body:has(>.rail) .client-nav{margin-top:24px}
body:has(>.rail) #devices :is(.device-card,.device){border:0;border-radius:0;box-shadow:none;background:transparent}
body:has(>.rail) #devices :is(.device-card.selected,.device.selected){border:0;border-inline-start:3px solid var(--af-primary);background:var(--af-surface-raised)}
body:has(>.rail) #devices .device-card .device{border:0;background:transparent}
body:has(>.rail) .device .wrist-device{border:0;border-radius:0;background:transparent;padding-inline:0}
body:has(>.rail) .rail #client-list button{border-color:transparent;border-radius:0;background:transparent}
body:has(>.rail) .rail #client-list button:hover{background:var(--af-surface-raised)}
body:has(>.rail) #open-pair{background:transparent;color:var(--af-primary);border:1px solid var(--af-border-control);border-radius:8px}
body:has(>.rail) #open-pair:hover{background:var(--af-surface-raised)}
body:has(>.rail) .modality-panel+.modality-panel{border-top:1px solid var(--af-border-subtle);padding-top:24px}
@media(max-width:820px){
 body:has(>.rail) .rail{inset:auto;padding-top:16px;border-right:0;border-bottom:1px solid var(--af-border-subtle)}
 body:has(>.rail) .rail>.brand{position:static;height:auto}
 body:has(>.rail) .studio-widgets{position:static;border-left:0;border-top:1px solid var(--af-border-subtle)}
 body:has(>.rail) .guide-shell{gap:20px}
}
@media(forced-colors:active){
 body:has(>.rail) .guide-phases button.active{border-inline-start-color:Highlight}
 body:has(>.rail) .studio-widget-button{border-color:ButtonText}
}

body:has(>.rail) main>header>.workspace-language{border:0;border-radius:0;background:transparent;box-shadow:none;padding:0}
body:has(>.rail) :is(.modality-sync,.linked-volume-web,.client-access fieldset){border:0;border-radius:0;box-shadow:none;background:transparent}
body:has(>.rail) :is(.emdr2,.workspace-personal-scale){border:0;border-top:1px solid var(--af-border-subtle);border-radius:0;background:transparent;box-shadow:none;margin-block:24px}
body:has(>.rail) .emdr2>summary{padding:16px 0}
body:has(>.rail) :is(.emdr2-shell,.emdr2-nav,.emdr2-phase-nav){border:0;background:transparent}
body:has(>.rail) :is(.emdr2-prompt,.emdr2-badge){border-radius:0;background:transparent}
body:has(>.rail) .emdr2-badge{border:0}

/* Public navigation: markers sit outside the text's line box. */
.site-header>nav[aria-label]{display:flex;gap:.5rem 1.75rem}
.site-header nav .nav-link{
 position:relative;display:inline-flex;align-items:center;box-sizing:border-box;
 min-height:44px;padding:10px 0 12px 16px;line-height:1.4;
 color:#F3F0F7;text-decoration:none;white-space:nowrap;
}
.site-header nav .nav-link.active,
.site-header nav .nav-link[aria-current="page"]{color:#B3A4F4;font-weight:650}
.site-header nav .nav-link:is(:hover,:focus-visible){color:#CFC3FF}
.site-header nav .nav-link:focus-visible{outline:2px solid var(--af-focus);outline-offset:4px;border-radius:3px}
.site-header nav .nav-link.active::before,
.site-header nav .nav-link[aria-current="page"]::before{
 content:"";position:absolute;left:0;top:50%;transform:translateY(-50%);
 width:2px;height:18px;background:currentColor;border-radius:1px;pointer-events:none;
}
.site-header nav .nav-link.active::after,
.site-header nav .nav-link[aria-current="page"]::after{
 content:"";position:absolute;left:16px;right:0;bottom:6px;
 height:1px;background:currentColor;pointer-events:none;
}
@media(max-width:700px){.site-header>nav[aria-label]{gap:.25rem 1.25rem}}
@media(forced-colors:active){
 .site-header nav .nav-link:is(.active,[aria-current="page"]){color:LinkText!important}
 .site-header nav .nav-link:is(.active,[aria-current="page"])::before,
 .site-header nav .nav-link:is(.active,[aria-current="page"])::after{background:LinkText;forced-color-adjust:none}
}
