/* The project overview that opens under a row on the board (projectOverview.js). */
.project-name-link { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; border-radius: 6px; }
.project-name-link:hover { color: var(--accent); }
.project-name-link:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.project-name-link .ov-chev { color: var(--accent); transition: transform 0.2s ease; flex: none; }
.project-name-link[aria-expanded="true"] .ov-chev { transform: rotate(180deg); }

.overview-cell {
  grid-column: 1 / -1;
  position: sticky; left: 0;
  width: min(100%, 100vw);
  background: var(--bg);
  border-bottom: 2px solid var(--accent);
  box-shadow: inset 4px 0 0 var(--accent);
}
.overview-cell.fresh .ov-body { animation: ov-open 0.22s ease-out; }
@keyframes ov-open { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.row-cell.ov-open { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }

.ov-body { padding: 14px 20px 18px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.ov-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ov-head h2 { margin: 0; font-size: 17px; }
.ov-spacer { flex: 1; }
.ov-addr { color: var(--text-dim); font-size: 12px; }
.ov-chip { font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--status-on_track) 16%, transparent); color: var(--status-on_track); }
.ov-chip.grey { background: var(--surface-3); color: var(--text-dim); }
.ov-btn {
  font: 600 12px var(--font-body); padding: 5px 11px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); cursor: pointer; text-decoration: none; white-space: nowrap;
}
.ov-btn:hover { border-color: var(--accent); }
.ov-state { padding: 26px 4px; color: var(--text-dim); display: flex; align-items: center; gap: 12px; }

.ov-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ov-span2 { grid-column: span 2; }
@media (max-width: 1100px) { .ov-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .ov-grid { grid-template-columns: minmax(0, 1fr); } .ov-span2 { grid-column: auto; } }

.ov-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.ov-card.ov-warn { border-color: color-mix(in srgb, var(--status-waiting) 55%, var(--border)); }
.ov-lbl { color: var(--text-faint); font-size: 11px; }
.ov-ttl { font-weight: 600; font-size: 12.5px; }
.ov-ttl-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.ov-ttl-row a { font-weight: 600; font-size: 12px; color: var(--accent-strong); text-decoration: none; }
.ov-ttl-row a:hover { text-decoration: underline; }
.ov-big { font-size: 25px; font-weight: 600; line-height: 1.15; margin-top: 2px; display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.ov-big small { font-size: 12px; font-weight: 400; color: var(--text-dim); }
.ov-good { color: var(--status-on_track); }
.ov-bad { color: var(--status-blocked); }
.ov-amber { color: var(--status-waiting); }
.ov-sub { color: var(--text-dim); font-size: 11.5px; line-height: 1.45; }
.ov-faint { color: var(--text-faint); }
.ov-wx { display: flex; align-items: center; gap: 8px; }
.ov-hours { display: flex; gap: 2px; margin-top: 6px; }
.ov-hours > div { flex: 1; text-align: center; font-size: 10px; color: var(--text-faint); }
.ov-hours b { display: block; font-size: 11px; color: var(--text); font-weight: 600; }
.ov-hours i { display: block; height: 3px; background: #3987e5; margin: 2px 0; border-radius: 2px; }

.ov-key { display: flex; gap: 12px; color: var(--text-dim); font-size: 11px; margin: 1px 0 3px; flex-wrap: wrap; }
.ov-key i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 4px; vertical-align: 3px; }
.ov-keyr { margin-left: auto; color: var(--text); }
.ov-svg { display: block; width: 100%; height: auto; }

.ov-bar { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: 11.5px; color: var(--text-dim); }
.ov-bar .ov-l { width: 104px; flex: none; }
.ov-bar .ov-t { flex: 1; height: 7px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.ov-bar .ov-t i { display: block; height: 7px; border-radius: 4px; background: #3987e5; }
.ov-bar .ov-v { width: 34px; text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }

.ov-legend { display: flex; gap: 10px; font-size: 11px; margin: 1px 0 3px; flex-wrap: wrap; }
.ov-strip { display: flex; gap: 2px; margin-top: 5px; }
.ov-hz { flex: 1; height: 20px; border-radius: 3px; display: grid; place-items: center; font-size: 11px; text-decoration: none; border: 1px solid transparent; }
.ov-hz-clear { background: color-mix(in srgb, var(--status-on_track) 16%, transparent); color: var(--status-on_track); }
.ov-hz-noted { background: color-mix(in srgb, var(--status-waiting) 18%, transparent); color: var(--status-waiting); }
.ov-hz-incident { background: color-mix(in srgb, var(--status-blocked) 18%, transparent); color: var(--status-blocked); }
.ov-hz-nowork, .ov-hz-none { border-color: var(--border); }
.ov-hz-none { opacity: 0.45; }
a.ov-hz:hover { filter: brightness(1.2); outline: 1px solid var(--accent); }

.ov-iss { display: flex; gap: 7px; margin: 6px 0; font-size: 12px; color: var(--text); }
.ov-iss i { width: 7px; height: 7px; border-radius: 50%; background: var(--status-waiting); margin-top: 6px; flex: none; }
.ov-iss em { font-style: normal; color: var(--text-faint); }
.ov-line { font-size: 11.5px; color: var(--text); margin: 5px 0; }
.ov-line b { color: var(--text-faint); font-weight: 500; margin-right: 6px; font-variant-numeric: tabular-nums; }

.ov-rep {
  display: grid; grid-template-columns: 88px 74px minmax(0, 1fr) auto; gap: 8px; align-items: center;
  padding: 5px 6px; margin: 0 -6px; border-radius: 7px; color: var(--text-dim); text-decoration: none; font-size: 11.5px;
}
.ov-rep:hover { background: var(--surface-2); color: var(--text); }
.ov-rep b { color: var(--text); font-weight: 600; }
.ov-rep-sum { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-rep-end { font-weight: 600; font-size: 11px; white-space: nowrap; }
.ov-rep-end u { color: var(--accent-strong); text-decoration: none; margin-left: 6px; }
@media (max-width: 640px) { .ov-rep { grid-template-columns: 80px minmax(0, 1fr) auto; } .ov-rep > :nth-child(2) { display: none; } }

.ov-tip { position: fixed; display: none; pointer-events: none; z-index: 400; background: var(--surface-3); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 6px 9px; font-size: 12px; box-shadow: var(--shadow-sm); white-space: nowrap; }
.ov-tip small { color: var(--text-faint); font-size: 11px; }

/* ---- live on site: the street view picture, who is there, what they're doing ---- */
.ov-live { position: relative; border-radius: 12px; overflow: hidden; min-height: 330px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: 12px 12px 26px; color: #e8eef0; background: linear-gradient(160deg, #24343a, #131b1f 70%); border: 1px solid var(--border); isolation: isolate; }
.ov-photo { position: absolute; inset: 0; z-index: -1; background-size: cover; background-position: center; opacity: 0; transition: opacity 0.5s ease; }
.ov-photo.has-img { opacity: 1; }
.ov-live::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, rgba(8, 12, 14, 0.5), rgba(8, 12, 14, 0.05) 35%, rgba(8, 12, 14, 0.45)); }
.ov-livetop { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.ov-livetag { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border-radius: 999px; background: rgba(12, 17, 20, 0.62); backdrop-filter: blur(6px); }
.ov-livetag i { width: 8px; height: 8px; border-radius: 50%; background: #8a949a; }
.ov-livetag.on i { background: #2fd6a3; box-shadow: 0 0 0 0 rgba(47, 214, 163, 0.6); animation: ov-pulse 2s infinite; }
@keyframes ov-pulse { 70% { box-shadow: 0 0 0 7px rgba(47, 214, 163, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 214, 163, 0); } }
.ov-wxchip { display: flex; align-items: center; gap: 9px; padding: 6px 14px 6px 10px; border-radius: 999px; background: rgba(12, 17, 20, 0.62); backdrop-filter: blur(6px); font-size: 12px; line-height: 1.3; }
.ov-wxchip b { font-size: 20px; font-weight: 600; }
.ov-wxchip small { color: #b7c3c6; font-size: 11px; }
.ov-livecards { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 12px; }
@media (max-width: 800px) { .ov-livecards { grid-template-columns: minmax(0, 1fr); } }
.ov-glass { background: rgba(16, 21, 24, 0.8); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.ov-glbl { font-size: 11px; color: #9fb0b4; }
.ov-gsub { font-size: 11.5px; color: #b7c3c6; line-height: 1.45; }
.ov-gdim { color: #9fb0b4; }
.ov-staffn { display: flex; align-items: center; gap: 12px; margin: 2px 0 8px; }
.ov-staffn b { font-size: 46px; line-height: 1; font-weight: 700; color: #2fd6a3; font-variant-numeric: tabular-nums; }
.ov-staffn span { font-size: 14px; display: flex; flex-direction: column; }
.ov-staffn small { font-size: 11.5px; color: #b7c3c6; }
.ov-bubbles { display: flex; flex-wrap: wrap; gap: 5px; }
.ov-bubbles i, .ov-lead > i { font-style: normal; font-size: 10px; font-weight: 700; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.14); }
.ov-bubbles i.more { background: transparent; }
.ov-lead { display: flex; align-items: center; gap: 9px; margin-top: 10px; padding-top: 9px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.ov-lead > i { width: 32px; height: 32px; font-size: 11px; background: rgba(47, 214, 163, 0.18); color: #2fd6a3; border-color: rgba(47, 214, 163, 0.35); flex: none; }
.ov-lead b { display: block; font-size: 13px; }
.ov-lead small { font-size: 11.5px; color: #b7c3c6; }
.ov-livefoot { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: 11.5px; color: #b7c3c6; }
.ov-livefoot b { color: #2fd6a3; font-weight: 600; }
.ov-whead { font-size: 21px; font-weight: 650; line-height: 1.2; margin: 3px 0 4px; }
.ov-wlist { list-style: none; margin: 8px 0 0; padding: 0; font-size: 12px; display: flex; flex-direction: column; gap: 3px; }
.ov-wlist li { display: flex; gap: 8px; }
.ov-wlist li > span { width: 12px; text-align: center; color: #9fb0b4; flex: none; }
.ov-wlist small { color: #9fb0b4; font-size: 11.5px; }
.ov-wlist li.s-done > span { color: #2fd6a3; }
.ov-wlist li.s-not_done > span { color: #ff7a6b; }
.ov-stagerow { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.ov-stagerow b { font-size: 26px; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; }
.ov-gchip { font-size: 11px; padding: 2px 9px; border-radius: 6px; background: rgba(255, 255, 255, 0.1); }
.ov-gbar { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.14); margin-top: 7px; overflow: hidden; }
.ov-gbar i { display: block; height: 100%; background: #5b8def; border-radius: 3px; }
.ov-credit { position: absolute; right: 12px; bottom: 6px; font-size: 10px; color: rgba(255, 255, 255, 0.7); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }

/* ---- health and safety, today ---- */
.ov-hs .ov-r { font-weight: 400; font-size: 11.5px; }
.ov-hsgrid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 0.8fr)) minmax(0, 2.4fr); gap: 10px; margin-top: 8px; }
@media (max-width: 1100px) { .ov-hsgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ov-light, .ov-risks { grid-column: 1 / -1; } }
.ov-light, .ov-mini { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.ov-light { display: flex; gap: 12px; align-items: center; }
.ov-bulbs { display: flex; flex-direction: column; gap: 5px; padding: 7px 6px; border-radius: 16px; background: var(--surface-3); flex: none; }
.ov-bulbs i { width: 17px; height: 17px; border-radius: 50%; background: var(--border); opacity: 0.55; }
.ov-bulbs i.on { opacity: 1; box-shadow: 0 0 9px currentColor; }
.ov-bulbs i.on.red { background: var(--status-blocked); color: var(--status-blocked); }
.ov-bulbs i.on.amber { background: var(--status-waiting); color: var(--status-waiting); }
.ov-bulbs i.on.green { background: var(--status-on_track); color: var(--status-on_track); }
.ov-hsbig { font-size: 21px; font-weight: 650; line-height: 1.15; }
.ov-hsnum { font-size: 28px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.ov-mini .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; }
.dot.good { background: var(--status-on_track); } .dot.warn { background: var(--status-waiting); } .dot.bad { background: var(--status-blocked); }
.ov-risk { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.ov-risk:last-child { border-bottom: 0; }
.ov-risk > i { width: 7px; height: 7px; border-radius: 50%; margin-top: 6px; flex: none; }
.ov-risk > span { flex: 1; min-width: 0; color: var(--text); }
.ov-risk em { font-style: normal; color: var(--text-dim); }
.ov-risk u { text-decoration: none; font-size: 10.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; flex: none; }
.lv-extreme { background: color-mix(in srgb, var(--status-blocked) 22%, transparent); color: var(--status-blocked); }
.lv-high { background: color-mix(in srgb, #e8742f 22%, transparent); color: #e8742f; }
.lv-moderate { background: color-mix(in srgb, var(--status-waiting) 22%, transparent); color: var(--status-waiting); }
.lv-low { background: var(--surface-3); color: var(--text-dim); }
i.lv-extreme { background: var(--status-blocked); } i.lv-high { background: #e8742f; } i.lv-moderate { background: var(--status-waiting); } i.lv-low { background: var(--text-faint); }
