/* Welcome-page sample chooser: compact, readable cards on desktop and mobile. */
#homeView #heroSamplePlanMenu { position: relative; width: min(100%, 760px); }
#homeView #heroSamplePlanMenu > summary { width: 100%; }
#homeView #heroSamplePlanMenu .sample-plan-menu-panel {
  box-sizing: border-box;
  left: 0;
  right: auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  max-height: min(58vh, 480px);
  overflow-y: auto;
  overscroll-behavior: contain;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid #d7e5df;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15,39,66,.16);
}
#homeView #heroSamplePlanMenu .sample-plan-menu-panel button {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 78px;
  padding: 13px 15px;
  border: 1px solid #e0e9e5;
  border-radius: 13px;
  background: #f8fbf9;
  font-size: 15px;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  transition: background-color .15s, border-color .15s;
}
#homeView #heroSamplePlanMenu .sample-plan-menu-panel button small {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  color: #526579;
}
#homeView #heroSamplePlanMenu .sample-plan-menu-panel button:hover,
#homeView #heroSamplePlanMenu .sample-plan-menu-panel button:focus-visible {
  background: #e9f6ef;
  border-color: #15996d;
}
#homeView #heroSamplePlanMenu .sample-plan-menu-panel button:focus-visible {
  outline: 2px solid #15996d;
  outline-offset: 2px;
}
@media (max-width: 760px) {
  #homeView #heroSamplePlanMenu .sample-plan-menu-panel {
    grid-template-columns: minmax(0,1fr);
    max-height: 55vh;
    gap: 7px;
    padding: 8px;
  }
  #homeView #heroSamplePlanMenu .sample-plan-menu-panel button { min-height: 64px; padding: 11px 13px; }
}

/* Mobile: use the same native disclosure/card chooser as desktop, rather
   than the separate select + load flow. This only affects the welcome page. */
@media (max-width: 760px) {
  #homeView #introSampleActions #heroSamplePlanMenu,
  #homeView #introSampleActions [data-s3-key="sample"] #heroSamplePlanMenu {
    display: block !important;
    width: 100%;
    min-width: 0;
  }
  #homeView #introSampleActions .hero-mobile-sample-select,
  #homeView #introSampleActions [data-s3-key="sample"] .hero-mobile-sample-select,
  #homeView #introSampleActions .hero-mobile-sample-button,
  #homeView #introSampleActions [data-s3-key="sample"] .hero-mobile-sample-button {
    display: none !important;
  }
  #homeView #heroSamplePlanMenu > summary {
    width: 100%;
    min-height: 52px;
    padding: 12px 42px 12px 18px;
    font-size: 16px;
  }
  #homeView #heroSamplePlanMenu .sample-plan-menu-panel {
    position: relative;
    inset: auto;
    width: 100%;
    max-width: 100%;
    max-height: min(52vh, 420px);
    margin-top: 8px;
    grid-template-columns: minmax(0, 1fr);
    padding: 8px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(15,39,66,.10);
  }
  #homeView #heroSamplePlanMenu:not([open]) .sample-plan-menu-panel { display: none; }
  #homeView #heroSamplePlanMenu .sample-plan-menu-panel button {
    min-height: 64px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fbf9;
    color: #17324a;
    font-size: 15px;
    font-weight: 750;
  }
  #homeView #heroSamplePlanMenu .sample-plan-menu-panel button small {
    color: #536779;
    font-size: 12px;
    font-weight: 500;
  }
}

/* The outer legacy disclosure duplicates the visible card-chooser button. */
@media (max-width: 760px) {
  #homeView #introSampleActions [data-s3-key="sample"] > summary {
    display: none !important;
  }
  #homeView #introSampleActions [data-s3-key="sample"] > .s3-scope {
    margin-top: 0;
  }
}

/* Mobile welcome: only the actual sample-card chooser is visible.
   The older outer disclosure and explanatory copy remain in the DOM for
   existing logic but do not occupy space on mobile. */
@media (max-width: 760px) {
  #homeView #introSampleActions [data-s3-key="sample"] > summary,
  #homeView #introSampleActions #samplePlanSummary {
    display: none !important;
  }
  #homeView #introSampleActions [data-s3-key="sample"] > .s3-scope {
    display: none !important;
  }
  #homeView #introSampleActions [data-s3-key="sample"] {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
}
