/* Touch layouts, with the desktop catalogue unchanged. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body:has(dialog[open]){overflow:hidden}
@media screen and (max-width:1024px){
 body:not(.login-page) header{padding:20px 24px;gap:16px}
 body:not(.login-page) main{padding:30px 24px 48px}
 nav{padding:0 24px;gap:24px}
 .nav-note{display:none}
 .page-head>div,.panel,.sell-layout>section,.customer-layout>section,.detail>div{min-width:0}
 .request-row{flex-wrap:wrap;gap:16px}
 .request-side{flex:1 1 100%;text-align:left;display:flex;align-items:center;justify-content:space-between;gap:16px;min-width:0}
 .request-actions{justify-content:flex-start;margin:0}
 .request-side .button{margin:0}
 .customer-row{flex-wrap:wrap}
 .customer-row>div{flex:1 1 100%;min-width:0}
 .sell-layout{gap:20px}
 input,select,textarea,.photo-drop input{font-size:16px}
 .button,.close,.nav,.tabs button{min-height:44px}
 .close{width:44px;height:44px}
 .photo-choice label,.keep-photo,.suggestion-row label{min-height:44px}
 .photo-choice input[type=checkbox],.photo-choice input[type=radio],.keep-photo input,.suggestion-row input[type=checkbox]{width:22px;height:22px;flex:none}
 .photo-upload .button{min-height:44px}
 .detail .photo img{object-fit:contain}
 .modal-head{position:sticky;top:0;background:#fff;z-index:2}
 .modal-head h2{font-size:22px}
 dialog{max-height:90dvh;overscroll-behavior:contain}
 .invoice-table{table-layout:fixed}
 .invoice-table th:first-child{width:40%}
 .invoice-table th:nth-child(2){width:12%}
 .invoice-table td,.invoice-table th{overflow-wrap:anywhere}
}
@media screen and (max-width:680px){
 body:not(.login-page) header{padding:12px 16px;gap:12px}
 .brand{gap:9px;font-size:15px;letter-spacing:1.3px}
 .brand-mark{padding:10px;font-size:22px}
 .brand-sub{font-size:9px;letter-spacing:2px;margin-top:4px}
 .private-label,.account #account{display:none}
 .account{gap:0}.account .button{padding:10px 12px;font-size:13px}
 nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;padding:0 12px}
 nav:has(#customers-nav[hidden]){grid-template-columns:repeat(3,minmax(0,1fr))}
 .nav{padding:12px 5px;font-size:13px;min-width:0;white-space:normal;line-height:1.3}
 body:not(.login-page) main{padding:24px 14px 36px;min-height:60svh}
 h1{font-size:28px;line-height:1.15;letter-spacing:-.8px}h2{font-size:22px}
 .page-head{margin-bottom:22px;gap:16px}.page-head .muted{font-size:14px;line-height:1.55}
 .inventory-actions{width:100%}.inventory-actions .button{width:100%}
 .toolbar{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;margin-bottom:18px}
 .toolbar input,.toolbar select{width:100%;min-height:46px}
 .count{margin:16px 0;font-size:13px}
 #catalogue .card{padding:10px;gap:8px}
 #catalogue .card-open{grid-template-columns:80px minmax(0,1fr);gap:10px}
 #catalogue .photo{width:80px;height:88px}
 #catalogue .card-action{margin-left:90px}
 #catalogue .card-action .button{min-height:44px;font-size:13px}
 #catalogue .card-bottom{gap:7px}
 #catalogue .card-bottom>div:last-child{flex-wrap:wrap;gap:5px}
 #catalogue .price{font-size:17px}
 .empty{padding:38px 18px}
 .panel{padding:18px}
 .sell-layout,.customer-layout{grid-template-columns:minmax(0,1fr);gap:24px}
 .seller-enquiry .muted{overflow-wrap:anywhere}
 .request-row{padding:17px;gap:14px}
 .request-side{display:block}.request-side .price{font-size:23px}
 .request-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:14px}
 .request-actions .button{padding:10px 8px;white-space:normal}
 .request-actions .primary{grid-column:1/-1}
 .collection-notice{font-size:13px;padding:12px}
 dialog{width:100%;height:100dvh;max-width:100%;max-height:100dvh;margin:0;border-radius:0;box-shadow:none}
 dialog[open]{display:block}
 .modal-head{padding:12px max(16px,env(safe-area-inset-right)) 12px max(16px,env(safe-area-inset-left))}
 .modal-head h2{font-size:20px}
 .modal-body{padding:18px 16px max(24px,env(safe-area-inset-bottom))}
 .detail{grid-template-columns:minmax(0,1fr);gap:18px}
 .detail .photo{max-height:260px}
 .specs{gap:14px;margin:20px 0}
 .form-grid{grid-template-columns:minmax(0,1fr)}.span2{grid-column:auto}
 .form-actions{display:grid;grid-template-columns:1fr 1fr}
 .photo-drop{padding:14px}.photo-drop input{max-width:100%}
 .invoice-heading{gap:10px}.invoice-heading img{width:72px;height:62px}
 .invoice-heading h3{font-size:16px}.invoice-heading .eyebrow{font-size:10px;letter-spacing:1px}
 .invoice-table th,.invoice-table td{padding:10px 4px;font-size:12px}
 .invoice-total{font-size:16px}.invoice-document>p{font-size:14px}.invoice-print{width:100%}
 #notice{width:calc(100% - 28px);max-width:none;bottom:max(14px,env(safe-area-inset-bottom));padding:14px 16px;font-size:14px}
 footer{padding:20px 16px max(20px,env(safe-area-inset-bottom));gap:10px}
 .login-page{min-height:100svh}.login-shell{min-height:100svh}
 .login-story{padding:20px 22px}.login-brand img{width:48px;height:48px}.login-brand>span{font-size:17px}
 .story-copy{margin:18px 0 0}.story-copy h1{font-size:24px}.login-kicker{display:none}
 .login-card{padding:24px 22px}.login-card input{font-size:16px;min-height:48px}
 .login-card h2{font-size:27px}.invitation-tag{margin-bottom:12px}.login-intro{margin-bottom:20px;font-size:14px}
 .login-card label{font-size:14px;margin-bottom:18px}.login-help{margin-top:20px;padding-top:16px}
 .login-card-footer{margin-top:24px}
}
@media screen and (min-width:681px) and (max-width:1024px){
 .login-page{padding:24px}.login-shell{min-height:620px;grid-template-columns:minmax(0,.85fr) minmax(0,1fr)}
 .login-story{padding:28px}.login-brand{gap:12px}.login-brand img{width:52px;height:52px}.login-brand>span{font-size:15px}
 .login-card{padding:32px 28px}.login-card input{font-size:16px}
 .story-copy h1{font-size:36px}.story-copy{margin:55px 0 80px}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

.contact-email{font-size:14px;line-height:1.6;overflow-wrap:anywhere}.contact-email a,a.contact-email{color:var(--navy);text-decoration:underline;text-underline-offset:3px}.login-form-wrap>.contact-email{margin:20px 0 0}a.contact-email{display:inline-block;padding:8px 0}footer>span{min-width:0}

/* Offshore platform silhouette between the title and catalogue action. */
.inventory-heading>div:first-child{flex:1;min-width:0}
.inventory-rig{display:block;flex:0 1 190px;width:190px;height:129px;object-fit:contain}
.inventory-heading .inventory-actions{flex:none}
@media screen and (max-width:1024px) and (min-width:681px){.inventory-heading{flex-wrap:wrap}.inventory-heading>div:first-child{flex-basis:calc(100% - 200px)}.inventory-heading .inventory-actions{margin-left:auto}}
@media screen and (max-width:680px){.inventory-heading{display:grid;grid-template-columns:100px minmax(0,1fr);align-items:center;gap:14px}.inventory-heading>div:first-child{grid-column:1/-1}.inventory-rig{width:100px;height:76px}.inventory-heading .inventory-actions{width:100%;min-width:0}}

.message-layout{display:grid;grid-template-columns:minmax(230px,1fr) minmax(0,2fr);gap:24px}.conversation-link{display:flex;flex-direction:column;gap:8px;width:100%;text-align:left;border:0;border-bottom:1px solid var(--line);padding:18px 10px;background:#fff;color:var(--navy);overflow-wrap:anywhere}.conversation-link.selected{background:#edf3f5;border-left:3px solid var(--orange)}.conversation-link span{font-size:13px}.message-history{margin:20px 0;display:flex;flex-direction:column;gap:14px}.message-bubble{padding:14px;border:1px solid var(--line);border-radius:8px;background:#f3f6f7;max-width:95%}.message-bubble.own{align-self:flex-end;background:#e8f1f2}.message-author{margin:0;font-size:12px;overflow-wrap:anywhere}.message-author span{display:block;color:var(--muted);margin-top:5px}.message-text{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6;margin:12px 0 0}.message-layout .panel{min-width:0}.message-layout>section>button{margin-bottom:10px}@media(max-width:800px){.message-layout{grid-template-columns:minmax(0,1fr)}#conversation-list{max-height:260px;overflow:auto}.message-bubble{max-width:100%}}@media(max-width:680px){nav:has(#customers-nav[hidden]){grid-template-columns:repeat(2,minmax(0,1fr))}#customers-nav:not([hidden]){grid-column:1/-1}}

@media screen and (max-width:680px){#catalogue .card-action{margin-left:0}}

/* Keep the saved-parts view compact, including its empty state. */
body.favourites-page{display:flex;flex-direction:column;min-height:100svh}
body.favourites-page main{flex:1;width:100%;min-height:0;margin:0 auto;padding-top:20px;padding-bottom:20px}
.favourites-page .page-head{display:block;margin-bottom:16px}
.favourites-page .page-head .eyebrow,.favourites-page .inventory-rig,.favourites-page .inventory-actions{display:none}
.favourites-page h1{font-size:28px;margin-bottom:6px}
.favourites-page .page-head .muted{margin-top:0}
.favourites-page .toolbar{margin-bottom:12px}
.favourites-page .toolbar[hidden],.favourites-page .count[hidden]{display:none}
.favourites-page .count{margin:12px 0}
.favourites-page .empty{padding:22px 16px}
.favourites-page .empty h2{font-size:20px;margin-bottom:8px}
.favourites-page .empty p{margin:8px auto 16px}
.favourites-page footer{padding-top:12px;padding-bottom:12px}

/* Match the compact saved-parts layout for orders and offers. */
body.requests-page{display:flex;flex-direction:column;min-height:100svh}
body.requests-page main{flex:1;width:100%;min-height:0;margin:0 auto;padding-top:20px;padding-bottom:20px}
.requests-page .page-head{margin-bottom:12px}
.requests-page .page-head .eyebrow{display:none}
.requests-page h1{font-size:28px;margin-bottom:6px}
.requests-page .page-head .muted{margin-top:0;font-size:14px;line-height:1.45}
.requests-page main>.collection-notice{padding:10px 12px;margin:12px 0;font-size:13px}
.requests-page .empty{padding:22px 16px}
.requests-page .empty h2{font-size:20px;margin-bottom:8px}
.requests-page .empty p{margin:8px auto;line-height:1.45}
.requests-page .enquiry-inbox{margin-top:18px}
.requests-page footer{padding-top:12px;padding-bottom:12px}

/* Compact Messages and Sell to us without constraining real content. */
body:is(.messages-page,.sell-page){display:flex;flex-direction:column;min-height:100svh}
body:is(.messages-page,.sell-page) main{flex:1;width:100%;min-height:0;margin:0 auto;padding-top:20px;padding-bottom:20px}
:is(.messages-page,.sell-page) .page-head{margin-bottom:12px;gap:12px}
:is(.messages-page,.sell-page) .page-head .eyebrow{display:none}
:is(.messages-page,.sell-page) h1{font-size:28px;margin-bottom:6px}
:is(.messages-page,.sell-page) .page-head .muted{margin-top:0;font-size:14px;line-height:1.45}
:is(.messages-page,.sell-page) .panel{padding:16px}
:is(.messages-page,.sell-page) .empty{padding:20px 16px}
:is(.messages-page,.sell-page) .empty p{margin:8px auto;line-height:1.45}
:is(.messages-page,.sell-page) h2{font-size:20px;margin-bottom:12px}
:is(.messages-page,.sell-page) footer{padding-top:12px;padding-bottom:12px}
.messages-page main>.collection-notice{padding:10px 12px;margin:12px 0;font-size:13px}
.messages-page .message-layout{gap:16px;align-items:start}
.messages-page .message-layout.no-conversations{grid-template-columns:minmax(0,1fr)}
.messages-page #conversation-content[hidden]{display:none}
.sell-page .sell-layout{gap:20px;align-items:start}
.sell-page #seller-form label{margin-bottom:10px}
.sell-page #seller-form input,.sell-page #seller-form textarea{padding:9px;margin-top:5px}
.sell-page #seller-form textarea{min-height:80px}
.sell-page #seller-form .hint{margin:6px 0 10px;font-size:12px;line-height:1.4}
.sell-page #seller-photo-note:empty{display:none}
.sell-page #seller-form .form-grid{gap:0 12px}
@media(max-width:680px){.messages-page .page-head{flex-wrap:wrap}}

/* Compact administrator and seller pages. */
body:is(.customers-page,.stock-page){display:flex;flex-direction:column;min-height:100svh}
body:is(.customers-page,.stock-page) main{flex:1;width:100%;min-height:0;margin:0 auto;padding-top:20px;padding-bottom:20px}
:is(.customers-page,.stock-page) .page-head{margin-bottom:12px;gap:12px}
:is(.customers-page,.stock-page) .page-head .eyebrow{display:none}
:is(.customers-page,.stock-page) h1{font-size:28px;margin-bottom:6px}
:is(.customers-page,.stock-page) .page-head .muted{margin-top:0;font-size:14px;line-height:1.45}
:is(.customers-page,.stock-page) .panel{padding:16px}
:is(.customers-page,.stock-page) .empty{padding:20px 16px}
:is(.customers-page,.stock-page) .empty p{margin:8px auto;line-height:1.45}
:is(.customers-page,.stock-page) h2{font-size:20px;margin-bottom:10px}
:is(.customers-page,.stock-page) footer{padding-top:12px;padding-bottom:12px}
.customers-page .customer-layout{gap:16px;align-items:start}
.customers-page .access-requests{margin-bottom:16px}
.customers-page .access-requests p{margin:8px 0;line-height:1.4}
.customers-page .collection-notice{padding:10px 12px;font-size:13px}
.customers-page #customer-form label{margin-bottom:10px}
.customers-page #customer-form input{padding:9px;margin-top:5px}
.customers-page #customer-form .hint{margin:8px 0;font-size:12px;line-height:1.4}
.customers-page .customer-row{padding-top:10px;padding-bottom:10px;gap:10px}
.customers-page .customer-row p{margin:6px 0}
.stock-page .stock-tools{margin:12px 0;gap:10px}
.stock-page .stock-legend{margin:10px 0;font-size:12px;line-height:1.4}
.stock-page .stock-pagination{margin:12px 0}
.stock-page .seller-settings{margin-top:12px;padding:8px 14px}
.stock-page .seller-settings>summary{padding:6px 0}

/* Keep optional customer setup out of the main list. */
.customers-page .customer-layout{display:flex;flex-direction:column;gap:12px}
.customers-page .customer-layout>section,.customers-page .customer-layout>details{width:100%;min-width:0}
.customers-page details.panel{padding:10px 14px}
.customers-page details.panel>summary{cursor:pointer;font-weight:700;font-size:14px;min-height:24px;line-height:24px}
.customers-page .access-requests{margin-bottom:12px}
.customers-page .customer-add[open]>summary{margin-bottom:12px}
.customers-page #customer-form{max-width:650px}
.customers-page .customer-row{padding:8px 0}
.customers-page .customer-row .button{padding:8px 12px}
@media(min-width:800px){.customers-page #customer-form{display:grid;grid-template-columns:1fr 1fr;column-gap:16px}.customers-page #customer-form>p,.customers-page #customer-form>button{grid-column:1/-1}}

/* Expand the enquiry form only when the visitor is ready to submit parts. */
.sell-page .sell-layout{display:flex;flex-direction:column;gap:16px}
.sell-page .sell-layout>details,.sell-page .sell-layout>section{width:100%;min-width:0}
.sell-page .sell-enquiry-form{padding:10px 14px}
.sell-page .sell-enquiry-form>summary{cursor:pointer;font-weight:700;font-size:14px;min-height:28px;line-height:28px}
.sell-page .sell-enquiry-form[open]>summary{margin-bottom:14px}
.sell-page #seller-form{max-width:850px}
.sell-page .sell-layout>section>.hint{margin:6px 0 12px}

/* Compact offer buttons instead of wide blocks. */
.offer-buttons{display:inline-grid;gap:6px}
.button.offer-button,#catalogue .card-action .offer-button{width:auto;min-height:32px;padding:7px 11px;font-size:12px;line-height:16px;white-space:nowrap}
#catalogue .card-action{justify-self:end}
@media(min-width:681px){#catalogue .card{grid-template-columns:138px minmax(0,1fr) auto}}
@media(max-width:680px){#catalogue .card-action{justify-self:start}}
@media(pointer:coarse){.button.offer-button,#catalogue .card-action .offer-button{min-height:44px}}

#catalogue .card-action .listing-owner{margin:7px 0 0;font-size:11px;line-height:1.4;color:var(--muted);text-align:right}
@media(max-width:680px){#catalogue .card-action .listing-owner{text-align:left}}

/* One-row navigation on phones; expand only when choosing a page. */
.mobile-navigation{display:none}
@media(max-width:680px){
 .mobile-navigation{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:4px 14px;background:#fff;border-bottom:1px solid var(--line);min-height:48px}
 #mobile-page-name{font-size:14px;font-weight:700;color:var(--navy)}
 #mobile-menu-toggle{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:8px 12px;border:1px solid var(--line);border-radius:4px;background:#fff;color:var(--navy);font-size:14px;font-weight:600}
 body #main-navigation{display:none}
 body.mobile-menu-open #main-navigation{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));padding:6px 12px;border-bottom:1px solid var(--line);gap:0 10px}
 #main-navigation .nav{grid-column:auto;text-align:left;padding:12px 8px;min-height:44px}
 #main-navigation .nav[hidden]{display:none}
}

/* Fit the closed sign-in form into laptop-height viewports. */
@media(min-width:681px){
 body.login-page{padding:16px 4vw;min-height:100svh}
 .login-page .login-shell{min-height:0}
 .login-page .login-story{padding:30px}
 .login-page .story-copy{margin:36px 0 48px}
 .login-page .story-copy h1{font-size:40px;margin-bottom:16px}
 .login-page .login-kicker{margin-bottom:16px}
 .login-page .login-card{padding:24px 32px 18px}
 .login-page .invitation-tag{margin-bottom:12px}
 .login-page .login-card h2{font-size:30px;margin:0 0 8px}
 .login-page .login-intro{margin-bottom:16px;line-height:1.5}
 .login-page .login-card label{margin-bottom:12px}
 .login-page .login-card input{min-height:42px;padding:10px 12px;margin-top:6px}
 .login-page .login-card .button{min-height:44px;padding:10px 14px}
 .login-page .login-help{margin-top:14px;padding-top:8px;line-height:1.4}
 .login-page .login-help summary{padding:8px 0;min-height:36px}
 .login-page .login-form-wrap>.contact-email{margin:8px 0 0;font-size:13px;line-height:1.4}
 .login-page .login-form-wrap>.contact-email a{padding:4px 0}
 .login-page .login-card-footer{margin-top:16px}
}

/* Short laptop windows, including browser toolbars and display scaling. */
@media(min-width:681px) and (max-height:760px){
 body.login-page{padding:10px 3vw}
 .login-page .login-shell{min-height:0}
 .login-page .login-story{padding:24px}
 .login-page .login-brand img{width:54px;height:54px}
 .login-page .login-brand>span{font-size:17px}
 .login-page .story-copy{margin:22px 0 28px}
 .login-page .story-copy h1{font-size:34px;margin-bottom:12px}
 .login-page .story-copy>p:last-child{font-size:14px;line-height:1.5}
 .login-page .login-card{padding:16px 28px 12px}
 .login-page .invitation-tag{margin-bottom:8px}
 .login-page .login-card h2{font-size:27px;margin-bottom:6px}
 .login-page .login-intro{font-size:13px;margin-bottom:12px;line-height:1.4}
 .login-page .login-card label{margin-bottom:9px}
 .login-page .login-card input{min-height:38px;padding:8px 10px;margin-top:4px}
 .login-page .login-card .button{min-height:40px;padding:9px 12px;margin-top:0}
 .login-page .login-help{margin-top:10px;padding-top:4px;font-size:11px}
 .login-page .login-help summary{padding:6px 0;min-height:32px;font-size:13px}
 .login-page .login-help>p{margin-top:4px}
 .login-page .login-form-wrap>.contact-email{margin-top:6px;font-size:12px}
 .login-page .login-card-footer{margin-top:10px;font-size:8px}
}

.login-help a{text-decoration:underline;text-underline-offset:3px}.access-status{color:#2e684b;font-size:13px;line-height:1.4}.access-status:empty{display:none}
/* Tighter phone listings with the offer action tucked to the right. */
@media(max-width:680px){
 #catalogue .grid{gap:6px}
 #catalogue .card{padding:8px;row-gap:3px;column-gap:9px}
 #catalogue .card-action{justify-self:end;align-self:end;margin:0;text-align:right}
 #catalogue .card-action .offer-button{min-height:30px;padding:6px 9px;font-size:11px;line-height:16px}
 #catalogue .card-action .listing-owner{margin:3px 0 0;font-size:10px;text-align:right}
 #catalogue .listing-brand{margin-bottom:2px}
 #catalogue .card-bottom{margin-top:4px}
}

.site-stats{margin-bottom:12px}.stats-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:14px 0}.stats-grid>div{background:#eff4f6;padding:14px;border-radius:5px}.stats-grid strong{display:block;font-size:25px;color:#173746}.stats-grid span{font-size:12px;color:#506774;display:block;margin-top:5px}.stats-table{width:100%;border-collapse:collapse;font-size:13px}.stats-table td,.stats-table th{padding:8px;text-align:left;border-bottom:1px solid #dbe3e7}@media(max-width:680px){.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
