/* Wide delivery card. The portrait stays on the shared white surface. */
.wb-delivery { container-name: delivery; container-type: inline-size; }
.wb-delivery-focus[data-urgency] {
  --hero-ink: #243244;
  --hero-muted: #4c5d6d;
  --state-ink: #3e6658;
  display: grid;
  grid-template-columns: minmax(0, 56fr) minmax(0, 44fr);
  grid-template-rows: auto;
  align-items: center;
  gap: 24px;
  min-width: 0;
  min-height: 0;
  width: 100%;
  flex-shrink: 0;
  padding: 8px 0 10px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: #fff;
  background-image: none;
  transition: none;
}
.wb-delivery-focus[data-urgency="blue"] { --state-ink: #36547c; }
.wb-delivery-focus[data-urgency="orange"] { --state-ink: #7d4c18; }
.wb-delivery-focus[data-urgency="red"] { --state-ink: #913d34; }
.wb-focus-copy { grid-column: 1; grid-row: 1; align-self: center; min-width: 0; width: 100%; max-width: 510px; }
.wb-focus-heading { padding: 0; }
.wb-focus-kicker { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 7px; color: #536273; font-size: 12px; line-height: 1.5; font-weight: 600; }
.wb-focus-kicker > .btn { min-height: 30px; padding: 3px 7px; font-size: 12px; }
.wb-delivery-focus[data-urgency] .wb-focus-context { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 9px; margin: 0 0 7px; font-size: 12px; line-height: 1.5; color: var(--hero-muted); }
.wb-delivery-focus[data-urgency] .wb-focus-context > span:first-child { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-delivery-focus[data-urgency] .wb-focus-context .tag { flex-shrink: 0; padding: 2px 7px; font-size: 12px; line-height: 1.5; border-radius: 7px; }
.wb-delivery-focus[data-urgency] .wb-focus-name { display: -webkit-box; width: 100%; padding: 0; background: transparent; border: 0; text-align: left; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; font-size: 24px; line-height: 1.35; font-weight: 650; letter-spacing: -.4px; color: var(--hero-ink); }
.wb-delivery-focus[data-urgency] .wb-focus-name:hover { color: #2459e8; }
.wb-delivery-focus[data-urgency] .wb-countdown { display: block; grid-column: auto; grid-row: auto; width: fit-content; max-width: 100%; min-width: 0; margin: 13px 0 0; padding: 11px 16px 10px; border-radius: 16px; background: var(--deadline-color, #dcede5); }
.wb-delivery-focus[data-urgency] .wb-countdown-label { display: block; margin-bottom: 3px; color: #405164; font-size: 12px; line-height: 1.5; font-weight: 550; transition: none; }
.wb-delivery-focus[data-urgency] .wb-countdown-digits { display: grid; grid-template-columns: max-content 10px max-content max-content; align-items: start; justify-content: start; gap: 0 4px; }
.wb-delivery-focus[data-urgency] .wb-countdown-part { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.wb-delivery-focus[data-urgency] .wb-countdown-part strong { font-family: "Segoe UI", sans-serif; font-size: 52px; font-weight: 650; line-height: 1.06; letter-spacing: -2px; font-variant-numeric: tabular-nums; color: var(--hero-ink); transition: none; }
.wb-delivery-focus[data-urgency] .wb-countdown-part small { margin-top: 2px; font-size: 12px; line-height: 1.5; color: #405164; }
.wb-delivery-focus[data-urgency] .wb-countdown-colon { font-size: 37px; line-height: 1.2; letter-spacing: 0; font-weight: 400; color: var(--hero-ink); transition: none; }
.wb-delivery-focus[data-urgency] .wb-countdown-colon:nth-child(4) { display: none; }
.wb-delivery-focus[data-urgency] .wb-countdown-part:last-child { grid-column: 4; grid-row: 1; align-self: end; align-items: center; gap: 0; margin: 0 0 1px 4px; }
.wb-delivery-focus[data-urgency] .wb-countdown-part:last-child strong { font-size: 16px; line-height: 1.5; letter-spacing: 0; font-weight: 600; color: #405164; }
.wb-delivery-focus[data-urgency] .wb-countdown-part:last-child small { margin: 0; }
.wb-delivery-focus[data-urgency] .wb-countdown.has-long-days .wb-countdown-part:first-child strong { font-size: 36px; line-height: 1.53; letter-spacing: -1px; }
.wb-delivery-focus[data-urgency="red"] .wb-countdown-label { color: #843e36; }
.wb-delivery-focus[data-urgency] .wb-focus-deadline { display: flex; align-items: center; gap: 6px; margin-top: 10px; color: var(--hero-muted); font-size: 13px; line-height: 1.5; }
.wb-delivery-focus[data-urgency] .wb-focus-deadline .icon { width: 15px; height: 15px; flex-shrink: 0; }
.wb-delivery-focus[data-urgency] .wb-focus-deadline > span { min-width: 0; overflow-wrap: anywhere; }
.wb-delivery-focus[data-urgency] .wb-focus-bottom, .wb-delivery-focus[data-urgency] .wb-focus-actions { display: flex; grid-column: auto; grid-row: auto; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 8px 12px; min-width: 0; margin: 12px 0 0; padding: 0; }
.wb-delivery-focus[data-urgency] .wb-focus-bottom > span, .wb-delivery-focus[data-urgency] .wb-focus-actions > span { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 12px; line-height: 1.5; color: var(--hero-muted); }
.wb-delivery-focus[data-urgency] .wb-focus-bottom > span strong, .wb-delivery-focus[data-urgency] .wb-focus-actions > span strong { color: var(--hero-ink); font-weight: 600; }
.wb-delivery-focus[data-urgency] .wb-focus-bottom > .wb-focus-actions { flex: 0 1 100%; margin: 0; }
.wb-estimate { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 5px; min-height: 30px; padding: 3px 0; border: 0; background: transparent; color: #4c5d6d; font-size: 12px; line-height: 1.5; text-align: left; }
.wb-estimate strong { color: #243244; font-weight: 600; }
.wb-estimate .icon { width: 14px; height: 14px; }
.wb-estimate:hover { color: #2459e8; }
.wb-focus-no-deadline { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 10px; margin-top: 14px; padding: 12px; border-radius: 10px; background: #f3f6fa; color: #4c5d6d; font-size: 13px; line-height: 1.5; }
.wb-focus-no-deadline > .icon { width: 15px; height: 15px; }
.wb-delivery-focus[data-urgency] .wb-focus-bottom > .btn, .wb-delivery-focus[data-urgency] .wb-focus-actions > .btn, .wb-delivery-focus[data-urgency] .wb-idle-copy > .btn { min-height: 38px; padding: 8px 13px; margin: 0; background: var(--hero-ink); color: #fff; border: 1px solid var(--hero-ink); border-radius: 10px; font-size: 13px; font-weight: 550; line-height: 1.5; box-shadow: none; white-space: nowrap; }
.wb-delivery-focus[data-urgency] .wb-focus-bottom > .btn:hover, .wb-delivery-focus[data-urgency] .wb-focus-actions > .btn:hover, .wb-delivery-focus[data-urgency] .wb-idle-copy > .btn:hover { background: #394b60; border-color: #394b60; }
.wb-delivery-focus[data-urgency] .wb-focus-actions > .btn.outline { color: var(--hero-ink); background: #fff; border-color: #aebdcb; }
.wb-delivery-focus[data-urgency] .wb-focus-actions > .btn.outline:hover { background: #f1f5f8; border-color: #8fa3b6; }

.wb-state-panel { display: flex; grid-column: 2; grid-row: 1; flex-direction: column; align-items: center; justify-content: center; align-self: center; min-width: 0; gap: 9px; margin: 0; padding: 0; border-radius: 0; background: #fff; overflow: visible; }
.wb-state-caption { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 0; padding: 0; font-size: 13px; line-height: 1.5; font-weight: 550; color: var(--state-ink); background: none; }
.wb-state-caption:before { content: ""; display: block; width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; background: currentColor; }
.wb-mascot { position: relative; display: block; flex: 0 0 auto; width: 100%; max-width: 220px; height: auto; min-width: 0; min-height: 0; padding: 0; margin: 0; border: 0; border-radius: 0; background: #fff; box-shadow: none; overflow: visible; cursor: pointer; }
.wb-mascot:after { content: none; }
.wb-mascot:hover { box-shadow: none; }
.wb-mascot-image, .wb-delivery-empty .wb-mascot-image { display: block; width: 100%; height: 220px; max-height: none; object-fit: contain; pointer-events: none; user-select: none; }
.wb-mood-message { max-width: 21em; color: #536273; font-size: 13px; line-height: 1.6; text-align: center; }
.wb-mascot:focus-visible, .wb-focus-name:focus-visible { outline: 3px solid #2459e8; outline-offset: 3px; }
.wb-delivery-focus.wb-delivery-empty { min-height: 250px; grid-template-columns: minmax(0, 56fr) minmax(0, 44fr); grid-template-rows: auto; color: var(--hero-ink); }
.wb-idle-copy { grid-column: 1; grid-row: 1; min-width: 0; align-self: center; padding: 0; }
.wb-idle-copy h3 { color: var(--hero-ink); font-size: 24px; font-weight: 650; line-height: 1.4; }
.wb-idle-copy p { color: var(--hero-muted); font-size: 13px; line-height: 1.7; margin: 10px 0 15px; }

/* Risks stay next to the heading rather than at the bottom of a tall card. */
.wb-risk-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; min-width: 0; margin: 0 0 8px; padding: 6px; border: 1px solid #dce4eb; border-radius: 10px; background: #f6f8fa; }
.wb-risk-counts { display: flex; align-items: center; flex-wrap: wrap; flex: 0 0 auto; gap: 6px; }
.wb-risk-items { display: flex; align-items: stretch; flex-wrap: wrap; flex: 1 1 340px; min-width: 0; gap: 7px; }
.wb-risk-counts .btn { min-height: 36px; padding: 7px 9px; font-size: 12px; line-height: 1.5; }
.wb-risk-strip > .btn { flex-shrink: 0; min-height: 34px; padding: 6px 9px; font-size: 12px; line-height: 1.5; }
.wb-risk-item { display: inline-flex; flex: 1 1 180px; align-items: center; gap: 6px; min-width: 0; max-width: 100%; min-height: 34px; padding: 6px 9px; border: 1px solid #e6dcd7; border-radius: 8px; background: #fffaf7; text-align: left; color: #813f33; font-size: 12px; line-height: 1.5; }
.wb-risk-item:hover { background: #fff2ea; }
.wb-risk-item .icon { width: 14px; height: 14px; flex-shrink: 0; }
.wb-risk-item > span { min-width: 0; overflow-wrap: anywhere; }
.wb-risk-item > span { flex-shrink: 0; }
.wb-risk-item strong { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; min-width: 0; flex: 1; overflow-wrap: anywhere; color: #71382e; font-size: 13px; font-weight: 600; }
.wb-risk-item small { font-size: 12px; line-height: 1.5; }

.wb-delivery .wb-upcoming { flex-shrink: 0; margin-top: 12px; padding: 12px 0 0; border-top: 1px solid #e1e7ed; }
.wb-delivery .wb-subhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; margin-bottom: 6px; color: #536273; font-size: 12px; line-height: 1.5; }
.wb-delivery .wb-subhead > span:first-child { color: #34465a; font-size: 13px; font-weight: 600; }
.wb-delivery .wb-quiet { display: block; padding: 3px 0; margin: 0; color: #536273; font-size: 13px; line-height: 1.5; }
.wb-delivery .wb-delivery-row { display: grid; grid-template-columns: minmax(72px, auto) minmax(0, 1fr) auto 14px; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid #e7edf2; }
.wb-delivery .wb-delivery-row > .icon { grid-column: 4; grid-row: 1; width: 14px; height: 14px; }
.wb-delivery .wb-delivery-row:last-child { border-bottom: 0; }
.wb-delivery .wb-delivery-row-date { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2px 5px; font-size: 12px; line-height: 1.5; padding: 4px 6px; color: #485e75; background: #f0f4f8; }
.wb-delivery .wb-delivery-row-date small { display: inline; margin: 0; font-size: 12px; opacity: 1; }
.wb-delivery .wb-delivery-row-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; min-width: 0; color: #304357; font-size: 14px; line-height: 1.45; }
.wb-delivery .wb-row-note { color: #536273; font-size: 12px; line-height: 1.5; }
.wb-delivery .wb-delivery-row .wb-row-note { grid-column: 3; grid-row: 1; }
.wb-delivery .wb-delivery-footer { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 7px 12px; margin-top: 10px; padding: 0; }
.wb-delivery .wb-risk-links { display: flex; flex-wrap: wrap; gap: 7px; }
.wb-delivery .wb-risk-links .btn { min-height: 34px; padding: 6px 9px; font-size: 12px; }
.wb-delivery .wb-more-count { display: block; margin: 0; color: #536273; font-size: 12px; line-height: 1.5; }

/* Wide cards use three horizontal zones instead of a tall stack beside the IP. */
@container delivery (min-width: 700px) {
  .wb-delivery-focus[data-urgency] { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, .9fr); grid-template-rows: auto auto; column-gap: 18px; row-gap: 8px; min-height: 0; padding: 0; }
  .wb-focus-copy { display: contents; }
  .wb-focus-heading { grid-column: 1; grid-row: 1; align-self: end; min-width: 0; }
  .wb-delivery-focus[data-urgency] .wb-focus-name { font-size: 24px; }
  .wb-delivery-focus[data-urgency] .wb-countdown { grid-column: 2; grid-row: 1; align-self: end; justify-self: start; margin: 0; }
  .wb-delivery-focus[data-urgency] .wb-countdown-part strong { font-size: 52px; }
  .wb-delivery-focus[data-urgency] .wb-countdown-part:last-child strong { font-size: 16px; }
  .wb-delivery-focus[data-urgency] .wb-countdown.has-long-days .wb-countdown-part:first-child strong { font-size: 36px; }
  .wb-delivery-focus[data-urgency] .wb-focus-deadline { grid-column: 2; grid-row: 2; align-self: start; margin: 0; }
  .wb-delivery-focus[data-urgency] .wb-focus-bottom { grid-column: 1; grid-row: 2; align-self: start; align-content: start; gap: 6px; margin: 0; }
  .wb-delivery-focus[data-urgency] .wb-focus-bottom > .wb-focus-actions { flex: 0 1 auto; gap: 6px; }
  .wb-delivery-focus[data-urgency] .wb-focus-actions > .btn { padding: 7px 10px; min-height: 36px; }
  .wb-focus-kicker { margin-bottom: 4px; }
  .wb-delivery-focus[data-urgency] .wb-focus-context { margin-bottom: 5px; }
  .wb-focus-no-deadline { grid-column: 2; grid-row: 1 / 3; align-self: center; margin: 0; }
  .wb-state-panel { grid-column: 3; grid-row: 1 / 3; gap: 6px; }
  .wb-mascot { max-width: 170px; }
  .wb-mascot-image, .wb-delivery-empty .wb-mascot-image { height: 156px; }
  .wb-state-caption { font-size: 13px; line-height: 1.4; }
  .wb-mood-message { font-size: 12px; line-height: 1.5; }
  .wb-delivery-focus.wb-delivery-empty { grid-template-columns: minmax(0, 2.2fr) minmax(0, .9fr); grid-template-rows: auto; min-height: 205px; gap: 18px; }
  .wb-delivery-empty .wb-idle-copy { grid-column: 1; grid-row: 1; }
  .wb-delivery-empty .wb-state-panel { grid-column: 2; grid-row: 1; }
  .wb-risk-strip, .wb-risk-items { flex-wrap: nowrap; }
  .wb-risk-items { flex: 1 1 0; }
  .wb-risk-item { min-height: 36px; flex: 1 1 0; padding: 6px 7px; }
  .wb-risk-item strong { -webkit-line-clamp: 1; }
  .wb-delivery .wb-upcoming { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 5px 10px; margin-top: 8px; padding-top: 8px; }
  .wb-delivery .wb-subhead { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; margin: 0; }
  .wb-delivery .wb-delivery-row { grid-template-columns: minmax(66px, auto) minmax(0, 1fr) auto 12px; gap: 6px; padding: 4px 0; border: 0; }
  .wb-delivery .wb-delivery-row-date { padding: 3px 4px; }
  .wb-delivery .wb-delivery-row-title { -webkit-line-clamp: 1; }
  .wb-delivery .wb-delivery-row > .icon { width: 12px; height: 12px; }
  .wb-delivery .wb-upcoming > .wb-link { grid-column: 1 / -1; justify-self: end; }
  .wb-delivery .wb-upcoming:not(:has(.wb-delivery-row)) { display: block; }
  .wb-delivery .wb-upcoming:not(:has(.wb-delivery-row)) .wb-subhead { flex-direction: row; justify-content: space-between; gap: 4px 12px; }
}

@container delivery (max-width: 600px) {
  .wb-delivery-focus[data-urgency] { gap: 14px; }
  .wb-delivery-focus[data-urgency] .wb-focus-name { font-size: 22px; }
  .wb-delivery-focus[data-urgency] .wb-countdown { padding: 10px 12px; }
  .wb-delivery-focus[data-urgency] .wb-countdown-part strong { font-size: 42px; letter-spacing: -1.7px; }
  .wb-delivery-focus[data-urgency] .wb-countdown-colon { font-size: 31px; }
  .wb-delivery-focus[data-urgency] .wb-countdown-part:last-child strong { font-size: 16px; letter-spacing: 0; }
  .wb-delivery-focus[data-urgency] .wb-countdown.has-long-days .wb-countdown-part:first-child strong { font-size: 31px; line-height: 1.47; }
  .wb-mascot-image, .wb-delivery-empty .wb-mascot-image { height: 190px; }
  .wb-state-caption, .wb-mood-message { font-size: 12px; }
}
@container delivery (max-width: 420px) {
  .wb-delivery-focus[data-urgency] { gap: 10px; }
  .wb-delivery-focus[data-urgency] .wb-countdown { padding: 9px; }
  .wb-delivery-focus[data-urgency] .wb-countdown-digits { grid-template-columns: max-content 8px max-content max-content; gap: 0 2px; }
  .wb-delivery-focus[data-urgency] .wb-countdown-part strong { font-size: 38px; letter-spacing: -1.5px; }
  .wb-delivery-focus[data-urgency] .wb-countdown-part:last-child strong { font-size: 16px; letter-spacing: 0; margin-left: 0; }
  .wb-delivery-focus[data-urgency] .wb-countdown.has-long-days .wb-countdown-part:first-child strong { font-size: 28px; }
  .wb-mascot-image, .wb-delivery-empty .wb-mascot-image { height: 175px; }
}
