/* v0.42 only: restore breathing room and legible values on phone widths. */
@media (max-width:680px){
  #v23-demo-note{display:flex;align-items:center;gap:7px;font:13px/1.5 system-ui,sans-serif}
  #v23-demo-note .information-button{flex:0 0 22px;margin:0}
  .page-shell{padding:14px 12px 20px;min-width:0}
  .masthead{min-width:0;gap:8px}
  .brand-line{min-width:0;grid-template-columns:24px minmax(0,1fr)}
  .brand-line h1{font-size:20px;line-height:1.25}
  .brand-line p{font-size:11px;line-height:1.35}
  .mast-right .person-button{max-width:125px;min-width:0}
  .mast-right #person-name{font-size:13px;white-space:nowrap}
  .mast-right #person-role{max-width:115px;font-size:9px;line-height:1.3;white-space:nowrap}
  .person-menu{width:min(250px,calc(100vw - 28px));right:0}
  .view-nav{gap:4px;min-width:0;margin-top:12px}
  .view-nav>button{min-width:0;flex:1 1 0;padding:10px 2px;font:700 14px/1.3 system-ui,sans-serif;white-space:nowrap;overflow:visible}
  .toolbar{padding-top:12px}
  .date-controls{gap:9px 8px}
  .date-controls label{min-width:0}
  .date-controls label>span{font-size:11px;line-height:1.35}
  .date-controls select,#reset-range{min-height:40px;height:40px;font-size:14px}
  .date-controls .date-input-wrap{min-width:0;height:42px}
  .date-controls .date-input-wrap input{min-width:0;font-size:14px;letter-spacing:-.03em}
  .calendar-toggle{flex:0 0 28px}

  .dashboard-grid{gap:17px;margin-top:16px}
  .dashboard-grid .group:nth-child(n){min-width:0;padding:14px 12px 16px}
  .group-head{display:flex;flex-wrap:wrap;align-items:center;gap:4px 7px;min-width:0}
  .group-title{font-size:21px;line-height:1.25}
  .group-frequency{flex-basis:100%;margin:1px 0 0 0;font:600 11px/1.4 system-ui,sans-serif;white-space:normal;overflow-wrap:anywhere}
  .group-scope{max-width:100%;white-space:normal;overflow-wrap:anywhere}
  .metric{min-width:0}
  .metric-top{display:flex;align-items:baseline;flex-wrap:wrap;gap:3px 7px;margin-bottom:6px}
  .metric-top h4{font-size:15px;line-height:1.4;min-width:0}
  .metric-period,.metric-more{font-size:11px;line-height:1.35}
  .metric-project,html body [data-metric=students] .metric-project{display:grid;grid-template-columns:24px minmax(0,1fr) minmax(80px,max-content)!important;grid-template-rows:auto auto auto;gap:4px 6px;align-items:center;min-width:0;min-height:0;margin:6px 0;padding:7px 7px 8px}
  .metric-project .thumb-slot{grid-column:1;grid-row:1;width:24px;min-width:0}
  .metric-project .project-label{grid-column:2;grid-row:1;min-width:0;font:650 14px/1.3 system-ui,sans-serif;white-space:normal;overflow-wrap:anywhere}
  .metric-project .metric-value{grid-column:3;grid-row:1;min-width:0;max-width:132px;text-align:right;font:700 15px/1.25 system-ui,sans-serif;font-variant-numeric:tabular-nums;white-space:normal;overflow-wrap:anywhere}
  .metric-project .metric-aux{grid-column:2/-1;grid-row:2;min-width:0;max-width:100%!important;justify-self:end;text-align:right;font:11px/1.35 system-ui,sans-serif;white-space:normal;overflow-wrap:anywhere}
  [data-metric=students] .metric-project .metric-value{grid-column:2/-1;grid-row:2;display:flex;align-items:baseline;justify-content:flex-end;gap:3px;max-width:none;width:100%;font-size:13px;white-space:nowrap}
  [data-metric=students] .metric-project .metric-value>span{white-space:nowrap}
  [data-metric=students] .metric-project .metric-aux:empty{display:none}
  .metric-project .track{grid-column:1/-1;grid-row:3;min-width:0;width:100%;height:9px;margin-top:2px}
  .metric-project .track .fill{height:100%}
  .metric-project .winner-caption{font-size:9px}
  .metric-project .inherited-source{font-size:10px;white-space:normal}

  .detail-head h2{font-size:21px;line-height:1.3;overflow-wrap:anywhere}
  .detail-columns.pk-columns,.detail-columns.pk-columns.single{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;margin:14px 0 18px}
  .pk-project.detail-card{padding:12px 13px;gap:5px;min-width:0}
  .pk-project.detail-card h3{font-size:16px;line-height:1.35}
  .pk-project .detail-card-period{font-size:11px;line-height:1.35;flex-basis:auto}
  .pk-project.detail-card>strong{font-size:24px;line-height:1.2}
  .pk-project.detail-card p{font-size:11px;line-height:1.4}
  .pk-difference{display:flex;flex-direction:row;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:4px 9px;padding:8px 12px;text-align:left}
  .pk-difference strong{font-size:16px;line-height:1.35}
  .pk-difference p{font-size:11px;line-height:1.4;flex-basis:100%}
  .detail-project-table{min-width:0}
  .detail-project-table h4{overflow-wrap:anywhere}
  .detail-project-table .analysis-table-wrap,.trend-section .analysis-table-wrap{max-width:100%;overflow-x:auto}
  .trend-section{min-width:0}

  #report-view{min-width:0}
  #report-view .report-top{gap:7px}
  #report-view .report-top h2{font-size:21px;line-height:1.3}
  .report-workspace{min-width:0;gap:9px}
  .report-workspace>.rw-block-rail{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  .rw-block-rail .rw-block-heading{min-height:49px;padding:7px 9px;font:700 12px/1.3 system-ui,sans-serif;overflow-wrap:anywhere}
  .rw-block-rail .rw-block-heading small{font-size:10px;line-height:1.3}
  .rw-directory,.rw-content{min-width:0}
  .rw-directory{padding:9px}
  .rw-content{padding:9px}
  .rw-branch-title{font-size:16px;line-height:1.35;overflow-wrap:anywhere}
  .rw-missed-item,.rw-record-item{overflow-wrap:anywhere}
  .rw-tabs{max-width:100%;overflow-x:auto}
  .rw-tabs button{white-space:nowrap}
  .rw-editable-composition .composition-table input{font-size:16px}
  .impact-entry-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .impact-entry-item strong{font-size:16px;overflow-wrap:anywhere}
  .confirm-dialog,.profile-dialog,.rw-operation-dialog,.rw-backfill-dialog{max-width:calc(100vw - 20px);box-sizing:border-box}
  .system-frame{width:100%;min-width:0;height:calc(100dvh - 195px);min-height:540px}
}
