/* Stable startup presentation, independent of the application bundle.
   All selectors are scoped; no body/root overlay or application visibility rules.
   Recovery is opt-in: the watchdog removes the panel's hidden attribute. */
.bp-startup,
#bp-recovery-panel {
  --bp-boot-navy: #122b50;
  --bp-boot-blue: #2563c3;
  --bp-boot-coral: #e65359;
  --bp-boot-muted: #53647c;
  --bp-boot-line: #e7edf4;
  box-sizing: border-box;
  color: var(--bp-boot-navy);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  text-align: left;
  overflow-wrap: anywhere;
  color-scheme: light;
}

.bp-startup *,
#bp-recovery-panel * {
  box-sizing: border-box;
}

/* Preserve native hidden semantics even if other stylesheet rules set display. */
#bp-startup[hidden],
#bp-recovery-panel[hidden],
#bp-recovery-action[hidden] {
  display: none !important;
}

.bp-startup {
  width: 100%;
  min-height: 100svh;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

.bp-startup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 100px;
  padding: 22px 40px;
  border-bottom: 1px solid var(--bp-boot-line);
  background: #fff;
}

.bp-startup-brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 13px;
}

.bp-startup-logo {
  flex: 0 0 auto;
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 12px;
}

.bp-startup-wordmark {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 750;
  letter-spacing: -0.8px;
}

.bp-startup-brand-caption {
  margin: 5px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--bp-boot-muted);
}

.bp-startup-header-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid var(--bp-boot-line);
  border-radius: 999px;
  color: var(--bp-boot-muted);
  font-size: 12px;
  line-height: 1.5;
}

.bp-startup-status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--bp-boot-blue);
}

.bp-startup-layout {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  min-height: calc(100svh - 100px);
}

/* Empty, screen-reader-hidden decoration; never includes account or case data. */
.bp-startup-sidebar {
  display: block;
  padding: 38px 23px;
  border-right: 1px solid var(--bp-boot-line);
  background: #fcfdff;
}

.bp-startup-sidebar-label {
  width: 69px;
  height: 7px;
  margin: 0 14px 24px;
}

.bp-startup-nav-placeholder {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 44px;
  padding: 12px 14px;
  margin-bottom: 9px;
  border-radius: 9px;
}

.bp-startup-nav-placeholder-active {
  background: #edf3fc;
  box-shadow: inset 3px 0 var(--bp-boot-blue);
}

.bp-startup-nav-placeholder span {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  border: 2px solid #d9e3ef;
  border-radius: 5px;
}

.bp-startup-nav-placeholder i {
  width: 74px;
  max-width: 100%;
  height: 7px;
  border-radius: 6px;
  background: #e7edf4;
}

.bp-startup-nav-placeholder-active span {
  border-color: #b3c9e9;
}

.bp-startup-nav-placeholder-active i {
  background: #c8d9f0;
}

.bp-startup-sidebar-rule {
  height: 1px;
  margin: 27px 13px;
  background: var(--bp-boot-line);
}

.bp-startup-content {
  width: 100%;
  min-width: 0;
  grid-column: 2;
  max-width: 1240px;
  margin: 0 auto;
  padding: 64px clamp(24px, 4.6vw, 76px) 28px;
}

.bp-startup-intro {
  margin-bottom: 38px;
}

.bp-startup-eyebrow,
.bp-recovery-eyebrow {
  margin: 0 0 15px;
  color: var(--bp-boot-blue);
  font-size: 11px;
  line-height: 1.5;
  font-weight: 750;
  letter-spacing: 1.5px;
}

.bp-startup-title {
  margin: 0 0 18px;
  color: var(--bp-boot-navy);
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -1.2px;
}

.bp-startup-description {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  max-width: 520px;
  margin: 0;
  color: var(--bp-boot-muted);
  font-size: 15px;
  line-height: 1.7;
}

.bp-startup-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin-top: 5px;
  border: 2px solid #dfe8f5;
  border-top-color: var(--bp-boot-blue);
  border-right-color: var(--bp-boot-blue);
  border-radius: 50%;
}

.bp-startup-preview {
  display: block;
}

.bp-startup-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.bp-startup-summary-card,
.bp-startup-workspace-card {
  min-width: 0;
  border: 1px solid var(--bp-boot-line);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 3px 12px #122b5003;
}

.bp-startup-summary-card {
  padding: 25px;
}

.bp-startup-placeholder {
  display: block;
  border-radius: 5px;
  background: #edf1f6;
}

.bp-startup-placeholder-label {
  width: 58%;
  height: 8px;
  margin-bottom: 24px;
}

.bp-startup-placeholder-value {
  width: 42%;
  height: 23px;
  margin-bottom: 14px;
  background: #e4ebf4;
}

.bp-startup-placeholder-detail {
  width: 73%;
  height: 6px;
}

.bp-startup-workspace-card {
  padding: 0 26px;
}

.bp-startup-workspace-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 74px;
  border-bottom: 1px solid var(--bp-boot-line);
}

.bp-startup-workspace-heading > :first-child {
  width: 145px;
  max-width: 55%;
  height: 11px;
}

.bp-startup-workspace-heading > :last-child {
  width: 52px;
  height: 8px;
}

.bp-startup-workspace-row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 85px;
  border-bottom: 1px solid #f0f3f7;
}

.bp-startup-workspace-row:last-child {
  border-bottom: 0;
}

.bp-startup-placeholder-icon {
  width: 34px;
  height: 38px;
  border-radius: 7px;
  flex: 0 0 auto;
}

.bp-startup-row-lines {
  flex: 1;
  min-width: 0;
}

.bp-startup-row-lines i:first-child {
  width: 57%;
  height: 9px;
  margin-bottom: 12px;
}

.bp-startup-row-lines i:last-child {
  width: 36%;
  height: 6px;
}

.bp-startup-placeholder-pill {
  width: 66px;
  height: 22px;
  border-radius: 999px;
  flex: 0 0 auto;
  background: #eff4fb;
}

.bp-startup-footnote {
  margin: 30px 0 0;
  color: #63738a;
  font-size: 12px;
  line-height: 1.6;
}

.bp-startup-footnote::before {
  display: inline-block;
  width: 15px;
  height: 3px;
  margin: 0 9px 3px 0;
  border-radius: 3px;
  background: var(--bp-boot-coral);
  content: "";
}

/* Shared with an independent watchdog-created panel. Nothing is shown until
   the watchdog inserts the panel or explicitly clears its hidden attribute. */
#bp-recovery-panel {
  width: 100%;
  max-width: 600px;
  margin: 0 0 30px;
  padding: 0;
  font-size: 16px;
  line-height: 1.6;
  background: #fff;
  border: 1px solid #eadfe3;
  border-top: 3px solid var(--bp-boot-coral);
  border-radius: 13px;
  box-shadow: 0 8px 28px #122b5008;
}

#bp-recovery-panel > div {
  width: 100%;
  min-width: 0;
  padding: 26px;
}

#bp-recovery-panel .bp-recovery-eyebrow {
  margin-bottom: 10px;
  color: #9c3944;
}

#bp-recovery-title {
  margin: 0 0 10px;
  color: var(--bp-boot-navy);
  font-size: clamp(21px, 3vw, 26px);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.5px;
}

#bp-recovery-message {
  margin: 0;
  color: var(--bp-boot-muted);
  font-size: 15px;
  line-height: 1.7;
}

#bp-recovery-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  max-width: 100%;
  margin: 20px 0 0;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--bp-boot-navy);
  color: #fff;
  font:
    600 14px/1.5 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    system-ui,
    sans-serif;
  text-decoration: none;
  cursor: pointer;
}

#bp-recovery-action:hover {
  background: #1b4276;
}

#bp-recovery-action:focus-visible {
  outline: 3px solid var(--bp-boot-blue);
  outline-offset: 4px;
}

.bp-startup-noscript {
  max-width: 600px;
  margin: 24px 0 0;
  padding: 16px 20px;
  border-left: 3px solid var(--bp-boot-coral);
  background: #fff6f5;
  color: var(--bp-boot-navy);
}

@media (max-width: 960px) {
  .bp-startup-layout {
    grid-template-columns: 176px minmax(0, 1fr);
  }
  .bp-startup-sidebar {
    padding-right: 16px;
    padding-left: 16px;
  }
  .bp-startup-summary-grid {
    gap: 12px;
  }
  .bp-startup-summary-card {
    padding: 20px 16px;
  }
}

@media (max-width: 700px) {
  .bp-startup-header {
    min-height: 90px;
    padding: 20px 22px;
  }
  .bp-startup-header-label {
    display: none;
  }
  .bp-startup-layout {
    display: block;
    min-height: calc(100svh - 90px);
  }
  .bp-startup-sidebar {
    display: none;
  }
  .bp-startup-content {
    padding: 42px 22px 28px;
  }
  .bp-startup-intro {
    margin-bottom: 30px;
  }
  .bp-startup-summary-grid {
    gap: 9px;
    margin-bottom: 18px;
  }
  .bp-startup-summary-card {
    padding: 21px 13px;
  }
  .bp-startup-placeholder-label {
    width: 78%;
  }
  .bp-startup-placeholder-value {
    width: 60%;
    height: 19px;
  }
  .bp-startup-workspace-card {
    padding: 0 18px;
  }
  .bp-startup-workspace-row {
    gap: 12px;
  }
  .bp-startup-placeholder-pill {
    width: 43px;
    height: 18px;
  }
  .bp-startup-row-lines i:first-child {
    width: 80%;
  }
  .bp-startup-row-lines i:last-child {
    width: 56%;
  }
  #bp-recovery-panel > div {
    padding: 22px;
  }
}

@media (max-width: 360px) {
  .bp-startup-header {
    padding-right: 16px;
    padding-left: 16px;
  }
  .bp-startup-content {
    padding-right: 16px;
    padding-left: 16px;
  }
  .bp-startup-logo {
    width: 40px;
    height: 40px;
  }
  .bp-startup-brand-caption {
    font-size: 11px;
  }
  .bp-startup-summary-card {
    padding-right: 10px;
    padding-left: 10px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .bp-startup-spinner {
    animation: bp-boot-spin 1.2s linear infinite;
  }
  #bp-recovery-action {
    transition: transform 140ms ease-out;
  }
  #bp-recovery-action:active {
    transform: scale(0.98);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bp-startup-spinner {
    animation: none;
  }
  #bp-recovery-action {
    transition: none;
  }
}

@keyframes bp-boot-spin {
  to {
    transform: rotate(360deg);
  }
}
