/* Blood & Tribute Build 21.278 — split Personal and Family Operations. */

/* Progression-first sidebar hierarchy. */
.sidebar .nav .nav-btn[data-view="operations"],
.sidebar .nav .nav-btn[data-view="family-operations"] { white-space:nowrap; }

#operations.bt21277-personal-route .operations-board-head,
#operations.bt21277-personal-route .operations-cards-grid-stable:not(.bt21240-personal-op-grid):not(.bt21237-personal-op-grid) { display:none!important; }

#operations.bt21277-personal-route [data-bt21234-personal-operations] { margin-top:0!important; }
#operations.bt21277-personal-route [data-bt21234-personal-operations] .section-head { margin-top:0!important; }

#family-operations .bt21277-family-operations-summary {
  display:grid;
  grid-template-columns:minmax(0,1.05fr) minmax(360px,.95fr);
  gap:12px;
  align-items:stretch;
}
#family-operations .bt21277-family-active-card,
#family-operations .bt21277-family-legacy-card {
  min-height:188px;
  box-sizing:border-box;
  margin:0;
}
#family-operations .bt21277-family-active-card .list-stack {
  max-height:132px;
  overflow:auto;
  scrollbar-gutter:stable;
}
#family-operations .bt21277-family-legacy-card {
  display:flex;
  flex-direction:column;
  gap:8px;
}
#family-operations .bt21277-family-legacy-card > p.muted {
  margin:0;
  font:500 11px/1.38 Inter,Segoe UI,sans-serif;
}
#family-operations .bt21277-weekly {
  display:grid;
  gap:5px;
}
#family-operations .bt21277-weekly > div:first-child {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  font:600 10.5px/1.2 Inter,Segoe UI,sans-serif;
  color:var(--muted,#c6b78f);
}
#family-operations .bt21277-weekly strong { color:var(--text,#f4ecd8); }
#family-operations .bt21277-perk-list {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:5px;
}
#family-operations .bt21277-perk-list > div {
  display:flex;
  justify-content:space-between;
  gap:8px;
  padding:6px 7px;
  border:1px solid rgba(207,166,74,.22);
  border-radius:7px;
  background:rgba(255,255,255,.02);
}
#family-operations .bt21277-perk-list strong {
  color:#f0cf78;
  font:700 9px/1.15 Inter,Segoe UI,sans-serif;
}
#family-operations .bt21277-perk-list span {
  color:var(--muted,#c6b78f);
  font:500 9px/1.15 Inter,Segoe UI,sans-serif;
  text-align:right;
}
#family-operations .bt21277-family-board-head { margin-top:2px; }
#family-operations .bt21277-family-board-head .eyebrow { margin-bottom:3px; }
#family-operations .bt21277-family-operation-grid {
  display:grid!important;
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
  gap:8px!important;
  align-items:stretch!important;
}
#family-operations .bt21277-family-operation-grid > .entity-card {
  min-width:0!important;
  height:100%!important;
}
#family-operations .bt21267-operation-bonus-strip { display:none!important; }

@media (max-width:1500px) {
  #family-operations .bt21277-family-operation-grid { grid-template-columns:repeat(4,minmax(0,1fr))!important; }
}
@media (max-width:1180px) {
  #family-operations .bt21277-family-operations-summary { grid-template-columns:1fr; }
  #family-operations .bt21277-family-operation-grid { grid-template-columns:repeat(3,minmax(0,1fr))!important; }
}
@media (max-width:850px) {
  #family-operations .bt21277-family-operation-grid { grid-template-columns:repeat(2,minmax(0,1fr))!important; }
  #family-operations .bt21277-perk-list { grid-template-columns:1fr; }
}
@media (max-width:600px) {
  #family-operations .bt21277-family-operation-grid { grid-template-columns:1fr!important; }
}


/* -------------------------------------------------------------------------
   Build 21.278 — true Personal/Family Operations integration.
--------------------------------------------------------------------------- */
#family-operations .bt21278-family-operations-summary {
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:12px!important;
  align-items:stretch!important;
}
#family-operations .bt21278-family-operations-summary > .card {
  min-height:190px!important;
  height:190px!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
}
#family-operations .bt21277-family-active-card .list-stack {
  min-height:0!important;
  max-height:128px!important;
  overflow:auto!important;
  scrollbar-gutter:stable!important;
}
#family-operations .bt21278-family-legacy-card {
  gap:6px!important;
}
#family-operations .bt21278-family-legacy-card > p.muted {
  font:500 11px/1.35 Inter,"Segoe UI",sans-serif!important;
}
#family-operations .bt21278-family-work-metrics {
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:6px!important;
}
#family-operations .bt21278-family-work-metrics > div {
  min-width:0!important;
  padding:6px 7px!important;
  border:1px solid rgba(207,166,74,.2)!important;
  border-radius:8px!important;
  background:rgba(255,255,255,.025)!important;
}
#family-operations .bt21278-family-work-metrics span {
  display:block!important;
  color:var(--muted,#c6b78f)!important;
  font:700 9px/1.15 Inter,"Segoe UI",sans-serif!important;
  letter-spacing:.05em!important;
  text-transform:uppercase!important;
}
#family-operations .bt21278-family-work-metrics strong {
  display:block!important;
  margin-top:3px!important;
  color:var(--text,#f4ecd8)!important;
  font:800 11px/1.15 Inter,"Segoe UI",sans-serif!important;
}
#family-operations .bt21278-legacy-actions {
  margin-top:auto!important;
  justify-content:flex-start!important;
}
#family-operations .bt21278-legacy-actions .primary.small {
  width:auto!important;
  min-width:132px!important;
  min-height:31px!important;
  height:31px!important;
  padding:5px 12px!important;
  font:800 11px/1 Inter,"Segoe UI",sans-serif!important;
}

/* Heat Recovery on Family Operations uses the same visual language as the
   Personal Operations card, but no selector is borrowed from #operations. */
#family-operations [data-bt21278-family-heat] {
  display:flex!important;
  flex-direction:column!important;
  gap:8px!important;
}
#family-operations [data-bt21278-family-heat][data-critical="1"] {
  border-color:rgba(196,76,65,.55)!important;
  box-shadow:inset 0 0 0 1px rgba(196,76,65,.12)!important;
}
#family-operations [data-bt21278-family-heat] .bt21262-heat-copy {
  margin:0!important;
  font:500 11px/1.36 Inter,"Segoe UI",sans-serif!important;
}
#family-operations [data-bt21278-family-heat] .bt21262-heat-controls {
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(128px,168px)!important;
  gap:8px!important;
  align-items:end!important;
  margin-top:auto!important;
}
#family-operations [data-bt21278-family-heat] .bt21262-heat-metrics {
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:5px!important;
}
#family-operations [data-bt21278-family-heat] .bt21262-heat-metrics > div {
  min-width:0!important;
  padding:6px 7px!important;
  border:1px solid rgba(207,166,74,.18)!important;
  border-radius:8px!important;
  background:rgba(255,255,255,.02)!important;
}
#family-operations [data-bt21278-family-heat] .bt21262-heat-metrics span {
  display:block!important;
  font:700 9px/1.1 Inter,"Segoe UI",sans-serif!important;
  letter-spacing:.05em!important;
  text-transform:uppercase!important;
  color:var(--muted,#c6b78f)!important;
  white-space:nowrap!important;
}
#family-operations [data-bt21278-family-heat] .bt21262-heat-metrics strong {
  display:block!important;
  margin-top:3px!important;
  font:800 11px/1.1 Inter,"Segoe UI",sans-serif!important;
  white-space:nowrap!important;
}
#family-operations [data-bt21278-family-heat] .bt21262-heat-action {
  width:100%!important;
  min-height:31px!important;
  height:31px!important;
  padding:5px 9px!important;
  font:800 11px/1 Inter,"Segoe UI",sans-serif!important;
  white-space:nowrap!important;
}

/* Family-wide Operation perks are valid on both Personal and Family work. */
#family-operations .bt21278-family-perks-card {
  display:flex!important;
  flex-direction:column!important;
  gap:8px!important;
}
#family-operations .bt21278-family-perks-card .bt21268-operation-perks-list {
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:6px!important;
  min-height:0!important;
  overflow:auto!important;
  scrollbar-gutter:stable!important;
}
#family-operations .bt21278-family-perks-card .bt21268-operation-perk {
  min-width:0!important;
  padding:7px 8px!important;
}
#family-operations .bt21278-family-perks-card .bt21268-operation-perk strong {
  font:800 10px/1.15 Inter,"Segoe UI",sans-serif!important;
}
#family-operations .bt21278-family-perks-card .bt21268-operation-perk span {
  font:600 9.5px/1.2 Inter,"Segoe UI",sans-serif!important;
}

/* Never wrap the Active-perk count on either Operations page. */
#operations [data-bt21269-perk-count],
#family-operations [data-bt21278-perk-count] {
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex:0 0 auto!important;
  min-width:82px!important;
  width:82px!important;
  max-width:none!important;
  white-space:nowrap!important;
  word-break:normal!important;
  overflow:visible!important;
  flex-wrap:nowrap!important;
  padding-left:9px!important;
  padding-right:9px!important;
}

/* Family Operation launch feedback exactly mirrors Personal Operations. */
#family-operations [data-operation-launch] {
  position:relative!important;
  overflow:hidden!important;
  isolation:isolate!important;
}
#family-operations [data-operation-launch].phase21112-operation-clicked {
  animation:phase21112OperationClick .42s ease!important;
  box-shadow:0 0 0 2px rgba(212,169,83,.34),0 0 20px rgba(212,169,83,.25)!important;
  opacity:1!important;
}
#family-operations [data-operation-launch][data-operation-feedback]::after {
  content:attr(data-operation-feedback)!important;
  position:absolute!important;
  inset:0!important;
  z-index:2!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:inherit!important;
  background:linear-gradient(135deg,#98712d,#c89d4d)!important;
  color:#15100a!important;
  font-weight:900!important;
  letter-spacing:.035em!important;
  pointer-events:none!important;
  white-space:nowrap!important;
}
@media (prefers-reduced-motion:reduce) {
  #family-operations [data-operation-launch].phase21112-operation-clicked { animation:none!important; }
}

@media (max-width:1180px) {
  #family-operations .bt21278-family-operations-summary { grid-template-columns:1fr!important; }
  #family-operations .bt21278-family-operations-summary > .card { height:auto!important; min-height:180px!important; }
}
@media (max-width:720px) {
  #family-operations [data-bt21278-family-heat] .bt21262-heat-controls { grid-template-columns:1fr!important; }
  #family-operations .bt21278-family-work-metrics,
  #family-operations .bt21278-family-perks-card .bt21268-operation-perks-list { grid-template-columns:1fr!important; }
}

/* -------------------------------------------------------------------------
   Build 21.279 — compact, aligned Personal/Family Operations summaries.
   Keep page hierarchy full-width and put the working-status cards in one row.
--------------------------------------------------------------------------- */

/* Family-member Personal Operations: never allow old layout generations to
   split the hero/catalog into left/right columns. Every direct page section
   owns the full content width. */
#operations.bt21277-personal-route .page-stack {
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:10px!important;
  width:100%!important;
  max-width:none!important;
}
#operations.bt21277-personal-route .page-stack > * {
  grid-column:1 / -1!important;
  min-width:0!important;
  width:100%!important;
  max-width:none!important;
}

/* The existing canonical summary row stays in place so Heat/Legacy update
   owners can keep finding it, but its hero now occupies the full first row.
   Active Personal Operations, Lay Low, and Legacy Perks form the compact row
   directly beneath it. */
#operations.bt21277-personal-route .bt21240-operations-summary-row.bt21269-final-summary,
#operations.bt21277-personal-route .operations-summary-row2138.bt21269-final-summary,
#operations.bt21277-personal-route .operations-summary-row2136.bt21269-final-summary,
#operations.bt21277-personal-route .phase2138-summary-row.bt21269-final-summary,
#operations.bt21277-personal-route .phase2136-summary-row.bt21269-final-summary {
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:10px!important;
  align-items:stretch!important;
  width:100%!important;
}
#operations.bt21277-personal-route .bt21269-final-summary > .section-hero,
#operations.bt21277-personal-route .bt21269-final-summary > .phase2138-compact-hero,
#operations.bt21277-personal-route .bt21269-final-summary > .phase2136-compact-hero {
  grid-column:1 / -1!important;
  order:0!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  margin:0!important;
}
#operations.bt21277-personal-route .bt21269-final-summary > .operations-active-fixed-panel,
#operations.bt21277-personal-route .bt21269-final-summary > .operations-active-card-stable {
  grid-column:1!important;
  order:1!important;
}
#operations.bt21277-personal-route .bt21269-final-summary > [data-bt21262-heat-recovery] {
  grid-column:2!important;
  order:2!important;
}
#operations.bt21277-personal-route .bt21269-final-summary > [data-bt21268-operation-perks],
#operations.bt21277-personal-route .bt21269-final-summary > [data-bt21269-operation-perks] {
  grid-column:3!important;
  order:3!important;
}
#operations.bt21277-personal-route .bt21269-final-summary > .operations-active-fixed-panel,
#operations.bt21277-personal-route .bt21269-final-summary > .operations-active-card-stable,
#operations.bt21277-personal-route .bt21269-final-summary > [data-bt21262-heat-recovery],
#operations.bt21277-personal-route .bt21269-final-summary > [data-bt21268-operation-perks],
#operations.bt21277-personal-route .bt21269-final-summary > [data-bt21269-operation-perks] {
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  height:168px!important;
  min-height:168px!important;
  max-height:168px!important;
  margin:0!important;
  overflow:hidden!important;
  padding:11px 12px!important;
}
#operations.bt21277-personal-route .operations-active-fixed-panel .section-head,
#operations.bt21277-personal-route .operations-active-card-stable .section-head,
#operations.bt21277-personal-route [data-bt21262-heat-recovery] .section-head,
#operations.bt21277-personal-route .bt21268-operation-perks-card .section-head {
  margin-bottom:6px!important;
}
#operations.bt21277-personal-route .operations-active-fixed-panel .list-stack,
#operations.bt21277-personal-route .operations-active-card-stable .list-stack {
  min-height:0!important;
  max-height:102px!important;
  overflow:auto!important;
  scrollbar-gutter:stable!important;
}
#operations.bt21277-personal-route [data-bt21262-heat-recovery] .bt21262-heat-copy {
  font-size:10.5px!important;
  line-height:1.25!important;
  min-height:0!important;
  margin:0 0 5px!important;
}
#operations.bt21277-personal-route [data-bt21262-heat-recovery] .bt21262-heat-metrics {
  gap:4px!important;
  margin:0 0 6px!important;
}
#operations.bt21277-personal-route [data-bt21262-heat-recovery] .bt21262-heat-metrics > div {
  padding:5px 6px!important;
}
#operations.bt21277-personal-route [data-bt21262-heat-recovery] .bt21262-heat-action {
  min-height:29px!important;
  height:29px!important;
}
#operations.bt21277-personal-route .bt21268-operation-perks-card .bt21268-operation-perks-list {
  gap:5px!important;
  overflow:auto!important;
  scrollbar-gutter:stable!important;
}
#operations.bt21277-personal-route .bt21268-operation-perks-card .bt21268-operation-perk {
  min-height:31px!important;
  padding:5px 7px!important;
}

/* Available Personal Operations always follows the compact status row and
   remains a true full-width catalog. */
#operations.bt21277-personal-route [data-bt21234-personal-operations] {
  grid-column:1 / -1!important;
  order:10!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  margin:0!important;
}
#operations.bt21277-personal-route [data-bt21234-personal-operations] .bt21240-personal-op-grid,
#operations.bt21277-personal-route [data-bt21234-personal-operations] .bt21234-personal-op-grid {
  width:100%!important;
  max-width:none!important;
}

/* Family Operations: all four working/status cards share one compact row. */
#family-operations .bt21278-family-operations-summary {
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:10px!important;
  align-items:stretch!important;
  width:100%!important;
}
#family-operations .bt21278-family-operations-summary > .card,
#family-operations .bt21278-family-operations-summary > .section-card {
  box-sizing:border-box!important;
  min-width:0!important;
  width:100%!important;
  height:168px!important;
  min-height:168px!important;
  max-height:168px!important;
  margin:0!important;
  padding:11px 12px!important;
  overflow:hidden!important;
}
#family-operations .bt21278-family-operations-summary .section-head {
  margin:0 0 6px!important;
  gap:6px!important;
}
#family-operations .bt21278-family-operations-summary .section-head h3 {
  font-size:17px!important;
  line-height:1.03!important;
}
#family-operations .bt21278-family-operations-summary .section-head .eyebrow {
  margin-bottom:2px!important;
}
#family-operations .bt21277-family-active-card .list-stack {
  min-height:0!important;
  max-height:104px!important;
  overflow:auto!important;
  scrollbar-gutter:stable!important;
}

/* Build the Outfit is intentionally compact. The action is always visible,
   rather than being clipped below the card edge. */
#family-operations .bt21278-family-legacy-card {
  display:flex!important;
  flex-direction:column!important;
  gap:5px!important;
}
#family-operations .bt21278-family-legacy-card > p.muted {
  margin:0!important;
  font-size:10px!important;
  line-height:1.22!important;
  display:-webkit-box!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:2!important;
  overflow:hidden!important;
}
#family-operations .bt21278-family-work-metrics {
  gap:4px!important;
}
#family-operations .bt21278-family-work-metrics > div {
  padding:4px 6px!important;
}
#family-operations .bt21278-family-work-metrics span {
  font-size:8px!important;
  line-height:1.05!important;
}
#family-operations .bt21278-family-work-metrics strong {
  margin-top:2px!important;
  font-size:10.5px!important;
}
#family-operations .bt21277-weekly {
  gap:3px!important;
}
#family-operations .bt21277-weekly > div:first-child {
  font-size:9.5px!important;
}
#family-operations .bt21278-legacy-actions {
  margin-top:auto!important;
  width:100%!important;
}
#family-operations .bt21278-legacy-actions .primary.small {
  width:100%!important;
  min-width:0!important;
  min-height:28px!important;
  height:28px!important;
  padding:4px 9px!important;
  font-size:10.5px!important;
}

/* Compact Family Heat card. */
#family-operations [data-bt21278-family-heat] {
  gap:5px!important;
}
#family-operations [data-bt21278-family-heat] .bt21262-heat-copy {
  font-size:10px!important;
  line-height:1.22!important;
  margin:0 0 3px!important;
  min-height:0!important;
  display:-webkit-box!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:2!important;
  overflow:hidden!important;
}
#family-operations [data-bt21278-family-heat] .bt21262-heat-controls {
  grid-template-columns:1fr!important;
  gap:5px!important;
  margin-top:auto!important;
}
#family-operations [data-bt21278-family-heat] .bt21262-heat-metrics {
  gap:4px!important;
}
#family-operations [data-bt21278-family-heat] .bt21262-heat-metrics > div {
  padding:4px 5px!important;
}
#family-operations [data-bt21278-family-heat] .bt21262-heat-metrics span {
  font-size:8px!important;
}
#family-operations [data-bt21278-family-heat] .bt21262-heat-metrics strong {
  font-size:10.5px!important;
}
#family-operations [data-bt21278-family-heat] .bt21262-heat-action {
  min-height:28px!important;
  height:28px!important;
  font-size:10.5px!important;
}

/* Family-wide perk list: two clean rows, not run-together inline text. */
#family-operations .bt21278-family-perks-card .bt21268-operation-perks-list {
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:5px!important;
  min-height:0!important;
  max-height:106px!important;
  overflow:auto!important;
  scrollbar-gutter:stable!important;
}
#family-operations .bt21278-family-perks-card .bt21268-operation-perk {
  display:grid!important;
  grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr)!important;
  align-items:center!important;
  gap:6px!important;
  min-height:31px!important;
  padding:5px 7px!important;
  border:1px solid rgba(207,166,74,.25)!important;
  border-radius:8px!important;
  background:rgba(255,255,255,.025)!important;
}
#family-operations .bt21278-family-perks-card .bt21268-operation-perk strong {
  min-width:0!important;
  color:#f0cf78!important;
  font-size:9.5px!important;
}
#family-operations .bt21278-family-perks-card .bt21268-operation-perk span {
  min-width:0!important;
  color:var(--muted,#c6b78f)!important;
  font-size:9px!important;
  text-align:right!important;
}

@media (max-width:1280px) {
  #family-operations .bt21278-family-operations-summary {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  #operations.bt21277-personal-route .bt21269-final-summary {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  #operations.bt21277-personal-route .bt21269-final-summary > .section-hero,
  #operations.bt21277-personal-route .bt21269-final-summary > .phase2138-compact-hero,
  #operations.bt21277-personal-route .bt21269-final-summary > .phase2136-compact-hero {
    grid-column:1 / -1!important;
  }
  #operations.bt21277-personal-route .bt21269-final-summary > .operations-active-fixed-panel,
  #operations.bt21277-personal-route .bt21269-final-summary > .operations-active-card-stable { grid-column:1!important; }
  #operations.bt21277-personal-route .bt21269-final-summary > [data-bt21262-heat-recovery] { grid-column:2!important; }
  #operations.bt21277-personal-route .bt21269-final-summary > [data-bt21268-operation-perks],
  #operations.bt21277-personal-route .bt21269-final-summary > [data-bt21269-operation-perks] { grid-column:1 / -1!important; }
}
@media (max-width:760px) {
  #family-operations .bt21278-family-operations-summary,
  #operations.bt21277-personal-route .bt21269-final-summary {
    grid-template-columns:1fr!important;
  }
  #family-operations .bt21278-family-operations-summary > .card,
  #family-operations .bt21278-family-operations-summary > .section-card,
  #operations.bt21277-personal-route .bt21269-final-summary > .operations-active-fixed-panel,
  #operations.bt21277-personal-route .bt21269-final-summary > .operations-active-card-stable,
  #operations.bt21277-personal-route .bt21269-final-summary > [data-bt21262-heat-recovery],
  #operations.bt21277-personal-route .bt21269-final-summary > [data-bt21268-operation-perks],
  #operations.bt21277-personal-route .bt21269-final-summary > [data-bt21269-operation-perks] {
    grid-column:1!important;
    height:auto!important;
    min-height:150px!important;
    max-height:none!important;
  }
}
