/* Final Stage 9 overrides must stay after the strategic-calendar layer. */

.event-chip.high .event-chip-hint {
  color: #29433d !important;
}

.release-day {
  padding-bottom: 6px;
}

.release-day .release-day-open,
.release-day .release-add-day {
  width: 30px;
  height: 30px;
  min-height: 30px;
}

.release-day .release-add-day {
  position: static;
  display: flex;
  margin: 6px 0 0 auto;
}

.release-day .release-chip,
.release-day .release-more {
  min-height: 24px;
}

.release-month.focused .release-day .release-chip {
  min-height: 28px;
}

/* 2026 product shell: dense, calm and built around the current task. */
.app-shell {
  grid-template-columns: 244px minmax(0, 1fr);
}

.sidebar {
  gap: 12px;
  padding: 16px 12px;
  background: #0d2529;
}

.brand {
  gap: 10px;
  padding: 2px 6px 14px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #56c3a9;
  box-shadow: none;
}

.brand strong {
  font-size: 15px;
}

.nav {
  gap: 12px;
}

.nav-section {
  gap: 2px;
}

.nav-section-label {
  padding: 0 8px 4px;
  color: rgba(231, 239, 237, 0.68);
}

.nav-item {
  min-height: 36px;
  border-radius: 6px;
  padding: 0 8px;
  font-size: 13px;
}

.nav-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.workspace {
  padding: 22px clamp(22px, 2.4vw, 40px) 40px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  margin-bottom: 16px;
  padding: 14px 0;
  background: rgba(244, 246, 247, 0.94);
  backdrop-filter: blur(14px);
}

.topbar h1[tabindex="-1"]:focus-visible {
  padding-left: 10px;
  border-left: 3px solid var(--accent);
  outline: 0;
}

.section-panel.current {
  gap: 14px;
}

.section-header {
  align-items: center;
  gap: 18px;
  padding: 2px 0 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.section-header h2 {
  font-size: 26px;
}

.section-header > .topbar-actions {
  flex: 0 1 auto;
  padding-left: 0;
  border-left: 0;
}

.section-description {
  max-width: 760px;
}

.section-view-tabs {
  width: 100%;
  padding: 3px;
  border-color: var(--line-soft);
  border-radius: 7px;
  background: #e9edee;
}

.section-view-tab {
  min-height: 40px;
  border-radius: 5px;
  padding: 0 13px;
}

.section-view-tab.active {
  color: var(--accent-strong);
  box-shadow: 0 1px 3px rgba(20, 27, 31, 0.12);
}

[data-section-view-panel] {
  min-width: 0;
}

:is(#xboxPlanPanel, #psPlanPanel, #steamPlanPanel, #epicPlanPanel, #switchPlanPanel) {
  display: grid;
  gap: 14px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: var(--panel-border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--panel-shadow);
}

.stat-card {
  min-height: 84px;
  padding: 12px 15px;
  border: 0;
  border-right: 1px solid var(--line-soft);
  border-radius: 0;
  box-shadow: none;
}

.stat-card:last-child {
  border-right: 0;
}

.stat-card strong {
  margin: 5px 0 2px;
  font-size: 25px;
}

.stat-card::after,
.platform-command-card::after {
  display: none;
}

.decision-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.decision-card {
  min-height: 84px;
  gap: 4px;
  padding: 12px 13px;
  border-radius: 7px;
  box-shadow: none;
}

.decision-card strong {
  margin: 2px 0;
  font-size: 24px;
}

.decision-card::after {
  display: none;
}

.platform-guide {
  background: var(--surface);
  box-shadow: none;
}

.platform-command-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: var(--panel-border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--panel-shadow);
}

.platform-command-card {
  min-height: 84px;
  gap: 4px;
  padding: 12px 14px;
  border: 0;
  border-right: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.platform-command-card:last-child {
  border-right: 0;
}

.platform-command-card.good,
.platform-command-card.risk {
  border-top: 0;
  border-bottom: 0;
  border-left: 0;
}

.platform-command-card strong {
  font-size: 19px;
}

.platform-command-card span,
.platform-command-card small {
  font-size: 11px;
}

.xbox-main {
  gap: 14px;
}

.xbox-family-toolbar,
.compact-header {
  align-items: end;
  min-height: 0;
  padding: 4px 0;
}

.xbox-family-toolbar h2,
.compact-header h2 {
  font-size: 19px;
}

.xbox-family-toolbar .eyebrow,
.compact-header .eyebrow {
  margin-bottom: 3px;
}

.xbox-family-grid {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 1px 1px 7px;
  scroll-snap-type: x proximity;
}

.xbox-family-grid .family-card {
  flex: 0 0 min(220px, 72vw);
  min-height: 68px;
  padding: 10px 12px;
  border-radius: 7px;
  box-shadow: none;
  scroll-snap-align: start;
}

#productCatalogPanel .library-layout {
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

#productFamilyGrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 8px;
  max-height: calc(100vh - 250px);
  min-height: 240px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 1px 7px 1px 1px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

#productFamilyGrid .family-card {
  min-height: 76px;
  padding: 12px 14px;
  box-shadow: none;
}

.family-card.selected {
  box-shadow: inset 0 0 0 1px var(--accent);
}

.xbox-check-panel {
  padding: 13px;
  box-shadow: none;
}

.xbox-check-panel h2 {
  font-size: 17px;
}

#xboxWarnings,
#psWarnings,
#steamWarnings,
#epicWarnings,
#xboxSuggestions {
  max-height: min(34vh, 320px);
  overflow-y: auto;
  padding-right: 3px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.xbox-suggestion-panel .empty-state,
#xboxSuggestions > .empty-state {
  min-height: 88px;
  padding: 14px;
}

.opportunity-panel,
.ps-inbox-panel {
  margin-bottom: 0;
  padding: 13px;
  border-radius: 8px;
  box-shadow: none;
}

.ps-inbox-kpis {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--surface);
}

.ps-inbox-kpis span {
  border: 0;
  border-right: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
}

.ps-inbox-kpis span:last-child {
  border-right: 0;
}

.ps-inbox-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 11px 13px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  background: var(--surface-raised);
}

.ps-inbox-empty strong,
.ps-inbox-empty span {
  margin: 0;
}

.ps-inbox-empty span {
  color: var(--muted);
  font-size: 12px;
}

.opportunity-list {
  padding-right: 0;
}

.opportunity-card {
  display: block;
  padding: 0;
  overflow: hidden;
}

.opportunity-card > summary {
  list-style: none;
  padding: 12px 13px;
  cursor: pointer;
}

.opportunity-card > summary::-webkit-details-marker {
  display: none;
}

.opportunity-card > summary:hover {
  background: rgba(255, 255, 255, 0.55);
}

.opportunity-card > summary:focus-visible {
  outline: 3px solid rgba(31, 122, 104, 0.34);
  outline-offset: -3px;
}

.opportunity-card[open] > summary {
  border-bottom: 1px solid var(--line-soft);
}

.opportunity-summary-meta {
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  color: var(--muted);
}

.opportunity-summary-meta strong {
  color: var(--ink);
  font-size: 16px;
}

.opportunity-summary-meta small {
  font-size: 11px;
  font-weight: 700;
}

.opportunity-summary-meta span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  font-size: 18px;
  transition: transform 0.15s ease;
}

.opportunity-card[open] .opportunity-summary-meta span {
  transform: rotate(180deg);
}

.opportunity-event-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 13px 0;
}

.opportunity-event-toolbar > span {
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.opportunity-card > .opportunity-candidates {
  padding: 10px 13px 13px;
}

.campaign-table-wrap {
  max-height: min(68vh, 760px);
  box-shadow: none;
}

.campaign-table th,
.campaign-table td {
  padding: 10px 12px;
}

.campaign-table tbody tr:hover td {
  background: #f7f9f9;
}

.empty-state {
  border-style: solid;
  background: var(--surface-raised);
}

/* Platform workspaces keep warnings above the full-width planning canvas. */
@media (min-width: 761px) {
  :is(#xboxPlanPanel, #psPlanPanel, #steamPlanPanel, #epicPlanPanel, #switchPlanPanel) > .xbox-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  :is(#xboxPlanPanel, #psPlanPanel, #steamPlanPanel, #epicPlanPanel, #switchPlanPanel) > .xbox-layout > .xbox-side {
    position: static;
    top: auto;
    order: -1;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
  }
}

@media (min-width: 1101px) and (max-width: 1320px) {
  .app-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .workspace {
    padding-right: 18px;
    padding-left: 18px;
  }

  .section-header {
    flex-wrap: wrap;
  }

  .section-header > div:first-child {
    flex-basis: 100%;
    max-width: none;
  }

  .section-header > .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

}

@media (min-width: 1101px) and (max-width: 1540px) {
  #productCatalogPanel .library-layout {
    grid-template-columns: minmax(190px, 220px) minmax(0, 1fr);
  }

  .product-status-row {
    grid-template-columns: minmax(150px, 1.35fr) 128px minmax(110px, 1fr) 58px 68px;
    gap: 8px;
  }

  .platform-matrix-head,
  .platform-matrix-row {
    grid-template-columns: minmax(150px, 1.35fr) repeat(5, minmax(96px, 1fr));
    min-width: 0;
  }

  #productFamilyDetail .product-platform-overview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #productFamilyDetail .family-workbench {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .workspace {
    padding: 0 22px 32px;
  }

  .platform-command-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .platform-command-card:nth-child(2) {
    border-right: 0;
  }

  .platform-command-card:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line-soft);
  }

  #productCatalogPanel .library-layout {
    grid-template-columns: 1fr;
  }

  #productFamilyGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 300px;
    min-height: 0;
  }
}

@media (max-width: 760px) {
  .workspace {
    padding: 0 12px 24px;
  }

  .section-panel.current {
    gap: 12px;
  }

  .section-header {
    align-items: stretch;
    padding-bottom: 4px;
  }

  .section-header h2 {
    font-size: 22px;
  }

  .section-header > .topbar-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .section-header > .topbar-actions .primary-button,
  .section-header > .topbar-actions .secondary-button {
    min-width: 0;
  }

  .section-view-tabs {
    overflow-x: auto;
  }

  .switch-status-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .decision-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-card:nth-child(2) {
    border-right: 0;
  }

  .stat-card:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line-soft);
  }

  .platform-command-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .platform-command-card {
    min-height: 74px;
    padding: 10px;
  }

  .ps-inbox-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ps-inbox-kpis span:nth-child(2) {
    border-right: 0;
  }

  .ps-inbox-kpis span:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line-soft);
  }

  .xbox-family-grid {
    display: flex;
    grid-template-columns: none;
  }

  #productFamilyGrid {
    grid-template-columns: 1fr;
    max-height: 260px;
  }

  .campaign-table-wrap {
    max-height: 64vh;
  }
}

@media (max-width: 430px) {
  .decision-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .decision-card {
    min-height: 96px;
    padding: 11px;
  }

  .decision-card span,
  .decision-card small {
    font-size: 11px;
  }

  .platform-command-grid {
    grid-template-columns: 1fr;
  }

  .platform-command-card {
    grid-template-columns: 1fr auto;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .platform-command-card:last-child {
    border-bottom: 0;
  }

  .platform-command-card span,
  .platform-command-card small {
    grid-column: 1 / -1;
  }

  .opportunity-main {
    align-items: flex-start;
  }

  .opportunity-main h3 {
    font-size: 15px;
  }

  .opportunity-summary-meta small {
    display: none;
  }

  .ps-inbox-empty {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }
}
