/* The office (manager and owner screens), after docs/brand/src/mock-dashboard.html. Tokens from app.css, pieces from brand.css.
   Here: the page title and meta, chips, the Team dashboard (ready, pace, needs you, people, slip), the dates panel. */

/* page title: a heading, a meta line, the actions at the right */
.top { display: flex; align-items: flex-end; flex-wrap: wrap; gap: var(--s3) var(--s4); margin-bottom: 22px; }
.top h1 { margin: 0; font-size: 30px; }
.top-meta { margin: 6px 0 0; color: var(--muted); font-size: 15px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.top-meta span { display: inline-flex; align-items: center; gap: 6px; }
.top-meta .i { width: 16px; height: 16px; }
.top-meta b { color: var(--ink); font-weight: 600; }
.top-acts { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.top .goal { margin: 6px 0 0; }

/* chips: filters and the course switcher */
.chip { height: 32px; padding: 0 13px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--paper); font: 600 13px/1 var(--text); color: var(--muted); cursor: pointer; white-space: nowrap; }
.chip:hover { color: var(--ink); border-color: var(--faint); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
@media (pointer: coarse) { .chip { height: 40px; } }
.cswitch { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }

/* cards in the office: a head with a title and a small line */
.card-h { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 14px; }
.card-h h2 { margin: 0; font: 700 17px/1.2 var(--display); }
.card-h small { color: var(--muted); font-size: 13.5px; }
.row1 { display: grid; grid-template-columns: minmax(0, 1.72fr) minmax(0, 1fr); gap: 18px; margin-bottom: 18px; }
.row2 { display: grid; gap: 18px; }
.row1 > .card, .row2 > .card { margin: 0; min-width: 0; }
.msg:empty { display: none; }
.msg .note { margin: 0 0 var(--s4); }
.foot-links { margin: var(--s4) 0 0; font-size: var(--fs-sm); }

/* who is ready: the one number the manager came for */
.ready { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; }
.ready-n { display: flex; align-items: baseline; gap: 10px; margin: 0; }
.ready-n b { font: 800 72px/.9 var(--display); letter-spacing: -.03em; }
.ready-n span { font: 700 24px/1 var(--display); color: var(--muted); }
.ready-n em { margin-left: 4px; font: 700 24px/1 var(--display); font-style: normal; }
.team { display: flex; flex-wrap: wrap; gap: 5px; margin: 20px 0 14px; }
.team i { width: 22px; height: 28px; border-radius: 7px; background: var(--line); }
.team i.pass { background: var(--pass); } .team i.going { background: var(--going); } .team i.stuck { background: var(--stuck); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend span::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.legend b { color: var(--ink); font-weight: 700; }
.k-pass { --c: var(--pass); } .k-going { --c: var(--going); } .k-stuck { --c: var(--stuck); } .k-idle { --c: var(--line-2); }

/* the pace chart */
.pace { border-left: 1px solid var(--line); padding-left: 26px; display: flex; flex-direction: column; min-width: 0; }
.pace h3 { margin: 0; font: 600 13.5px/1.2 var(--text); color: var(--muted); }
.pace-svg { width: 100%; height: auto; margin: 8px 0 6px; overflow: visible; }
.pace-say { margin: 0; font-size: 14px; color: var(--muted); }
.pace-say b { color: var(--ink); }
.pace-svg text { font: 500 10.5px var(--text); fill: var(--faint); }
.pace-svg text.pc-b { fill: var(--ink); font-weight: 700; }
.pc-all { stroke: var(--line-2); stroke-dasharray: 3 4; }
.pc-base { stroke: var(--line); }
.pc-live { stroke: var(--ink); stroke-width: 1.5; }
.pc-area { fill: var(--pass-soft); }
.pc-line { fill: none; stroke: var(--pass); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.pc-proj { fill: none; stroke: var(--pass); stroke-width: 2; stroke-dasharray: 2 5; stroke-linecap: round; }
.pc-dot { fill: var(--pass); stroke: #fff; stroke-width: 2; }

/* needs you */
.needs { display: flex; flex-direction: column; }
.needs ul { list-style: none; margin: 0; padding: 0; }
.needs li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.needs li:first-child { border-top: 0; padding-top: 2px; }
.needs b { display: block; font: 600 15px/1.25 var(--text); }
.needs small { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.needs small em { font-style: normal; color: var(--stuck-ink); font-weight: 600; }
.needs .avatar { background: var(--stuck-soft); color: var(--stuck-ink); }
.needs .btn-s { min-width: 34px; padding: 0 8px; }
.needs-foot, .needs-none { margin: auto 0 0; padding-top: 12px; color: var(--muted); font-size: 13.5px; }
.needs-none { margin: 0; padding: 0; font-size: 14.5px; }

/* the people table */
.people { padding-bottom: 12px; }
.filters { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; }
.people table { width: 100%; border-collapse: collapse; }
.people th { text-align: left; font: 600 12.5px/1 var(--text); color: var(--muted); padding: 8px 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.people td { padding: 9px 10px; border-bottom: 1px solid var(--line); font-size: 14.5px; vertical-align: middle; }
.people tr:last-child td { border-bottom: 0; }
.people th:first-child, .people td:first-child { padding-left: 0; }
.people th:last-child, .people td:last-child { padding-right: 0; text-align: right; color: var(--muted); white-space: nowrap; }
.who { display: flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; min-width: 0; }
.who b { display: block; font: 600 14.5px/1.25 var(--text); }
.who small { display: block; color: var(--muted); font-size: 13px; white-space: nowrap; }
a.who:hover b { text-decoration: underline; }
.people tr[data-state="stuck"] .avatar { background: var(--stuck-soft); color: var(--stuck-ink); }
.lv { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13.5px; white-space: nowrap; }
.score { font: 700 16px/1 var(--display); }
.score.none { color: var(--faint); font: 500 14px/1 var(--text); }
.where { color: var(--muted); font-size: 13.5px; margin-left: 8px; }
.table-foot { padding: 10px 0 2px; color: var(--muted); font-size: 13.5px; border-top: 1px solid var(--line); }
.people-none { margin: 0 0 12px; color: var(--muted); }

/* where people slip */
.hard ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px; }
.hard .card-h small { flex: 1 1 100%; }
.hard li { display: flex; flex-direction: column; }
.hard-top { flex: 1; display: flex; justify-content: space-between; gap: 10px; font-size: 14.5px; margin-bottom: 6px; }
.hard-top b { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.hard-top span { color: var(--muted); white-space: nowrap; }
.slipbar { margin-top: auto; height: 8px; border-radius: 4px; background: var(--mist-2); overflow: hidden; }
.slipbar i { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--ink); }
.slipbar.first i { background: var(--stuck); }

/* the pseudonymous notice */
.note.pseudo { display: flex; align-items: flex-start; gap: 10px; background: var(--going-soft); border: 1px solid #C5CFFF; color: var(--going-ink); margin: 0 0 var(--s4); font-size: var(--fs-sm); }
.note.pseudo .i { margin-top: 2px; }

/* the dates panel: a quiet key that opens the go-live date and the deadline */
.dates { margin: -8px 0 18px; }
.dates > summary { list-style: none; cursor: pointer; display: inline-flex; margin-bottom: 0; }
.dates > summary::-webkit-details-marker { display: none; }
.dates[open] > summary { background: var(--mist-2); }
.dates-in { margin-top: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-l); padding: 18px 22px; max-width: 520px; }
.dates-in h3 { margin: 18px 0 8px; font: 700 14px/1.2 var(--display); }
.dates-h { margin: 8px 0 0; font-size: 13.5px; }
.dl-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.dl-form .fld { flex: 1 1 200px; }
.dl-form .btn { margin-bottom: 0; }
.linkish { color: var(--ink); font-weight: 600; font-size: var(--fs-sm); }

@media (max-width: 1100px) {
  .row1 { grid-template-columns: 1fr; }
  .hard ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .top { display: block; margin-bottom: 16px; }
  .top h1 { font-size: 26px; }
  .top-meta { font-size: 14px; }
  .top-acts { margin: 14px 0 0; }
  .top-acts .btn { flex: 1; }
  .top-acts .act-report { flex: 0 0 46px; padding: 0; }
  .top-acts .act-report span { display: none; }
  .card { padding: 18px 16px; border-radius: 16px; }
  .row1, .row2 { gap: 14px; margin-bottom: 14px; }
  .ready { display: block; }
  .ready-n b { font-size: 60px; }
  .ready-n span, .ready-n em { font-size: 20px; }
  .team i { width: calc((100% - 55px) / 12); height: 26px; }
  .pace { border-left: 0; padding: 16px 0 0; margin-top: 16px; border-top: 1px solid var(--line); }
  .hard ul { grid-template-columns: 1fr; gap: 14px; }
  .dates-in { padding: 16px; }
  .people table, .people tbody, .people tr, .people td { display: block; }
  .people thead { display: none; }
  .people tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: center; }
  .people tr:last-child { border-bottom: 0; }
  .people td, .people td:first-child, .people td:last-child { padding: 0; border: 0; }
  .people td.c-who { grid-column: 1; grid-row: 1; }
  .people td.c-score { grid-column: 2; grid-row: 1; text-align: right; }
  .people td.c-lv { grid-column: 1 / -1; grid-row: 2; }
  .people td.c-st { grid-column: 1; grid-row: 3; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
  .people td.c-last { grid-column: 2; grid-row: 3; font-size: 13px; text-align: right; }
  .lv .pips { flex: 0 1 240px; min-width: 0; }
  .lv .pips i { flex: 1 1 0; width: auto; min-width: 0; }
  .where { margin-left: 4px; }
  .filters { margin-left: 0; flex: 1 1 100%; }
}

/* one person, and the answers page */
.who-top { align-items: center; flex-wrap: nowrap; gap: 16px; }
.who-top h1 { overflow-wrap: anywhere; }
.avatar.big { width: 56px; height: 56px; border-radius: 16px; font-size: 18px; }
.meta-row { margin: 0 0 var(--s4); }
.prows { list-style: none; margin: 10px 0 0; padding: 0; }
.prow { display: grid; grid-template-columns: minmax(0, 1fr) 220px 150px 70px auto; align-items: center; gap: 8px 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.prow:first-child { border-top: 0; }
.prow-t { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; min-width: 0; }
.prow-t b { font: 600 15px/1.3 var(--text); overflow-wrap: anywhere; }
.prow-x { font-size: 13.5px; white-space: nowrap; }
.prow-m { font-size: 13.5px; white-space: nowrap; }
.prow .lv { justify-content: flex-start; }
.prow-sum { margin: 0 0 4px; }
.card.attn .stuck .tag { margin: 0; }
@media (max-width: 900px) {
  .prow { grid-template-columns: minmax(0, 1fr) auto; }
  .prow-t { grid-column: 1 / -1; }
  .prow .lv { grid-column: 1 / -1; }
  .prow-x { grid-column: 1; } .prow-m { grid-column: 2; text-align: right; }
  .prow .btn { grid-column: 1 / -1; }
}
@media (max-width: 760px) { .who-top { gap: 12px; } .avatar.big { width: 44px; height: 44px; font-size: 15px; } }
@media (max-width: 760px) { .top-acts .act-report:only-child { flex: 1; padding: 10px 18px; } .top-acts .act-report:only-child span { display: inline; } }
@media (max-width: 760px) { .top.who-top { display: flex; } }

/* teams and who has a course: a row that opens to its editor (Admin, Teams, the owner's course view) */
.who-ds, .team-list { list-style: none; margin: 0 0 var(--s3); padding: 0; display: grid; gap: 8px; }
.who-d { border: 1px solid var(--line); border-radius: var(--r-l); background: var(--paper); }
.who-d[open] { border-color: var(--line-2); }
.who-d > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 6px 14px; padding: 10px 14px; min-height: 48px; border-radius: var(--r-l); }
.who-d > summary::-webkit-details-marker { display: none; }
.who-d > summary:hover { background: var(--mist); }
.who-d > summary:focus-visible { outline: 3px solid var(--going); outline-offset: 2px; }
.who-t { font: 600 15px/1.3 var(--text); min-width: 0; overflow-wrap: anywhere; }
.who-s { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.who-n { color: var(--muted); font-size: 13.5px; }
.who-edit { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font: 600 13px/1 var(--text); }
.who-d[open] .who-edit { color: var(--ink); }
.who, .team-in { padding: 4px 16px 16px; border-top: 1px solid var(--line); }
/* the editor shares the class name .who with the dashboard's person link (above, a flex row): here it is a block */
.who[data-who] { display: block; color: inherit; }
.who[data-who] small { display: inline; white-space: normal; font-size: 13px; }
.who h4, .team-in h4 { margin: 14px 0 2px; font: 600 12.5px/1.2 var(--text); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.who-all { padding-top: 6px; font-weight: 600; }
.who-hint { margin: 0 0 4px; }
.who-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 18px; }
.who-people { max-height: 260px; overflow-x: hidden; overflow-y: auto; }
.who-list .chk { min-width: 0; }
.who-list .chk span { min-width: 0; overflow-wrap: anywhere; }
.who-all, .who-all span { white-space: normal; }
.who-list .chk[hidden] { display: none; }
.who-find { max-width: 360px; margin: 4px 0 8px; }
.who-find .input { width: 100%; }
.who-list .chk small { margin-left: auto; }
.who-note { margin: 12px 0 0; font-size: 13px; }
.team-in .dl-form { margin-top: 12px; }
.team-in .btn-quiet { margin-top: 14px; }
.addrow[data-tm] { margin-top: var(--s3); }
.chk input:disabled + span { color: var(--faint); }

/* the team filter above the Team screen's dashboard */
.tfilter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.tf-l { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font: 600 13px/1 var(--text); margin-right: 2px; }

/* by team: ready of total and who is stuck, a block per team */
.byteam { margin-bottom: 18px; }
.byteam .btn-s { margin-left: auto; }
.bt-l { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.bt { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; min-width: 0; }
.bt-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.bt-h b { font: 700 15.5px/1.2 var(--display); }
.bt-h small, .bt-none { color: var(--muted); font-size: 13px; }
.bt-c { list-style: none; margin: 0; padding: 0; }
.bt-c li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.bt-c li:first-child { border-top: 0; }
.bt-course { min-width: 0; overflow-wrap: anywhere; }
.bt-r { color: var(--muted); white-space: nowrap; }
.bt-r b { color: var(--ink); }
.bt-s { margin: 8px 0 0; font-size: 13.5px; color: var(--muted); }
.bt-s a { color: var(--ink); }
.bt-sl { color: var(--stuck-ink); font-weight: 600; }

/* the owner's "who has a course" panel */
.ap-card { margin-bottom: 18px; }
.ap-top { max-width: 420px; }
.ap h3 { margin: 18px 0 6px; font: 600 12.5px/1.2 var(--text); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.ap-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ap-list > li { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; padding: 8px 0; border-top: 1px solid var(--line); }
.ap-list > li:first-child { border-top: 0; }
.ap-n { display: flex; flex-direction: column; min-width: 0; flex: 1 1 200px; }
.ap-n small { font-size: 13px; }
.ap-org .who-d { flex: 1 1 100%; }
.ap-org > .chk { flex: 0 0 auto; }
.ap-msg:empty { display: none; }

@media (max-width: 760px) {
  .who-d > summary { grid-template-columns: minmax(0, 1fr) auto; }
  .who-s { grid-column: 1 / -1; grid-row: 2; }
  .who-list { grid-template-columns: 1fr; }
  .bt-l { grid-template-columns: 1fr; }
  .bt-c li { grid-template-columns: minmax(0, 1fr) auto; }
  .bt-c li .tag { grid-column: 1 / -1; justify-self: start; }
  .tfilter .tf-l { flex: 1 1 100%; }
}
