/* Shared presentation only: retain controls, values, route visibility and actions. */
html body :is(main,dialog) :is(fieldset,.hub-step,.biz-edit,.records,.panel){min-width:0;box-sizing:border-box;max-width:100%}
html body :is(main,dialog) fieldset{margin:8px auto;padding:8px;width:100%}
html body :is(main,dialog) legend{margin-inline:auto;padding-inline:6px;text-align:center}
html body :is(main,dialog) :is(.brand-grid,.spoken-language-options,#listing-services,#listing-communities,#listing-states,#biz-brand-list){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;align-items:stretch;gap:6px;width:100%;margin:6px auto;padding:0;box-sizing:border-box}
html body :is(main,dialog) :is(.brand-grid,.spoken-language-options,#listing-services,#listing-communities,#listing-states,#biz-brand-list)>label{display:flex;align-items:center;justify-content:flex-start;gap:7px;min-width:0;min-height:44px;height:auto;margin:0;padding:6px;box-sizing:border-box;text-align:start;font-size:14px;line-height:1.3;overflow-wrap:anywhere;word-break:normal}
html body :is(main,dialog) label>input:is([type=checkbox],[type=radio]){flex:0 0 20px;width:20px;height:20px;min-height:20px;margin:0;padding:0}
html body :is(main,dialog) :is(.hub-pager,.hub-step-nav){display:flex;align-items:center;justify-content:center;gap:8px;margin:8px auto;min-height:44px;width:100%}
html body :is(main,dialog) .hub-step-nav{border-top:1px solid var(--line,#dce2ee);padding-top:8px}
html body :is(main,dialog) .hub-page-count{font-size:13px;line-height:1.3;text-align:center}
html body :is(main,dialog) .hub-step-title{margin:6px 0;font-size:16px;text-align:center}
html body :is(main,dialog) .hub-step-title.hub-repeated-title{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip-path:inset(50%)}
html body main :is(.biz-edit,.hub-disclosure)>summary{justify-content:center;gap:8px;text-align:center;padding:8px;min-height:44px;box-sizing:border-box}
html body main :is(.panel,.records,.biz-box)>:is(h2,h3){margin-block:6px 8px}
html body main :is(.panel,.records,.biz-box)>p{margin-block:6px;line-height:1.4}
@media(min-width:900px){html body :is(main,dialog) :is(.brand-grid,.spoken-language-options,#listing-services,#listing-communities,#listing-states,#biz-brand-list){grid-template-columns:repeat(4,minmax(0,1fr))}}
/* Layout must never reveal hidden pages, permissions or paginated choices. */
html body [hidden],html body [data-hub-page-hidden]{display:none!important}

/* Step navigation belongs above the fields; list paging remains below its list. */
.hub-step-heading{display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:8px;width:100%;margin:8px 0}
.hub-step-heading>button{width:44px;min-width:44px;min-height:44px;padding:6px;margin:0}
.hub-step-heading>.hub-step-title{margin:0;text-align:center}
.hub-step-heading>.hub-page-count{white-space:nowrap;font-size:13px}
.hub-repeated-step-heading{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important}
[data-biz-view]:not([data-biz-view="home"]) .biz-summary{display:none!important}

/* Slight emphasis for displayed names; retain existing layout and controls. */
html body :is(#biz-header-company,#biz-summary-name,.service-history-company,.job-technician-selector){font-weight:800}html body .service-history-company{font-size:18px}

/* Shared button geometry. Presentation only: no color, visibility or action changes. */
:root{--hub-button-gap:8px;--hub-button-min-height:44px}
html body :is(button,a.button){box-sizing:border-box;text-align:center;vertical-align:middle}
html body :is(.actions,.contact-actions,.hub-action-row,.product-actions,.invite-guide-actions,.invite-mode,.pair-actions,.hub-button-row):not(:has(>label,>select,>input:not([hidden]))){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:var(--hub-button-gap);width:100%;margin:8px auto}
html body :is(.actions,.contact-actions,.hub-action-row,.product-actions,.invite-guide-actions,.invite-mode,.pair-actions,.hub-button-row):not(:has(>label,>select,>input:not([hidden])))>:is(button,a.button){display:flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:0;max-width:none;width:100%;min-height:var(--hub-button-min-height);height:100%;margin:0;padding:10px 8px;line-height:1.25;white-space:normal;word-break:normal;overflow-wrap:break-word}
html body :is(.actions,.contact-actions,.hub-action-row,.product-actions,.invite-guide-actions,.invite-mode,.pair-actions,.hub-button-row):not(:has(>label,>select,>input:not([hidden])))>:is(button,a.button):nth-last-child(1 of :not([hidden])):nth-child(odd of :not([hidden])){grid-column:1/-1}
html body :is(#invitation-content,#invite-friend .panel)>button:not([hidden]){display:flex;align-items:center;justify-content:center;width:100%;min-height:var(--hub-button-min-height);margin:8px auto!important;text-align:center}
html body .invite-contact-search{text-align:center;margin:8px auto;width:100%}
html body .invite-contact-search>button{display:flex;align-items:center;justify-content:center;width:100%;min-height:var(--hub-button-min-height);margin:8px auto;text-align:center}
/* Hidden state always wins over shared layout, including permission-gated actions. */
html body [hidden],html body [data-hub-page-hidden]{display:none!important}
