/* Leadership (/leadership): Department Health, Forecast. Uses the roster app's look (e-*). */
.ld-side-title { display: none; font-weight: 600; color: var(--ink); }
@media (max-width: 900px) { .ld-side-title { display: block; } }
.ld-nolinks a[href^="/edit/person/"] { color: inherit; pointer-events: none; text-decoration: none; }

.ld-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.ld-grid > * { min-width: 0; }
.ld-grid > .e-card + .e-card { margin-top: 0; }
.ld-span-3 { grid-column: span 3; } .ld-span-4 { grid-column: span 4; } .ld-span-5 { grid-column: span 5; }
.ld-span-6 { grid-column: span 6; } .ld-span-7 { grid-column: span 7; } .ld-span-12 { grid-column: span 12; }
@media (max-width: 1180px) { .ld-span-3, .ld-span-4.ld-m { grid-column: span 6; } .ld-span-5, .ld-span-7 { grid-column: span 12; } }
@media (max-width: 900px) { .ld-span-4, .ld-span-6 { grid-column: span 12; } }
@media (max-width: 760px) { .ld-grid > * { grid-column: span 12; } }
.ld-section { font-size: .95rem; font-weight: 600; color: var(--ink-2); margin: 26px 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--rule-2); }
.ld-intro { max-width: 78ch; margin: -6px 0 16px; line-height: 1.5; }

.ld-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.ld-card-head h2 { font-size: 1rem; font-weight: 600; }
.ld-card-head .e-hint { margin-top: 3px; }
.ld-toggle { flex: none; }
.ld-h3 { font-size: .86rem; font-weight: 600; color: var(--ink-2); margin: 14px 0 8px; }
.ld-empty { padding: 36px 8px; text-align: center; }
.ld-tablewrap { overflow: auto; max-height: 340px; border: 1px solid var(--rule); border-radius: var(--r); }
.ld-tablewrap .e-table small { display: block; font-size: .76rem; }
.ld-proj td:first-child { white-space: normal; }
.ld-foot { margin-top: 12px; }

/* Charts */
.ld-chart { position: relative; }
.ld-chart svg { display: block; width: 100%; overflow: visible; }
.ld-chart line.grid { stroke: var(--rule); shape-rendering: crispEdges; }
.ld-chart line.base { stroke: var(--rule-2); shape-rendering: crispEdges; }
.ld-chart line.target { stroke: var(--muted); stroke-dasharray: 2 3; }
.ld-chart line.cross { stroke: var(--rule-2); }
.ld-chart text { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.ld-chart text.val { fill: var(--ink-2); font-weight: 600; }
.ld-chart text.cat { fill: var(--ink-2); font-size: 12px; }
.ld-chart .hit { fill: transparent; }
.ld-chart path.ln { stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ld-chart path.ln.dash { stroke-dasharray: 5 4; }
.ld-chart path.band { fill: var(--sage-wash); }
.ld-chart circle.dot { stroke: var(--paper); stroke-width: 2; }
.ld-legend { display: flex; flex-wrap: wrap; gap: 14px; margin: -4px 0 8px; font-size: .82rem; color: var(--ink-2); }
.ld-legend i { display: inline-block; width: 10px; height: 10px; border-radius: var(--r-sm); margin-right: 6px; vertical-align: -1px; }
.ld-legend i.line { width: 14px; height: 2px; border-radius: var(--r-sm); vertical-align: 3px; }
.ld-legend i.dash { width: 14px; height: 0; border-top: 2px dashed var(--sage); background: none !important; vertical-align: 3px; }
.ld-legend i.band { width: 14px; }
.ld-tip { position: fixed; z-index: 60; display: none; pointer-events: none; min-width: 130px; padding: 8px 10px; border-radius: var(--r);
  background: var(--well); border: 1px solid var(--rule-2); box-shadow: var(--shadow); font-size: .82rem; color: var(--ink); }
.ld-tip .t { color: var(--muted); font-size: .76rem; margin-bottom: 4px; }
.ld-tip .row { display: flex; align-items: center; gap: 8px; }
.ld-tip .row i { width: 8px; height: 8px; border-radius: var(--r-sm); }
.ld-tip .row b { margin-left: auto; padding-left: 12px; font-variant-numeric: tabular-nums; }
.ld-key { margin-top: 14px; }
.ld-key > div { display: grid; grid-template-columns: 12px 1fr auto 44px; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--rule); font-size: .88rem; color: var(--ink-2); }
.ld-key > div:first-child { border-top: 0; }
.ld-key i { width: 10px; height: 10px; border-radius: var(--r-sm); }
.ld-key b { color: var(--ink); font-variant-numeric: tabular-nums; }
.ld-key em { font-style: normal; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }

/* Tiles and the score */
.ld-tiles { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ld-tiles-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ld-tiles-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 14px; }
.ld-tiles-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1180px) { .ld-tiles-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 761px) and (max-width: 1180px) { .ld-tiles-2 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .ld-tiles, .ld-tiles-2, .ld-tiles-4, .ld-tiles-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ld-tile { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ld-tile b { font-size: 1.7rem; }
.ld-tile small b { display: inline; font-family: inherit; font-size: inherit; font-weight: 600; }
.ld-tile .up, .ld-key .up { color: var(--sage-ink); }
.ld-tile .down { color: var(--bad); }
.ld-health { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 22px; align-items: center; }
@media (max-width: 520px) { .ld-health { grid-template-columns: 1fr; } }
.ld-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.ld-hero > b { font-family: var(--serif); font-weight: 700; font-size: 4rem; line-height: 1; font-variant-numeric: tabular-nums; }
.ld-hero.early > b { color: var(--muted); }
.ld-hero.good > b { color: var(--sage-ink); } .ld-hero.warn > b { color: var(--warn); } .ld-hero.bad > b { color: var(--bad); }
.ld-hero > span { color: var(--muted); font-size: .82rem; }
.ld-status { margin-top: 8px; padding: 3px 10px; border-radius: var(--r-sm); font-style: normal; font-size: .8rem; font-weight: 600; background: var(--paper); border: 1px solid var(--rule-2); color: var(--ink-2); }
.ld-status.good { color: var(--sage-ink); border-color: color-mix(in srgb, var(--sage) 55%, transparent); }
.ld-status.warn { color: var(--warn); border-color: var(--warn-line); }
.ld-status.bad { color: var(--bad); border-color: var(--bad-line); }
.ld-hero small { margin-top: 6px; }
.ld-part { display: grid; grid-template-columns: 96px minmax(0, 1fr) 36px; gap: 2px 10px; align-items: center; padding: 6px 0; }
.ld-part .nm { font-weight: 600; font-size: .9rem; }
.ld-part .nm small { display: block; font-weight: 400; color: var(--muted); font-size: .74rem; }
.ld-part > b { text-align: right; font-variant-numeric: tabular-nums; }
.ld-part > p { grid-column: 2 / 4; }
.ld-part.na .nm, .ld-part.na > b { color: var(--muted); }
.ld-meter { height: 8px; border-radius: var(--r-sm); background: var(--well); overflow: hidden; }
.ld-meter i { display: block; height: 100%; border-radius: var(--r-sm); background: var(--sage); }

/* Forecast */
.ld-whatif { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); align-items: start; }
.ld-whatif .e-field { align-content: start; }
.ld-whatif .e-hint { font-size: .76rem; }
.ld-pipe { display: grid; gap: 6px; }
.ld-pipe-div { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--rule); color: var(--muted); font-size: .85rem; }
.ld-pipe-div:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.ld-pipe-row { display: grid; grid-template-columns: minmax(0, 15em) minmax(0, 1fr) 2.6em; gap: 10px; align-items: center; font-size: .88rem; }
.ld-pipe-row .nm { color: var(--ink-2); display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ld-pipe-row .nm b { color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 500; }
.ld-pipe-row .nm .e-chip { font-size: .68rem; padding: 0 6px; }
.ld-pipe-row .track { position: relative; height: 10px; border-radius: var(--r); background: var(--well); overflow: hidden; }
.ld-pipe-row .track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: var(--r); background: color-mix(in srgb, var(--sage) 55%, transparent); }
.ld-pipe-row .track i.solid { background: var(--sage); }
.ld-pipe-row .track u { position: absolute; left: 0; top: 0; bottom: 0; border-radius: var(--r); background: var(--sage-ink); }
.ld-pipe-row > b { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .ld-pipe-row { grid-template-columns: minmax(0, 9.5em) minmax(0, 1fr) 2.4em; } }
.ld-pool { margin-top: 14px; color: var(--ink-2); font-size: .88rem; }
.ld-tablewrap .e-table td { white-space: nowrap; }
.ld-proj td { white-space: normal; }
