/*
 * Compact desktop density — v1
 * Loaded as an isolated layer so reverting the visual change only requires
 * removing this stylesheet from index.html.
 */
@media (min-width:781px){
  .app-shell{grid-template-columns:214px minmax(0,1fr)}
  .sidebar{padding:17px 12px 13px}
  .brand{gap:9px;padding:1px 7px 16px}
  .brand-mark{width:33px;height:33px;padding:8px}
  .brand strong{font-size:15px}
  .brand small{font-size:9px}
  .group-switch{margin:0 2px 15px;padding:3px}
  .group-btn{padding:7px;font-size:12px}
  .nav-label{margin:0 9px 6px;font-size:10px}
  .nav-list{gap:2px;margin-bottom:12px}
  .nav-item{min-height:36px;padding:7px 9px;gap:9px;font-size:12.5px}
  .nav-item span{width:18px;font-size:14px}
  .sidebar-status{padding:12px 7px 1px}

  .topbar{height:68px;padding:9px 19px;gap:13px}
  .page-heading p{margin-bottom:2px;font-size:10px}
  .page-heading h1{font-size:21px}
  .top-actions{gap:7px}
  .freshness{height:39px;min-width:164px;padding:5px 9px}
  .icon-button{width:39px;height:39px;border-radius:10px;font-size:18px}
  .content{max-width:2100px;padding:15px 18px 23px}
  .footer{min-height:24px;padding:7px 19px 11px}

  .section-head{gap:12px;margin:0 0 10px}
  .section-head h2{font-size:18px}
  .section-head p{margin-top:3px;font-size:10.5px;line-height:1.55}
  .source-pill{padding:6px 9px;font-size:10px}

  .metric-strip{gap:8px;margin-bottom:11px}
  .metric{min-height:74px;padding:10px 12px;border-radius:11px}
  .metric-label{margin-bottom:5px;font-size:10.5px}
  .metric-value{font-size:20px}
  .metric-note{margin-top:4px;font-size:9px}

  .grid-2{gap:12px}
  .panel{margin-bottom:11px}
  .panel-head{padding:11px 14px 9px;gap:10px}
  .panel-head h3{font-size:14px}
  .panel-head p{margin-top:3px;font-size:9.5px;line-height:1.55}
  .panel-actions,.table-head-actions,.matrix-actions{gap:6px}
  .segmented{padding:2px}
  .segment{padding:5px 8px;font-size:10.5px}
  .notice{padding:8px 11px;margin-bottom:9px;font-size:10px;line-height:1.65}
  .method-card{padding:17px;line-height:1.8}

  .table-wrap{max-height:calc(100vh - 235px)}
  table{font-size:11px}
  th,td{padding:6px 7px}
  th{font-size:10.5px}
  .fund-cell strong{font-size:11px}
  .fund-cell small{font-size:8.5px}
  .fund-avatar{width:24px;height:24px}
  .matrix-cell{min-height:27px;padding:2px 5px}
  .matrix-wrap{max-height:calc(100vh - 245px)}
  .matrix-table th,.matrix-table td{padding:5px 6px}
  .portfolio-rank-card{min-height:50px;padding:6px 7px}
  .probable-rank-card{min-height:72px;padding-bottom:6px}
  .trade-rank-card{min-height:108px;padding:8px 9px}
  .trade-ranked-wrap,.probable-ranked-wrap{max-height:calc(100vh - 245px)}

  .chart{height:320px}
  .tall-chart{height:342px}
  .risk-section{gap:10px;margin:14px 0 21px}
  .section-heading{gap:9px}
  .section-heading>span{width:31px;height:31px;border-radius:9px}
  .section-heading h2{margin-bottom:2px;font-size:18px}
  .section-heading p{font-size:10.5px;line-height:1.55}
  .drilldown-panel summary{padding:12px 14px}

  .return-range-card{padding:13px 15px}
  .return-range-heading{gap:9px;margin-bottom:11px}
  .return-range-icon{width:34px;height:34px;border-radius:9px;font-size:20px}
  .return-range-heading h3{font-size:15px}
  .period-form,.inline-form{gap:8px}
  .inline-form input,.period-form input,.manual-grid input{height:36px;min-width:145px}
  .effective-period{margin-top:10px;padding:8px 10px}
  .performance-tabs{gap:5px;margin-bottom:11px;padding:4px}
  .performance-tabs button{padding:7px 14px}

  .primary-button,.secondary-button{min-height:34px;padding:7px 11px}
  .column-chooser summary{padding:6px 9px}
  .table-export-button{min-height:29px;padding:4px 7px}
  .matrix-search{padding:7px 10px}
  .probable-filter-box{margin:0 14px 10px;padding:10px 11px}
  .probable-filter-head{margin-bottom:8px}
  .probable-fund-chip{padding:6px 8px}

  .private-upload-actions{gap:8px}
  .private-upload-actions input[type=file]{padding:8px}
  .private-metals{gap:8px}
  .private-metals input{height:37px}
  .preview-summary>div{gap:8px;margin-bottom:9px}
  .preview-controls{margin:10px 0}
  .upload-preview{margin-top:12px;padding-top:12px}
}

@media (min-width:1800px){
  .content{padding-inline:22px}
  .metric-strip{grid-template-columns:repeat(4,minmax(0,1fr))}
}
