/* Mobile reading and navigation refinements. Desktop retains its existing layout. */
@media (max-width:767.98px){
 body{padding-bottom:calc(52px + env(safe-area-inset-bottom))!important}
 header>div>div:first-child{gap:8px;padding-top:12px!important;padding-bottom:12px!important}
 header>div>div:first-child>a:first-child{gap:8px;min-width:0;flex:1}
 header>div>div:first-child>a:first-child img{width:34px;height:34px;flex-shrink:0}
 header>div>div:first-child>a:first-child .text-lg{font-size:15px;white-space:nowrap}
 header>div>div:first-child>a:first-child .text-xs{font-size:10px;line-height:1.5}
 header>div>div:first-child>a:nth-child(2){font-size:12px;padding:10px 8px;flex-shrink:0}
 header [data-user-menu]>summary,header #menu-btn{min-width:40px;min-height:44px;justify-content:center}
 #mobile-nav:not(.hidden){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding-top:8px;max-height:65dvh;overflow-y:auto;border-top:1px solid #e2e8f0}
 #mobile-nav>a{margin:0;min-height:44px;display:flex;align-items:center;background:#f8fafc;line-height:1.5}
 .ptoc-home-section{min-width:0}
 .ptoc-home-section.py-12,.ptoc-home-section>div.py-12{padding-top:32px;padding-bottom:32px}
 .ptoc-home-section>div.py-14{padding-top:36px;padding-bottom:36px}
 .ptoc-home-section h2{font-size:23px;line-height:1.5;text-wrap:balance}
 .ptoc-home-section>div.flex.items-end{align-items:flex-start;flex-direction:column;gap:12px;margin-bottom:20px}
 .ptoc-home-section>div.flex.items-end>a{min-height:44px;display:inline-flex;align-items:center}
 .ptoc-home-section .grid{gap:16px;min-width:0}
 .ptoc-home-section .grid>*{min-width:0}
 .ptoc-home-section p{line-height:1.85}
 .ptoc-home-hero>div.grid{padding-top:28px;padding-bottom:28px;gap:24px}
 .ptoc-home-hero h1{font-size:26px;line-height:1.5;margin-bottom:12px;text-wrap:pretty}
 .ptoc-home-hero h1+p{font-size:14px;margin-bottom:18px}
 .ptoc-home-hero .mb-5{margin-bottom:14px}
 .ptoc-home-hero .mb-8{margin-bottom:20px;gap:8px}
 .ptoc-home-hero .text-start>div:last-child{display:grid;grid-template-columns:1fr;gap:10px}
 .ptoc-home-hero .text-start>div:last-child>a{justify-content:center;min-height:46px;padding:11px 16px;width:100%}
 .ptoc-home-hero img{aspect-ratio:16/9}
 .ptoc-newsline{padding-bottom:env(safe-area-inset-bottom)}
 .ptoc-newsline .ptoc-newsline__inner{min-height:48px;padding:6px 12px;gap:10px}
 .ptoc-newsline .ptoc-newsline__label{font-size:12px;padding:6px 9px;flex-shrink:0}
 #ptoc-entry-popup>div.flex{padding:12px}
 #ptoc-entry-popup>div.flex>div{max-height:calc(100dvh - 24px);overscroll-behavior:contain}
 #ptoc-entry-popup [data-popup-close].absolute{min-width:44px;min-height:44px;top:6px;left:6px;z-index:1;background:white}
 #ptoc-entry-popup .p-6{padding:20px 16px}
 #ptoc-entry-popup h2{font-size:21px;line-height:1.6;padding-inline:24px}
 #ptoc-entry-popup .grid>a{gap:8px;padding:10px;min-height:64px}
 #ptoc-entry-popup .grid>a .text-sm{font-size:12px;line-height:1.6}
 footer{overflow-wrap:anywhere}
 input[type=email],input[type=text],input[type=password],select,textarea{font-size:16px}
}
@media(max-width:374px){
 header>div{padding-left:10px;padding-right:10px}
 header>div>div:first-child{gap:5px}
 header>div>div:first-child>a:first-child .text-lg{font-size:13px}
 header>div>div:first-child>a:first-child .text-xs{font-size:9px}
 .ptoc-home-hero h1{font-size:24px}
}
@media(hover:none){
 .ptoc-card .ptoc-title-overlay{transform:translateY(0)}
 .ptoc-card .ptoc-date,.ptoc-card .ptoc-title{transform:translateY(0);opacity:1}
}
@media(prefers-reduced-motion:reduce){
 .ptoc-newsline__track,.ptoc-pulse{animation:none!important}
}

/* Footer: two readable navigation columns, full-width contact and legal rows. */
@media(max-width:767.98px){
 footer{margin-top:28px!important;text-align:start}
 footer>div{padding-top:28px!important;padding-bottom:24px!important}
 footer>div>.grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 16px}
 footer>div>.grid>div{min-width:0;text-align:start}
 footer>div>.grid>div:first-child,footer>div>.grid>div:last-child{grid-column:1/-1}
 footer>div>.grid>div:first-child{padding-bottom:20px;border-bottom:1px solid rgb(255 255 255 / .18)}
 footer>div>.grid>div:first-child>.flex{flex-direction:row;margin-bottom:12px}
 footer>div>.grid>div:first-child p{line-height:1.9;margin-top:0}
 footer>div>.grid>div>div.font-semibold{margin-bottom:10px}
 footer>div>.grid>div>ul{margin-top:0}
 footer>div>.grid>div>ul>li{margin-top:0}
 footer>div>.grid>div>ul a{min-height:44px;display:flex;align-items:center;line-height:1.6;padding-block:7px}
 footer>div>.grid>div:last-child{padding-top:20px;border-top:1px solid rgb(255 255 255 / .18)}
 footer form{margin-top:12px}
 footer input[type=email]{min-height:48px;padding:12px;color:#0f172a;background:#fff;direction:ltr;text-align:start}
 footer input[type=email]::placeholder{color:#64748b}
 footer form label{flex-direction:row;text-align:start;line-height:1.8;padding-block:4px}
 footer form label input{flex-shrink:0;width:18px;height:18px;margin-top:3px}
 footer form button{width:100%;min-height:46px;justify-content:center;background:#17a2b8!important;font-size:14px}
 footer>div>.grid>div:last-child>.flex{flex-direction:row;gap:12px}
 footer a[aria-label]{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;border-radius:50%;background:rgb(255 255 255 / .1)}
 footer>div>.border-t{margin-top:24px;padding-top:20px;border-color:rgb(255 255 255 / .2)}
 footer>div>.border-t>.flex{flex-direction:column!important;gap:14px;text-align:center}
 footer>div>.border-t>.flex>div:first-child{white-space:nowrap}
 footer>div>.border-t>.flex>div:last-child{display:flex;flex-direction:row!important;flex-wrap:wrap;justify-content:center;gap:4px 16px;width:100%}
 footer>div>.border-t>.flex>div:last-child>span{display:none}
 footer>div>.border-t a{display:inline-flex;align-items:center;min-height:40px;line-height:1.6;white-space:nowrap;font-size:12px}
}

/* Welcome dialog */
#ptoc-entry-popup>div.flex{padding:24px}
#ptoc-entry-popup>div.flex>div{max-width:780px;max-height:calc(100dvh - 48px);border:1px solid #e2e8f0;border-radius:24px;overscroll-behavior:contain;scrollbar-width:thin;background:#f8fafc}
#ptoc-entry-popup .p-6{padding:28px}
#ptoc-entry-popup .text-center.mb-6{padding:8px 32px 22px;margin-bottom:22px;border-bottom:1px solid #e2e8f0}
#ptoc-entry-popup .text-center.mb-6 img{width:48px;height:48px;margin-bottom:12px}
#ptoc-welcome-title{font-size:25px;line-height:1.5;padding:0;text-wrap:balance}
#ptoc-welcome-description{font-size:14px;line-height:1.8;margin-top:8px;color:#64748b}
#ptoc-entry-popup button.absolute[data-popup-close]{position:absolute;top:12px;left:12px;float:none;margin:0;width:44px;height:44px;display:flex;align-items:center;justify-content:center;z-index:3;background:white;color:#334155;border:1px solid #e2e8f0;box-shadow:0 2px 8px #0f172a0a}
#ptoc-entry-popup h3{color:#475569;letter-spacing:0;font-size:14px;margin-bottom:12px}
#ptoc-entry-popup .grid>a.flex{flex-direction:row!important;background:white;min-height:88px;padding:14px;gap:12px;border-color:#e2e8f0;text-align:start}
#ptoc-entry-popup .grid>a.flex>span:first-child{display:flex;align-items:center;justify-content:center;width:36px;height:36px;flex-shrink:0;background:#ecfeff;color:#138496;border-radius:10px;font-size:18px}
#ptoc-entry-popup .grid>a.flex .text-sm{font-size:13px;line-height:1.65}
#ptoc-entry-popup .grid>a.group{display:flex;align-items:center;background:white;padding:10px;gap:10px;text-align:start}
#ptoc-entry-popup .grid>a.group>.aspect-video{width:80px;height:72px;flex-shrink:0;border-radius:8px}
#ptoc-entry-popup .grid>a.group>.p-3{padding:0;min-width:0}
#ptoc-entry-popup .grid>a.group h4{font-size:13px;line-height:1.7}
#ptoc-entry-popup .grid:has(>a.group){grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
#ptoc-entry-popup a:focus-visible,#ptoc-entry-popup button:focus-visible{outline:2px solid #0891b2;outline-offset:3px}
#ptoc-entry-popup .ptoc-welcome-actions{position:sticky;bottom:0;margin:24px -28px -28px;padding:16px 28px 20px;background:white;border-top:1px solid #e2e8f0;z-index:2}
#ptoc-entry-popup .ptoc-welcome-actions p{font-size:12px;line-height:1.7}
#ptoc-entry-popup .ptoc-welcome-actions>div{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:10px}
#ptoc-entry-popup .ptoc-welcome-actions a,#ptoc-entry-popup .ptoc-welcome-browse{display:flex;align-items:center;justify-content:center;min-height:44px;border-radius:10px;padding:10px;font-size:13px;line-height:1.5}
#ptoc-entry-popup .ptoc-welcome-browse{background:#17a2b8;color:white;font-weight:700}
#ptoc-entry-popup .ptoc-welcome-actions a{background:#f1f5f9!important;color:#0f172a!important;border:1px solid #e2e8f0}
@media(max-width:640px){
 #ptoc-entry-popup>div.flex{padding:12px}
 #ptoc-entry-popup>div.flex>div{max-height:calc(100dvh - 24px);border-radius:20px}
 #ptoc-entry-popup .p-6{padding:20px 16px}
 #ptoc-entry-popup .text-center.mb-6{padding:10px 30px 18px;margin-bottom:18px}
 #ptoc-welcome-title{font-size:21px!important}
 #ptoc-entry-popup .grid{gap:8px}
 #ptoc-entry-popup .grid>a.flex{flex-direction:column!important;align-items:flex-start;min-height:104px;padding:12px;gap:8px}
 #ptoc-entry-popup .grid:has(>a.group){grid-template-columns:1fr}
 #ptoc-entry-popup .ptoc-welcome-actions{bottom:0;margin:20px -16px -20px;padding:12px 16px 16px}
 #ptoc-entry-popup .ptoc-welcome-actions>div{grid-template-columns:1fr 1fr;gap:8px}
 #ptoc-entry-popup .ptoc-welcome-browse{grid-column:1/-1}
}
