/* Phone-only layer. The desktop composition stays unchanged. */
.mobile-menu-toggle,.mobile-nav-source,.mobile-header-spacer{display:none!important}
@media(max-width:600px){
 /* Reading instructions remain visible; repeated geographic/date labels do not. */
 body[data-page="explore"] .detail-period,
 body[data-page="explore"] .detail-period-repeat,
 body[data-page="explore"] .mobile-repeated-period{display:none}
 body[data-page] #workspace>.surface,body[data-page] .history-page .history-shell,body[data-page] .about-hero{padding:20px 10px;box-shadow:2px 3px 0 var(--ink);min-width:0;max-width:100%}
 body[data-page] .mobile-header-spacer{display:block!important;pointer-events:none;overflow-anchor:none}
 body[data-page] header.mobile-header-compact{padding:6px 10px;gap:8px;flex-wrap:nowrap}
 body[data-page] header.mobile-header-compact .brand strong.brand-wordmark{font-size:23px}
 body[data-page] header.mobile-header-compact .brand .brand-logo{width:26px;height:26px}
 body[data-page] header.mobile-header-compact>button:not(.mobile-menu-toggle){display:none}
 body[data-page] header.mobile-header-compact .mobile-menu-toggle{display:block!important;margin-left:auto;min-height:44px;font-size:14px;background:var(--yellow);flex-shrink:0}
 body[data-page] header.mobile-header-compact #nav{display:none;position:absolute;top:100%;left:8px;right:8px;width:auto;margin:0;padding:12px;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;background:var(--paper);border:2px solid var(--ink);border-radius:0 0 12px 12px;box-shadow:2px 3px 0 var(--ink);max-height:calc(100dvh - 80px);overflow-y:auto}
 body[data-page] header.mobile-header-compact.mobile-menu-open #nav{display:grid}
 body[data-page] header.mobile-header-compact #nav button{min-height:52px;text-align:center}
 body[data-page] header.mobile-header-compact #nav b{font-size:14px}
 body[data-page] header.mobile-header-compact.mobile-menu-open #nav .mobile-nav-source{display:block!important;grid-column:1/-1;border-top:1px solid #d0d3dc;font-size:14px}
 body[data-page] main{padding:20px 8px;max-width:100%;min-width:0}
 body[data-page] header{gap:12px;padding:10px;max-width:100%}
 body[data-page] header .brand{min-width:0;gap:7px}
 body[data-page] header .brand strong.brand-wordmark{font-size:25px;letter-spacing:-1px}
 body[data-page] header .brand .brand-logo{width:30px;height:30px}
 body[data-page] header>button{font-size:13px;min-height:44px;padding:8px}
 body[data-page] header #nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;min-width:0;width:100%;padding-top:10px}
 body[data-page] header #nav button{white-space:normal;min-width:0;min-height:48px;padding:6px 3px;line-height:1.25}
 body[data-page] header #nav button .picto{display:none}
 body[data-page] header #nav b{font-size:12px;overflow-wrap:break-word}
 body[data-page="explore"] .intro.page-heading{margin:0 0 22px}
 body[data-page="explore"] .intro .page-title{font-size:clamp(28px,8vw,36px);line-height:1.18;margin:0}
 body[data-page="explore"] .intro .page-subtitle{display:none}
 body[data-page="explore"] .stats{gap:10px;margin-bottom:24px}
 body[data-page="explore"] .stats .stat{padding:14px 10px;box-shadow:2px 3px 0 var(--ink)}
 body[data-page="explore"] .stats .statnumber{font-size:clamp(25px,7vw,34px);line-height:1.2;letter-spacing:-1px;gap:4px;margin:12px 0}
 body[data-page="explore"] .stats .statnumber small{font-size:13px}
 body[data-page="explore"] .stats .statlabel{font-size:14px;line-height:1.3}
 body[data-page="explore"] .stats .stat em{font-size:12px;line-height:1.4}
 body[data-page="explore"] .stats .stat-action{margin-top:12px;font-size:12px;padding:6px;max-width:100%}
 body[data-page="explore"] .stats .stat2{padding:12px;align-items:center}
 body[data-page="explore"] .stats .stat2 .statnumber{font-size:26px;margin:0}
 body[data-page="explore"] .stats .stat2 .stat-action{margin-top:4px;background:none;padding:0;font-size:12px}
 body[data-page="explore"] #workspace,body[data-page="explore"] #workspace section,body[data-page="explore"] #workspace aside{min-width:0;max-width:100%}
 body[data-page="explore"] #workspace .surface{padding:20px 10px;box-shadow:2px 3px 0 var(--ink)}
 body[data-page="explore"] #workspace h2,body[data-page="explore"] #workspace h3{overflow-wrap:break-word}
 body[data-page="explore"] .explorer .canvasheading{gap:14px;margin-bottom:20px}
 body[data-page="explore"] .canvasheading h2{font-size:27px;line-height:1.2}
 body[data-page="explore"] .canvas-subtitle{display:none}
 body[data-page="explore"] .canvasamount{font-size:32px;white-space:normal;text-align:left;line-height:1.15}
 body[data-page="explore"] .canvasamount small{font-size:12px;margin-top:6px}
 body[data-page="explore"] .overview-representation>.seg{display:flex;flex-wrap:wrap;width:100%}
 body[data-page="explore"] .seg button{flex:1;min-height:44px;font-size:14px;white-space:normal}
 body[data-page="explore"] .overview-chart-tools .filterline,body[data-page="explore"] .overview-chart-tools .unitlabel{width:100%;margin:12px 0 0}
 body[data-page="explore"] .scopechips{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}
 body[data-page="explore"] .scopechips button{font-size:14px;white-space:normal}
 body[data-page="explore"] select{font-size:16px;min-height:44px;max-width:100%;min-width:0}
 body[data-page="explore"] .exploregrid,body[data-page="explore"] .detail-chart-layout{display:grid;grid-template-columns:minmax(0,1fr)!important;height:auto!important;gap:20px;align-items:start}
 body[data-page="explore"] .visualcolumn{position:static;min-width:0;min-height:0}
 body[data-page="explore"] .visualcolumn>.treemap,body[data-page="explore"] .detail-chart-layout>.treemap{position:relative;inset:auto;height:390px!important;max-height:none;width:100%}
 body[data-page="explore"] .overview-representation>.seg{display:none}
 body[data-page="explore"] .explorer .visualcolumn>#budgetMap.treemap{height:650px!important}
 body[data-page="explore"] .piechart{height:auto!important;min-height:0;width:100%}
 body[data-page="explore"] .pie-layout{height:auto!important;min-width:0}
 body[data-page="explore"] .pie-layout svg{width:100%;height:auto;max-width:100%;display:block}
 body[data-page="explore"] .tile.compact>.picto{display:none}
 body[data-page="explore"] .tile.compact b{font-size:13px;line-height:1.2;overflow-wrap:break-word;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
 body[data-page="explore"] .tile.compact strong{font-size:18px;line-height:1.1}
 body[data-page="explore"] .tile.tiny .tile-reference{font-size:14px}
 body[data-page="explore"] .legendmain{min-height:56px;flex-wrap:wrap;gap:8px}
 body[data-page="explore"] .legendtext{flex:1 1 120px}
 body[data-page="explore"] .legendmain>strong{font-size:18px}
 body[data-page="explore"] .legendtext b{font-size:15px;line-height:1.4}
 body[data-page="explore"] .legendtext small{font-size:12px}
 body[data-page="explore"] .function-row{min-height:56px;gap:12px;flex-wrap:wrap}
 body[data-page="explore"] .function-row>b{flex:1 1 150px;font-size:15px;line-height:1.4;overflow-wrap:break-word}
 body[data-page="explore"] .function-row>.function-row-number{font-size:20px;min-width:0}
 body[data-page="explore"] .function-rows,body[data-page="explore"] .chart-sidebar{height:auto;max-height:none;overflow:visible;padding:0 10px}
 body[data-page="explore"] .drilltitle{display:flex;flex-wrap:wrap;gap:12px;align-items:start}
 body[data-page="explore"] .drilltitle>div{flex:1 1 180px;min-width:0}
 body[data-page="explore"] .drilltitle h2{font-size:32px;line-height:1.15}
 body[data-page="explore"] .detail-amount{font-size:32px;line-height:1.2}
 body[data-page="explore"] .detail-period{display:block;font-size:13px;margin:8px 0 0}
 body[data-page="explore"] .global-share{margin:4px 0 12px 0!important;padding:12px 16px;display:flex;align-items:center;gap:12px;width:100%;min-width:0}
 body[data-page="explore"] .global-share strong{font-size:32px;line-height:1.1;white-space:nowrap}
 body[data-page="explore"] .global-share span{font-size:14px;text-align:left}
 body[data-page="explore"] .function-explanation{grid-template-columns:minmax(0,1fr)!important;gap:16px;margin:20px 0 28px}
 body[data-page="explore"] .function-explanation .plain-description{font-size:17px;line-height:1.6}
 body[data-page="explore"] .function-explanation li{font-size:16px;line-height:1.5}
 body[data-page="explore"] .function-section-heading h3{font-size:26px;line-height:1.25}
 body[data-page="explore"] .function-scope,body[data-page="explore"] .function-check,body[data-page="explore"] .micro-note{font-size:12px;line-height:1.55;overflow-wrap:anywhere}
 body[data-page="explore"] .chart-tools{display:flex;flex-direction:column;align-items:stretch;gap:10px}
 body[data-page="explore"] .chart-switch{width:100%}
 body[data-page="explore"] .compact-mapnote{font-size:12px;line-height:1.5}
 body[data-page="explore"] .function-inline-panel{padding:16px 10px;box-shadow:2px 2px 0 var(--ink)}
 body[data-page="explore"] .function-detail{overflow-anchor:none}
 body[data-page="explore"] .tile[aria-expanded="true"]::after{content:'Ouvert ↓';position:absolute;top:6px;right:6px;padding:4px 6px;border:1px solid var(--ink);border-radius:6px;background:var(--paper);color:var(--ink);font-size:12px;line-height:1.2;font-weight:750;pointer-events:none}
 body[data-page="explore"] .tile.tiny[aria-expanded="true"]::after{content:'↓';padding:2px 4px}
 body[data-page="explore"] .tile[aria-expanded="true"] .tilearrow{display:none}
 body[data-page="explore"] .function-subcategory,body[data-page="explore"] .function-inline-panel{animation:mobile-detail-reveal .22s ease-out}
 @keyframes mobile-detail-reveal{from{opacity:0;clip-path:inset(0 0 12% 0)}to{opacity:1;clip-path:inset(0)}}
 @media(prefers-reduced-motion:reduce){body[data-page="explore"] .function-subcategory,body[data-page="explore"] .function-inline-panel{animation:none}}
 body[data-page="explore"] .function-inline-heading h3,body[data-page="explore"] .function-subcategory h2{font-size:28px;line-height:1.2;overflow-wrap:break-word}
 body[data-page="explore"] .function-inline-amount strong{font-size:28px;display:block;margin:8px 0}
 body[data-page="explore"] .function-inline-close,body[data-page="explore"] .drillback{width:44px;height:44px;flex-shrink:0}
 body[data-page="explore"] .function-history{flex-direction:column;align-items:stretch;padding:16px;gap:16px}
 body[data-page="explore"] .function-history strong{font-size:34px}
 body[data-page="explore"] .backexplore{white-space:normal;min-height:44px;line-height:1.4}
 body[data-page="explore"] .case-card p{font-size:16px;line-height:1.5}
 body[data-page="explore"] .flowwrap{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
 body[data-page="explore"] .contextnote{flex-wrap:wrap;gap:12px}
 body[data-page="explore"] .contextnote p{flex:1 1 160px;font-size:13px}
 body[data-page="explore"] .contextnote button{min-height:44px;font-size:14px}
 body[data-page="explore"] .mobile-fold{width:100%;min-width:0;border-top:1px solid #d0d3dc;margin:8px 0 0}
 body[data-page="explore"] .mobile-fold>summary{cursor:pointer;min-height:48px;padding:14px 0;font-size:14px;font-weight:750;line-height:1.4}
 body[data-page="explore"] .mobile-fold[open]>summary{margin-bottom:10px}
 body[data-page="explore"] .mobile-fold>.case-section{margin:0}
 body[data-page="explore"] .mobile-fold .case-sectionhead{display:none}
 body[data-page="explore"] .mobile-fold .legendhead{display:none}
 body[data-page="explore"] .drillbreadcrumb{display:flex;flex-wrap:wrap;gap:6px;overflow:visible}
 body[data-page="explore"] .drillbreadcrumb button{white-space:normal;overflow-wrap:anywhere;min-height:44px;font-size:13px}
 body[data-page="explore"] dialog{max-width:calc(100vw - 12px)}
 body[data-page="explore"] #detailbody{padding:20px 16px;overflow-wrap:anywhere}
 body[data-page="explore"] table{display:block;max-width:100%;overflow-x:auto}
}
