/* Shared grid tracks keep the overview's upper and lower edges aligned. */
#app .dev-root {
  --overview-title-size: clamp(30px, 2.6vw, 40px);
  --overview-top-inset: 28px;
  --overview-title-gap: 32px;
  width: 100%; max-width: 1832px; margin: 0 auto;
  box-sizing: border-box;
  padding: calc(var(--navbar-height, 72px) + var(--overview-top-inset)) clamp(20px, 2.4vw, 40px) 44px;
}
#app .dev-root > .page-hero { margin: 0 0 var(--overview-title-gap); padding: 0; }
#app .dev-root > .page-hero .container { padding: 0; }
#app .dev-root > .page-hero .badge,
#app .dev-root > .page-hero .page-hero-content > p,
#app .dev-root .desk-heading { display: none !important; }
#app .dev-root > .page-hero h1 {
  margin: 0; font-size: var(--overview-title-size); line-height: 1.15;
  text-align: center; letter-spacing: -.02em;
}
#app .dev-root .desk {
  --overview-metric-height: 156px;
  --overview-panel-height: clamp(380px, calc(100svh - 378px), 500px);
  --overview-cell-height: 14px;
  display: grid; grid-template-columns: minmax(280px, 1.08fr) minmax(0, 1.15fr) minmax(0, 1.05fr) minmax(250px, .92fr);
  width: 100%; max-width: 1760px;
  min-height: calc(100svh - var(--navbar-height, 72px) - var(--overview-top-inset) - var(--overview-title-size) * 1.15 - var(--overview-title-gap));
  margin: 0 auto calc(var(--navbar-height, 72px) + 24px);
  gap: 24px; align-items: start; align-content: start;
}
/* Project actions begin in the next screen, below the fixed navigation. */
#app .dev-root > .dev-toolbar {
  width: 100%; max-width: 1760px; margin: 0 auto 24px;
  scroll-margin-top: calc(var(--navbar-height, 72px) + 24px);
}
#app .dev-root .desk > .desk-top,
#app .dev-root .desk > .desk-bottom { display: contents; }
#app .dev-root .desk .metric-projects { grid-column: 1; grid-row: 1; }
#app .dev-root .desk .metric-spending { grid-column: 2; grid-row: 1; }
#app .dev-root .desk .metric-online { grid-column: 3; grid-row: 1; }
#app .dev-root .desk .weather-slot { grid-column: 4; grid-row: 1; }
#app .dev-root .desk .metric { height: var(--overview-metric-height); }
#app .dev-root .desk .weather-slot {
  min-width: 0; min-height: var(--overview-metric-height);
  display: flex; align-items: center; justify-content: center;
}
#app .dev-root .desk .weather-host:not(.is-expanded) { height: var(--overview-metric-height); }
#app .dev-root .desk .weather-host:not(.is-expanded) .cardm { top: calc((var(--overview-metric-height) - 130px) / 2); }
#app .dev-root .desk .desk-left {
  grid-column: 1; grid-row: 2; height: var(--overview-panel-height);
  display: grid; grid-template-rows: 100px minmax(0, 1fr) !important;
  gap: 24px !important; min-width: 0;
}
#app .dev-root .desk .completion-pair { gap: 20px; min-width: 0; }
#app .dev-root .desk .completion-card { box-sizing: border-box; padding: 12px 16px !important; }
#app .dev-root .desk .completion-card > span { line-height: 1.2; }
#app .dev-root .desk .completion-card > small { line-height: 1.25; }
#app .dev-root .desk .finance-cockpit {
  grid-column: 2 / span 2; grid-row: 2; height: var(--overview-panel-height); min-width: 0;
}
#app .dev-root .desk .todo-panel {
  grid-column: 4; grid-row: 2; height: var(--overview-panel-height); min-width: 0;
}
#app .dev-root .desk .contribution-panel,
#app .dev-root .desk .urgency-panel.has-contribution-rhythm {
  min-width: 0; min-height: 0; padding: 14px !important;
}
#app .dev-root .desk .rhythm-months,
#app .dev-root .desk .rhythm-grid {
  grid-template-columns: repeat(var(--rhythm-weeks), minmax(12px, 26px)); gap: 3px;
}
#app .dev-root .desk .rhythm-months { white-space: nowrap; line-height: 12px; }
#app .dev-root .desk .rhythm-calendar { min-width: calc(var(--rhythm-weeks) * 15px + 22px); }
#app .dev-root .desk .rhythm-weekdays,
#app .dev-root .desk .rhythm-grid { grid-template-rows: repeat(7, var(--overview-cell-height)); }
/* Calendar dates are heatmap cells, and must not inherit full-size action buttons. */
#app .dev-root .desk .rhythm-cell {
  display: block; width: 100% !important; min-width: 0 !important;
  height: var(--overview-cell-height) !important; min-height: 0 !important;
  padding: 0 !important; margin: 0 !important; border-radius: 3px !important;
  box-shadow: none !important; background-image: none !important;
  background-color: var(--overview-cell-color, transparent) !important;
}
#app .dev-root .desk .rhythm-cell::before,
#app .dev-root .desk .rhythm-cell::after { content: none !important; display: none !important; }
#app .dev-root .desk .rhythm-cell[data-level="0"] { --overview-cell-color: #f2f3f0; }
#app .dev-root .desk .rhythm-cell[data-level="1"] { --overview-cell-color: #83c79d; }
#app .dev-root .desk .rhythm-cell[data-level="2"] { --overview-cell-color: #efd469; }
#app .dev-root .desk .rhythm-cell[data-level="3"] { --overview-cell-color: #6250ad; }
#app .dev-root .desk .rhythm-cell[data-level="4"] { --overview-cell-color: #ee5963; }
#app .dev-root .desk .rhythm-cell:hover,
#app .dev-root .desk .rhythm-cell:focus-visible { transform: scale(1.12) !important; outline: 1px solid #b0eff4; }
#app .dev-root .desk .rhythm-cell-empty { border-color: transparent !important; }

@media(min-width:1200px) and (max-height:800px) {
  #app .dev-root .desk { --overview-cell-height: 9px; --overview-metric-height: 140px; }
  #app .dev-root .desk .desk-left { grid-template-rows: 84px minmax(0,1fr) !important; gap: 20px !important; }
  #app .dev-root .desk .completion-card { padding: 10px 16px !important; }
  #app .dev-root .desk .completion-card strong { font-size: 1.75rem !important; }
  #app .dev-root .desk .rhythm-heading > p,
  #app .dev-root .desk .rhythm-detail { display: none; }
  #app .dev-root .desk .contribution-panel,
  #app .dev-root .desk .urgency-panel.has-contribution-rhythm { padding: 12px !important; }
}
@media(max-width:1199px) {
  #app .dev-root .desk { grid-template-columns: repeat(2, minmax(0,1fr)); --overview-panel-height: 480px; }
  #app .dev-root .desk .metric-online { grid-column: 1; grid-row: 2; }
  #app .dev-root .desk .weather-slot { grid-column: 2; grid-row: 2; }
  #app .dev-root .desk .desk-left { grid-column: 1; grid-row: 3; }
  #app .dev-root .desk .finance-cockpit { grid-column: 2; grid-row: 3; }
  #app .dev-root .desk .todo-panel { grid-column: 1 / -1; grid-row: 4; height: 360px; }
}
@media(max-width:760px) {
  #app .dev-root { padding-left: 16px; padding-right: 16px; }
  #app .dev-root .desk { grid-template-columns: minmax(0,1fr); gap: 20px; --overview-metric-height: 156px; }
  #app .dev-root .desk :is(.metric-projects,.metric-spending,.metric-online,.weather-slot,.desk-left,.finance-cockpit,.todo-panel) { grid-column: 1; grid-row: auto; }
  #app .dev-root .desk .desk-left { height: auto; grid-template-rows: 100px auto !important; gap: 24px !important; }
  #app .dev-root .desk .contribution-panel,
  #app .dev-root .desk .urgency-panel.has-contribution-rhythm { min-height: 366px; }
  #app .dev-root .desk .finance-cockpit { height: auto; min-height: 480px; }
}
