/* DNEG AI Roadmap: css/views/business_unit.css
   The By business unit lens (.lens-business-unit): the unit cards with their maturity breakdown and the capabilities to start with, the
   two parts of the repository list, and the "Through <capability>" line on a repository card. Everything else on these pages is the
   shared kit (lk-* in department.css, the brief and the folded blocks in site.css) and the shared components. Tokens only. */

.lens-business-unit .bu-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); margin-top: 1.4rem; }
.lens-business-unit .bu-card { display: flex; flex-direction: column; gap: .55rem; }
.lens-business-unit .bu-card p { font-size: .88rem; }
.lens-business-unit .bu-card.quiet h3, .lens-business-unit .bu-card.quiet p { opacity: .72; }
/* where subgrid exists, the cards of one row share their rows (name, description, counts, maturity, capabilities), so the numbers line up */
@supports (grid-template-rows: subgrid) {
  .lens-business-unit .bu-card { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: .55rem; }
  .lens-business-unit .bu-card .lk-dfoot { display: contents; }
  .lens-business-unit .bu-card > .top { grid-row: 1; }
  .lens-business-unit .bu-card > p { grid-row: 2; }
  .lens-business-unit .bu-card .bu-figs { grid-row: 3; }
  .lens-business-unit .bu-card .bu-mix { grid-row: 4; }
  .lens-business-unit .bu-card .bu-start { grid-row: 5; align-content: start; }
}

/* the counts, and under them how many more repositories come through the unit's capabilities */
.lens-business-unit .bu-figs { display: grid; gap: .2rem; align-content: start; }
.lens-business-unit .bu-more { color: var(--muted); font-size: .8rem; }
.lens-business-unit .bu-more b { color: var(--fg); font-weight: 600; }

/* maturity breakdown: the shared stacked bar and key, slimmer and without a value column */
.lens-business-unit .bu-mix { align-content: start; gap: 8px; margin-top: 0; padding-top: 0; }
.lens-business-unit .bu-mix .bar { grid-template-columns: minmax(0, 1fr); }
.lens-business-unit .bu-mix .t { height: 8px; }

/* the capabilities to start with */
.lens-business-unit .bu-start { display: grid; gap: .35rem; margin-top: .25rem; }
.lens-business-unit .bu-caps { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.lens-business-unit .bu-caps li { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: .9rem; }
.lens-business-unit .bu-caps a { min-width: 0; color: var(--fg); font-weight: 500; text-decoration: none; }
.lens-business-unit .bu-caps a:hover { color: var(--accent2); text-decoration: underline; }
.lens-business-unit .bu-caps .chip { flex: 0 0 auto; }

/* the one line under a unit's description that points to the Group, or says what the Group serves */
.lens-business-unit .bu-shared { margin-top: .7rem; }

/* repositories in two parts: tagged for the unit, then through its capabilities */
.lens-business-unit .bu-part + .bu-part { margin-top: 2.4rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.lens-business-unit .bu-plabel { display: flex; align-items: baseline; gap: .6rem; margin: 0; color: var(--accent2); font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.lens-business-unit .bu-plabel .num { color: var(--muted); font-weight: 400; letter-spacing: 0; }
.lens-business-unit .bu-subnote { margin: .35rem 0 1.3rem; max-width: 80ch; }

/* "Through <capability>" on a repository card */
.lens-business-unit .bu-via { color: var(--muted); font-size: .8rem; line-height: 1.45; }
.lens-business-unit .bu-via .lk-label { margin-right: .3em; }
.lens-business-unit .bu-via a { color: var(--accent2); text-decoration: none; }
.lens-business-unit .bu-via a:hover { text-decoration: underline; }

/* the executive pass: tidy spacing around the shared brief and folded blocks */
.lens-business-unit .lk-mbody > .bu-grid { margin-top: .6rem; }    /* the cards sit under their notes inside the open block */

@media print { .lens-business-unit .bu-card { break-inside: avoid; } }
