/* The weekly ledger, source thread and connected record live inside the existing inbox scene. */
.bs-stop-check { margin: 14px 0; padding: 11px 12px; border: 1px solid var(--bs-stroke); border-radius: 5px; background: #12252e; }
.bs-stop-check summary { color: var(--bs-teal); font-weight: 650; cursor: pointer; }
.bs-stop-check summary:focus-visible { outline: 2px solid #fff0b3; outline-offset: 3px; }
.bs-stop-tabs { display: flex; gap: 6px; margin: 12px 0; }
.bs-stop-check button { padding: 6px 9px; border: 1px solid #688982; border-radius: 4px; background: #223e39; color: #d4f0e6; }
.bs-stop-tabs button[aria-pressed=true] { color: #13272d; background: var(--bs-teal); }
.bs-stop-check button:disabled { color: #aac6bd; background: #182d2c; cursor: default; }
.bs-stop-source { margin: 4px 0; color: var(--bs-muted); font: 600 .68rem/1.4 var(--mono); }
.bs-stop-track { position: relative; height: 5px; margin: 18px 4px 12px; border-radius: 3px; background: repeating-linear-gradient(90deg,#4b6b70 0 1px,#29454c 1px calc(100% / 13)); }
.bs-stop-track i, .bs-stop-track b { position: absolute; top: 50%; transform: translate(-50%, -50%); }
.bs-stop-track i { width: 9px; height: 9px; border-radius: 50%; background: var(--bs-teal); transition: left .3s ease-out; }
.bs-stop-track b { width: 2px; height: 15px; background: var(--bs-amber); }
.bs-stop-result { min-height: 2.5em; margin: 9px 0; color: #dce7e6; line-height: 1.45; font-size: .8rem; }
.motion-paused .bs-stop-track i { transition: none; }
@media (prefers-reduced-motion: reduce) { .bs-stop-track i { transition: none; } }
.if-stage {
  --bs-text: #edf7f6;
  --bs-muted: #a7bec5;
  --bs-stroke: #37515e;
  --bs-ink: #0b1922;
  --bs-teal: #a5eadb;
  --bs-amber: #f5c48c;
}
.bs-workload {
  position: relative;
  padding: clamp(19px, 3.3vw, 42px) clamp(16px, 4vw, 58px) clamp(16px, 2.5vw, 30px);
  border-bottom: 1px solid var(--bs-stroke);
  background: radial-gradient(ellipse at 88% 12%, #23434c8f, transparent 52%), #0f202b;
}
.bs-workload-head, .bs-volume-head, .bs-panel-title, .bs-case-strip, .bs-paging, .bs-case-label, .bs-mail-meta {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.bs-workload-head { margin-bottom: 22px; }
.bs-overline, .bs-field-label, .bs-week-label > span {
  color: #a9c7cb; font: 650 .67rem/1.25 var(--mono); text-transform: uppercase; letter-spacing: .13em;
}
.bs-workload h3 { margin: 5px 0 0; font: 650 clamp(1.65rem, 3vw, 2.55rem)/1.1 'Oxanium', sans-serif; letter-spacing: -.045em; }
.bs-week-label { display: flex; align-items: center; gap: 10px; }
.bs-week-label select, .bs-workload button, .bs-case-strip button, .bs-source button, .bs-record button, .if-response [data-studio-action] {
  font: 650 .77rem/1.22 var(--mono); cursor: pointer;
}
.bs-week-label select { color: var(--bs-text); background: #172e39; border: 1px solid #526e79; border-radius: 5px; padding: 9px 10px; color-scheme: dark; }
.bs-ledger { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .8fr); gap: clamp(22px, 5vw, 72px); }
.bs-dest-area .bs-field-label { display: block; margin-bottom: 8px; }
.bs-destinations { display: flex; gap: 5px; flex-wrap: wrap; }
.bs-destinations button { display: flex; align-items: center; gap: 9px; border: 1px solid #496572; color: #cadce1; background: #132733; padding: 6px 10px; min-height: 36px; border-radius: 5px; }
.bs-destinations b { background: #263e49; border-radius: 3px; padding: 2px 4px; font-size: .69rem; }
.bs-destinations button[aria-pressed=true] { color: #12272b; background: var(--bs-teal); border-color: var(--bs-teal); }
.bs-destinations button[aria-pressed=true] b { background: #87c7ba; color: #102d2a; }
.bs-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 18px; gap: 5px; }
.bs-metrics > div { border-left: 1px solid var(--bs-stroke); padding-left: 15px; }
.bs-metrics > div:first-child { border-left: 0; padding-left: 0; }
.bs-metrics strong { display: block; font: 600 clamp(1.5rem, 2.8vw, 2.3rem)/1 'Oxanium', sans-serif; color: #e5f1ef; font-variant-numeric: tabular-nums; }
.bs-metrics > div:nth-child(3) strong, .bs-metrics > div:nth-child(4) strong { color: var(--bs-amber); }
.bs-metrics span { display: block; color: var(--bs-muted); margin-top: 5px; font-size: .75rem; }
.bs-volume-head button { background: transparent; color: var(--bs-muted); border: 1px solid #47616e; border-radius: 15px; padding: 4px 9px; }
.bs-volume-head button[aria-pressed=true] { color: var(--bs-teal); border-color: #678f8e; }
.bs-days { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin-top: 5px; }
.bs-days button { display: grid; grid-template-rows: 16px 40px 17px; align-items: end; gap: 4px; padding: 5px 3px; color: #b7cdd1; background: none; border: 1px solid transparent; border-radius: 4px; text-align: center; }
.bs-days button i { display: block; background: repeating-linear-gradient(0deg,#76a9ac 0 4px, #55858a 4px 6px); justify-self: center; width: min(65%, 33px); height: var(--bs-fill); min-height: 4px; border-radius: 2px 2px 0 0; }
.bs-days button b { font-size: .76rem; color: #d6e9e9; }
.bs-days button[aria-pressed=true] { border-color: #5f9992; background: #193536; }
.bs-days button[aria-pressed=true] i { background: repeating-linear-gradient(0deg,#b2edda 0 4px, #83d2ba 4px 6px); }
.bs-workload button:hover, .bs-source button:hover, .bs-record button:hover, .bs-case-strip button:hover, .bs-sender-site:hover, .if-response [data-studio-action]:hover { border-color: #addbd8; }
.if-stage [data-studio-action]:focus-visible, .bs-week-label select:focus-visible { outline: 2px solid #fff0b3; outline-offset: 3px; }
.if-world { padding-top: 84px; min-height: 380px; }
.bs-source-yards { position: absolute; display: flex; justify-content: center; left: 1%; right: 1%; top: -71px; gap: 4px; }
.bs-sender-site { display: grid; grid-template-rows: 19px 12px; align-content: center; justify-items: center; gap: 2px; flex: 1 1 0; max-width: 78px; min-width: 0; height: 42px; background: #10212c; border: 1px solid #3d5867; border-radius: 4px; cursor: pointer; color: #c9dde2; }
.bs-sender-site span { font: 600 .62rem/1 var(--mono); }
.bs-sender-site i { display: block; width: 27px; height: 18px; align-self: end; border: 1px solid #72909a; background: repeating-linear-gradient(90deg,transparent 0 4px,#304a55 4px 6px), repeating-linear-gradient(0deg,#7899a2 0 3px,#365361 3px 5px); clip-path: polygon(0 28%,23% 28%,23% 12%,52% 12%,52% 32%,74% 32%,74% 0,100% 0,100% 100%,0 100%); }
.bs-sender-site:nth-child(2) i { width: 31px; clip-path: polygon(0 45%,15% 45%,15% 30%,45% 8%,48% 34%,73% 13%,75% 35%,100% 18%,100% 100%,0 100%); }
.bs-sender-site:nth-child(3) i { width: 22px; clip-path: polygon(0 20%,24% 20%,24% 0,74% 0,74% 20%,100% 20%,100% 100%,0 100%); }
.bs-sender-site[aria-pressed=true] { background: #254246; color: #d6fbf0; border-color: #8bc4b9; }
.bs-sender-site:disabled { opacity: .4; cursor: default; }
.if-broker[data-staff-active] { border-color: #d9b682; box-shadow: 0 0 11px #ffb55e4a; }
.if-stage[data-bs-ready] .if-broker[data-staff-active], .if-stage[data-bs-ready] .if-core-screen i { border-color: #8bd9c0; color: #b6eedb; }
.if-stage[data-bs-ready] .if-error-packet { color: #d6fff0; background: #244f43; border-color: #8bd9c0; box-shadow: none; }
.bs-packet-caption { position: absolute; left: 50%; top: 84%; transform: translateX(-50%); padding: 5px 7px; border: 1px solid #446775; border-radius: 4px; background: #112531; color: #c0d8da; font: 650 .65rem/1.25 var(--mono); text-align: center; white-space: nowrap; }
.if-stage .if-packet { animation: bs-mail-transit 4.9s linear var(--bs-delay, 0s) infinite; }
.if-stage .if-packet[hidden] { display: none; }
.if-packet[data-kind=amendment] { border-color: #e6ba8b; background: #332c25; }
.if-packet[data-kind=hold] { border-color: #df958b; background: #352626; }
.if-packet[data-kind=release] { border-color: #c4a7e0; background: #29243b; }
.if-packet[data-kind=amendment] b, .if-packet[data-kind=hold] b, .if-packet[data-kind=release] b { color: #f3eadd; }
@keyframes bs-mail-transit { 0% { left: 1%; opacity: 0; transform: translate(-30%, 3px); } 10%, 86% { opacity: 1; } 100% { left: 99%; opacity: 0; transform: translate(-70%, -3px); } }
.if-stage.if-still .if-packet:not([hidden]) { display: block; animation: none; opacity: .9; left: var(--bs-position); transform: translateX(-50%); }
@media (prefers-reduced-motion: reduce) { .if-stage .if-packet:not([hidden]) { display: block; animation: none; opacity: .9; left: var(--bs-position); transform: translateX(-50%); } }
@media (max-width: 700px) {
  .if-stage.if-still .if-packet:not([hidden]):not(:nth-child(2)):not([data-last]) { display: none; }
}
@media (max-width: 700px) and (prefers-reduced-motion: reduce) {
  .if-stage .if-packet:not([hidden]):not(:nth-child(2)):not([data-last]) { display: none; }
}
.bs-case-strip { padding: 10px clamp(14px, 4vw, 58px); background: #122a32; border-top: 1px solid #44616a; position: relative; }
.bs-case-label { justify-content: flex-start; flex-wrap: wrap; color: #d5e6e7; font-size: .84rem; }
.bs-case-label strong, .bs-paging span { font: 650 .78rem/1.3 var(--mono); color: #cbebe6; }
.bs-case-lamp { height: 8px; width: 8px; flex-shrink: 0; border-radius: 50%; background: var(--bs-amber); }
.if-stage[data-bs-ready] .bs-case-lamp { background: #a4e6c8; }
.bs-paging { gap: 7px; flex-shrink: 0; }
.bs-paging button { color: #e5f4ef; border: 1px solid #567782; background: #18333d; border-radius: 4px; width: 35px; height: 33px; font-size: 1rem; }
.bs-paging span { min-width: 40px; text-align: center; }
.bs-source, .bs-record { position: relative; padding: 15px 14px; border-bottom: 1px solid #344c57; }
.bs-panel-title strong { color: #e7f4f0; font-size: .92rem; }
.bs-panel-title span { color: #afc5c8; font: 600 .68rem/1.25 var(--mono); text-align: right; }
.bs-thread-tabs, .bs-view-tabs, .bs-review-actions { display: flex; gap: 4px; flex-wrap: wrap; margin: 10px 0; }
.bs-thread-tabs button, .bs-view-tabs button { padding: 6px 8px; border-radius: 4px; border: 1px solid #49616d; background: #10212b; color: #b2c9cf; }
.bs-thread-tabs button[aria-pressed=true] { background: #edd5b4; border-color: #edd5b4; color: #322c24; }
.bs-envelope { color: #222e32; background: linear-gradient(120deg,#f2e8d5,#f6f0e2); border: 1px solid #e9dec7; border-left: 3px solid #e1a667; box-shadow: 0 5px 10px #0002; border-radius: 3px; padding: 12px; }
.bs-envelope .bs-mail-meta { color: #485754; font: 600 .67rem/1.3 var(--mono); align-items: flex-start; }
.bs-mail-meta time { text-align: right; flex-shrink: 0; }
.bs-envelope h4 { color: #26322f; margin: 9px 0 4px; font-size: 1rem; }
.bs-envelope p { margin: 0; color: #404d47; font-size: .82rem; line-height: 1.5; }
.bs-target-heading { margin: 15px 0 6px; }
.bs-copies > div { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,.85fr) 59px; gap: 5px; align-items: center; padding: 5px 0; min-height: 34px; border-top: 1px solid #2d464f; font-size: .75rem; }
.bs-copies b { color: #b5dacb; font-size: .7rem; font-weight: 600; }
.bs-copies [data-stale=true] b { color: var(--bs-amber); }
.bs-copies button, .bs-review-actions button, .if-response [data-studio-action] { border: 1px solid #76978d; background: #223e39; color: #d4f0e6; padding: 6px; border-radius: 4px; }
.bs-copies button { border-color: #806952; background: #352d27; color: #f7d4a6; }
.bs-copies small { color: var(--bs-muted); font: 600 .66rem/1.2 var(--mono); text-align: center; }
.bs-fields { margin: 10px 0; }
.bs-fields > div { display: grid; grid-template-columns: .75fr 1.25fr; align-items: baseline; gap: 8px; padding: 7px 0; border-top: 1px solid var(--bs-stroke); font-size: .78rem; }
.bs-fields dt { color: #a5bdbf; }
.bs-fields dd { margin: 0; }
.bs-fields em { display: block; color: var(--bs-amber); font: 600 .66rem/1.3 var(--mono); margin-top: 2px; }
.bs-review-actions:empty { display: none; }
.bs-review-evidence { margin: 8px 0; padding: 8px 10px; border-left: 2px solid var(--bs-amber); background: #272b29; color: #e5d8bd; font-size: .77rem; line-height: 1.45; }
.bs-review-evidence[hidden] { display: none; }
.bs-linked { padding: 10px; margin-top: 14px; border-radius: 4px; border: 1px solid #385e5d; background: #10282c; }
.bs-linked p { margin: 0; font-size: .78rem; line-height: 1.45; color: #cce0df; }
.bs-view-tabs button[aria-pressed=true] { background: var(--bs-teal); color: #18332e; border-color: var(--bs-teal); }
.if-response > div > strong { color: #d9f4e8; font-size: .82rem; }
.if-response [hidden] { display: none; }
.if-response [data-answer] { margin-top: 3px; }
.if-stage .bs-workload button, .if-stage .bs-source button, .if-stage .bs-record button { touch-action: manipulation; }
@media (max-width: 900px) { .bs-ledger { gap: 18px; } .bs-metrics > div { padding-left: 9px; } .bs-week-label { display: grid; justify-items: end; gap: 4px; } }
@media (max-width: 700px) {
  .bs-ledger { grid-template-columns: 1fr; gap: 17px; }
  .bs-volume { border-top: 1px solid #324e58; padding-top: 11px; }
  .bs-workload-head { margin-bottom: 15px; }
  .bs-days button { grid-template-rows: 14px 27px 16px; }
  .if-world { padding-top: 87px; min-height: 300px; }
  .bs-packet-caption { font-size: .55rem; white-space: normal; width: 68px; }
  .bs-source-yards { gap: 2px; left: 0; right: 0; }
  .bs-sender-site { padding: 0; }
  .bs-case-label { gap: 5px; }
  .bs-case-label > span:last-child { font-size: .72rem; }
  .bs-source, .bs-record { padding: 12px; }
  .if-response [data-studio-action] { grid-column: 2; justify-self: start; }
}
@media (max-width: 400px) {
  .bs-workload { padding-inline: 12px; }
  .bs-destinations { gap: 3px; }
  .bs-destinations button { font-size: .71rem; padding-inline: 6px; gap: 4px; }
  .bs-case-label > span:last-child { width: 100%; }
  .bs-paging { gap: 2px; }
  .bs-sender-site span { font-size: .51rem; }
  .bs-packet-caption { width: 54px; font-size: .51rem; }
}

