.home-body { display: block; overflow: auto; height: auto; min-height: 100%; }
.bar .grow { flex: 1; }
a.button { text-decoration: none; border-radius: 6px; padding: 5px 12px; font-size: 14px; }
a.button.primary { background: var(--accent); color: #fff; }
main.home { display: block; max-width: 1180px; margin: 0 auto; padding: 24px 16px 48px; }
.intro h1 { font-size: 22px; margin: 0 0 6px; letter-spacing: -0.01em; }
.intro p { margin: 0; color: var(--muted); max-width: 70ch; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 20px 0 24px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.kpi .v { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi .l { color: var(--muted); font-size: 12px; }

.rainbow { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; overflow-x: auto; }
.pgrid { display: grid; grid-template-columns: 64px repeat(6, minmax(72px, 1fr)) minmax(280px, 2fr); gap: 4px 4px;
  align-items: center; min-width: 900px; }
.pgrid.head { margin-bottom: 4px; }
.phase { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); text-align: center;
  border-bottom: 1px solid var(--line); padding-bottom: 3px; }
.stage-name { font-size: 12px; font-weight: 600; text-align: center; color: #fff; border-radius: 6px; padding: 5px 2px;
  line-height: 1.2; }
.stage-name small { display: block; font-weight: 400; opacity: .85; font-size: 10px; }

.yr-row { cursor: pointer; border-radius: 8px; padding: 3px 0; }
.yr-row:hover { background: var(--bg); }
.yr-row.disabled { cursor: default; }
.yr { font-weight: 700; font-variant-numeric: tabular-nums; padding-left: 4px; display: flex; align-items: center; gap: 6px; }
.cell { position: relative; height: 26px; border-radius: 5px; overflow: hidden; }
.cell .fill { position: absolute; inset: 0 auto 0 0; }
.cell .pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px;
  font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); mix-blend-mode: normal; }
.summary { font-size: 13px; padding-left: 8px; line-height: 1.35; }
.summary .sub { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; color: #fff; }
.foot { color: var(--muted); font-size: 12px; margin-top: 14px; }

/* hover / focus explanations on the stage and phase labels */
.has-tip { position: relative; cursor: help; outline: none; }
.has-tip .tip { display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; width: 300px;
  padding: 10px 12px; border-radius: 8px; background: var(--panel); color: var(--ink); border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18); font-size: 12px; font-weight: 400; line-height: 1.45; text-align: left;
  text-transform: none; letter-spacing: normal; white-space: normal; }
.has-tip .tip strong { display: block; font-size: 12px; margin-bottom: 4px; }
.has-tip .tip.right { left: auto; right: 0; }
.has-tip:hover .tip, .has-tip:focus .tip, .has-tip:focus-within .tip { display: block; }
.stage-name.has-tip:focus-visible, .phase.has-tip:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.rainbow { overflow: visible; }
@media (max-width: 960px) { .rainbow { overflow-x: auto; } }
