/* Phone layouts use a single reading direction and native category selection. */
@layer reset,base,components,responsive,polska,typography,brand,sources,mobile;
@layer mobile {
 .mobile-category-picker{display:none}
 @media(max-width:1100px){
  .navlinks{max-height:calc(100dvh - 74px);overflow-y:auto;overscroll-behavior:contain}
 }
 @media(max-width:650px){
  html{scroll-padding-top:0}
  main [id],[data-catalog],#arkusz,#obliczenia,.budget-examples,#jak-pracujemy,#zrodla,#pomoc{scroll-margin-top:84px}
  
  input,select,textarea,.select-control,.searchbox input,.field input{font-size:16px}
  input,select,textarea{max-width:100%}
  .btn,.insight-budgets a{min-height:44px}
  .navlinks{max-height:calc(100dvh - 68px);padding-bottom:max(16px,env(safe-area-inset-bottom))}

  .mobile-category-picker:not([hidden]){display:grid;gap:8px;margin:0 0 20px;min-width:0}
  .mobile-category-picker>span{font-size:14px;font-weight:700;color:var(--ink)}
  .mobile-category-picker select{display:block;width:100%;min-width:0;min-height:48px;padding:10px 34px 10px 12px;background:var(--white);color:var(--ink);border:1px solid var(--line);border-radius:8px;font:inherit;font-size:16px;line-height:1.5}
  .has-mobile-picker>[data-category-links],.has-mobile-picker>.sidebar-label{display:none}
  .catalog-sidebar .mobile-category-picker{margin-bottom:0}
  .home-category-tabs,.catalog-sidebar nav{flex-wrap:wrap;overflow:visible;gap:8px;padding-bottom:0}
  .home-category-tabs a,.catalog-sidebar nav a{white-space:normal;max-width:100%;min-height:44px}
  .catalog-workspace{gap:18px}
  .section-head{align-items:flex-start;gap:10px;flex-wrap:wrap}
  
  .section-head .text-link{min-height:44px;display:inline-flex;align-items:center}
  .catalog-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:8px}
  .catalog-controls>.searchbox{grid-column:1/-1;width:100%;min-width:0}
  .catalog-controls>.select-control{width:100%;min-width:0;min-height:46px;padding:10px 25px 10px 10px}
  .catalog-controls>.view-toggle{display:none}
  .results-meta{flex-wrap:wrap;gap:5px 12px;line-height:1.6}
  .results-meta>span,.results-meta>a{max-width:100%;text-align:left;overflow-wrap:anywhere}
  .results-meta>a{padding-block:5px}
  .product-save{width:44px;height:44px;top:5px;right:5px}.product-save .icon{width:18px;height:18px}
  .product-title,.is-table .product-title{font-size:14px;line-height:1.5;min-height:4.5em;-webkit-line-clamp:3;overflow-wrap:anywhere}
  .product-title a{display:block;min-height:44px}
  .product-go{display:none}
  .product-content{padding:12px 10px}
  .price-row{gap:0}.price-row>div{min-width:0}
  .price-row strong{font-size:16px;line-height:1.4}
  .price-row small{font-size:12px;line-height:1.5;overflow-wrap:anywhere}
  .welcome-cards{display:grid;grid-template-columns:minmax(0,1fr);overflow:visible;gap:10px;padding-block:8px 22px}
  .welcome-card{display:flex;flex:auto;min-width:0;min-height:76px;padding:13px 14px;gap:12px;align-items:center}
  .welcome-card>div{min-width:0}.welcome-card small{display:none}
  .welcome-card h2{font-size:16px;line-height:1.4}.welcome-card p{font-size:14px;line-height:1.5;margin-top:3px}
  .welcome-symbol{width:34px;height:34px;margin:0;flex-shrink:0}
  .welcome-card>.icon{display:block;width:16px;height:16px;flex-shrink:0;margin-left:auto}
  .page-head{padding-block:22px;margin-bottom:22px}.page-head h1{font-size:clamp(30px,8vw,36px);line-height:1.15;overflow-wrap:anywhere}
  .page-head p,.prose p,.prose li{font-size:16px;line-height:1.7}
  .prose h2{font-size:24px;line-height:1.3}.prose h3{font-size:20px;line-height:1.4}
  .prose a,.source-list a,.detail-facts dd{overflow-wrap:anywhere}
  summary{min-height:44px;padding-block:8px;align-items:center;line-height:1.5;font-size:16px}
  details p{font-size:16px;line-height:1.7}
  
  .article-aside{grid-template-columns:1fr;padding:18px}
  .article-aside a{display:flex;align-items:center;min-height:44px;font-size:15px;padding-block:6px}
  .table-wrap{max-width:100%;overscroll-behavior-x:contain}.table-wrap th,.table-wrap td{font-size:14px;line-height:1.55;padding:10px}
  .detail-info h1{font-size:28px;line-height:1.2;overflow-wrap:anywhere}
  .detail-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
  .detail-actions .btn,.detail-actions .text-link{min-height:46px;font-size:15px;justify-content:center}
  .detail-actions .text-link{justify-content:flex-start;overflow-wrap:anywhere}
  .detail-facts{gap:16px}.detail-facts dt{font-size:13px}.detail-facts dd{font-size:14px}
  .field{min-width:0}.field input{min-width:0;min-height:48px}
  .field label{font-size:14px;line-height:1.5}.field small{font-size:13px;line-height:1.6}
  .calc-form .field label{min-height:3em}
  .calc-form{gap:20px 14px}.calc-total{font-size:36px;overflow-wrap:anywhere}
  .budget-example{padding:20px 16px}.budget-example .btn{align-self:stretch;min-height:44px;white-space:normal}
  
  .footer-legal{gap:4px 16px}.footer-legal>a{min-height:44px;display:inline-flex;align-items:center}
  .footer{padding-bottom:max(24px,env(safe-area-inset-bottom))}
  .toast{max-width:calc(100% - 32px);bottom:max(16px,env(safe-area-inset-bottom));overflow-wrap:anywhere}
 }
 @media(max-width:370px){
  .catalog-controls{grid-template-columns:minmax(0,1fr)}
  .calc-form{grid-template-columns:minmax(0,1fr)}
  .calc-form .field label{min-height:0}
  
 }
}

/* Keep all category labels and focus rings visible on tablet widths. */

