/* Funnel responsive layer v1 — presentation only; native clinical UI stays original. */
body>header{padding:10px 24px;gap:12px;flex-wrap:wrap}
body>header nav{gap:8px 16px;flex-wrap:wrap;min-width:0}
body>header .languages{min-width:0;gap:3px;padding-block:0}
main,main>section,.hero>*,.work-head>*,.section-head>*{min-width:0}
.cards,.calculator-grid,.reference-grid,.resource-grid{min-width:0}
.cards>*{min-width:0}
.card :is(strong,span),.reference-card :is(h2,h3),.calculator-card :is(h2,h3){overflow-wrap:anywhere}
:is(#workspace,#calculator-workspace,#reference-workspace,.native-calculator-workspace){box-sizing:border-box;width:calc(100% - 40px);max-width:2200px!important;margin-inline:auto!important;padding:20px 22px}
.tools-page:has(.native-calculator-workspace){padding-inline:20px}
.tools-page .native-calculator-workspace{width:100%}
:is(.work-head,.section-head):has(+.work-note),#workspace>.section-head{gap:12px;margin-bottom:12px;align-items:center;flex-wrap:wrap}
.work-head h2,#workspace>.section-head h2{font-size:clamp(27px,2.2vw,40px);line-height:1.2;overflow-wrap:anywhere}
.work-head .eyebrow,#workspace>.section-head .eyebrow{margin-bottom:6px}
.work-head>div:last-child,.work-actions,#workspace>.section-head .actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:0}
:is(.work-head,.work-actions,#workspace>.section-head) :is(button,a){min-height:44px;display:inline-flex;align-items:center;justify-content:center;white-space:normal}
.work-note,#workspace>.tool-note{font-size:12px;line-height:1.6;margin-block:8px 14px}
:is(#editor,#calculator-frame,#references-frame){display:block;width:100%;max-width:100%;height:clamp(680px,calc(100vh - 180px),1100px);height:clamp(680px,calc(100dvh - 180px),1100px)}
:is(#workspace,#calculator-workspace,#reference-workspace,.native-calculator-workspace):is(.expanded,.wide){width:calc(100% - 16px);max-width:none!important;padding-inline:10px}
:is(#workspace,#calculator-workspace,#reference-workspace,.native-calculator-workspace):is(.expanded,.wide) iframe{height:calc(100dvh - 110px);min-height:760px}
.tool-bar{padding-block:10px;gap:12px;flex-wrap:wrap}
:is(.native-demo,.voice-section){box-sizing:border-box;max-width:2200px;width:calc(100% - 40px);margin-inline:auto;padding:24px}
.native-demo iframe:not(.voice-expanded),.voice-section iframe:not(.voice-expanded){max-width:100%;width:100%}
:is(.native-demo,.voice-section) :is(.primary,.secondary){white-space:normal;max-width:100%}
.native-demo-wide iframe,.voice-section #live-voice-frame{min-height:740px}
dialog{max-width:calc(100% - 28px);max-height:90vh;max-height:90svh;overflow:auto}
dialog :is(button,a){min-height:44px}
button:focus-visible,a:focus-visible{outline:3px solid var(--blue,var(--accent,#1269ba));outline-offset:3px}
@media(min-width:1600px){
 body>header .brand{order:0;flex-shrink:0}
 body>header .languages{order:1;width:auto;flex:1;justify-content:center;flex-wrap:nowrap}
 body>header nav{order:2;font-size:12px;gap:12px}
 body>header .flag{padding:5px;gap:2px;min-width:31px}
}
@media(max-width:750px){
 body>header{padding:10px 12px;gap:8px}
 body>header .brand{order:0}
 body>header .languages{order:1;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));width:100%;flex:none;gap:2px}
 body>header .flag{display:flex;justify-content:center;align-items:center;min-width:0;min-height:44px;padding:4px;gap:2px}
 body>header .flag img{width:25px;height:17px}
 body>header nav{order:2;display:flex;flex-wrap:nowrap;justify-content:flex-start;width:100%;max-width:100%;overflow-x:auto;gap:14px;scrollbar-width:thin;padding-block:2px}
 body>header nav>a{display:inline-flex!important;align-items:center;min-height:44px;flex:0 0 auto;white-space:nowrap;font-size:12px}
 .hero{gap:28px}.hero h1{font-size:clamp(34px,10vw,56px)!important;line-height:1.08;overflow-wrap:anywhere}
 .hero .lead{font-size:18px;line-height:1.5}.hero .description{font-size:14px}
 .hero-photo>img{max-height:360px}.hero-visual{min-width:0}
 .library,.discovery,.tools-page,.calculator-directory,.reference-directory{padding-inline:14px}
 .methods{gap:8px}.methods :is(button,a){min-width:0}.methods span{overflow-wrap:anywhere}
 .cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .card :is(span,strong){font-size:13px;line-height:1.4}
 .library-bar{width:100%;max-width:100%}.library-bar label{max-width:100%}
 :is(#search,#calculator-search,#reference-search){font-size:16px;min-height:48px;max-width:100%}
 :is(#workspace,#calculator-workspace,#reference-workspace,.native-calculator-workspace),:is(#workspace,#calculator-workspace,#reference-workspace,.native-calculator-workspace):is(.expanded,.wide){width:100%;max-width:100%!important;margin-inline:0!important;padding:18px 8px;border-inline:0;border-radius:0}
 .tools-page:has(.native-calculator-workspace){padding-inline:8px}
 .work-head,#workspace>.section-head{display:flex;flex-direction:column;align-items:stretch;gap:12px}
 .work-head h2,#workspace>.section-head h2{font-size:28px}
 .work-head>div:last-child,.work-actions,#workspace>.section-head .actions{display:flex;gap:8px;margin-top:0;width:100%}
 :is(.work-head,.work-actions,#workspace>.section-head) :is(button,a){flex:1 1 120px;min-width:0;font-size:13px;padding:10px 8px;line-height:1.4;margin-top:0}
 :is(#editor,#calculator-frame,#references-frame){height:max(680px,calc(100vh - 140px));height:max(680px,calc(100svh - 140px));border-radius:8px}
 :is(#workspace,#calculator-workspace,#reference-workspace,.native-calculator-workspace):is(.expanded,.wide) iframe{height:95svh;min-height:780px}
 .tool-bar{font-size:10px;padding:10px;gap:8px}
 :is(.native-demo,.voice-section){width:100%;max-width:100%;padding:20px 8px;border-inline:0;border-radius:0;margin-block:28px}
 :is(.native-demo,.voice-section) h2{font-size:28px;overflow-wrap:anywhere}
 :is(.native-demo,.voice-section) p{font-size:14px;line-height:1.65}
 .native-demo-wide iframe,.voice-section #live-voice-frame{min-height:740px}
 :is(.native-demo,.voice-section) :is(.primary,.secondary){min-height:44px;padding:12px 14px}
 .copied{padding:20px}.copied h2{font-size:30px}
 .copied :is(button,a){min-height:44px;max-width:100%;white-space:normal}
 footer{gap:16px;flex-wrap:wrap;padding-inline:16px}
 #motion-toggle{inset-inline-end:8px;bottom:8px;font-size:11px;padding:9px;max-width:170px}
}
@media(max-width:360px){.methods{grid-template-columns:repeat(2,minmax(0,1fr))}.card{padding:8px}.card img{height:96px}.hero-index{flex-wrap:wrap;gap:12px}}

/* Keep the page animation control out of native report action bars. */
#motion-toggle{position:static;display:block;width:max-content;margin:16px 20px 24px auto;max-width:calc(100% - 40px)}

/* Remove nested gutters around the actual tool, while keeping directory cards inset. */
body>main:has(>#workspace){max-width:none;width:100%}
.calculator-directory:has(#calculator-workspace){padding-inline:20px}
.calculator-directory #calculator-workspace{width:100%}
@media(max-width:750px){
 .method-links{grid-template-columns:repeat(2,minmax(0,1fr))}
 .method-links a{min-width:0;padding:14px 10px;gap:8px;overflow-wrap:anywhere}
 .calculator-directory:has(#calculator-workspace){padding-inline:0}
 .calculator-directory:has(#calculator-workspace)>:not(#calculator-workspace){max-width:calc(100% - 28px);margin-inline:14px}
}
