/* Check-ins, workload, clean-up, stuck and settings (owner: portal-work). Loaded after styles.css; use its tokens (--accent, --paper, --muted…). */

/* A slot that only holds a section: its children sit in the parent's grid as if the slot weren't there. */
.wk-slot { display: contents; }

/* Classes below set display, which would beat the hidden attribute. */
.ci-edit [hidden], .ci-audience[hidden], .wk-bar[hidden], .board-new[hidden], .fu-more[hidden] { display: none !important; }

input[type="time"], input[type="number"] {
  width: 100%; min-height: 36px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-s);
  background: var(--raised); color: var(--ink); min-width: 0; font: inherit;
}
input[type="radio"] { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; flex: none; }

fieldset.ci-days, fieldset.ci-checks, fieldset.ci-optset, fieldset.ci-q { border: 0; padding: 0; margin: 0; min-width: 0; }
.ci-days > legend, .ci-checks > legend, .ci-optset > legend { font-size: 12px; font-weight: 600; color: var(--muted); padding: 0; margin-bottom: 4px; }

/* ---------- old-task questions (My work) */

.fu-list { display: grid; }
.fu { display: grid; gap: 4px; padding: 10px 0; border-top: 1px solid var(--line); min-width: 0; }
.fu:first-child { border-top: 0; padding-top: 2px; }
.fu-question { font-weight: 600; overflow-wrap: anywhere; }
.fu-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.fu-more:empty { display: none; }
.fu-form { display: grid; gap: 8px; padding: 10px; margin-top: 6px; background: var(--sunk); border-radius: var(--radius-s); min-width: 0; }

/* ---------- check-ins */

.ci-rounds, .ci-list, .ci-history, .ci-feed { display: grid; }
.ci-round, .ci-item, .ci-history > li, .ci-feed > li { display: grid; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line); min-width: 0; }
.ci-round:first-child, .ci-item:first-child, .ci-history > li:first-child, .ci-feed > li:first-child { border-top: 0; padding-top: 2px; }
.ci-round { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.ci-round-main { display: grid; gap: 2px; min-width: 0; }
.ci-round-title { font-weight: 700; overflow-wrap: anywhere; }
.ci-round-done .ci-round-title { color: var(--muted); }
.ci-ok { color: var(--ok-ink); }
.ci-item-head, .ci-history-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; justify-content: space-between; min-width: 0; }
.ci-item-title { font-weight: 700; overflow-wrap: anywhere; }
.ci-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.ci-history-head strong { overflow-wrap: anywhere; }
.ci-state { font-size: 12px; font-weight: 600; color: var(--muted); }
.ci-state-answered { color: var(--ok-ink); }
.ci-state-closed { color: var(--warn-ink); }

.ci-days { display: flex; flex-wrap: wrap; gap: 6px; }
.ci-days > legend { flex-basis: 100%; }
.ci-day { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 11px; border: 1.5px solid var(--line-strong); border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer; background: var(--raised); }
/* A picked day or answer is a little plastic badge, like the chips. */
.ci-day:has(input:checked) { background: var(--face-sky); border-color: var(--keyline); color: var(--face-ink); font-weight: 800; box-shadow: inset 0 -2px 0 rgba(5, 8, 60, .16), 0 2px 0 var(--keyline); }
.ci-day:focus-within { outline: 2px solid var(--focus); outline-offset: 1px; }

.ci-answers { display: grid; gap: 2px 12px; margin: 0; min-width: 0; }
.ci-answers dt { font-size: 12px; font-weight: 600; color: var(--muted); }
.ci-answers dd { margin: 0 0 6px; overflow-wrap: anywhere; }
.ci-feed-name { font-weight: 700; }
.ci-daybar { align-items: end; }

.ci-intro { color: var(--muted); }
.ci-form { gap: 18px; }
.ci-q { display: grid; gap: 8px; }
.ci-q > legend, .ci-q > label.ci-q-prompt { font-weight: 700; font-size: inherit; color: var(--ink); padding: 0; margin-bottom: 8px; overflow-wrap: anywhere; }
.ci-q-text { gap: 0; }
.ci-req { color: var(--danger); }
.ci-picks { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ci-pick { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 6px 13px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-s); background: var(--raised); cursor: pointer; min-width: 0; overflow-wrap: anywhere; font-weight: 600; transition: transform 80ms ease; }
.ci-pick:hover { border-color: var(--faint); }
.ci-pick:has(input:checked) { background: var(--face-sky); border-color: var(--keyline); color: var(--face-ink); font-weight: 800; box-shadow: inset 0 -3px 0 rgba(5, 8, 60, .16), 0 2px 0 var(--keyline); }
.ci-pick:focus-within { outline: 2px solid var(--focus); outline-offset: 1px; }
.ci-q-scale .ci-pick { min-width: 44px; justify-content: center; }
.ci-q-choice .ci-picks { display: grid; justify-items: start; }
.ci-ends { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); }
fieldset.ci-q > .ci-seen { margin-top: 0; } /* the grid gap already spaces it */

.ci-edit { min-width: 0; }
.ci-radios { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.ci-radios label { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-size: 13.5px; font-weight: 500; }
.ci-audience { display: grid; gap: 12px; min-width: 0; }
@media (min-width: 720px) { .ci-audience { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.ci-checklist { display: grid; gap: 2px; max-height: 240px; overflow-y: auto; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--raised); }
.ci-check { display: flex; align-items: center; gap: 8px; min-height: 30px; font-size: 13.5px; cursor: pointer; overflow-wrap: anywhere; min-width: 0; }

.ci-editor { display: grid; gap: 10px; min-width: 0; }
.ci-qs { display: grid; gap: 10px; }
.ci-qcard { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--sunk); min-width: 0; }
.ci-qcard-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.ci-qcard-head h3 { font-size: 13.5px; }
.ci-qcard-tools { display: flex; flex-wrap: wrap; gap: 4px; }
.ci-optset { display: grid; gap: 6px; }
.ci-opts { display: grid; gap: 6px; }
.ci-opt { display: flex; gap: 6px; align-items: center; min-width: 0; }
.ci-opt input { flex: 1; }
.ci-add { justify-content: flex-start; }

.ci-totals { display: grid; gap: 12px; }
.ci-totals > li { display: grid; gap: 4px; min-width: 0; }
.ci-total-q { font-weight: 700; overflow-wrap: anywhere; }
.ci-texts { display: grid; gap: 4px; padding-left: 14px; list-style: disc; font-size: 13.5px; }

/* ---------- workload and scores */

.wl-carry { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.wl-big { font-size: 26px; font-weight: 800; line-height: 1.1; }
.wl-none { color: var(--muted); }
.wl-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin: 10px 0; }
.wl-stats .stat { padding: 8px 10px; border-radius: var(--radius-s); background: var(--sunk); min-width: 0; }
.wl-stats dt { font-size: 12px; color: var(--muted); }
.wl-stats dd { margin: 0; font-size: 18px; font-weight: 800; }
.wl-stats .stat-warn { background: var(--warn-bg); color: var(--warn-ink); }
.wl-stats .stat-warn dt, .wl-stats .stat-blocked dt { color: inherit; }
.wl-stats .stat-blocked { background: var(--blocked-bg); color: var(--blocked-ink); }
.wl-stats .stat-stale dd { font-style: italic; }
.wl-facts { display: grid; gap: 2px; padding-left: 14px; list-style: disc; font-size: 13px; color: var(--muted); }
.wl-sub { font-size: 13.5px; margin: 12px 0 4px; }
.wl-tasks { display: grid; }
.wl-tasks > li { display: grid; gap: 2px; padding: 7px 0; border-top: 1px solid var(--line); min-width: 0; }
.wl-tasks > li:first-child { border-top: 0; }
.wl-task-main { display: flex; gap: 8px; align-items: baseline; min-width: 0; overflow-wrap: anywhere; }
.wl-parts { display: grid; gap: 8px; margin-top: 10px; }
.wl-part { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 10px; background: var(--raised); min-width: 0; }
.wl-part > summary { cursor: pointer; font-weight: 700; display: flex; flex-wrap: wrap; gap: 4px 10px; justify-content: space-between; }
.wl-part[open] > summary { margin-bottom: 8px; }

.wl-people { display: grid; }
.wl-person { display: grid; gap: 4px; padding: 10px 0; border-top: 1px solid var(--line); min-width: 0; }
.wl-person:first-child { border-top: 0; padding-top: 2px; }
.wl-person-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.wl-name { font-weight: 700; overflow-wrap: anywhere; }
.wl-carrying { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--muted); }
.wl-scores .wl-person-head { display: grid; gap: 2px; }
.wl-score { font-weight: 700; }
.wl-scores .muted { font-size: 13px; }
.wl-band-overloaded, .wl-band-heavy { padding-top: 18px; }
.wl-band-overloaded { box-shadow: inset 0 6px 0 var(--face-coral), var(--slab); }
.wl-band-heavy { box-shadow: inset 0 6px 0 var(--gold), var(--slab); }

/* ---------- clean-up, stuck, people, settings */

.wk-bar { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 12px; background: var(--surface); border: 2px solid var(--keyline); border-radius: 14px; box-shadow: var(--slab-s); }
.wk-bar .row-actions { margin-top: 0; }
.wk-picked { font-size: 13px; font-weight: 600; }
.wk-picks { display: grid; }
.wk-pick-row { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--line); min-width: 0; }
.wk-pick-row:first-child { border-top: 0; }
.wk-pick-row > input { margin-top: 3px; flex: none; }
.wk-pick-main { display: grid; gap: 2px; flex: 1; min-width: 0; cursor: pointer; overflow-wrap: anywhere; }
.wk-all { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; cursor: pointer; }

.wk-capacity { margin-top: 10px; }
@media (max-width: 520px) { .wk-capacity .row2 { grid-template-columns: minmax(0, 1fr); } }

.wk-setting-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; justify-content: space-between; min-width: 0; }
.wk-setting-head code { overflow-wrap: anywhere; }
.wk-setting-value { font-weight: 700; overflow-wrap: anywhere; }
.wk-setting-value.is-changed { color: var(--accent); }

.board-new { margin-bottom: 16px; }

@media (max-width: 480px) {
  .ci-round { grid-template-columns: minmax(0, 1fr); }
  .wl-carrying { margin-left: 0; }
}

/* ---------- two-step sign-in (Settings, and the set-up screen when it's required) */

.tf-steps { display: grid; gap: 14px; margin: 0; padding-left: 20px; }
.tf-steps > li { display: grid; gap: 8px; min-width: 0; }
.tf-qr { display: block; width: 220px; max-width: 100%; height: auto; background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 6px; }
.tf-add { justify-self: start; }
.tf-add[hidden] { display: none; }
.tf-manual summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.tf-manual p { margin-top: 6px; }
.tf-key-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tf-key { font-size: 15px; letter-spacing: .06em; padding: 4px 8px; overflow-wrap: anywhere; }
.tf-code { font: 600 22px/1.2 var(--mono); letter-spacing: .2em; max-width: 12ch; }
.tf-title { font-size: 16px; margin: 0; }
.tf-backup { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.tf-backup code { display: block; font-size: 15px; padding: 6px 8px; text-align: center; }
.tf-left { justify-content: flex-start; }
.tf-check { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.tf-check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.tf-required { max-width: 640px; margin: 24px auto; display: grid; gap: 16px; padding: 20px; }
.tf-required-head { display: flex; gap: 14px; align-items: flex-start; }
.tf-required-head h1 { font-size: 20px; margin: 0 0 6px; }
.tf-required-head .locky { flex: none; width: 72px; height: auto; }
@media (max-width: 480px) {
  .tf-required-head { flex-direction: column; }
}

/* Security keys, under two-step sign-in in Settings (js/work/security-keys.js). */
.sk { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.sk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sk-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); min-width: 0; }
.sk-row > div { min-width: 0; overflow-wrap: anywhere; }
