/* BLOCKS PAGE: the grid of block cards (title row, chart, deviation bars) and the 'active deviations' strip at the bottom.
   Built by js/03-blocks.js. Grid size comes from --cols / --rows (set in js/01-settings.js). */

  /* blocks view: the grid of block cards and the active-deviations strip */
  #grid { flex:1 1 0; min-height:0; display:grid; gap:.5rem; padding:.5rem;
          grid-template-columns:repeat(var(--cols), 1fr); grid-template-rows:repeat(var(--rows), 1fr); }
  .card { position:relative; background:var(--card); border:2px solid var(--line); border-radius:.4rem; display:grid; grid-template-columns:2fr 1fr;
          grid-template-rows:auto 1fr; min-width:0; min-height:0; overflow:hidden; }
  .card.stale { opacity:.45; }
  .title { grid-column:1 / 3; display:flex; align-items:baseline; gap:.8rem; padding:.3rem .6rem; font-weight:600; font-size:1.2rem; }
  .title span { white-space:nowrap; }
  .v { font-size:1.7rem; font-weight:700; color:var(--val); }
  .w { font-size:1.7rem; font-weight:700; color:var(--gen); }
  .age { margin-left:auto; color:var(--mut); font-weight:400; font-size:1rem; }
  .card.stale .age { color:var(--below); font-weight:700; }
  .plot, .bars { min-width:0; min-height:0; overflow:hidden; }

  #strip { display:none; flex:none; height:var(--strip); padding:.4rem 1.2rem; border-top:1px solid var(--line); gap:1.5rem; align-items:flex-start; }
  body.strip #strip { display:flex; }
  #strip .lab { color:var(--mut); letter-spacing:.12em; text-transform:uppercase; white-space:nowrap; line-height:1.6rem; }
  #strip .lab b { color:var(--ink); }
  #items { position:relative; flex:1; min-width:0; height:3.3rem; overflow:hidden; line-height:1.6rem; }   /* relative: offsetTop is measured from here */
  .it { display:inline-block; margin-right:1.6rem; white-space:nowrap; }
  .it .bk { color:var(--mut); }
  .it.neg b { color:var(--below); }
  .it.pos b { color:var(--val); }
  .none { color:var(--mut); }
