/* v0.40 — shared destinations, desktop navigation and phone navigation. */
:root{--nav-height:72px;--mobile-bar:72px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
:focus-visible{outline:3px solid #0071e3;outline-offset:3px}
.global-header{height:var(--nav-height);gap:32px;padding:0 24px}
.global-header .brand-image{width:180px;height:64px}
/* Continuous leaf movement stays visible at header size. Body and lettering stay still. */
@keyframes brand-leaf-left{0%,100%{transform:rotate(-18deg)}50%{transform:rotate(12deg)}}
@keyframes brand-leaf-right{0%,100%{transform:rotate(16deg)}50%{transform:rotate(-10deg)}}
.brand-leaf{transform-box:view-box;animation-timing-function:ease-in-out;animation-iteration-count:infinite}
.leaf-left{transform-origin:638px 224px;animation:brand-leaf-left 3.4s ease-in-out -.6s infinite}
.leaf-right{transform-origin:653px 230px;animation:brand-leaf-right 3.8s ease-in-out -1.2s infinite}
@media(prefers-reduced-motion:reduce){.brand-leaf{animation:none;transform:none}}
.global-header .primary-nav{gap:8px}
.global-header .primary-nav>button{position:relative;gap:9px;min-height:46px;padding:10px 20px;font-size:15px;border-radius:13px;white-space:nowrap}
.primary-nav .icon{width:19px;height:19px;flex-shrink:0}
.global-header .primary-nav>button.active{background:#fff1e2;color:#994b0b;box-shadow:inset 0 0 0 1px #f3d0a8;font-weight:650}
.global-header .account{font-size:13px;gap:12px;min-width:0}
.global-header .account-identity{min-height:44px}
.global-header .account-identity>.account-role{display:block;margin-top:2px;padding:0;border:0;border-radius:0;background:none;color:var(--muted);font-size:11px;font-weight:400;line-height:1.35}
.global-header .header-actions{display:flex;align-items:center;gap:12px;margin-left:auto;min-width:0;flex-shrink:0}
.global-header .header-actions>.account{margin-left:0;gap:8px}
.global-header .header-actions>.customer-preview-switch{order:-1}
@media(min-width:761px) and (max-width:1100px){.app-shell>.global-header{height:auto;min-height:72px;flex-wrap:wrap;row-gap:6px;padding-block:10px}}
.global-header .account>span{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.global-header .account small{font-size:11px}
.account-identity{min-width:0;max-width:220px;line-height:1.4}.account-identity>div{display:flex;align-items:center;gap:7px;min-width:0}.account-identity strong{font-size:14px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.account-identity>small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.account-role{font-size:11px;border:1px solid #e5d8cb;background:#fff7ee;color:#8c5a2d;border-radius:5px;padding:1px 5px;white-space:nowrap}
.global-header .icon-button,.dialog-heading .icon-button{width:44px;height:44px;flex-shrink:0}
.nav-count{min-width:20px;min-height:20px;display:inline-grid;place-items:center;border-radius:7px;background:#e9ebef;font-size:12px!important;line-height:1.2}
/* Switch directly between the permitted admin sections. */
.admin-nav{display:flex;flex-wrap:wrap;gap:6px;width:max-content;max-width:100%;margin:0 0 20px;padding:4px;border:1px solid #e2e6ee;border-radius:12px;background:#fcfbf9}
.admin-nav>button{display:flex;align-items:center;gap:8px;min-height:44px;padding:9px 14px;border:1px solid transparent;border-radius:9px;background:none;color:#5c6470;font-size:14px;white-space:nowrap}
.admin-nav>button:hover{background:#f2f4f8;color:#2b3138}
.admin-nav>button.active{background:#fff1e2;border-color:#f3d0a8;color:#994b0b;font-weight:650}
.admin-nav .nav-count{background:#bd5913;color:#fff}
.external-api-panel{max-width:760px}
.external-api-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin:0 0 18px}
.external-api-facts>div{min-width:0;padding:12px 14px;border:1px solid #e6e9f0;border-radius:9px;background:#fbfbfd}
.external-api-facts dt{font-size:11px;color:#737d8a;margin-bottom:4px}
.external-api-facts dd{margin:0;font-size:14px;overflow-wrap:anywhere}
.external-api-panel .form-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:6px}
@media(max-width:760px){
 .admin-nav{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:3px;width:100%;margin:0 0 16px}
 .admin-nav>button{justify-content:center;gap:3px;min-width:0;padding:6px 3px;font-size:13px;white-space:normal;text-align:center;line-height:1.35;word-break:keep-all;overflow-wrap:anywhere}
 .admin-nav>button>svg.icon{display:none}
 .admin-nav>button>span{min-width:0}
 .external-api-panel .form-actions .btn{flex:1 1 140px}
}
@media(prefers-reduced-motion:reduce){.admin-nav>button{transition:none}}
.content{padding-top:30px}
.space-heading h1{font-size:30px}
.space-heading .back-link{font-size:13px;min-height:36px;margin-bottom:3px}
.space-heading p{margin-top:5px}
.space-tabs,.business-nav{position:sticky;top:98px;z-index:15;display:flex;width:100%;gap:22px;padding:0 8px;margin:20px 0 24px;border:0;border-bottom:1px solid #d7dce5;border-radius:0;box-shadow:none;background:#f6f7fbd9;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px)}
.space-tabs button,.business-nav button{min-height:48px;padding:10px 10px;border:0;border-bottom:3px solid transparent;border-radius:0;font-size:15px;background:none;box-shadow:none;color:#646973}
.space-tabs button.active,.business-nav button.active{background:none;box-shadow:none;color:#994b0b;border-bottom-color:#e78829;font-weight:650}
.space-tabs button:hover,.business-nav button:hover{background:#e8edf544}
.process-index{top:172px}
.process-index button{padding:12px 10px;border-radius:8px}
.process-index button[aria-current=step]{background:#fff1e2;color:#994b0b;font-weight:650}
.process-stage{scroll-margin-top:172px}
.mobile-stage-picker,.mobile-candidates{display:none}
.brand-decision>img{height:200px}
.user-row-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.user-row-actions .btn{white-space:nowrap}
.user-profile-identity{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:24px;padding-bottom:18px;border-bottom:1px solid #e0e4ec}.user-profile-identity>span:last-child{font-size:13px;color:#737d8a}
@media(max-width:760px){.mobile-records .user-row-actions .btn{width:auto;flex:1;min-height:44px}.user-row-actions>span{width:100%}}
.modal-backdrop dialog{display:flex;flex-direction:column;overflow:hidden;max-height:90dvh}
.dialog-heading{position:sticky;top:0;z-index:6;flex:0 0 auto;padding:18px 24px;background:#fdfdfe;min-width:0}
.dialog-heading h2{min-width:0;overflow-wrap:anywhere}
.dialog-body{overflow:auto;overscroll-behavior:contain;min-height:0;padding:24px;scroll-padding-block:20px 90px}
.dialog-body .form-actions,.dialog-body .modal-actions{position:sticky;bottom:-24px;z-index:3;display:flex;justify-content:flex-end;gap:10px;padding:16px 0;margin:8px 0 -24px;background:#fdfdfef5;border-top:1px solid #e0e4ec;box-shadow:0 -8px 16px #fdfdfec9}
.dialog-body .form-actions .btn,.dialog-body .modal-actions .btn{min-height:44px}
.dialog-body form:has(>.form-actions),.dialog-body form:has(>.modal-actions){padding-bottom:24px}
.editor-footer{position:sticky;bottom:0;z-index:4;padding:14px 0;background:#fdfdfef5;box-shadow:0 -8px 15px #fdfdfed9;gap:12px}
.automation-form{scroll-margin-top:165px}
.automation-workbench:has(.automation-form){overflow:visible}
.pair-heading{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.pair-heading>div{min-width:0}.pair-heading h3{font-size:17px;overflow-wrap:anywhere;line-height:1.5}.pair-heading p{font-size:12px;color:#6c737d;overflow-wrap:anywhere}
.pair-row{border-top:1px solid #dfe3ea;padding:16px 0 0;margin-top:20px}
.pair-row>h3{font-size:13px;color:#646f7d;margin:0 0 10px}
.pair-row>div{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.pair-row p{margin:0;font-size:14px;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere;min-width:0}
@media(min-width:761px) and (max-width:1050px){.global-header{gap:20px;padding:0 16px}.global-header .brand-image{width:155px}.global-header .primary-nav>button{padding:10px 13px;font-size:14px}.global-header .account>span{display:none}}
@media(max-width:760px){
 :root{--nav-height:64px}
 html{scroll-padding-top:150px;scroll-padding-bottom:100px}
 .app-shell{padding-bottom:calc(var(--mobile-bar) + env(safe-area-inset-bottom))}
 .global-header{top:0;width:100%;height:64px;margin:0;border:0;border-bottom:1px solid #e0e4eb;border-radius:0;padding:0 18px;gap:14px;background:#fcfbf9;backdrop-filter:none;-webkit-backdrop-filter:none;box-shadow:0 1px 8px #303b4c05}
 .global-header .brand-image{width:148px;height:54px}
 .global-header .account{margin-left:auto;gap:6px}.global-header .account>span{display:block;max-width:90px;font-size:12px}.global-header .account small{font-size:11px}
 .account-identity{max-width:140px}.account-identity>div{flex-wrap:wrap;gap:2px 5px}.account-identity strong{font-size:12px;max-width:90px}.account-role{font-size:10px;padding:0 4px}.global-header .account-identity>small{font-size:11px}
 .global-header .primary-nav{position:fixed;inset:auto 0 0;z-index:30;display:flex;align-items:stretch;justify-content:space-around;height:calc(var(--mobile-bar) + env(safe-area-inset-bottom));padding:6px 10px calc(6px + env(safe-area-inset-bottom));gap:6px;border-top:1px solid #dfe4ec;border-radius:0;background:#fafbfff5;backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);box-shadow:0 -3px 18px #28364a08}
 .global-header .primary-nav>button{flex:1;min-width:0;min-height:58px;display:flex;flex-direction:column;justify-content:center;gap:3px;padding:6px 3px;font-size:13px;line-height:1.3;border-radius:12px}
 .primary-nav .icon{width:22px;height:22px}.global-header .primary-nav>button.active{box-shadow:none;background:#fff1e2;color:#994b0b}
 .global-header .nav-count{position:absolute;top:4px;left:calc(50% + 10px);min-width:18px;min-height:18px;padding:2px 4px;background:#bd5913;color:#fff;font-size:11px!important}
 .content{padding:22px 18px 30px;min-height:calc(100dvh - 210px)}.footer{padding:22px 18px;font-size:12px}
 .page-heading{gap:12px;flex-wrap:wrap}.page-heading h1{font-size:25px}.page-heading p{font-size:14px;line-height:1.65}.page-heading>.actions{flex-wrap:wrap;gap:8px}
 input:not([type=checkbox]):not([type=radio]),select,textarea,.form input,.form select,.form textarea{font-size:16px;min-width:0;max-width:100%}
 .btn,.btn.compact,.text-button,.icon-button,.back-link{min-height:44px}.text-button,.back-link{font-size:14px}.icon-button{min-width:44px}
 .form label,.form-note,.form small{font-size:13px;line-height:1.65}.form input,.form select{min-height:46px}
 .space-heading{display:grid;grid-template-columns:minmax(0,1fr) minmax(100px,40%);gap:10px;align-items:center;padding:0}
 .space-heading>div{width:auto}.space-heading h1{font-size:25px;line-height:1.3;padding-top:0}.space-heading .back-link{font-size:13px;max-width:none;min-height:36px;margin:0 0 3px}.space-heading p{font-size:12px;margin-top:4px}
 .space-switch{position:static;width:auto;min-width:0;max-width:none;margin:0}.space-switch select{font-size:16px;min-height:44px;padding:8px 24px 8px 10px;width:100%}
 .space-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));position:static;gap:0;width:100%;padding:0;margin:14px 0 18px;overflow:visible;border-bottom:1px solid #d7dce5;background:none;backdrop-filter:none}
 .space-tabs button{font-size:14px;min-height:44px;padding:8px 4px;min-width:0}.space-tabs button span{font-size:11px}.space-tabs button.active{background:#fff1e2;border-radius:8px 8px 0 0}
 .business-nav{top:64px;gap:0;margin:12px 0 20px;padding:0;justify-content:space-between}.business-nav button{font-size:14px;padding:10px 4px;flex:1;white-space:nowrap;min-width:0}
 .dashboard-summary{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;margin-bottom:18px}.dashboard-summary>button{min-width:0;min-height:48px;flex-wrap:wrap;padding:8px 6px;font-size:12px;gap:4px}
 .dashboard-summary .icon{display:none}
 .table-wrap:has(.mobile-records){overflow:visible}.table-wrap table.mobile-records{display:block;width:100%;min-width:0;max-width:100%}.mobile-records thead{display:none}.mobile-records tbody{display:block}
 .mobile-records tr{display:grid;grid-template-columns:1fr 1fr;gap:12px 16px;padding:20px;border-bottom:1px solid #e0e4eb}.mobile-records tr:last-child{border-bottom:0}
 .mobile-records td{display:block;border:0;padding:0;min-width:0;white-space:normal;overflow-wrap:anywhere;font-size:14px}.mobile-records td:first-child{grid-column:1/-1;font-size:16px}.mobile-records td:last-child{grid-column:1/-1;padding-top:8px}.mobile-records td:last-child .btn{width:100%}
 .mobile-records td[data-label]::before{content:attr(data-label);display:block;font-size:12px;color:#737d8a;margin-bottom:4px}.mobile-records .cell-note{font-size:12px;line-height:1.6}.mobile-records .application-note{margin-top:8px;max-width:none;white-space:pre-wrap}
 .filter-tabs{display:flex;flex-wrap:wrap;gap:5px}.filter-tabs button{min-height:44px;font-size:13px;padding:8px 10px}
 .modal-backdrop{padding:8px}.modal-backdrop dialog{max-height:calc(100dvh - 16px);width:min(720px,100%);border-radius:18px}
 .dialog-heading{padding:12px 16px}.dialog-heading h2{font-size:20px;line-height:1.4}.dialog-body{padding:18px 16px;scroll-padding-bottom:90px}
 .dialog-body .form-actions,.dialog-body .modal-actions{bottom:-18px;padding:12px 0;margin-bottom:-18px;flex-wrap:wrap}.dialog-body .form-actions .btn{flex:1}
 .dialog-body form:has(>.form-actions),.dialog-body form:has(>.modal-actions){padding-bottom:18px}.user-access-form .permission-option{padding:14px}.permission-option strong{font-size:15px}.permission-option small{font-size:13px}.permission-option input{width:20px!important;height:20px!important}
 .editor-footer{bottom:calc(var(--mobile-bar) + env(safe-area-inset-bottom));flex-wrap:wrap;padding:12px 0}.editor-footer .checkbox{font-size:14px}
 .automation-form .text-button{min-height:44px;font-size:14px}.condition-row button,.action-row button{min-width:40px;min-height:44px}.automation-form .icon-button{min-width:44px}
 .automation-form input:not([type=checkbox]),.automation-workbench .automation-form select,.history-filter select{font-size:16px;min-height:46px}
 .date-range{display:grid;grid-template-columns:1fr;gap:12px}.date-range label{width:100%;min-width:0}.date-range input{width:100%;min-height:46px}.date-range>span:not(.small){display:none}
 .process-index{display:none}.mobile-stage-picker{display:block;position:sticky;top:112px;z-index:14;margin:-2px 0 16px;padding:8px 0;background:#f4f5f9f5;backdrop-filter:blur(20px)}
 .mobile-stage-picker label{display:flex;align-items:center;gap:12px;font-size:13px;color:#626e7c}.mobile-stage-picker select{flex:1;min-height:44px;background:white}
 .process-stage{scroll-margin-top:182px;padding:20px 16px}.process-stage-head{flex-wrap:wrap;gap:8px}.process-stage-head>div{flex:1;min-width:0}.process-stage-head .text-button{font-size:13px;min-height:44px}
 .brand-decision>img{height:150px}
 .process-question p,.process-origin,.process-answer p,.process-next p,.process-connector p{font-size:14px;line-height:1.8}.process-status,.process-updated{font-size:12px}.process-question h3{font-size:16px}
 .comparison-scroll{display:none}.mobile-candidates{display:grid;gap:14px}.candidate-card{display:grid;grid-template-columns:88px minmax(0,1fr);gap:14px;padding:18px;background:#fff;border:1px solid #e1e5ed;border-radius:16px;min-width:0}
 .candidate-card.source-domestic{border-left:3px solid #75aaca}.candidate-card.source-import{border-left:3px solid #d5a46b}.candidate-card .compare-photo{height:112px;margin:0}.candidate-card .compare-photo img{height:88px}.candidate-card .compare-photo figcaption{font-size:10px;line-height:14px}
 .candidate-info{min-width:0}.candidate-info .compare-name{font-size:16px}.candidate-info p,.candidate-info small{display:block;font-size:12px;line-height:1.6;color:#707b89;margin:5px 0;overflow-wrap:anywhere}.candidate-info strong{font-size:15px}
 .candidate-actions{grid-column:1/-1;display:flex;gap:10px}.candidate-actions .btn{flex:1;font-size:14px}.candidate-actions [aria-pressed=true]{background:#fff1e2;border-color:#e4b27d;color:#994b0b}
 .compare-selection{position:sticky;bottom:calc(var(--mobile-bar) + env(safe-area-inset-bottom) + 8px);z-index:5;display:flex;align-items:center;justify-content:space-between;gap:10px;background:#fdfdfef5;border:1px solid #d8e0eb;border-radius:14px;padding:12px;font-size:13px;box-shadow:0 3px 14px #28364a10}
 .pair-heading,.pair-row>div{gap:14px}.pair-heading .compare-photo{height:110px}.pair-heading .compare-photo img{height:88px}.pair-heading h3{font-size:15px}.pair-heading .sourcing-badge{font-size:11px;padding:4px 6px}.pair-row p{font-size:14px}
 .family-tabs button,.equipment-view button,.sourcing-filters button{min-height:44px;font-size:13px}.family-tabs{gap:6px}.family-tabs button{padding:8px 10px}.compare-note{font-size:13px}
 .purchase-summary{grid-template-columns:1fr;gap:14px}.purchase-summary strong{font-size:24px}.purchase-summary p,.purchase-list p,.purchase-list small{font-size:13px}.purchase-list .text-button{min-height:44px}
 .auth{padding:32px 18px}.auth>.brand{margin-bottom:24px}.auth>.brand .brand-image{width:250px;height:100px}.auth-card{padding:28px 24px}.auth-card>p{font-size:14px;line-height:1.6}.auth-switch{font-size:13px}.auth-switch .text-button{font-size:14px}
 .toast{bottom:calc(var(--mobile-bar) + env(safe-area-inset-bottom) + 12px);max-width:calc(100% - 24px)}
}
@media(prefers-reduced-transparency:reduce){.business-nav,.space-tabs,.global-header .primary-nav,.mobile-stage-picker{backdrop-filter:none;-webkit-backdrop-filter:none;background:#fcfbf9}}

/* Product detail stays above the current list; specifications are visible before long notes. */
.modal-backdrop dialog:has(.product-detail-modal){width:min(1080px,100%);max-width:1080px}
.product-detail-toolbar{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:18px}
.product-detail-toolbar>div{display:flex;align-items:center;gap:10px;flex-wrap:wrap;min-width:0}.product-detail-toolbar>div>span{font-size:13px;color:var(--muted);overflow-wrap:anywhere}
.product-detail-modal .product-detail-hero{margin-bottom:22px}.product-detail-modal .product-detail-hero p{white-space:pre-line}
.product-detail-modal .business-detail-grid{grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:20px}
.product-detail-modal .business-details dd{overflow-wrap:anywhere;white-space:pre-line;text-align:left}
.product-detail-modal .business-details>div{display:grid;grid-template-columns:90px minmax(0,1fr);align-items:start;gap:12px}
.product-detail-modal .product-review{margin-top:28px}.product-detail-modal .business-links{overflow-wrap:anywhere}
@media(max-width:700px){.product-detail-modal .business-detail-grid{grid-template-columns:minmax(0,1fr)}.product-detail-toolbar{align-items:flex-start}.product-detail-toolbar .btn{white-space:nowrap}.product-detail-modal .product-detail-hero{grid-template-columns:minmax(0,1fr)}.product-detail-modal .compare-photo{max-width:210px;margin-inline:auto}}
/* The scroll viewport owns both the page and footer. Short pages fill it;
   long pages keep the footer after the content, above mobile navigation. */
#app .app-scroll{display:flex;flex-direction:column}
#app .app-scroll>.content{flex:1 0 auto;min-height:0}
#app .app-scroll>.footer{flex:0 0 auto;width:100%;margin-top:auto}
