/* Shared finishing layer: retain record data, simplify surrounding chrome. */
html{scroll-padding-top:130px}
body{--portal-ink:#173b54;--portal-line:#dce6ed;--portal-paper:#fff;--portal-wash:#f5f8fb}
body :is(main,.content,.card,.card-head,.record-main,.krs-catalog-main,.ceidg-catalog-main){min-width:0;box-sizing:border-box}
body :is(h1,h2,h3,.record-title,.krs-catalog-main,.ceidg-catalog-main){overflow-wrap:anywhere}
body :is(.card-head,.results-tools){gap:16px;flex-wrap:wrap}
body :is(.card-head,.results-tools)>*{min-width:0}
body :is(input,select,textarea,button,a.btn):focus-visible{outline:3px solid #bd8a27;outline-offset:3px}
body :is(.public-register-search,.krz-results,.krs-catalog,.ceidg-catalog,.sector-catalog-page .card){border-radius:14px!important;box-shadow:none!important}
body .public-register-search{padding:22px!important;gap:24px!important}
body .public-register-search h2{font-size:clamp(22px,2vw,30px)!important;line-height:1.25!important;margin:0 0 10px!important}
body .public-register-search p{line-height:1.65!important;margin:0!important;max-width:70ch}
body.portal-filters-horizontal .krs-catalog-row{display:grid!important;grid-template-columns:40px minmax(0,1fr) auto!important;gap:16px!important;align-items:start!important;padding:22px!important}
body.portal-filters-horizontal .krs-catalog-row>*{position:static!important;inset:auto!important;min-width:0!important;width:auto!important}
body.portal-filters-horizontal .krs-catalog-row>dl{grid-column:2/-1!important;grid-row:2!important;margin:0!important}
body.portal-filters-horizontal .krs-catalog-row>.btn{grid-column:3!important;grid-row:1!important;max-width:190px;white-space:normal!important;justify-self:end!important}
body :is(.krs-catalog-row,.ceidg-catalog-row) h3{line-height:1.45!important;margin:5px 0 8px!important;font-size:16px!important}
body :is(.krs-catalog-row,.ceidg-catalog-row) dl{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:0!important;border:1px solid var(--portal-line);border-radius:10px;overflow:hidden}
body :is(.krs-catalog-row,.ceidg-catalog-row) dl>div{min-width:0;padding:12px!important;overflow-wrap:anywhere}
body :is(.krs-catalog-row,.ceidg-catalog-row) dd{margin:4px 0 0!important;text-align:left!important}
body:has(.portal-function-bar .pw-more) .pw-launcher{display:none!important}
body :is(.stat-grid,.stats-grid,.sejm-stats-grid,.law-metric-grid,.judgment-metric-grid,.lawyer-profile-stats,.market-stats,.registry-hero-stats,.forum-home-stats,.forum-topic-stats,.court-record-stats,.lc-stats,#statystyki-sadu){display:none!important}
@media(min-width:761px){body.portal-top-navigation :is(.portal-bottom-nav,.mobile-nav-v2){display:none!important}}

@media(max-width:850px){
 body.portal-filters-horizontal .portal-horizontal-drawer{padding:16px!important;margin-bottom:16px!important}
 body.portal-filters-horizontal .portal-horizontal-drawer:not([open])>:not(summary){display:none!important}
 body.portal-filters-horizontal .portal-horizontal-drawer[open]>summary{margin-bottom:16px}
 body :is(.public-register-search,.card-head){gap:16px!important}
 body .public-register-search{grid-template-columns:minmax(0,1fr)!important}
}
@media(max-width:600px){
 html{scroll-padding-top:95px}
 body{padding-bottom:calc(84px + env(safe-area-inset-bottom))!important}
 body .public-register-search{padding:18px!important}
 body :is(.public-register-search,.card) h1{font-size:26px!important;line-height:1.25!important}
 body.portal-filters-horizontal .krs-catalog-row{grid-template-columns:32px minmax(0,1fr)!important;padding:18px!important;gap:12px!important}
 body.portal-filters-horizontal .krs-catalog-row>dl{grid-column:1/-1!important}
 body.portal-filters-horizontal .krs-catalog-row>.btn{grid-column:1/-1!important;grid-row:3!important;max-width:none!important;width:100%!important;justify-self:stretch!important}
 body :is(.krs-catalog-row,.ceidg-catalog-row) dl{grid-template-columns:minmax(0,1fr)!important}
 body :is(.krs-catalog-row,.ceidg-catalog-row) dl>div{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid var(--portal-line)}
 body :is(.krs-catalog-row,.ceidg-catalog-row) dl>div:last-child{border-bottom:0}
 body :is(.krs-catalog-row,.ceidg-catalog-row) dd{margin:0!important}
 body .pw-launcher{bottom:calc(88px + env(safe-area-inset-bottom))!important}
 body :is(.record-tabs,.company-tabs,.sejm-record-tabs){max-width:100%;overflow-x:auto;flex-wrap:nowrap;scrollbar-width:thin}
}




@media(min-width:761px) and (max-width:1180px){body.portal-top-navigation .site-header .topbar{padding-top:10px!important;padding-bottom:10px!important}body.portal-top-navigation .site-header .top-actions>button{display:none!important}}
