/* Shared responsive corrections. Loaded last so older desktop polish cannot undo reflow. */
body.dd-site :is(main,section,article,figure,form,fieldset){min-width:0}
body.dd-site :is(p,dd,.mag-source a,.dv-source a){overflow-wrap:anywhere}
@media(max-width:900px){
 body.dd-site .dd-header{height:64px!important}
 body.dd-site .dd-header__inner{display:flex!important;justify-content:space-between!important;gap:12px!important}
 body.dd-site .dd-nav{display:none!important}
 body.dd-site .dd-menu-button{display:inline-flex!important;align-items:center;justify-content:center;min-width:44px;min-height:44px}
 body.dd-site .shift-nav-register{display:none}
 body.dd-site .shift-nav-login{min-width:auto;padding:8px 12px!important;font-size:12px!important}
 body.dd-site .dd-account{gap:12px!important}
 body.dd-site .dd-drawer{height:100dvh;max-width:calc(100vw - 32px);overflow-y:auto;overscroll-behavior:contain;padding-bottom:calc(20px + env(safe-area-inset-bottom))}
 body.dd-site .dd-drawer__nav a{min-height:48px}
}
@media(max-width:740px){
 body.dd-site .dd-shell,body.dd-site .ui2-shell{width:100%;max-width:100%;padding-left:20px!important;padding-right:20px!important}
 body.dd-site .ui2-page{padding-top:24px!important;padding-bottom:48px!important}
 body.dd-site .dd-brand img{max-width:124px}
 body.dd-site input:not([type=checkbox]):not([type=radio]),body.dd-site textarea,body.dd-site select{font-size:16px}
 body.dd-site :is(.dd-button,.sh-btn-primary,.sh-btn-secondary){min-height:44px;white-space:normal;text-align:center}
 body.dd-site :is(.dd-help){right:12px!important;bottom:calc(12px + env(safe-area-inset-bottom))!important}
 .hairline-hero{padding:26px 0 32px!important;gap:24px!important}
 .hairline-hero-copy h1{font-size:36px!important;line-height:1.23!important;margin:18px 0!important;letter-spacing:-.045em!important}
 .hairline-hero-copy>p{font-size:14px!important;line-height:1.8!important;margin-bottom:20px!important}
 .hairline-hero-form{margin-top:20px!important;padding-top:16px!important}
 .hairline-hero-form select{min-height:44px}
 .hairline-hero-actions{gap:12px!important}
 .hairline-hero-actions>.dd-button,.hairline-hero-secondary{flex:1 1 145px;min-width:0;padding:12px!important;font-size:13px!important}
 .hairline-hero-meta{margin-top:20px!important;gap:8px 14px!important;font-size:11px!important}
 .hairline-hero-art{height:300px!important}
 .hairline-hero-art figcaption{padding:12px!important;font-size:8px!important;gap:10px}
 .hairline-section{padding-top:28px!important;padding-bottom:30px!important}
 .hairline-section>header{display:flex;flex-direction:column;align-items:flex-start;gap:14px}
 .hairline-section h2{font-size:25px!important;line-height:1.4!important}
 .hairline-method-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .hairline-method-grid article{padding:16px 12px!important}
 .hairline-method-banner{padding:18px!important}
 .hairline-library-head{padding:26px 0 18px!important;gap:14px}
 .hairline-library-head h1{font-size:29px!important;line-height:1.35!important}
 .hairline-library-head p{font-size:14px;line-height:1.8}
 .hairline-library-match{font-size:12px!important;padding:9px 12px!important}
 .hairline-search{display:flex!important;gap:8px;min-width:0}
 .hairline-search input{min-width:0;flex:1;width:0}
 .hairline-search button{padding:0 16px!important;flex:none}
 .hairline-categories{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto;max-width:100%;gap:10px!important;padding:14px 0 12px!important;overscroll-behavior-x:contain;scrollbar-width:thin}
 .hairline-categories a{flex:none;min-height:44px;padding:10px 13px!important;font-size:12px!important}
 .hairline-filters summary{display:flex;flex-wrap:wrap;gap:6px;min-height:44px;font-size:12px}
 .hairline-filters summary small{border:0;padding-left:0;font-size:11px}
 .hairline-filters form{padding:16px!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .hairline-filter-actions{grid-column:1/-1;flex-wrap:wrap}
 .hairline-result-head{flex-wrap:wrap;gap:10px}
 .hairline-card-grid{grid-template-columns:minmax(0,1fr)!important;gap:20px!important}
 .hairline-card-art{height:185px!important}
 .hairline-card-copy{padding:16px!important}
 .hairline-compare-bar{max-width:calc(100vw - 24px);bottom:calc(12px + env(safe-area-inset-bottom));flex-wrap:wrap;gap:8px}
 .hairline-compare-panel{width:calc(100vw - 20px)!important;max-height:90dvh;overflow:auto}
 .shift-rankings{padding-top:24px}
 .shift-rankings__head h1{font-size:32px;margin-top:14px}
 .shift-rankings__head>p{font-size:14px;line-height:1.8}
 .shift-ranking-row{grid-template-columns:26px 76px minmax(0,1fr)!important;gap:12px!important;padding:18px 0}
 .shift-ranking-row__art{height:78px!important}
 .shift-ranking-row__copy{min-width:0}
 .shift-ranking-row__copy h2{font-size:17px}
 .shift-ranking-row__tags{gap:5px}
 .shift-ranking-row__badge{font-size:10px;padding:2px 5px}
 .shift-ranking-row__data{grid-column:2/-1;display:flex;flex-wrap:wrap;gap:12px;align-items:center;font-size:11px}
 .shift-ranking-row__data span{display:block}
 .shift-ranking-row__meter{min-width:105px}
 .shift-ranking-row__cta{min-height:44px}
 .mag-category-head,.mag-latest,.mag-subscribe{grid-template-columns:minmax(0,1fr)!important}
 .mag-reader{padding:22px 16px!important}
 .mag-reader h1{font-size:28px!important;line-height:1.45}
 .mag-reader-head{flex-wrap:wrap;gap:8px}
 .mag-reader-body{font-size:16px!important;line-height:1.95!important}
 .mag-source a{word-break:break-all}
 .mag-page-nav{gap:8px}
 .mag-page-nav a{padding:10px 12px!important;font-size:12px}
 .mag-subscribe form{display:flex;flex-direction:column;gap:12px}
 .mag-subscribe input{width:100%;min-width:0}
 .mag-subscribe button{width:100%}
 .dv{padding-top:22px!important}
 .dv-hero{gap:20px!important}
 .dv-hero h1{font-size:32px!important;line-height:1.3!important}
 .dv-nav,.dv-tabs{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
 .dv-nav a,.dv-tabs button{min-height:44px;flex:none}
 .dv-block__head,.dv-sec__head{flex-wrap:wrap;gap:8px}
 .dv-field{min-width:0}
 .dv-table{display:block;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
 .ac-ledger{grid-template-columns:minmax(0,1fr)}
 .ac-add{border-left:0;border-top:1px solid var(--dv-line)}
 .ac-card,.ac-col{min-width:0}
 .ac-sum div{padding:12px 10px;overflow-wrap:anywhere}
 .ac-job,.ac-pjob{grid-template-columns:minmax(0,1fr) 80px;padding:16px;gap:12px}
 .ac-job__num{grid-column:2;grid-row:1}
 .ac-stage{grid-column:1/-1}
 .ac-hello__who>div{min-width:0;overflow-wrap:anywhere}
 .ac-outcome,.ac-settings{min-width:0}
 .shift-auth{gap:20px}
 .shift-auth__story h1{font-size:26px;margin:12px 0}
 .shift-auth__figure{display:none!important}
 .shift-auth__panel{padding:22px 18px}
 .shift-auth__tabs{margin-bottom:22px}
 .shift-auth__optional{grid-template-columns:1fr}
 .dd-diagnosis__steps button{min-height:48px;padding:10px;font-size:12px}
 .dd-diagnosis__actions{padding:14px;flex-wrap:wrap}
 .dd-diagnosis__actions>span{order:3;flex-basis:100%;text-align:center;margin:8px 0 0}
 .shift-advisor-modal{max-height:calc(100dvh - 24px);display:flex;flex-direction:column}
 .shift-advisor-head,.shift-advisor-foot,.shift-advisor-presets{padding:14px 16px;flex:none}
 .shift-advisor-history{min-height:100px;max-height:40dvh;flex:1;overflow:auto;padding:16px}
 .shift-advisor-close{min-width:44px;min-height:44px}
 .shift-advisor-form input{min-width:0}
 body.dd-site .ui2-footer__inner{gap:18px;padding-right:48px!important}
 .shift-footer-links{gap:12px 16px}
 .shift-footer-links a{display:inline-flex;align-items:center;min-height:36px}
}
@media(max-width:360px){
 body.dd-site .dd-shell,body.dd-site .ui2-shell{padding-left:16px!important;padding-right:16px!important}
 body.dd-site .dd-brand img{max-width:105px}
 body.dd-site .dd-account{gap:8px!important}
 body.dd-site .shift-nav-login i{display:none}
 .hairline-hero-copy h1{font-size:32px!important}
 .hairline-hero-actions>.dd-button,.hairline-hero-secondary{flex-basis:100%;text-align:center}
 .shift-ranking-row{grid-template-columns:22px 60px minmax(0,1fr)!important;gap:9px!important}
 .shift-ranking-row__art{height:68px!important}
 .hairline-method-grid{grid-template-columns:minmax(0,1fr)!important}
}
/* A translated, closed drawer must not widen the document on phones. */
body.dd-site #mobile-drawer:not(.is-open){display:none!important}
@media(max-width:740px){
 .dv .dd-detail__main h1{font-size:34px!important}
 .mag-section-heading{align-items:flex-start;flex-direction:column;gap:12px}
 .mag-section-heading>p{max-width:none}
}
/* Author styles such as display:grid must respect inactive form panels. */
body.dd-site [hidden]{display:none!important}
