/* The workspace: Send in the top bar, sheets, picking a person with their plate meter, Home's counts, Who's on what,
   New, the line (place, drag handle, arrows, where a row will land), a request open beside its list on a laptop, a
   manager's buttons, Who gets each kind, helpers, who a team member's request is for, "I'm out" and Crunch ahead.
   Colors come only from brand.css. Phone first; 900px and up is the laptop layout, 1200px and up opens a request
   beside its list. */

.bar-end { display: flex; align-items: center; gap: 8px; }
.bar-send { text-decoration: none; padding: 8px 14px; gap: 6px; }
.bar-send .ic { width: 20px; height: 20px; }

/* Status words beside the chips. */
.chip-st.paused { background: var(--paused-bg); color: var(--paused); }
.chip-st.rush { background: var(--slip-bg); color: var(--slip); }
.req-chip { display: flex; flex-wrap: wrap; gap: 6px; }
.why-soft { display: block; color: var(--slate); font-weight: 600; }

/* Sheets: up from the bottom on a phone, in the middle on a laptop. */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-dim { position: absolute; inset: 0; border: 0; background: var(--navy-soft); cursor: pointer; }
.sheet {
  position: relative; width: 100%; max-height: 90dvh; overflow-y: auto; display: grid; gap: 18px;
  padding: 20px 20px calc(24px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; background: var(--white);
  animation: rise .25s var(--ease);
}
.sheet:focus { outline: none; }
.sheet-head { display: flex; align-items: flex-start; gap: 12px; }
.sheet-title { flex: 1; min-width: 0; display: grid; gap: 4px; }
.sheet h2 { font-size: 26px; font-weight: 900; line-height: 1.15; overflow-wrap: anywhere; }
.sheet-title .sub { overflow-wrap: anywhere; }
.sheet-body { display: grid; gap: 14px; }
.sheet-body .seg { margin-bottom: 4px; }

/* Picking a person, with how full their plate is. */
.pick { display: grid; gap: 8px; }
.pick-row {
  display: flex; align-items: flex-start; gap: 12px; width: 100%; min-height: 64px; padding: 12px 14px;
  border: 1.5px solid var(--hair); border-radius: 14px; background: var(--white); text-align: left; cursor: pointer;
}
.pick-row[aria-pressed="true"] { border-color: var(--navy); background: var(--ice); }
.pick-dot { flex: none; display: grid; place-items: center; width: 26px; height: 26px; margin-top: 1px; border: 1.5px solid var(--hair); border-radius: 50%; background: var(--white); }
.pick-row[aria-pressed="true"] .pick-dot { border-color: var(--navy); background: var(--navy); color: var(--white); }
.pick-dot .ic { width: 16px; height: 16px; stroke-width: 2.6; }
.pick-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.pick-main b { font-weight: 800; overflow-wrap: anywhere; }
.pick-main small { color: var(--slate); font-size: 17px; overflow-wrap: anywhere; }
.meter-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.meter { flex: 0 0 120px; appearance: none; height: 10px; border: 0; border-radius: 999px; background: var(--ice); overflow: hidden; color: var(--blue); }
.meter::-webkit-progress-bar { background: var(--ice); border-radius: 999px; }
.meter::-webkit-progress-value { background: var(--blue); border-radius: 999px; transition: width .4s var(--ease); }
.meter::-moz-progress-bar { background: var(--blue); border-radius: 999px; }
.meter.over { color: var(--late); }
.meter.over::-webkit-progress-value { background: var(--late); }
.meter.over::-moz-progress-bar { background: var(--late); }
.meter-wrap small { color: var(--slate); font-size: 17px; }
.sizes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sizes .seg-btn { display: grid; gap: 0; text-align: left; padding: 8px 12px; }
.sizes .seg-btn small { font-size: 15px; font-weight: 600; }

/* Home: the four counts. */
.counts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.count {
  display: grid; gap: 2px; justify-items: start; min-height: 88px; padding: 14px 16px; border: 1px solid var(--hair);
  border-radius: 18px; background: var(--white); text-align: left; cursor: pointer; transition: border-color .15s var(--ease);
}
.count:hover { border-color: var(--navy); }
.count b { font-size: 34px; font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; }
.count span { color: var(--slate); font-weight: 800; }
.count.late:not(.zero) b { color: var(--late); }
.count.slipping:not(.zero) b { color: var(--slip); }

/* New: each request with its rush reason and a manager's buttons. */
.fresh { padding-bottom: 12px; }
.rush-why { display: flex; align-items: flex-start; gap: 8px; margin: 0 12px 10px 90px; color: var(--slip); font-weight: 800; overflow-wrap: anywhere; }
.rush-why .ic { width: 20px; height: 20px; margin-top: 2px; }
.fresh-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-left: 90px; padding-right: 12px; }
.req-row[aria-current="true"] { background: var(--ice); }

/* Who's on what. */
.plates { list-style: none; padding: 0; display: grid; }
.plates > li + li { border-top: 1px solid var(--hair); }
.plate {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 72px; padding: 12px; border: 0;
  border-radius: 14px; background: none; text-align: left; cursor: pointer;
}
.plate:hover { background: var(--off); }
.plate-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.plate-main b { font-weight: 800; overflow-wrap: anywhere; }
.plate-main > small { color: var(--slate); font-size: 17px; overflow-wrap: anywhere; }
.plate-go { color: var(--slate); transition: transform .2s var(--ease); }
.plate[aria-expanded="true"] .plate-go { transform: rotate(90deg); }
.jobs { list-style: none; display: grid; gap: 8px; margin: 0 12px 14px; padding: 0; animation: rise .2s var(--ease); }
.job { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--hair); border-radius: 14px; background: var(--off); }
.job.note { background: none; border-style: dashed; }
.job-main { display: grid; gap: 2px; text-decoration: none; min-width: 0; }
.job-main b { font-weight: 800; overflow-wrap: anywhere; }
.job-main small { color: var(--slate); font-size: 17px; }
.job .btn { justify-self: start; }

/* The line. */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters .chip { font-weight: 800; }
.line { list-style: none; padding: 0; margin: 0; display: grid; }
.line-row {
  position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: start;
  padding: 12px 8px; border-radius: 14px; background: var(--white); transition: transform .3s var(--ease);
}
.line-row + .line-row { border-top: 1px solid var(--hair); }
.line-row.mine { background: var(--ice); }
.line-row.current { background: var(--ice); outline: 2px solid var(--navy); outline-offset: -2px; }
.line-row.dragging { z-index: 5; transition: none; box-shadow: 0 10px 30px var(--navy-soft); border-top-color: transparent; }
.line-row.drop-before::before, .line-row.drop-after::after {
  content: ""; position: absolute; left: 8px; right: 8px; height: 4px; border-radius: 999px; background: var(--blue);
}
.line-row.drop-before::before { top: -2px; }
.line-row.drop-after::after { bottom: -2px; }
.line-left { display: grid; justify-items: center; gap: 4px; }
.line-no {
  display: grid; place-items: center; min-width: 36px; height: 36px; padding: 0 6px; border-radius: 999px;
  background: var(--navy); color: var(--white); font-weight: 900; font-variant-numeric: tabular-nums;
}
.grip {
  display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: none;
  color: var(--slate); cursor: grab; touch-action: none;
}
.grip .ic { stroke-width: 3.2; }
.grip:active { cursor: grabbing; }
.line-main { display: grid; gap: 2px; min-width: 0; text-decoration: none; padding: 4px 0; border-radius: 8px; }
.line-main small { color: var(--slate); font-size: 17px; overflow-wrap: anywhere; }
.line-main .req-chip { margin-top: 6px; }
.line-arrows { display: grid; gap: 6px; }
.line-arrows .icon-btn:disabled { opacity: .35; cursor: default; }
.pad-note { padding: 4px 12px 12px; }

/* A manager's buttons on a request. */
.manage { display: grid; gap: 14px; }
.manage .eyebrow { margin: 0; }
.manage-btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.manage-btns .btn { justify-content: flex-start; padding: 10px 14px; text-align: left; }
.manage-btns .btn:not(.quiet) { grid-column: 1 / -1; justify-content: center; }
.manage-btns .btn .ic { width: 20px; height: 20px; }

/* Who gets each kind. */
.dot.tile { display: inline-grid; width: 28px; height: 28px; border-radius: 8px; }
.dot.tile .ic { width: 18px; height: 18px; color: var(--white); }
.kind-rule { display: grid; gap: 10px; padding: 16px 0; }
.kind-rule + .kind-rule { border-top: 1px solid var(--hair); }
.kind-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.kind-name b { font-weight: 800; overflow-wrap: anywhere; }
.kind-name small { color: var(--slate); font-size: 17px; font-weight: 600; }
.boxes { display: flex; flex-wrap: wrap; gap: 8px; }
.box-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px 6px 10px; border: 1.5px solid var(--hair);
  border-radius: 12px; background: var(--white); font-weight: 700; text-align: left; cursor: pointer; overflow-wrap: anywhere;
}
.box-chip[aria-checked="true"] { border-color: var(--navy); background: var(--ice); }
.box-chip:disabled { cursor: default; }
.box { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border: 2px solid var(--navy); border-radius: 6px; background: var(--white); }
.box-chip[aria-checked="true"] .box { background: var(--navy); color: var(--white); }
.box .ic { width: 16px; height: 16px; stroke-width: 2.8; }
.ok-note { display: inline-flex; align-items: center; gap: 4px; color: var(--ok) !important; font-weight: 800 !important; }
.ok-note .ic { width: 18px; height: 18px; }

@media (min-width: 900px) {
  .counts { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
  .count { min-height: 104px; padding: 18px 20px; }
  .count b { font-size: 40px; }
  .sheet-wrap { align-items: center; padding: 24px; }
  .sheet { max-width: 560px; max-height: calc(100dvh - 48px); padding: 28px; border-radius: 24px; }
  .bar-end { flex-direction: column; align-items: stretch; }
  .bar-send { align-self: stretch; }
  .job { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .line-row { padding: 14px 12px; gap: 14px; }
  .line-arrows { grid-auto-flow: column; align-self: center; }
  .manage-btns { display: flex; flex-wrap: wrap; }
  .manage-btns .btn:not(.quiet) { min-width: 200px; }
}
/* Below 1200px the request opens on its own page, so the list takes the width. */
@media (min-width: 900px) and (max-width: 1199px) {
  .wide-split { display: block; }
}
@media (min-width: 1200px) {
  .main:has(.wide-split.has-open) { max-width: 1480px; }
  .wide-split { grid-template-columns: minmax(0, 1.15fr) minmax(460px, 1fr); }
  .wide-split:not(.has-open) { grid-template-columns: minmax(0, 1fr); }
  .req-pane, .split.has-open .req-pane { padding: 0; background: none; border: 0; }
  .req-pane .card { padding: 28px; }
  .req-pane .req-h1 { font-size: 34px; }
  .req-pane .said div { grid-template-columns: 160px minmax(0, 1fr); }
}

/* Your work: a task they're helping with, under its request. */
.helping { padding-bottom: 12px; }
.task-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 12px 0 90px; font-weight: 700; overflow-wrap: anywhere; }
.task-note span:last-child { min-width: 0; }

/* Helpers on a request: each task with its box. */
.helpers { display: grid; gap: 12px; }
.helper-list { list-style: none; padding: 0; display: grid; }
.helper { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 0; }
.helper + .helper { border-top: 1px solid var(--hair); }
.helper-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.helper-main b { font-weight: 800; overflow-wrap: anywhere; }
.helper-main small { color: var(--slate); font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.helper.done .helper-main b { color: var(--slate); text-decoration: line-through; }
.tick {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 2px solid var(--navy); border-radius: 12px;
  background: var(--white); color: var(--white); cursor: pointer;
}
.tick[aria-pressed="true"] { background: var(--navy); }
.tick:disabled { cursor: default; border-color: var(--hair); }
.tick[aria-pressed="true"]:disabled { background: var(--slate); border-color: var(--slate); }
.tick .ic { width: 24px; height: 24px; stroke-width: 2.6; }
.helpers > .btn { justify-self: start; }

/* Sending as the team: who it's for and who's doing it. */
.for-whom { display: grid; gap: 10px; margin: 6px 0 10px; text-align: left; }
.for-whom .label + .seg { margin-bottom: 4px; }
.picked { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 14px; border: 1.5px solid var(--navy); border-radius: 14px; background: var(--ice); }
.picked-main { flex: 1; min-width: 0; overflow-wrap: anywhere; }

/* "I'm out": a switch with its words beside it. */
.switch {
  flex: none; position: relative; width: 60px; height: 44px; border: 0; background: none; cursor: pointer; padding: 0;
}
.switch::before { content: ""; position: absolute; inset: 7px 0; border-radius: 999px; background: var(--hair); transition: background .2s var(--ease); }
.switch-knob {
  position: absolute; top: 10px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--white);
  transition: transform .2s var(--ease);
}
.switch[aria-checked="true"]::before { background: var(--navy); }
.switch[aria-checked="true"] .switch-knob { transform: translateX(30px); }

/* Crunch ahead: a week to a row, each work day's count. */
.crunch { display: grid; gap: 12px; }
.crunch-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.crunch-grid.cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.crunch-grid.cols-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.crunch-wd { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--slate); text-align: center; }
.crunch-day {
  display: grid; align-content: space-between; justify-items: start; gap: 2px; min-height: 64px; padding: 6px 8px;
  border: 1px solid var(--hair); border-radius: 12px; background: var(--white); color: var(--navy); text-align: left; cursor: pointer;
}
.crunch-day small { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.crunch-day b { font-size: 22px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.crunch-day.l1 { background: var(--ice); }
.crunch-day.l2 { background: var(--hair); }
.crunch-day.l3 { background: var(--navy); border-color: var(--navy); color: var(--white); }
.crunch-day.today { box-shadow: inset 0 0 0 2px var(--navy); }
.crunch-day.l3.today { box-shadow: inset 0 0 0 2px var(--white); }
.crunch-day[aria-pressed="true"] { outline: 3px solid var(--blue); outline-offset: 2px; }
.crunch-day.gone { cursor: default; border-style: dashed; color: var(--slate); background: var(--off); }
.crunch-list { display: grid; gap: 6px; }
