/* ===========================================================================
   RotaDone — Sol 2

   Visual thesis: a workforce operations ledger — architectural, exact and
   unmistakably branded. The week is a working horizon, staff are assignment
   lanes, and labour is a control dock rather than a secondary dashboard.
   ========================================================================== */

html.sol2-mode {
  --sol-canvas: #080d12;
  --sol-panel: #0e141b;
  --sol-raised: #151c25;
  --sol-cell: #0b1016;
  --sol-line: #26303a;
  --sol-line-soft: rgba(205, 220, 238, .075);
  --sol-ink: #f5f7f9;
  --sol-muted: #8c98a7;
  --sol-faint: #586574;
  --sol-accent: #5577ff;
  --sol-accent-strong: #3f63f5;
  --sol-accent-wash: rgba(85, 119, 255, .105);
  --sol-brass: #d2b175;
  --sol-radius: 3px;
}

html.sol2-mode.rd-light-mode {
  --sol-canvas: #e8e6df;
  --sol-panel: #f7f6f1;
  --sol-raised: #eeece5;
  --sol-cell: #fffefa;
  --sol-line: #d3d0c7;
  --sol-line-soft: rgba(28, 33, 42, .085);
  --sol-ink: #181b22;
  --sol-muted: #626a75;
  --sol-faint: #989a9c;
  --sol-accent: #264fe0;
  --sol-accent-strong: #173fcf;
  --sol-accent-wash: rgba(38, 79, 224, .09);
  --sol-brass: #98703a;
}

html.sol2-mode body { background: var(--sol-canvas); }

/* Brand command masthead ------------------------------------------------- */
html.sol2-mode body .topbar {
  position: relative;
  height: 78px;
  gap: 12px;
  padding: 0 18px;
  background: #0c1218;
  border-bottom: 1px solid #2b3540;
  box-shadow: inset 0 -2px #111923;
}
html.sol2-mode body .topbar::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 18px;
  width: 86px;
  height: 2px;
  background: var(--sol-accent);
}
html.sol2-mode .sol-identity {
  min-width: 316px;
  gap: 12px;
}
html.sol2-mode .sol-brand-mark {
  width: 43px;
  height: 43px;
  flex-basis: 43px;
  border-radius: 9px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 8px 24px rgba(38,79,224,.18);
}
html.sol2-mode .sol2-brand-copy {
  display: grid;
  align-content: center;
  justify-items: center;
  min-width: 122px;
  gap: 6px;
}
html.sol2-mode .tb-wordmark {
  position: relative;
  font-size: 27px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.075em;
}
html.sol2-mode .sol-word-terminal {
  position: absolute;
  right: -10px;
  bottom: 1px;
  width: 5px;
  height: 5px;
  margin: 0;
  transform: none;
}
html.sol2-mode .sol2-brand-descriptor {
  width: 100%;
  color: #98a3b1;
  font: 600 7.5px/1 'IBM Plex Mono', monospace;
  letter-spacing: .13em;
  text-align: center;
  text-transform: uppercase;
}
html.sol2-mode .sol2-brand-signal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  border: 1px solid #2d3742;
  border-radius: 2px;
  color: #7e8998;
  font: 600 7px/1 'IBM Plex Mono', monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}
html.sol2-mode .sol2-brand-signal i {
  width: 5px;
  height: 5px;
  background: #44c47a;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(68,196,122,.1);
}
html.sol2-mode .sol-identity .tb-div { height: 30px; }
html.sol2-mode .sol-identity .tb-venue {
  max-width: 128px;
  color: #a7afbb;
  font-size: 11px;
  font-weight: 550;
}

html.sol2-mode body .topbar .tb-week {
  grid-template-columns: 38px minmax(154px, 1fr) 38px;
  min-width: 270px;
  min-height: 52px;
  padding: 4px;
  background: #121922;
  border-color: #303b47;
  border-radius: 3px;
}
html.sol2-mode .sol-week-center { grid-template-rows: 12px 23px; }
html.sol2-mode .sol-week-kicker {
  color: var(--sol-brass);
  font-size: 7px;
  letter-spacing: .18em;
}
html.sol2-mode body .topbar .wk-label {
  color: #f4f6f8;
  font-size: 11px;
  font-weight: 600;
  line-height: 23px;
}
html.sol2-mode body .topbar .wk-btn {
  width: 38px;
  height: 42px;
  font-size: 19px;
}
html.sol2-mode .tb-actions { gap: 5px; }
html.sol2-mode .bug-report-btn { display: none; }
html.sol2-mode .sol-history-group {
  margin-inline: 2px;
  padding-inline: 5px;
  border-color: #313b46;
}
html.sol2-mode body .topbar :is(
  .theme-toggle, .btn-save2, .btn-strict, .btn-solve, .btn-pub,
  .btn-hist, .tb-more, .sb-restore, .sol-command-trigger
) { height: 38px; min-height: 38px; border-radius: 3px; }
html.sol2-mode body .topbar .btn-solve {
  min-width: 78px;
  background: var(--sol-accent) !important;
  border-color: var(--sol-accent) !important;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .09em;
}
html.sol2-mode body .topbar .btn-solve::after {
  content: '↗';
  margin-left: 9px;
  color: rgba(255,255,255,.68);
}
html.sol2-mode body .topbar .btn-pub.ready,
html.sol2-mode body .topbar .btn-pub.published { border-color: rgba(68,196,122,.46); }
html.sol2-mode .tb-user { gap: 6px; }

/* Light masthead is deliberately and completely light. */
html.sol2-mode.rd-light-mode body .topbar {
  background: #fbfaf6;
  border-color: #cecac1;
  box-shadow: inset 0 -2px #f0eee8;
}
html.sol2-mode.rd-light-mode body .topbar .tb-wordmark .sol-word-rota { color: #15181f; }
html.sol2-mode.rd-light-mode body .topbar .tb-wordmark .sol-word-done { color: #264fe0; }
html.sol2-mode.rd-light-mode .sol2-brand-descriptor { color: #747a84; }
html.sol2-mode.rd-light-mode .sol2-brand-signal {
  background: #f2f0ea;
  border-color: #d6d2ca;
  color: #626a75;
}
html.sol2-mode.rd-light-mode .sol-identity .tb-venue { color: #555c67; }
html.sol2-mode.rd-light-mode body .topbar .tb-week {
  background: #f0eee8;
  border-color: #d2cec5;
  box-shadow: inset 0 1px rgba(255,255,255,.8);
}
html.sol2-mode.rd-light-mode body .topbar .wk-label { color: #181b22; }
html.sol2-mode.rd-light-mode body .topbar .wk-btn:hover { background: #fffefa; color: #264fe0; }

/* Week runway ------------------------------------------------------------ */
html.sol2-mode .week-tabs {
  min-height: 59px;
  gap: 4px;
  padding: 0 16px 0 0;
  background: var(--sol-panel);
  border-bottom: 1px solid var(--sol-line);
}
html.sol2-mode .sol2-plan-anchor {
  align-self: stretch;
  width: 196px;
  min-width: 196px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 0 16px 0 18px;
  border-right: 1px solid var(--sol-line);
}
html.sol2-mode .sol2-plan-anchor span {
  color: var(--sol-brass);
  font: 600 7px/1 'IBM Plex Mono', monospace;
  letter-spacing: .15em;
}
html.sol2-mode .sol2-plan-anchor strong {
  color: var(--sol-ink);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -.025em;
}
html.sol2-mode .wtab {
  align-self: stretch;
  min-width: 72px;
  padding: 0 12px;
  border-bottom-width: 2px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .02em;
}
html.sol2-mode .wtab.active { color: var(--sol-ink); }
html.sol2-mode .wcount,
html.sol2-mode .wdup-btn { width: 27px; height: 27px; }
html.sol2-mode .wtab-sep { height: 22px; margin-inline: 7px; }
html.sol2-mode .sol2-plan-status {
  margin-left: auto;
  display: flex;
  align-items: center;
  align-self: stretch;
  gap: 0;
  border-left: 1px solid var(--sol-line);
}
html.sol2-mode .sol2-plan-status > span {
  height: 100%;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding-inline: 13px;
  border-right: 1px solid var(--sol-line);
  color: var(--sol-muted);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .055em;
  text-transform: uppercase;
  white-space: nowrap;
}
html.sol2-mode .sol2-plan-status b {
  color: var(--sol-ink);
  font: 600 10px/1 'IBM Plex Mono', monospace;
  letter-spacing: 0;
}
html.sol2-mode .sol2-plan-state i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
}
html.sol2-mode .sol2-plan-state.clear i { background: var(--green); }
html.sol2-mode .prog-strip { height: 2px; }

/* The week as a working horizon ----------------------------------------- */
html.sol2-mode .grid-wrap {
  background: var(--sol-cell);
  border-top: 0;
}
html.sol2-mode .gt { background: var(--sol-cell); }
html.sol2-mode :is(.g-corner, .g-rh, .g-role-row td, .g-os-h, .g-tasks-h, .g-ua-h) {
  min-width: 196px;
  width: 196px;
}
html.sol2-mode :is(.g-dh, .g-cell, .g-os-c, .g-tasks-c, .g-ua-c) {
  min-width: 172px;
}
html.sol2-mode .g-corner,
html.sol2-mode .g-dh {
  height: 84px;
  padding: 10px 15px;
  background: var(--sol-panel);
  border-color: var(--sol-line);
  vertical-align: top;
}
html.sol2-mode .g-corner {
  display: table-cell;
  position: sticky;
  left: 0;
  z-index: 26;
}
html.sol2-mode .g-corner::after { content: none; }
html.sol2-mode .g-corner .sb-toggle,
html.sol2-mode .g-corner .req-btn {
  height: 26px;
  min-width: 48px;
  padding: 0 8px;
  background: var(--sol-raised);
  border: 1px solid var(--sol-line);
  border-radius: 2px;
  color: var(--sol-muted);
  font-size: 8px;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
}
html.sol2-mode .sol2-grid-label {
  position: absolute;
  right: 15px;
  bottom: 15px;
  left: 15px;
  display: grid;
  gap: 4px;
}
html.sol2-mode .sol2-grid-label span {
  color: var(--sol-brass);
  font: 600 7px/1 'IBM Plex Mono', monospace;
  letter-spacing: .13em;
  text-transform: uppercase;
}
html.sol2-mode .sol2-grid-label b {
  color: var(--sol-ink);
  font-size: 12px;
  font-weight: 620;
  letter-spacing: -.02em;
}
html.sol2-mode .g-dh { border-top-width: 0; }
html.sol2-mode .g-dh.today {
  background: color-mix(in srgb, var(--sol-accent) 7%, var(--sol-panel));
  border-top: 0;
}
html.sol2-mode .g-dh.today::before {
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--sol-accent);
}
html.sol2-mode .g-dh.today::after {
  content: '';
  position: absolute;
  top: 0;
  right: 15px;
  width: 22px;
  height: 3px;
  background: var(--sol-brass);
}
html.sol2-mode .g-dh-day {
  color: var(--sol-muted);
  font-size: 8px;
  letter-spacing: .17em;
}
html.sol2-mode .g-dh-num {
  margin-top: 3px;
  color: var(--sol-ink);
  font-size: 28px;
  font-weight: 650;
  line-height: .9;
  letter-spacing: -.075em;
}
html.sol2-mode .g-dh.today .g-dh-num { color: var(--sol-accent); }
html.sol2-mode .g-dh-hrs {
  position: absolute;
  top: 38px;
  right: 14px;
  color: var(--sol-muted);
  font-size: 8px;
}
html.sol2-mode .sol2-day-index {
  position: absolute;
  top: 11px;
  right: 14px;
  color: var(--sol-faint);
  font: 600 7px/1 'IBM Plex Mono', monospace;
  letter-spacing: .11em;
}
html.sol2-mode .sol-cov {
  right: 14px;
  bottom: 14px;
  left: 67px;
  height: 25px;
}
html.sol2-mode .sol-cov svg { height: 24px; }
html.sol2-mode .sol-cov-line { stroke-width: 1.55; }
html.sol2-mode .sol-cov span { font-size: 8px; }

html.sol2-mode .g-role-row td {
  height: 35px;
  padding: 0 15px;
  background: color-mix(in srgb, var(--sol-raised) 72%, var(--sol-panel));
  border-color: var(--sol-line);
}
html.sol2-mode .g-role-divider {
  font-size: 8px;
  letter-spacing: .11em;
  text-transform: uppercase;
}
html.sol2-mode .g-role-divider .count { margin-left: auto; color: var(--sol-faint); }

html.sol2-mode .g-rh {
  position: sticky;
  left: 0;
  z-index: 12;
  height: 79px;
  padding: 12px 15px 18px;
  background: var(--sol-panel);
  border-color: var(--sol-line);
  vertical-align: top;
}
html.sol2-mode .g-rh::before {
  content: attr(data-sol2-row);
  position: absolute;
  top: 12px;
  right: 12px;
  color: var(--sol-faint);
  font: 500 7px/1 'IBM Plex Mono', monospace;
  letter-spacing: .1em;
}
html.sol2-mode .rh-inner { align-items: flex-start; }
html.sol2-mode .rh-bar { width: 3px; height: 34px; border-radius: 1px; }
html.sol2-mode .rh-name {
  max-width: 132px;
  color: #f8f9fb;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -.02em;
}
html.sol2-mode .rh-meta {
  margin-top: 4px;
  color: #abb5c2;
  font-size: 8.5px;
  font-weight: 500;
}
html.sol2-mode .sol2-row-util {
  position: absolute;
  right: 13px;
  bottom: 8px;
  left: 18px;
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 7px;
}
html.sol2-mode .sol2-row-util span {
  color: #8793a2;
  font: 550 7.5px/1 'IBM Plex Mono', monospace;
}
html.sol2-mode .sol2-row-util i {
  height: 2px;
  overflow: hidden;
  background: var(--sol-line);
}
html.sol2-mode .sol2-row-util b {
  display: block;
  height: 100%;
  background: var(--sol-accent);
}

html.sol2-mode .g-cell {
  height: 79px;
  padding: 6px;
  background: var(--sol-cell);
  border-color: var(--sol-line-soft);
}
html.sol2-mode #gt-body tr:nth-child(even) > .g-cell {
  background: color-mix(in srgb, var(--sol-raised) 16%, var(--sol-cell));
}
html.sol2-mode .g-cell.weekend {
  background: color-mix(in srgb, var(--sol-raised) 34%, var(--sol-cell));
}
html.sol2-mode .g-cell.today-col {
  background: color-mix(in srgb, var(--sol-accent) 7%, var(--sol-cell));
}
html.sol2-mode .g-cell:hover {
  background: color-mix(in srgb, var(--sol-accent) 10%, var(--sol-cell));
}
html.sol2-mode .g-cell > .chip:not(.ghost-chip) {
  position: relative;
  width: calc(100% - 2px);
  min-height: 48px;
  margin: 1px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: 15px 19px;
  align-content: center;
  gap: 1px 6px;
  padding: 7px 9px !important;
  background: color-mix(in srgb, currentColor 9%, var(--sol-raised)) !important;
  border: 1px solid color-mix(in srgb, currentColor 26%, var(--sol-line)) !important;
  border-left: 3px solid currentColor !important;
  border-radius: 2px !important;
}
html.sol2-mode .g-cell > .chip:not(.ghost-chip)::after {
  content: '';
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 4px;
  height: 4px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  opacity: .45;
}
html.sol2-mode .g-cell > .chip:not(.ghost-chip) .chip-time {
  grid-column: 1 / 3;
  grid-row: 1;
  color: #c8d0da;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .015em;
}
html.sol2-mode .g-cell > .chip:not(.ghost-chip) .chip-lbl {
  grid-column: 1 / 3;
  grid-row: 2;
  color: #fbfcfd;
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
}
html.sol2-mode .g-cell > .chip:not(.ghost-chip) .chip-lock {
  position: absolute;
  top: 6px;
  right: 7px;
  font-size: 8px;
}
html.sol2-mode .g-cell > .chip:not(.ghost-chip):hover {
  transform: translateX(2px);
  border-color: color-mix(in srgb, currentColor 55%, var(--sol-line)) !important;
}
html.sol2-mode .add-btn {
  right: 5px;
  bottom: 5px;
  width: 19px;
  height: 19px;
  border-radius: 2px;
  background: var(--sol-raised);
  border-color: var(--sol-line);
}

html.sol2-mode :is(.g-os-h, .g-os-c) { height: 132px; }
html.sol2-mode .g-os-h {
  position: sticky;
  left: 0;
  z-index: 12;
  padding: 14px 15px;
  background: color-mix(in srgb, var(--sol-accent) 5%, var(--sol-panel));
}
html.sol2-mode .g-os-label {
  display: flex;
  align-items: center;
  color: var(--sol-ink);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: -.01em;
  text-transform: none;
}
html.sol2-mode .g-os-label::before {
  content: 'QUEUE';
  margin-right: 8px;
  color: var(--sol-brass);
  font: 600 7px/1 'IBM Plex Mono', monospace;
  letter-spacing: .1em;
}
html.sol2-mode .g-os-c {
  padding: 7px;
  background: color-mix(in srgb, var(--sol-accent) 2.5%, var(--sol-cell));
  border-color: var(--sol-line-soft);
}
html.sol2-mode .sol-open-stack { max-height: 116px; }
html.sol2-mode :is(.os-chip, .ghost-chip) {
  min-height: 31px;
  border-radius: 2px !important;
}
html.sol2-mode .os-chip-name,
html.sol2-mode .ghost-chip .chip-lbl {
  color: #f3f5f8;
  font-size: 10.5px;
  font-weight: 650;
}
html.sol2-mode .os-chip-time,
html.sol2-mode .ghost-chip .chip-time {
  color: #b4bfcc;
  font-size: 9px;
  font-weight: 600;
}
html.sol2-mode .sol-open-empty :is(.g-os-h, .g-os-c) { height: 51px; }

/* Team inspector --------------------------------------------------------- */
html.sol2-mode .sidebar,
html.sol2-mode .sidebar.collapsed { width: 336px; }
html.sol2-mode .sidebar {
  background: #0f151c;
  border-left: 1px solid #34404c;
  box-shadow: -28px 0 70px rgba(0,0,0,.28);
  transition: transform .24s cubic-bezier(.22,.8,.28,1);
}
html.sol2-mode .sol-drawer-head {
  min-height: 66px;
  padding: 0 16px 0 18px;
  border-color: #2a343e;
  color: #f4f6f8;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -.035em;
}
html.sol2-mode .sol-drawer-head::before {
  content: 'TM / 01';
  position: absolute;
  top: 13px;
  left: 18px;
  color: var(--sol-brass);
  font: 600 7px/1 'IBM Plex Mono', monospace;
  letter-spacing: .13em;
}
html.sol2-mode .sol-drawer-head > span { transform: translateY(8px); }
html.sol2-mode .sol-drawer-head button {
  padding: 7px 9px;
  background: #171e27;
  border: 1px solid #303b47;
  border-radius: 2px;
  color: #8f99a7;
  font-size: 9px;
}
html.sol2-mode .sol2-team-readout {
  min-height: 67px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid #2a343e;
}
html.sol2-mode .sol2-team-readout span {
  display: grid;
  align-content: center;
  gap: 5px;
  padding-left: 16px;
  border-right: 1px solid #2a343e;
}
html.sol2-mode .sol2-team-readout span:last-child { border-right: 0; }
html.sol2-mode .sol2-team-readout b {
  color: #f2f4f7;
  font: 600 17px/1 'IBM Plex Mono', monospace;
}
html.sol2-mode .sol2-team-readout small {
  color: #677384;
  font-size: 7px;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
}
html.sol2-mode .sidebar .sb-sect { padding: 16px 16px 14px; border-color: #2a343e; }
html.sol2-mode .sidebar .sb-head {
  min-height: 27px;
  margin-bottom: 12px;
  color: #a4aebb;
  font-size: 8px;
  letter-spacing: .14em;
}
html.sol2-mode .sidebar .sb-head button {
  height: 27px;
  padding: 0 8px;
  background: #171e27;
  border: 1px solid #303b47;
  border-radius: 2px;
  color: #9bb0ff;
  font-size: 8.5px;
  font-weight: 650;
  letter-spacing: .02em;
}
html.sol2-mode .sidebar .sb-badge {
  min-width: 22px;
  padding: 3px 5px;
  background: #1a222c;
  border: 1px solid #2e3945;
  border-radius: 2px;
  color: #aab4c1;
  font-size: 8px;
  text-align: center;
}
html.sol2-mode .sidebar .role-chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: #29333e;
  border: 1px solid #29333e;
  border-radius: 2px;
}
html.sol2-mode .sidebar .role-chip {
  min-width: 0;
  min-height: 35px;
  justify-content: flex-start;
  padding: 0 9px;
  background: #121922 !important;
  border: 0 !important;
  border-radius: 0;
  color: #d7dde5 !important;
  font-size: 10px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
}
html.sol2-mode .sidebar .role-chip:hover { background: #1a222c !important; color: #fff !important; }
html.sol2-mode .sidebar .role-chip .dot { width: 5px; height: 17px; border-radius: 1px; }
html.sol2-mode .sidebar .role-edit-btn { margin-left: auto; color: #8490a0; }
html.sol2-mode .sol-staff-search { padding: 12px 13px 7px; }
html.sol2-mode .sol-staff-search input {
  height: 39px;
  padding-inline: 12px !important;
  background: #0c1218 !important;
  border-color: #303a46 !important;
  color: #eef1f5 !important;
  font-size: 11.5px;
}
html.sol2-mode .sol-staff-search input::placeholder { color: #697585; opacity: 1; }
html.sol2-mode .sidebar .staff-tools {
  min-height: 39px;
  padding: 6px 14px;
  border-color: #2a343e;
}
html.sol2-mode .sidebar .staff-tool-label {
  color: #788495;
  font-size: 8px;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
}
html.sol2-mode .sidebar .staff-group-toggle {
  height: 27px;
  padding: 0 8px;
  background: #171e27;
  border-color: #303a46;
  border-radius: 2px;
  color: #a9b3c0;
  font-size: 8.5px;
}
html.sol2-mode .sidebar .staff-group-toggle.on {
  background: rgba(85,119,255,.13);
  border-color: rgba(85,119,255,.4);
  color: #aebcff;
}
html.sol2-mode .sidebar .staff-list {
  gap: 0;
  padding: 4px 13px 14px;
}
html.sol2-mode .sidebar .staff-card {
  min-height: 61px;
  padding: 11px 8px 11px 12px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #27313b;
  border-radius: 0;
}
html.sol2-mode .sidebar .staff-card > div:first-child {
  top: 13px !important;
  bottom: 13px !important;
  width: 2px !important;
  border-radius: 1px !important;
}
html.sol2-mode .sidebar .staff-card:hover { background: #171f28; transform: none; }
html.sol2-mode .sidebar .sc-name {
  margin-bottom: 7px;
  color: #f5f7f9;
  font-size: 13.5px;
  font-weight: 650;
  letter-spacing: -.015em;
}
html.sol2-mode .sidebar .sc-meta { align-items: center; }
html.sol2-mode .sidebar .sc-badge {
  padding: 0;
  background: transparent !important;
  border-radius: 0;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .06em;
}
html.sol2-mode .sidebar .sc-type {
  padding: 0 0 0 7px;
  background: transparent;
  border: 0;
  border-left: 1px solid #37414d;
  border-radius: 0;
  color: #8d98a6;
  font-size: 8px;
}
html.sol2-mode .sidebar .sc-hrs {
  color: #b8c2ce;
  font-size: 8.5px;
  font-weight: 550;
}
html.sol2-mode .sidebar .staff-role-head {
  min-height: 31px;
  padding: 11px 2px 6px;
  color: #a5afbc;
  font-size: 8px;
  letter-spacing: .12em;
}
html.sol2-mode .sidebar .staff-role-dot { width: 5px; height: 13px; border-radius: 1px; }
html.sol2-mode .sidebar .staff-role-count { color: #7f8b9a; }
html.sol2-mode .sidebar .sb-footer {
  padding: 12px 16px;
  background: #0c1218;
  border-color: #2a343e;
}
html.sol2-mode .sidebar .tmpl-toggle-row span {
  color: #a1abb8;
  font-size: 8px;
  letter-spacing: .13em;
}
html.sol2-mode .sidebar .tmpl-item {
  min-height: 37px;
  padding: 6px 8px;
  background: #141b23;
  border-color: #2d3742;
  border-radius: 2px;
}
html.sol2-mode .sidebar .tmpl-name { color: #e9edf2; font-size: 10.5px; }
html.sol2-mode .sidebar .tmpl-time { color: #a6b0bd; font-size: 8.5px; }
html.sol2-mode .sidebar .add-tmpl-btn {
  min-height: 34px;
  border-color: #36414d;
  border-radius: 2px;
  color: #a8b3c0;
  font-size: 10px;
}

html.sol2-mode.rd-light-mode .sidebar {
  background: #f8f7f2;
  border-color: #cbc7be;
  box-shadow: -28px 0 70px rgba(32,35,42,.14);
}

/* The drawer closes by translating off-canvas, not by leaving the page, so
   it stays painted — and its shadow has a negative x offset, which means a
   closed drawer casts a 70px wash back across the right of the rota. That
   read as a vignette on the grid and baked itself into every screenshot of
   it. A closed drawer casts nothing. Both selectors carry more classes than
   the theme rules above, so this wins in either theme. */
html.sol2-mode .sidebar.collapsed,
html.sol2-mode.rd-light-mode .sidebar.collapsed { box-shadow: none; }
html.sol2-mode.rd-light-mode .sol-drawer-head,
html.sol2-mode.rd-light-mode .sol2-team-readout,
html.sol2-mode.rd-light-mode .sol2-team-readout span,
html.sol2-mode.rd-light-mode .sidebar :is(.sb-sect, .staff-tools) { border-color: #d7d3ca; }
html.sol2-mode.rd-light-mode .sol-drawer-head { color: #181b22; }
html.sol2-mode.rd-light-mode .sol-drawer-head button {
  background: #fffefa;
  border-color: #d2cec5;
  color: #626a75;
}
html.sol2-mode.rd-light-mode .sol2-team-readout b { color: #181b22; }
html.sol2-mode.rd-light-mode .sol2-team-readout small { color: #777c85; }
html.sol2-mode.rd-light-mode .sidebar .sb-head { color: #606773; }
html.sol2-mode.rd-light-mode .sidebar .sb-head button,
html.sol2-mode.rd-light-mode .sidebar .staff-group-toggle {
  background: #fffefa;
  border-color: #d1cdc4;
  color: #264fe0;
}
html.sol2-mode.rd-light-mode .sidebar .sb-badge {
  background: #ebe9e2;
  border-color: #d4d0c7;
  color: #5d646f;
}
html.sol2-mode.rd-light-mode .sidebar .role-chips {
  background: #d5d1c8;
  border-color: #d5d1c8;
}
html.sol2-mode.rd-light-mode .sidebar .role-chip {
  background: #fffefa !important;
  color: #262a32 !important;
}
html.sol2-mode.rd-light-mode .sidebar .role-chip:hover {
  background: #eceffc !important;
  color: #173fcf !important;
}
html.sol2-mode.rd-light-mode .sol-staff-search input {
  background: #fffefa !important;
  border-color: #d0ccc3 !important;
  color: #181b22 !important;
}
html.sol2-mode.rd-light-mode .sol-staff-search input::placeholder { color: #858991; }
html.sol2-mode.rd-light-mode .sidebar .staff-tool-label,
html.sol2-mode.rd-light-mode .sidebar .staff-role-head { color: #656c77; }
html.sol2-mode.rd-light-mode .sidebar .staff-card {
  border-color: #dedad2;
  background: transparent;
}
html.sol2-mode.rd-light-mode .sidebar .staff-card:hover { background: #eceae3; }
html.sol2-mode.rd-light-mode .sidebar .sc-name { color: #181b22; }
html.sol2-mode.rd-light-mode .sidebar .sc-type {
  border-color: #d3cfc6;
  color: #656c77;
}
html.sol2-mode.rd-light-mode .sidebar .sc-hrs { color: #4f5763; }
html.sol2-mode.rd-light-mode .sidebar .sb-footer {
  background: #f1efe9;
  border-color: #d4d0c7;
}
html.sol2-mode.rd-light-mode .sidebar .tmpl-toggle-row span { color: #5e6570; }
html.sol2-mode.rd-light-mode .sidebar .tmpl-item {
  background: #fffefa;
  border-color: #d4d0c7;
}
html.sol2-mode.rd-light-mode .sidebar .tmpl-name { color: #22262e; }
html.sol2-mode.rd-light-mode .sidebar .tmpl-time { color: #59616d; }
html.sol2-mode.rd-light-mode .sidebar .add-tmpl-btn { border-color: #c8c4ba; color: #515965; }

html.sol2-mode.rd-light-mode .rh-name { color: #15181f; }
html.sol2-mode.rd-light-mode .rh-meta { color: #59616c; }
html.sol2-mode.rd-light-mode .sol2-row-util span { color: #68717e; }
html.sol2-mode.rd-light-mode .g-cell > .chip:not(.ghost-chip) .chip-time { color: #46505d; }
html.sol2-mode.rd-light-mode .g-cell > .chip:not(.ghost-chip) .chip-lbl { color: #171a21; }
html.sol2-mode.rd-light-mode .os-chip-name,
html.sol2-mode.rd-light-mode .ghost-chip .chip-lbl { color: #20242b; }
html.sol2-mode.rd-light-mode .os-chip-time,
html.sol2-mode.rd-light-mode .ghost-chip .chip-time { color: #515b68; }

/* Labour control dock ---------------------------------------------------- */
html.sol2-mode .bot {
  background: var(--sol-panel);
  border-color: var(--sol-line);
}
html.sol2-mode .bot.collapsed { height: 48px; min-height: 48px; max-height: 48px; }
html.sol2-mode .bot.collapsed .bot-hdr { height: 48px; }
html.sol2-mode .bot:not(.collapsed) { min-height: 220px; }
html.sol2-mode .bot-hdr {
  height: 48px;
  padding: 0 18px;
  border-bottom: 1px solid var(--sol-line);
}
html.sol2-mode .bot-title {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--sol-ink);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .035em;
}
html.sol2-mode .bot-title span {
  color: var(--sol-brass);
  font: 600 7px/1 'IBM Plex Mono', monospace;
  letter-spacing: .12em;
}
html.sol2-mode .bot-hdr-extras {
  position: absolute;
  top: 8px;
  right: 49px;
  z-index: 9;
  padding: 0 !important;
}
html.sol2-mode .bot.collapsed .bot-hdr-extras { display: none !important; }
html.sol2-mode .rev-toggle {
  height: 30px;
  padding: 0 9px;
  border-radius: 2px;
  font-size: 8px;
}
html.sol2-mode .bot-body {
  display: grid;
  grid-template-columns: repeat(4, minmax(92px, 126px)) minmax(310px, 1fr);
  align-items: stretch;
  gap: 0;
  padding: 20px 18px 18px;
}
html.sol2-mode .lab-stat {
  min-width: 0;
  display: grid;
  align-content: center;
  justify-items: start;
  padding: 6px 16px;
  border-right: 1px solid var(--sol-line);
  text-align: left;
}
html.sol2-mode .lab-stat:first-child { padding-left: 0; }
html.sol2-mode .lab-val {
  color: var(--sol-ink);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -.06em;
}
html.sol2-mode .lab-lbl {
  margin-top: 7px;
  color: var(--sol-faint);
  font-size: 7px;
  font-weight: 650;
  letter-spacing: .11em;
}
html.sol2-mode .lab-target-row { margin-top: 5px; }
html.sol2-mode .day-bars {
  height: 92px;
  padding: 7px 0 0 22px;
  gap: 8px;
}
html.sol2-mode .db-bar {
  border-radius: 1px 1px 0 0;
  background: var(--sol-accent);
}
html.sol2-mode :is(.rev-row, .covers-row, .lab-role-row) {
  grid-column: 1 / -1;
  border-color: var(--sol-line);
}
html.sol2-mode .baseline-bar {
  min-height: 35px;
  padding-inline: 18px;
  background: color-mix(in srgb, var(--sol-raised) 55%, var(--sol-panel));
  border-color: var(--sol-line);
}

/* Deep surfaces inherit the same architectural language. */
html.sol2-mode :is(.modal, .tool-panel, .tkp-body, .fr-guide, .tb-menu, .wdup-menu) {
  border-radius: 4px;
  border-color: var(--sol-line);
  box-shadow: 0 28px 80px rgba(0,0,0,.4);
}
html.sol2-mode .modal { border-top: 2px solid var(--sol-accent); }
html.sol2-mode .m-hdr { padding-top: 18px; }
html.sol2-mode .m-title { font-size: 15px; letter-spacing: -.025em; }

/* Team member detail ----------------------------------------------------- */
html.sol2-mode #m-edit-staff .modal {
  width: min(650px, calc(100vw - 32px));
  max-width: 650px;
  max-height: min(900px, 92vh);
  overflow: hidden;
  background: #10161d;
  border-color: #36414c;
  border-top-color: var(--sol-accent);
}
html.sol2-mode #m-edit-staff .m-hdr {
  min-height: 63px;
  align-items: center;
  padding: 0 20px;
  background: #0d1319;
  border-bottom: 1px solid #2b3540;
}
html.sol2-mode #m-edit-staff .m-title {
  display: grid;
  gap: 5px;
  color: #f5f7f9;
  font-size: 16px;
  font-weight: 650;
}
html.sol2-mode #m-edit-staff .m-title span {
  color: var(--sol-brass);
  font: 600 7px/1 'IBM Plex Mono', monospace;
  letter-spacing: .14em;
}
html.sol2-mode #m-edit-staff .m-close {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  background: #171e27;
  border: 1px solid #303b47;
  border-radius: 2px;
  color: #9ca7b5;
  font-size: 17px;
}
html.sol2-mode .sol2-es-hero {
  min-height: 94px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 84px 84px;
  align-items: center;
  gap: 15px;
  padding: 0 20px;
  background: #131a22;
  border-bottom: 1px solid #2b3540;
}
html.sol2-mode .sol2-es-avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: rgba(85,119,255,.12);
  border: 1px solid rgba(85,119,255,.38);
  border-radius: 3px;
  color: #aebcff;
  font: 650 14px/1 'IBM Plex Mono', monospace;
  letter-spacing: .04em;
}
html.sol2-mode .sol2-es-person {
  min-width: 0;
  display: grid;
  gap: 3px;
}
html.sol2-mode .sol2-es-person small,
html.sol2-mode .sol2-es-metric small {
  color: #748091;
  font-size: 7px;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
}
html.sol2-mode .sol2-es-name {
  overflow: hidden;
  color: #f7f8fa;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html.sol2-mode .sol2-es-role { color: #abb5c2; font-size: 10px; }
html.sol2-mode .sol2-es-metric {
  min-height: 49px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding-left: 14px;
  border-left: 1px solid #303a45;
}
html.sol2-mode .sol2-es-metric b {
  color: #f1f3f6;
  font: 600 16px/1 'IBM Plex Mono', monospace;
}
html.sol2-mode #m-edit-staff .m-body {
  counter-reset: sol2-es-section;
  max-height: calc(92vh - 157px) !important;
  background: #10161d;
  scrollbar-color: #34404c transparent;
}
html.sol2-mode #m-edit-staff .es-invite-strip {
  padding: 11px 20px;
  background: #151d26;
  border-color: #2e3945;
  color: #c3cbd5;
}
html.sol2-mode #m-edit-staff .es-section {
  counter-increment: sol2-es-section;
  padding: 19px 20px 20px;
  border-color: #2b3540;
}
html.sol2-mode #m-edit-staff .es-section-h {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  color: #aab4c1;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .13em;
}
html.sol2-mode #m-edit-staff .es-section-h::before {
  content: '0' counter(sol2-es-section);
  color: var(--sol-brass);
  font: 600 7px/1 'IBM Plex Mono', monospace;
  letter-spacing: .06em;
}
html.sol2-mode #m-edit-staff .fg { margin-bottom: 16px; }
html.sol2-mode #m-edit-staff .fg > label {
  margin-bottom: 7px;
  color: #c3cbd5;
  font-size: 10px;
  font-weight: 600;
}
html.sol2-mode #m-edit-staff :is(input[type='text'], input[type='number'], select) {
  min-height: 40px;
  padding-inline: 11px;
  background: #0b1117 !important;
  border-color: #333e49 !important;
  border-radius: 2px !important;
  color: #f3f5f7 !important;
  font-size: 12px;
}
html.sol2-mode #m-edit-staff .fhint {
  margin-top: 7px;
  color: #7f8b9a;
  font-size: 9px;
  line-height: 1.45;
}
html.sol2-mode #m-edit-staff .day-togs { gap: 3px; }
html.sol2-mode #m-edit-staff .day-tog {
  min-height: 39px;
  padding: 0 7px;
  background: #141b23;
  border-color: #303a46;
  border-radius: 2px;
  color: #929dac;
  font-size: 9px;
  font-weight: 650;
}
html.sol2-mode #m-edit-staff .day-tog.on {
  background: rgba(85,119,255,.13);
  border-color: rgba(85,119,255,.5);
  color: #aebcff;
}
html.sol2-mode #m-edit-staff .es-sect-toggle { min-height: 23px; }
html.sol2-mode #m-edit-staff .es-sect-toggle .es-section-h { margin: 0; }
html.sol2-mode #m-edit-staff .es-chev { color: #8c98a7; }
html.sol2-mode #m-edit-staff .check-row,
html.sol2-mode #m-edit-staff .elig-radio-row {
  min-height: 36px;
  padding: 6px 8px;
  background: #141b23;
  border-bottom: 1px solid #2a343e;
  color: #c8d0da;
  font-size: 11px;
}
html.sol2-mode #m-edit-staff :is(input[type='checkbox'], input[type='radio']) {
  accent-color: var(--sol-accent);
}
html.sol2-mode #m-edit-staff .elig-radios {
  overflow: hidden;
  border: 1px solid #2f3944;
  border-radius: 2px;
}
html.sol2-mode #m-edit-staff .elig-tmpl-list {
  gap: 0;
  margin-top: 8px;
  border: 1px solid #2f3944;
  border-radius: 2px;
}
html.sol2-mode #m-edit-staff .elig-tmpl-item {
  min-height: 38px;
  padding: 7px 9px;
  border-bottom: 1px solid #2a343e;
  color: #d5dbe3;
}
html.sol2-mode #m-edit-staff .elig-tmpl-item:last-child { border-bottom: 0; }
html.sol2-mode #m-edit-staff .es-footer {
  min-height: 61px;
  gap: 7px;
  padding: 10px 20px;
  background: #0d1319;
  border-color: #303a45;
}
html.sol2-mode #m-edit-staff .es-footer button {
  min-height: 38px;
  border-radius: 2px;
  font-size: 10px;
  font-weight: 650;
}
html.sol2-mode #m-edit-staff .es-footer .btn-primary {
  background: var(--sol-accent);
  border-color: var(--sol-accent);
  color: #fff;
}
html.sol2-mode #m-edit-staff .es-remove-btn {
  background: transparent;
  border-color: rgba(229,83,75,.38);
  color: #ef7e78;
}

html.sol2-mode.rd-light-mode #m-edit-staff .modal,
html.sol2-mode.rd-light-mode #m-edit-staff .m-body { background: #fbfaf6; }
html.sol2-mode.rd-light-mode #m-edit-staff .m-hdr,
html.sol2-mode.rd-light-mode #m-edit-staff .es-footer {
  background: #f1efe9;
  border-color: #d4d0c7;
}
html.sol2-mode.rd-light-mode #m-edit-staff .es-invite-strip {
  background: #eef1ff;
  border-color: #cfd7f4;
  color: #26304f;
}
html.sol2-mode.rd-light-mode #m-edit-staff .es-inv-email { color: #20263a; }
html.sol2-mode.rd-light-mode #m-edit-staff .es-inv-status { color: #5d6678; }
html.sol2-mode.rd-light-mode #m-edit-staff .es-invite-strip button {
  background: #fffefa !important;
  border-color: #aebcf0 !important;
  color: #264fe0 !important;
}
html.sol2-mode.rd-light-mode #m-edit-staff .m-title,
html.sol2-mode.rd-light-mode .sol2-es-name { color: #171a21; }
html.sol2-mode.rd-light-mode #m-edit-staff .m-close {
  background: #fffefa;
  border-color: #d1cdc4;
  color: #59616d;
}
html.sol2-mode.rd-light-mode .sol2-es-hero {
  background: #f5f3ed;
  border-color: #d5d1c8;
}
html.sol2-mode.rd-light-mode .sol2-es-avatar {
  background: rgba(38,79,224,.08);
  border-color: rgba(38,79,224,.3);
  color: #264fe0;
}
html.sol2-mode.rd-light-mode .sol2-es-role { color: #59616d; }
html.sol2-mode.rd-light-mode .sol2-es-metric { border-color: #d5d1c8; }
html.sol2-mode.rd-light-mode .sol2-es-metric b { color: #1c2027; }
html.sol2-mode.rd-light-mode #m-edit-staff .es-section { border-color: #d8d4cb; }
html.sol2-mode.rd-light-mode #m-edit-staff .es-section-h { color: #59616d; }
html.sol2-mode.rd-light-mode #m-edit-staff .fg > label { color: #383d46; }
html.sol2-mode.rd-light-mode #m-edit-staff :is(input[type='text'], input[type='number'], select) {
  background: #fffefa !important;
  border-color: #ccc8bf !important;
  color: #171a21 !important;
}
html.sol2-mode.rd-light-mode #m-edit-staff .day-tog,
html.sol2-mode.rd-light-mode #m-edit-staff :is(.check-row, .elig-radio-row) {
  background: #fffefa;
  border-color: #d5d1c8;
  color: #414751;
}
html.sol2-mode.rd-light-mode #m-edit-staff .day-tog.on {
  background: #e9edff;
  border-color: #aab8ee;
  color: #264fe0;
}
html.sol2-mode.rd-light-mode #m-edit-staff :is(.elig-radios, .elig-tmpl-list) { border-color: #d3cfc6; }
html.sol2-mode.rd-light-mode #m-edit-staff .elig-tmpl-item {
  border-color: #ddd9d0;
  color: #343942;
}

/* Legibility system ------------------------------------------------------
   Tactical labels are tertiary, never microscopic. Working data has a
   consistent floor and stronger contrast across the complete Sol 2 app. */
html.sol2-mode :is(
  .sol2-brand-descriptor,
  .sol2-brand-signal,
  .sol-week-kicker,
  .sol2-plan-anchor span,
  .sol2-grid-label span,
  .sol2-day-index,
  .sol2-team-readout small,
  .bot-title span,
  #m-edit-staff .m-title span,
  .sol2-es-person small,
  .sol2-es-metric small
) { font-size: 9px; }
html.sol2-mode .g-rh::before,
html.sol2-mode .sol-drawer-head::before,
html.sol2-mode #m-edit-staff .es-section-h::before { font-size: 9px; }

html.sol2-mode :is(
  .sol2-plan-status > span,
  .g-dh-day,
  .g-dh-hrs,
  .sol-cov span,
  .g-role-divider,
  .sol2-row-util span,
  .sidebar .sb-head,
  .sidebar .sb-badge,
  .sidebar .staff-tool-label,
  .sidebar .staff-role-head,
  .sidebar .sc-badge,
  .sidebar .sc-type,
  .sidebar .sc-hrs,
  .sidebar .tmpl-time,
  .sidebar .tmpl-toggle-row span,
  .bot-title,
  .lab-lbl,
  .db-lbl,
  .db-cost,
  .sol-labour-glance,
  .sol-command-index,
  .sol-command-group,
  .sol-command-head button,
  .sol-command-option kbd,
  .sol-command-arrow,
  .sol-command-foot kbd,
  #m-edit-staff .es-section-h
) { font-size: 9.5px; }

html.sol2-mode :is(
  .wtab,
  .wcount,
  .wtab-weeks-lbl,
  .sidebar .sb-head button,
  .sidebar .staff-group-toggle,
  .sidebar .tmpl-name,
  .sidebar .add-tmpl-btn,
  .rev-toggle,
  .bl-status,
  .bl-btn,
  .g-task-time,
  .g-task-name,
  .sol-command-copy small,
  .sol-command-foot,
  #m-edit-staff .fhint
) { font-size: 10px; }

html.sol2-mode :is(
  .topbar button,
  .week-tabs button,
  .sidebar button,
  .tb-menu button,
  .modal button,
  .tool-panel button
) { font-size: max(10px, 0.625rem); }

html.sol2-mode .sidebar .sc-badge { color: #dce2e9 !important; }
html.sol2-mode .sidebar .staff-role-head,
html.sol2-mode .sidebar .staff-tool-label,
html.sol2-mode .sidebar .tmpl-toggle-row span { color: #aeb8c5; }
html.sol2-mode .lab-lbl,
html.sol2-mode .db-lbl,
html.sol2-mode .db-cost { color: #98a4b2; }
html.sol2-mode .sol-labour-glance { color: #9da8b5; }
html.sol2-mode .sol-labour-glance b { font-size: 11px; }
html.sol2-mode .sol-command-group { color: #8e9aaa; }
html.sol2-mode .sol-command-copy small { color: #9ba6b4; }
html.sol2-mode .sol-command-foot { color: #8d98a7; }

html.sol2-mode.rd-light-mode .sidebar .sc-badge { color: #343a44 !important; }
html.sol2-mode.rd-light-mode .sidebar .staff-role-head,
html.sol2-mode.rd-light-mode .sidebar .staff-tool-label,
html.sol2-mode.rd-light-mode .sidebar .tmpl-toggle-row span { color: #555d69; }
html.sol2-mode.rd-light-mode .lab-lbl,
html.sol2-mode.rd-light-mode .db-lbl,
html.sol2-mode.rd-light-mode .db-cost { color: #59616d; }
html.sol2-mode.rd-light-mode .sol-labour-glance { color: #5c6470; }

/* Presence and affordance, never decorative drift. */
html.sol2-mode body.sol2-ready .main {
  animation: sol2-workspace-in .24s cubic-bezier(.2,.75,.3,1) both;
}
@keyframes sol2-workspace-in {
  from { opacity: .72; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}
html.sol2-mode .chip,
html.sol2-mode .staff-card { transition: background-color .12s ease, border-color .12s ease, transform .12s ease; }

@media (max-width: 1380px) {
  html.sol2-mode .sol-identity { min-width: 238px; }
  html.sol2-mode .sol2-brand-signal,
  html.sol2-mode .sol-identity .tb-div,
  html.sol2-mode .sol-identity .tb-venue { display: none; }
  html.sol2-mode .sol2-plan-status > span { padding-inline: 9px; }
}

@media (max-width: 1180px) {
  html.sol2-mode .sol2-plan-status > span:nth-child(2) { display: none; }
  html.sol2-mode .sol2-plan-anchor { width: 170px; min-width: 170px; }
  html.sol2-mode body .topbar .tb-week { min-width: 218px; grid-template-columns: 32px minmax(132px,1fr) 32px; }
  html.sol2-mode :is(.g-corner, .g-rh, .g-role-row td, .g-os-h, .g-tasks-h, .g-ua-h) { min-width: 180px; width: 180px; }
  html.sol2-mode :is(.g-dh, .g-cell, .g-os-c, .g-tasks-c, .g-ua-c) { min-width: 158px; }
}

@media (max-width: 900px) and (min-width: 769px) {
  html.sol2-mode body .topbar { height: 68px; }
  html.sol2-mode .sol-identity { min-width: 92px; }
  html.sol2-mode .sol-brand-mark { width: 36px; height: 36px; flex-basis: 36px; }
  html.sol2-mode .sol2-brand-descriptor { display: none; }
  html.sol2-mode .tb-wordmark { font-size: 19px; }
  html.sol2-mode .sol2-plan-status { display: none; }
  html.sol2-mode .sol2-plan-anchor { width: 150px; min-width: 150px; }
}

@media (max-width: 768px) {
  html.sol2-mode body .topbar { height: 54px; padding-inline: 8px; gap: 6px; }
  html.sol2-mode .sol-identity { min-width: 76px; gap: 6px; }
  html.sol2-mode .sol-brand-mark { display: block; width: 31px; height: 31px; flex-basis: 31px; }
  html.sol2-mode .sol2-brand-copy { display: none; }
  html.sol2-mode body .topbar .tb-week {
    min-width: 150px;
    min-height: 40px;
    grid-template-columns: 26px minmax(94px,1fr) 26px;
  }
  html.sol2-mode body .topbar .wk-btn { width: 26px; height: 32px; }
  html.sol2-mode .sol-week-kicker { display: none; }
  html.sol2-mode .sol-week-center { display: block; }
  html.sol2-mode .sol2-plan-anchor { width: 128px; min-width: 128px; padding-left: 12px; }
  html.sol2-mode .sol2-plan-status { display: none; }
  html.sol2-mode .week-tabs { min-height: 50px; overflow-x: auto; }
  html.sol2-mode .sidebar,
  html.sol2-mode .sidebar.collapsed { width: 300px; }
  html.sol2-mode :is(.g-corner, .g-rh, .g-role-row td, .g-os-h, .g-tasks-h, .g-ua-h) { min-width: 164px; width: 164px; }
  html.sol2-mode :is(.g-dh, .g-cell, .g-os-c, .g-tasks-c, .g-ua-c) { min-width: 148px; }
  html.sol2-mode .g-corner,
  html.sol2-mode .g-dh { height: 76px; }
  html.sol2-mode .g-dh-num { font-size: 25px; }
  html.sol2-mode .bot-body { grid-template-columns: repeat(2, 1fr); }
  html.sol2-mode .day-bars { grid-column: 1 / -1; padding-left: 0; }
  html.sol2-mode .sol-labour-glance { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html.sol2-mode body.sol2-ready .main { animation: none; }
}

/* Mobile operating mode ==================================================
   Phones get a day-focused vertical workspace. Tablets retain the complete
   week canvas above; no desktop interaction is removed or forked. */
.sol2-mobile-day-head,
.sol2-mobile-top-actions,
.sol2-mobile-dock,
.sol2-mobile-labour-shade { display: none; }

@media (max-width: 768px) and (orientation: portrait) {
  html.sol2-mode .orient-prompt { display: none !important; }
}

/* ── The phone scroll model ─────────────────────────────────────────────
 * Exactly one element owns vertical scroll at any moment. Everything else
 * is pinned. Read this before adding another overflow rule.
 *
 *   html, body      never scroll. They are the fixed app shell: 100dvh,
 *                   overflow hidden, flex column. This is what stops the
 *                   page moving under an open sheet.
 *   .grid-wrap      owns vertical scroll in PORTRAIT. Horizontal is off
 *                   (table-layout is fixed and one day is shown), so
 *                   there is no second axis to fight over.
 *   .sol2-agenda-list  owns vertical scroll in LANDSCAPE. The grid is not
 *                   rendered at all there, so the two never compete.
 *   sheets/modals   #m-req, #m-edit-staff, .bot and the team sidebar each
 *                   scroll internally with overscroll-behavior: contain,
 *                   so a flick at their end never chains to the shell.
 *
 * Horizontal swipe changes the day, and only when it is decisively
 * horizontal (see solui2.js) — vertical intent always wins.
 */
@media (max-width: 700px), (max-height: 520px) and (pointer: coarse) {
  html.sol2-mode,
  html.sol2-mode body {
    width: 100%;
    height: 100%;
    height: 100dvh;
    overflow: hidden;
  }
  html.sol2-mode body {
    display: flex;
    flex-direction: column;
    background: var(--sol-canvas);
    overscroll-behavior: none;
    touch-action: manipulation;
  }
  html.sol2-mode :is(
    button,
    a,
    [role='button'],
    [role='tab'],
    .chip,
    .os-chip,
    .ghost-chip,
    .staff-card,
    .role-chip
  ) {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  html.sol2-mode :is(input, select, textarea) {
    font-size: 16px !important;
    touch-action: manipulation;
  }
  html.sol2-mode .orient-prompt { display: none !important; }

  html.sol2-mode .demo-banner {
    min-height: 30px;
    padding: 4px 9px !important;
    font-size: 10px !important;
  }
  html.sol2-mode .demo-banner a { padding: 4px 7px !important; }

  html.sol2-mode body .topbar {
    position: relative;
    width: 100%;
    height: 56px;
    min-height: 56px;
    padding: 0 10px;
    gap: 8px;
    flex: 0 0 56px;
    background: #0c1218;
    border-color: #29333e;
    box-shadow: none;
  }
  html.sol2-mode body .topbar::after { left: 10px; width: 66px; }
  html.sol2-mode .topbar > :is(
    #mobile-sidebar-toggle,
    .tb-week,
    .sb-restore,
    .sol-command-trigger,
    .tb-actions,
    .tb-user,
    .tb-div
  ) { display: none !important; }
  html.sol2-mode .sol-identity {
    min-width: 0;
    gap: 8px;
  }
  html.sol2-mode .sol-brand-mark {
    display: block;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 7px;
  }
  html.sol2-mode .sol2-brand-copy {
    min-width: 96px;
    display: grid;
    gap: 4px;
  }
  html.sol2-mode .tb-wordmark { display: inline-flex; font-size: 20px; }
  html.sol2-mode .sol-word-terminal {
    right: -8px;
    bottom: 1px;
    width: 4px;
    height: 4px;
  }
  html.sol2-mode .sol2-brand-descriptor { font-size: 8.5px; letter-spacing: .06em; }
  html.sol2-mode .sol2-brand-signal,
  html.sol2-mode .sol-identity .tb-venue { display: none; }
  html.sol2-mode .sol2-mobile-top-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  html.sol2-mode .sol2-mobile-save-state {
    max-width: 72px;
    overflow: hidden;
    color: #8f9aa8;
    font: 550 9px/1 'IBM Plex Mono', monospace;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  html.sol2-mode .sol2-mobile-save-state.ok { color: #64d293; }
  html.sol2-mode .sol2-mobile-save-state.err { color: #ef7973; }
  html.sol2-mode .sol2-mobile-publish {
    min-width: 68px;
    height: 36px;
    padding: 0 10px;
    background: #151c25;
    border: 1px solid #303b47;
    border-radius: 3px;
    color: #747f8e;
    font-size: 10px;
    font-weight: 650;
  }
  html.sol2-mode .sol2-mobile-publish.ready {
    background: rgba(55,185,110,.1);
    border-color: rgba(55,185,110,.42);
    color: #72d99f;
  }
  html.sol2-mode .sol2-mobile-publish:disabled { opacity: .55; }

  html.sol2-mode .app,
  html.sol2-mode .demo-banner ~ .app {
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    width: 100%;
    min-height: 0;
    flex: 1 1 0;
    overflow: hidden;
  }
  html.sol2-mode .main {
    width: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  html.sol2-mode .sol2-mobile-day-head {
    position: relative;
    display: block;
    flex: 0 0 auto;
    background: var(--sol-panel);
    border-bottom: 1px solid var(--sol-line);
  }
  html.sol2-mode .sol2-mobile-context {
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 12px 8px;
  }
  html.sol2-mode .sol2-mobile-context > div:first-child {
    min-width: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: baseline;
    gap: 3px 9px;
  }
  html.sol2-mode .sol2-mobile-context small {
    grid-column: 1;
    color: var(--sol-brass);
    font: 650 9px/1 'IBM Plex Mono', monospace;
    letter-spacing: .12em;
    text-transform: uppercase;
  }
  html.sol2-mode .sol2-mobile-day-title {
    grid-column: 1 / -1;
    overflow: hidden;
    color: var(--sol-ink);
    font-size: 20px;
    font-weight: 650;
    line-height: 1.05;
    letter-spacing: -.04em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  html.sol2-mode .sol2-mobile-day-meta {
    grid-column: 2;
    grid-row: 1;
    overflow: hidden;
    color: var(--sol-muted);
    font: 550 9.5px/1 'IBM Plex Mono', monospace;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  html.sol2-mode .sol2-mobile-day-step {
    display: grid;
    grid-template-columns: repeat(2, 42px);
    gap: 4px;
    flex: 0 0 auto;
  }
  html.sol2-mode .sol2-mobile-day-step button {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    background: var(--sol-raised);
    border: 1px solid var(--sol-line);
    border-radius: 3px;
    color: var(--sol-ink);
    font-size: 21px;
  }
  html.sol2-mode .sol2-mobile-days {
    height: 57px;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    padding: 0 7px 7px;
    gap: 2px;
  }
  html.sol2-mode .sol2-mobile-day {
    position: relative;
    min-width: 0;
    display: grid;
    grid-template-rows: 12px 18px;
    place-content: center;
    gap: 2px;
    padding: 4px 1px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 3px;
    color: var(--sol-muted);
  }
  html.sol2-mode .sol2-mobile-day b {
    font: 650 9px/1 'IBM Plex Mono', monospace;
    letter-spacing: .07em;
    text-transform: uppercase;
  }
  html.sol2-mode .sol2-mobile-day span {
    color: var(--sol-ink);
    font: 600 14px/1 'IBM Plex Mono', monospace;
  }
  html.sol2-mode .sol2-mobile-day i {
    position: absolute;
    top: 3px;
    right: 3px;
    min-width: 12px;
    height: 12px;
    display: grid;
    place-items: center;
    background: var(--sol-raised);
    border-radius: 2px;
    color: var(--sol-faint);
    font: 600 8.5px/1 'IBM Plex Mono', monospace;
    font-style: normal;
  }
  html.sol2-mode .sol2-mobile-day.active {
    background: var(--sol-accent-wash);
    border-color: color-mix(in srgb, var(--sol-accent) 44%, var(--sol-line));
    color: var(--sol-accent);
  }
  html.sol2-mode .sol2-mobile-day.active::after {
    content: '';
    position: absolute;
    right: 4px;
    bottom: -1px;
    left: 4px;
    height: 2px;
    background: var(--sol-accent);
  }
  html.sol2-mode .sol2-mobile-day.active i { background: var(--sol-accent); color: #fff; }
  html.sol2-mode .sol2-mobile-week-nav {
    min-height: 30px;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 64px;
    align-items: center;
    background: color-mix(in srgb, var(--sol-raised) 58%, var(--sol-panel));
    border-top: 1px solid var(--sol-line);
  }
  html.sol2-mode .sol2-mobile-week-nav button {
    align-self: stretch;
    padding: 0 7px;
    background: transparent;
    border: 0;
    color: var(--sol-muted);
    font-size: 9px;
    font-weight: 650;
  }
  html.sol2-mode .sol2-mobile-range {
    overflow: hidden;
    color: var(--sol-muted);
    font: 550 9px/1 'IBM Plex Mono', monospace;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html.sol2-mode .week-tabs {
    min-height: 42px;
    height: 42px;
    padding: 0 8px;
    gap: 2px;
    overflow-x: auto;
    overflow-y: hidden;
    flex: 0 0 42px;
    scrollbar-width: none;
    touch-action: pan-x;
  }
  html.sol2-mode .week-tabs::-webkit-scrollbar { display: none; }
  html.sol2-mode .sol2-plan-anchor,
  html.sol2-mode .sol2-plan-status { display: none; }
  html.sol2-mode .wtab {
    min-width: 60px;
    padding-inline: 8px;
    font-size: 10px;
  }
  html.sol2-mode .wtab-sep { margin-inline: 4px; }
  html.sol2-mode .wtab-weeks-lbl { display: none; }
  html.sol2-mode .wcount,
  html.sol2-mode .wdup-btn { width: 30px; min-width: 30px; height: 30px; }
  html.sol2-mode :is(.sanity-strip, .prob-bay, .solve-err, .conflict-bar) {
    max-height: 30vh;
    overflow-y: auto;
    flex: 0 0 auto;
  }

  /* This is the key mobile behavior: one day, one vertical scroll axis. */
  html.sol2-mode .grid-wrap {
    min-width: 0;
    min-height: 0;
    flex: 1 1 0;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: none;
    overscroll-behavior-y: contain;
    touch-action: pan-y pinch-zoom;
    scrollbar-width: thin;
  }
  html.sol2-mode .gt {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    touch-action: pan-y pinch-zoom;
  }
  html.sol2-mode .sol2-mobile-hidden { display: none !important; }
  html.sol2-mode :is(.g-corner, .g-rh, .g-os-h, .g-tasks-h, .g-ua-h) {
    width: 44%;
    min-width: 0;
    max-width: none;
  }
  html.sol2-mode :is(.g-dh, .g-cell, .g-os-c, .g-tasks-c, .g-ua-c) {
    width: 56%;
    min-width: 0;
    max-width: none;
  }
  html.sol2-mode .g-role-row td {
    width: 100%;
    min-width: 0;
  }
  html.sol2-mode .g-corner,
  html.sol2-mode .g-dh {
    top: 0;
    height: 76px;
    padding: 10px;
  }
  html.sol2-mode .g-corner {
    left: 0;
    vertical-align: middle;
  }
  html.sol2-mode .g-corner > :is(.sb-toggle, .req-btn) { display: none; }
  html.sol2-mode .sol2-grid-label {
    position: static;
    display: grid;
    gap: 5px;
  }
  html.sol2-mode .sol2-grid-label span { font-size: 9px; }
  html.sol2-mode .sol2-grid-label b { font-size: 12px; }
  html.sol2-mode .g-dh-day { font-size: 9px; }
  html.sol2-mode .g-dh-num { margin-top: 4px; font-size: 28px; }
  html.sol2-mode .g-dh-hrs { top: 36px; right: 9px; font-size: 9px; }
  html.sol2-mode .sol2-day-index { top: 11px; right: 9px; font-size: 8.5px; }
  html.sol2-mode .sol-cov {
    right: 9px;
    bottom: 8px;
    left: 49px;
    height: 17px;
  }
  html.sol2-mode .sol-cov svg { height: 16px; }
  html.sol2-mode .sol-cov span { font-size: 9px; }

  html.sol2-mode .g-role-row td { height: 34px; padding-inline: 11px; }
  html.sol2-mode .g-rh,
  html.sol2-mode .g-cell {
    height: auto;
    min-height: 86px;
  }
  html.sol2-mode .g-rh {
    left: 0;
    padding: 13px 10px 22px;
    vertical-align: top;
  }
  html.sol2-mode .g-rh::before { top: 10px; right: 8px; }
  html.sol2-mode .rh-inner { gap: 7px; }
  html.sol2-mode .rh-bar { width: 2px; height: 36px; }
  html.sol2-mode .rh-name {
    max-width: calc(100% - 12px);
    font-size: 13px;
    white-space: normal;
    line-height: 1.15;
  }
  html.sol2-mode .rh-meta {
    max-width: 112px;
    margin-top: 5px;
    overflow: hidden;
    font-size: 9.5px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  html.sol2-mode .sol2-row-util {
    right: 9px;
    bottom: 8px;
    left: 10px;
    grid-template-columns: 48px 1fr;
    gap: 5px;
  }
  html.sol2-mode .sol2-row-util span { font-size: 9px; }
  html.sol2-mode .g-cell { padding: 6px; vertical-align: top; }
  html.sol2-mode .g-cell > .chip:not(.ghost-chip) {
    width: 100%;
    min-height: 55px;
    margin: 0 0 5px;
    grid-template-rows: 17px 21px;
    padding: 8px 9px !important;
  }
  html.sol2-mode .g-cell > .chip:not(.ghost-chip) .chip-time { font-size: 9px; }
  html.sol2-mode .g-cell > .chip:not(.ghost-chip) .chip-lbl { font-size: 11.5px; }
  html.sol2-mode .g-cell > .chip:not(.ghost-chip):hover { transform: none; }
  html.sol2-mode .add-btn {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    height: 34px;
    margin-top: 2px;
    display: grid;
    place-items: center;
    opacity: 1;
    background: var(--sol-raised);
    border: 1px dashed var(--sol-line);
    color: var(--sol-muted);
    font-size: 15px;
  }
  html.sol2-mode :is(.g-os-h, .g-os-c) { height: auto; min-height: 72px; }
  html.sol2-mode .g-os-h { left: 0; padding: 12px 10px; }
  html.sol2-mode .g-os-label { display: grid; gap: 5px; align-content: start; }
  html.sol2-mode .g-os-label::before { margin: 0; }
  html.sol2-mode .g-os-c { padding: 6px; }
  html.sol2-mode .sol-open-stack { max-height: none; overflow: visible; }
  html.sol2-mode :is(.os-chip, .ghost-chip) {
    min-height: 38px;
    padding: 7px 8px !important;
  }
  html.sol2-mode .os-add {
    width: 34px;
    height: 34px;
    opacity: 1;
  }
  html.sol2-mode .sol-open-empty :is(.g-os-h, .g-os-c) { height: 50px; min-height: 50px; }
  html.sol2-mode .g-tasks-h,
  html.sol2-mode .g-tasks-c { padding: 8px; }

  html.sol2-mode .sol2-mobile-day-enter { animation: sol2-mobile-day-in .16s ease both; }
  @keyframes sol2-mobile-day-in {
    from { opacity: .65; transform: translateX(4px); }
    to { opacity: 1; transform: translateX(0); }
  }

  /* Labour becomes a bottom sheet; its collapsed glance remains in-flow. */
  html.sol2-mode .bot.collapsed {
    position: relative;
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    flex: 0 0 42px;
  }
  html.sol2-mode .bot.collapsed .bot-hdr { height: 42px; padding-inline: 10px; }
  html.sol2-mode .bot.collapsed .bot-title { display: none; }
  html.sol2-mode .bot.collapsed .sol-labour-glance {
    width: 100%;
    justify-content: space-between;
    gap: 4px;
    font-size: 9px;
  }
  html.sol2-mode .bot.collapsed .sol-labour-glance span:nth-child(4) { display: none; }
  html.sol2-mode .bot:not(.collapsed) {
    position: fixed;
    right: 0;
    bottom: calc(64px + env(safe-area-inset-bottom));
    left: 0;
    z-index: 90;
    width: 100%;
    height: min(72dvh, 620px) !important;
    min-height: 360px;
    max-height: min(72dvh, 620px);
    border-top: 2px solid var(--sol-accent);
    box-shadow: 0 -24px 70px rgba(0,0,0,.42);
    animation: sol2-mobile-sheet-in .2s cubic-bezier(.22,.8,.28,1) both;
  }
  @keyframes sol2-mobile-sheet-in {
    from { transform: translateY(18px); opacity: .6; }
    to { transform: translateY(0); opacity: 1; }
  }
  html.sol2-mode .bot:not(.collapsed) .bot-hdr { height: 52px; padding-inline: 14px; }
  html.sol2-mode .bot:not(.collapsed) .bot-hdr-extras {
    position: static;
    min-height: 43px;
    padding: 6px 12px !important;
    overflow-x: auto;
    border-bottom: 1px solid var(--sol-line);
  }
  html.sol2-mode .bot:not(.collapsed) .rev-toggle { min-width: max-content; height: 31px; font-size: 9px; }
  html.sol2-mode .bot:not(.collapsed) .bot-body {
    grid-template-columns: repeat(2, 1fr);
    padding: 12px;
    overflow-y: auto;
  }
  html.sol2-mode .bot:not(.collapsed) .lab-stat {
    min-height: 82px;
    padding: 10px 12px;
    border-right: 1px solid var(--sol-line);
    border-bottom: 1px solid var(--sol-line);
  }
  html.sol2-mode .bot:not(.collapsed) .lab-stat:nth-child(even) { border-right: 0; }
  html.sol2-mode .bot:not(.collapsed) .day-bars {
    grid-column: 1 / -1;
    height: 104px;
    padding: 10px 0 0;
  }
  html.sol2-mode .sol2-mobile-labour-shade {
    position: fixed;
    inset: 0 0 calc(64px + env(safe-area-inset-bottom));
    z-index: 85;
    background: rgba(4,7,11,.55);
    border: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
  }
  html.sol2-mode body.sol2-mobile-labour-open .sol2-mobile-labour-shade {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  /* Team is a complete inspector sheet on phones. */
  html.sol2-mode .sidebar,
  html.sol2-mode .sidebar.collapsed {
    position: fixed !important;
    inset: 0 0 0 auto !important;
    top: 0 !important;
    right: -100% !important;
    bottom: 0 !important;
    left: auto !important;
    z-index: 95;
    width: 100% !important;
    height: 100dvh;
    border: 0;
    transform: none !important;
    transition: right .23s cubic-bezier(.22,.8,.28,1);
  }
  html.sol2-mode .sidebar.mob-open { right: 0 !important; pointer-events: auto !important; }
  html.sol2-mode .sol-drawer-head {
    min-height: calc(64px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 15px 0 17px;
  }
  html.sol2-mode .sol-drawer-head::before { top: calc(13px + env(safe-area-inset-top)); }
  html.sol2-mode .sol2-team-readout { min-height: 72px; }
  html.sol2-mode .sol-staff-search input { min-height: 44px; font-size: 13px; }
  html.sol2-mode .sidebar .staff-card { min-height: 68px; }
  html.sol2-mode .sidebar .sc-name { font-size: 14px; }
  html.sol2-mode .sb-ov {
    z-index: 92;
    background: rgba(4,7,11,.58);
  }

  /* The five primary thumb actions are always reachable. */
  html.sol2-mode .sol2-mobile-dock {
    width: 100%;
    min-height: calc(64px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: start;
    padding: 5px 5px env(safe-area-inset-bottom);
    flex: 0 0 calc(64px + env(safe-area-inset-bottom));
    z-index: 80;
    background: #0c1218;
    border-top: 1px solid #2c3641;
    box-shadow: 0 -10px 30px rgba(0,0,0,.2);
  }
  html.sol2-mode .sol2-mobile-dock button {
    min-width: 0;
    height: 54px;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 4px;
    padding: 0 2px;
    background: transparent;
    border: 0;
    border-radius: 3px;
    color: #8e99a8;
    font-size: 9px;
    font-weight: 600;
  }
  html.sol2-mode .sol2-mobile-dock svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: square;
    stroke-linejoin: miter;
  }
  html.sol2-mode .sol2-mobile-dock button.active { color: #9db0ff; }
  html.sol2-mode .sol2-mobile-dock .sol2-mobile-solve {
    background: var(--sol-accent);
    color: #fff;
  }
  html.sol2-mode .sol2-mobile-dock .sol2-mobile-solve.working { opacity: .7; }
  html.sol2-mode .sol2-mobile-dock button:disabled { opacity: .45; }

  /* Tool surfaces become reachable bottom sheets instead of tiny windows. */
  html.sol2-mode .mbg {
    z-index: 100;
    align-items: flex-end;
    padding: 0;
  }
  html.sol2-mode .mbg .modal {
    width: 100%;
    max-width: none;
    max-height: min(92dvh, 820px);
    margin: 0;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 8px 8px 0 0;
  }
  html.sol2-mode .mbg.open .modal { animation: sol2-mobile-sheet-in .2s cubic-bezier(.22,.8,.28,1) both; }
  html.sol2-mode #m-edit-staff .modal {
    width: 100%;
    max-width: none;
    max-height: 96dvh;
    border-radius: 8px 8px 0 0;
  }
  html.sol2-mode #m-edit-staff .m-hdr { min-height: 58px; padding-inline: 14px; }
  html.sol2-mode .sol2-es-hero {
    min-height: 84px;
    grid-template-columns: 46px minmax(0, 1fr) 58px 58px;
    gap: 8px;
    padding: 0 13px;
  }
  html.sol2-mode .sol2-es-avatar { width: 42px; height: 42px; }
  html.sol2-mode .sol2-es-name { font-size: 14px; }
  html.sol2-mode .sol2-es-metric { min-height: 44px; padding-left: 8px; }
  html.sol2-mode .sol2-es-metric b { font-size: 13px; }
  html.sol2-mode #m-edit-staff .m-body { max-height: calc(96dvh - 142px) !important; }
  html.sol2-mode #m-edit-staff .es-section { padding: 17px 14px 18px; }
  html.sol2-mode #m-edit-staff :is(input[type='text'], input[type='number'], select) { min-height: 44px; font-size: 14px; }
  html.sol2-mode #m-edit-staff .day-tog { min-height: 44px; }
  html.sol2-mode #m-edit-staff .es-footer {
    min-height: calc(64px + env(safe-area-inset-bottom));
    padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
  }
  html.sol2-mode #m-edit-staff .es-footer button { min-height: 44px; }
  html.sol2-mode .sol-command {
    place-items: end center;
    padding: 0;
  }
  html.sol2-mode .sol-command-panel {
    width: 100%;
    max-height: 88dvh;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 8px 8px 0 0;
  }
  html.sol2-mode .sol-command-option { min-height: 58px; }

  /* Mobile form density: full touch targets without desktop whitespace. */
  html.sol2-mode #m-edit-staff .m-hdr { min-height: 54px; }
  html.sol2-mode .sol2-es-hero {
    min-height: 74px;
    grid-template-columns: 42px minmax(0, 1fr) 54px 54px;
    gap: 7px;
    padding-inline: 12px;
  }
  html.sol2-mode .sol2-es-avatar { width: 38px; height: 38px; font-size: 12px; }
  html.sol2-mode .sol2-es-person { gap: 2px; }
  html.sol2-mode .sol2-es-person small,
  html.sol2-mode .sol2-es-metric small { font-size: 8px; }
  html.sol2-mode .sol2-es-metric { min-height: 38px; padding-left: 7px; gap: 4px; }
  html.sol2-mode #m-edit-staff .m-body { max-height: calc(96dvh - 128px) !important; }
  html.sol2-mode #m-edit-staff .es-section { padding: 14px 13px 15px; }
  html.sol2-mode #m-edit-staff .es-section-h { margin-bottom: 10px; }
  html.sol2-mode #m-edit-staff .fg { margin-bottom: 12px; }
  html.sol2-mode #m-edit-staff .frow { gap: 8px; }
  html.sol2-mode #m-edit-staff .day-togs { gap: 2px; }
  html.sol2-mode #m-edit-staff .es-collapse-body { transition-duration: .16s; }
  html.sol2-mode #m-edit-staff .es-footer {
    min-height: calc(58px + env(safe-area-inset-bottom));
    padding: 7px 10px calc(7px + env(safe-area-inset-bottom));
  }

  /* Shifts is an operating sheet, not a wide desktop table in a viewport. */
  html.sol2-mode #m-req .modal {
    height: min(96dvh, 860px);
    max-height: min(96dvh, 860px);
  }
  html.sol2-mode #m-req .m-hdr {
    min-height: 54px;
    padding: 0 14px;
    flex: 0 0 54px;
  }
  html.sol2-mode #m-req #req-body {
    height: calc(96dvh - 54px);
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 13px 12px calc(16px + env(safe-area-inset-bottom));
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  html.sol2-mode #m-req .sf-section-h {
    min-height: 28px;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin-bottom: 7px;
    color: var(--sol-ink);
    font-size: 11px;
  }
  html.sol2-mode #m-req .sf-section-sub {
    width: 100%;
    color: var(--sol-muted);
    font-size: 10px;
    line-height: 1.35;
  }
  html.sol2-mode #m-req .sf-section-h button {
    min-height: 32px;
    margin-left: auto !important;
    border-radius: 2px !important;
  }
  html.sol2-mode #m-req .fhint {
    margin-bottom: 9px !important;
    font-size: 10px;
    line-height: 1.45;
  }
  html.sol2-mode #m-req #req-body > div[style*='overflow-x'] {
    margin-inline: -12px;
    padding: 0 12px 5px;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scroll-padding-left: 12px;
  }
  html.sol2-mode #m-req .sf-req-table {
    min-width: 650px;
    background: var(--sol-panel);
  }
  html.sol2-mode #m-req .sf-req-table :is(th, td) { border-bottom: 1px solid var(--sol-line); }
  html.sol2-mode #m-req .sf-req-table th:first-child,
  html.sol2-mode #m-req .sf-req-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 3;
    min-width: 180px;
    background: var(--sol-panel);
    box-shadow: 1px 0 var(--sol-line);
  }
  html.sol2-mode #m-req .sf-day-th { min-width: 54px; padding: 8px 4px; font-size: 9px; }
  html.sol2-mode #m-req .sf-tmpl-cell { min-height: 50px; padding: 7px 8px; font-size: 11px; }
  html.sol2-mode #m-req .sf-tmpl-times { margin-left: auto; }
  html.sol2-mode #m-req .sf-tmpl-time-inp {
    width: 48px;
    min-height: 34px;
    padding: 3px 4px;
    font-size: 10px;
  }
  html.sol2-mode #m-req .sf-req-input {
    width: 42px;
    min-height: 38px;
    font-size: 14px;
  }
  html.sol2-mode #m-req .sf-slots-list { gap: 1px; }
  html.sol2-mode #m-req .sf-slot-row {
    min-height: 52px;
    display: grid;
    grid-template-columns: 6px minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 3px 8px;
    padding: 8px 9px;
    background: var(--sol-raised);
    border: 0;
    border-bottom: 1px solid var(--sol-line);
    border-radius: 0;
  }
  html.sol2-mode #m-req .sf-slot-label { grid-column: 2; grid-row: 1; font-size: 11px; }
  html.sol2-mode #m-req .sf-slot-meta {
    grid-column: 2;
    grid-row: 2;
    color: var(--sol-muted);
    font-size: 9px;
  }
  html.sol2-mode #m-req .sf-slot-del {
    grid-column: 3;
    grid-row: 1 / 3;
    width: 38px;
    height: 38px;
    align-self: center;
  }
  html.sol2-mode #m-req .sf-add-slot-wrap {
    margin-top: 12px;
    padding: 10px;
    background: transparent;
    border-color: var(--sol-line);
    border-radius: 3px;
  }
  html.sol2-mode #m-req .sf-add-tab { min-height: 39px; padding: 7px; }
  html.sol2-mode #m-req .sf-add-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
    gap: 9px;
  }
  html.sol2-mode #m-req .sf-add-row .fg {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0;
  }
  html.sol2-mode #m-req .sf-add-row .fg:nth-last-of-type(-n+2) { min-width: 0 !important; }
  html.sol2-mode #m-req :is(.sf-add-sel, .sf-add-input) {
    min-height: 44px;
    border-radius: 2px;
    font-size: 13px;
  }
  html.sol2-mode #m-req .sf-add-btn { min-height: 44px; height: 44px; }
  html.sol2-mode #m-req .sf-stag-time-chip { min-height: 39px; border-radius: 2px; }
  html.sol2-mode #m-req .sf-stag-time-input { font-size: 13px; }
  html.sol2-mode #m-req #req-body > .btn-full:last-child {
    position: sticky;
    bottom: calc(-16px - env(safe-area-inset-bottom));
    z-index: 6;
    min-height: 48px;
    margin: 14px -12px calc(-16px - env(safe-area-inset-bottom)) !important;
    width: calc(100% + 24px);
    border-radius: 0;
  }

  html.sol2-mode.rd-light-mode body .topbar,
  html.sol2-mode.rd-light-mode .sol2-mobile-dock { background: #fbfaf6; border-color: #d2cec5; }
  html.sol2-mode.rd-light-mode .sol2-mobile-publish {
    background: #fffefa;
    border-color: #d1cdc4;
    color: #757b84;
  }
  html.sol2-mode.rd-light-mode .sol2-mobile-publish.ready {
    background: #edf8f1;
    border-color: #9dcdae;
    color: #19733c;
  }
  html.sol2-mode.rd-light-mode .sol2-mobile-save-state { color: #666e79; }
  html.sol2-mode.rd-light-mode .sol2-mobile-day-step button { background: #fffefa; }
  html.sol2-mode.rd-light-mode .sol2-mobile-dock button { color: #626a75; }
  html.sol2-mode.rd-light-mode .sol2-mobile-dock .sol2-mobile-solve { color: #fff; }
  html.sol2-mode.rd-light-mode .sol2-mobile-labour-shade { background: rgba(29,32,39,.34); }
}

@media (max-width: 370px) {
  html.sol2-mode .sol2-brand-mark { width: 31px; height: 31px; flex-basis: 31px; }
  html.sol2-mode .sol2-brand-copy { min-width: 86px; }
  html.sol2-mode .tb-wordmark { font-size: 18px; }
  html.sol2-mode .sol2-mobile-save-state { display: none; }
  html.sol2-mode .sol2-mobile-context { padding-inline: 9px; }
  html.sol2-mode .sol2-mobile-day-step { grid-template-columns: repeat(2, 38px); }
  html.sol2-mode .sol2-mobile-day-step button { width: 38px; height: 38px; }
  html.sol2-mode :is(.g-corner, .g-rh, .g-os-h, .g-tasks-h, .g-ua-h) { width: 45%; }
  html.sol2-mode :is(.g-dh, .g-cell, .g-os-c, .g-tasks-c, .g-ua-c) { width: 55%; }
}

/* ── Landscape phone: the agenda replaces the grid ──────────────────────
   A landscape phone gives us roughly 350px of height. The grid spent 181px
   of it on chrome before drawing a shift, so landscape now hides the shell
   and renders the day as a list. Chrome is one 40px bar plus one 44px dock;
   the agenda list owns everything between them, and owns vertical scroll. */
@media (max-height: 520px) and (orientation: landscape) and (pointer: coarse) {
  html.sol2-mode.sol2-landscape body .topbar,
  html.sol2-mode.sol2-landscape .sol2-mobile-day-head,
  html.sol2-mode.sol2-landscape .week-tabs,
  html.sol2-mode.sol2-landscape #grid-wrap,
  html.sol2-mode.sol2-landscape .sol2-plan-anchor,
  html.sol2-mode.sol2-landscape .sol2-plan-status { display: none !important; }

  html.sol2-mode.sol2-landscape .sol2-agenda { display: flex; }

  /* body is the flex column and the dock is its last child, so .main must
     grow into the gap rather than claim the whole viewport — pinning it to
     100dvh would push the dock off the bottom of the screen. */
  html.sol2-mode.sol2-landscape .main {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0;
    overflow: hidden;
  }

  /* The dock is the only chrome that survives alongside the bar. */
  html.sol2-mode.sol2-landscape .sol2-mobile-dock {
    min-height: calc(44px + env(safe-area-inset-bottom));
    flex-basis: calc(44px + env(safe-area-inset-bottom));
    padding-top: 0;
  }
  html.sol2-mode.sol2-landscape .sol2-mobile-dock button { height: 42px; }
  html.sol2-mode.sol2-landscape .sol2-mobile-dock button span { font-size: 9px; }
  /* The shade has to stop at the shorter dock, or it leaves a live strip of
     editor showing under a sheet that is meant to be modal. */
  html.sol2-mode.sol2-landscape .sol2-mobile-labour-shade {
    inset: 0 0 calc(44px + env(safe-area-inset-bottom));
  }

  /* Sheets and modals still open over the agenda, so they keep their own
     full-height treatment and their own scroll. */
  html.sol2-mode .bot.collapsed { display: none; }
  html.sol2-mode .bot:not(.collapsed) {
    bottom: calc(44px + env(safe-area-inset-bottom));
    height: calc(100dvh - 44px - env(safe-area-inset-bottom)) !important;
    min-height: 0;
    max-height: calc(100dvh - 44px - env(safe-area-inset-bottom));
  }
  html.sol2-mode .mbg .modal,
  html.sol2-mode #m-edit-staff .modal,
  html.sol2-mode #m-req .modal {
    width: min(760px, 100%);
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
  html.sol2-mode #m-edit-staff .m-hdr,
  html.sol2-mode #m-req .m-hdr { min-height: 44px; height: 44px; flex-basis: 44px; }
  html.sol2-mode .sol2-es-hero { min-height: 60px; grid-template-columns: 38px minmax(0,1fr) 58px 58px; }
  html.sol2-mode .sol2-es-avatar { width: 34px; height: 34px; }
  html.sol2-mode #m-edit-staff .m-body { max-height: calc(100dvh - 104px) !important; }
  html.sol2-mode #m-edit-staff .es-section { padding: 10px 14px 11px; }
  html.sol2-mode #m-edit-staff .es-section-h { margin-bottom: 7px; }
  html.sol2-mode #m-edit-staff .fg { margin-bottom: 8px; }
  html.sol2-mode #m-edit-staff :is(input[type='text'], input[type='number'], select) { min-height: 38px; }
  html.sol2-mode #m-edit-staff .day-tog { min-height: 38px; }
  html.sol2-mode #m-req #req-body {
    height: calc(100dvh - 44px);
    padding-top: 10px;
  }
  html.sol2-mode #m-req .sf-add-row { grid-template-columns: repeat(3, minmax(0,1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  html.sol2-mode .sol2-mobile-day-enter,
  html.sol2-mode .bot:not(.collapsed),
  html.sol2-mode .mbg.open .modal { animation: none; }
}

/* ── Agenda component ───────────────────────────────────────────────────
   Defined once here and switched on only by the landscape media query
   above, so the component reads as one thing rather than as a pile of
   orientation overrides. Row height is 40px: close to the 44px touch
   guidance, and it keeps six and a half rows visible on an iPhone in
   landscape where the grid managed one. */
.sol2-agenda {
  display: none;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  background: var(--sol-canvas);
}

.sol2-ag-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  flex: 0 0 40px;
  padding-left: max(6px, env(safe-area-inset-left));
  padding-right: max(6px, env(safe-area-inset-right));
  border-bottom: 1px solid var(--sol-line);
  background: var(--sol-panel);
}

.sol2-ag-step {
  width: 34px;
  height: 32px;
  flex: 0 0 34px;
  border: 1px solid var(--sol-line);
  border-radius: 7px;
  background: var(--sol-raised);
  color: var(--sol-ink);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
.sol2-ag-step:active { background: var(--sol-accent); border-color: var(--sol-accent); color: #fff; }

.sol2-ag-title {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  overflow: hidden;
}
.sol2-ag-title strong {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--sol-ink);
  white-space: nowrap;
}
.sol2-ag-title span {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--sol-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sol2-ag-publish {
  flex: 0 0 auto;
  height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: var(--sol-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.sol2-ag-publish[hidden] { display: none; }

/* The single vertical scroll owner in landscape. overscroll-behavior stops
   a flick at either end from chaining to the document and dragging Safari's
   address bar in and out mid-edit. */
.sol2-agenda-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
}

.sol2-ag-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 0 max(10px, env(safe-area-inset-right)) 0 0;
  border: 0;
  border-bottom: 1px solid var(--sol-line);
  background: var(--sol-cell);
  color: var(--sol-ink);
  text-align: left;
  font: inherit;
  cursor: pointer;
  touch-action: pan-y;
}
.sol2-ag-row:active { background: var(--sol-raised); }

.sol2-ag-flag {
  flex: 0 0 3px;
  align-self: stretch;
  background: var(--sol-faint);
}

.sol2-ag-time {
  flex: 0 0 auto;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: var(--sol-ink);
  white-space: nowrap;
}

.sol2-ag-who {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 7px;
  overflow: hidden;
}
.sol2-ag-who b {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sol2-ag-who em {
  font-style: normal;
  font-size: 11px;
  color: var(--sol-muted);
  white-space: nowrap;
}

.sol2-ag-role {
  flex: 0 0 auto;
  max-width: 92px;
  font-size: 11px;
  color: var(--sol-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sol2-ag-hours {
  flex: 0 0 42px;
  text-align: right;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--sol-muted);
}

.sol2-ag-lock { flex: 0 0 auto; font-size: 11px; }

/* Open shifts and unfilled requirements are the two things a manager is
   scanning for, so they read as gaps rather than as more rows. */
.sol2-ag-row--slot .sol2-ag-who b,
.sol2-ag-row--gap .sol2-ag-who b {
  color: var(--sol-brass);
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: 11.5px;
}
.sol2-ag-row--gap { background: transparent; }
.sol2-ag-row--gap .sol2-ag-flag { opacity: .55; }
.sol2-ag-row--gap .sol2-ag-time { color: var(--sol-muted); }

.sol2-ag-empty {
  margin: 0;
  padding: 22px 18px;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--sol-muted);
}

.sol2-ag-add {
  display: block;
  width: 100%;
  min-height: 40px;
  border: 0;
  border-bottom: 1px solid var(--sol-line);
  background: transparent;
  color: var(--sol-accent);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.sol2-ag-add:active { background: var(--sol-raised); }

.sol2-ag-row:focus-visible,
.sol2-ag-add:focus-visible,
.sol2-ag-step:focus-visible,
.sol2-ag-publish:focus-visible {
  outline: 2px solid var(--sol-accent);
  outline-offset: -2px;
}
