/* Home (today-board.js): the confirmed homeowners to send first, then the four others, then the next things to do and
   the money in one line. Phone first: everything down to the tiles fits a 375×667 screen. Colours are workspace.css's
   tokens; no inline styles (the workspace's CSP drops them). */
.workspace .tb { max-width: 1120px; margin-inline: auto; }
.tb-head { display: flex; align-items: center; gap: 8px; margin: -8px 0 0; }
.workspace .tb-head h1 { margin: 0 12px 0 0; font-size: 24px; letter-spacing: -.6px; }
.tb-updated { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0; border: 0; background: none; color: var(--ws-muted); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.tb-updated svg { width: 16px; height: 16px; }
.tb-updated:hover { color: var(--ws-ink); }
.tb-updated:disabled { cursor: progress; opacity: 1; }
.tb-menu { display: none; margin-left: auto; min-width: 44px; min-height: 44px; border: 1.5px solid var(--ws-btn-line); border-radius: var(--ws-radius); background: #fff; color: var(--ws-ink); font: inherit; font-size: 20px; line-height: 1; cursor: pointer; }

/* The hero: the confirmed ones by name, each with its own green Send. */
.tb-hero { border-radius: var(--ws-radius); padding: 16px; background: var(--ws-card); border: 1px solid var(--ws-line); }
.tb-hero.is-go { background: var(--ws-green-soft); border: 2px solid var(--ws-green); padding: 14px 16px 8px; }
.tb-hero-top { display: flex; align-items: center; gap: 14px; }
.tb-hero-count { font-size: 44px; font-weight: 800; line-height: 1; letter-spacing: -1.5px; color: var(--ws-green-ink); font-variant-numeric: tabular-nums; }
.workspace .tb-hero h2 { margin: 0; font-size: 20px; line-height: 1.3; letter-spacing: -.3px; color: var(--ws-green-ink); }
.workspace .tb-hero p { margin: 2px 0 0; font-size: 16px; line-height: 1.4; color: var(--ws-ink-2); }
.tb-hero-list { list-style: none; margin: 10px 0 0; padding: 0; border-top: 1px solid #bcd8c6; }
.tb-hero-row { display: flex; align-items: center; gap: 12px; padding: 2px 0; }
.tb-hero-row + .tb-hero-row { border-top: 1px solid #cde2d4; }
.tb-hero-row.is-desk { display: none; }
.tb-hero-who { flex: 1 1 auto; min-width: 0; min-height: 52px; display: grid; align-content: center; gap: 1px; padding: 4px 0; border: 0; background: none; color: var(--ws-ink); font: inherit; text-align: left; cursor: pointer; }
.tb-hero-who strong, .tb-hero-who span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tb-hero-who strong { font-size: 17px; font-weight: 650; line-height: 1.35; }
.tb-hero-who span { font-size: 14px; line-height: 1.4; color: var(--ws-ink-2); }
.workspace .tb-send { flex: none; min-width: 92px; min-height: 48px; }
.tb-hero-more, .tb-hero-link { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0; border: 0; background: none; color: var(--ws-green-ink); font: inherit; font-size: 16px; font-weight: 650; text-align: left; cursor: pointer; }
.tb-hero-more { border-top: 1px solid #cde2d4; }
.tb-hero-more.is-desk { display: none; }
.tb-hero-link { color: var(--ws-ink); text-decoration: underline; text-underline-offset: 3px; }
.tb-hero.is-clear h2 { color: var(--ws-ink); font-size: 17px; }
.workspace .tb-hero.is-clear p { color: var(--ws-muted); }
.tb-hero-none { margin: 0; font-size: 16px; }

/* The four others: the whole tile is the button. A zero is grey, never tinted. */
.tb-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.tb-tile { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 2px; min-width: 0; min-height: 84px; padding: 10px 14px; border: 1px solid var(--ws-line); border-radius: var(--ws-radius); background: var(--ws-card); color: var(--ws-ink); font: inherit; text-align: left; cursor: pointer; }
.tb-tile strong { font-size: 32px; font-weight: 750; line-height: 1.1; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.tb-tile > span { font-size: 15px; font-weight: 650; line-height: 1.3; }
.tb-tile small { font-size: 13px; color: var(--ws-muted); }
.tb-tile.is-amber { background: var(--ws-amber-soft); border-color: #efcfa6; }
.tb-tile.is-amber strong { color: var(--ws-amber-ink); }
.tb-tile.is-blue { background: var(--ws-blue-soft); border-color: #c4dbec; }
.tb-tile.is-blue strong { color: var(--ws-blue); }
.tb-tile.is-zero { background: var(--ws-card); border-color: var(--ws-line); }
.tb-tile.is-zero strong { color: var(--ws-muted); }
.tb-tile:hover { border-color: #9fbdab; }

/* Next up and the money. */
.workspace .tb-next h2 { margin: 24px 0 8px; font-size: 20px; letter-spacing: -.3px; }
.tb-quiet { margin: 0; padding: 14px 16px; border: 1px solid var(--ws-line); border-radius: var(--ws-radius); background: var(--ws-card); font-size: 16px; color: var(--ws-muted); }
.tb-money-title { display: none; }
.tb-money { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: center; gap: 8px; width: 100%; min-height: 64px; margin-top: 12px; padding: 10px 12px 10px 16px; border: 1px solid var(--ws-line); border-radius: var(--ws-radius); background: var(--ws-card); color: var(--ws-ink); font: inherit; text-align: left; cursor: pointer; }
.tb-money-item { display: grid; gap: 1px; min-width: 0; }
.tb-money-item > span { font-size: 14px; color: var(--ws-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-money strong { font-size: 17px; font-weight: 750; font-variant-numeric: tabular-nums; }
.tb-money .is-overdue strong { color: var(--ws-red); }
.tb-money-open { color: var(--ws-muted); font-size: 20px; font-weight: 650; }
.tb-money-open > span:first-child { display: none; }
.tb-money:hover, .tb-next .ws-list-row:hover { background: #f8fbf8; }

/* Loading: four grey tiles, never a reassuring zero. */
.tb-skeleton { height: 220px; border-radius: var(--ws-radius); background: var(--ws-grey-soft); }
.tb-loading .tb-tiles i { display: block; min-height: 84px; border-radius: var(--ws-radius); background: var(--ws-grey-soft); }

@media (min-width: 861px) {
  .tb-head { margin-bottom: 16px; }
  .tb-menu { display: inline-flex; align-items: center; justify-content: center; }
  .tb-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto; gap: 12px; align-items: stretch; }
  .tb-grid .tb-hero { grid-row: span 2; }
  .tb-grid .tb-tiles { display: contents; }
  .tb-grid .tb-tile { margin: 0; }
  .tb-hero-row.is-desk { display: flex; }
  .tb-hero-more.is-phone { display: none; }
  .tb-hero-more.is-desk { display: flex; }
  .tb-columns { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
  .workspace .tb-money-title { display: block; margin: 24px 0 8px; font-size: 20px; letter-spacing: -.3px; }
  .tb-columns .tb-money { display: flex; flex-direction: column; align-items: stretch; gap: 10px; margin-top: 0; padding: 16px 20px; }
  .tb-columns .tb-money-item { display: flex; justify-content: space-between; gap: 12px; }
  .tb-columns .tb-money-item > span { font-size: 16px; }
  .tb-money-open { display: flex; justify-content: space-between; margin-top: 4px; color: var(--ws-ink-2); font-size: 16px; }
  .tb-money-open > span:first-child { display: inline; }
}
